cmdline: parse numerical options stricter
1 - str2offset() no longer accepts negative numbers since offsets are by nature positive. 2 - introduced str2unum() for the command line parser that accepts numericals which are not supposed to be negative, so that it will properly complain on apparent bad uses and mistakes. Bug: http://curl.haxx.se/mail/archive-2012-07/0013.html
This commit is contained in:
@@ -32,6 +32,7 @@ ParameterError file2memory(char **bufp, size_t *size, FILE *file);
|
||||
void cleanarg(char *str);
|
||||
|
||||
int str2num(long *val, const char *str);
|
||||
int str2unum(long *val, const char *str); /* for unsigned input numbers */
|
||||
|
||||
long proto2num(struct Configurable *config, long *val, const char *str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user