mirror of
https://github.com/curl/curl.git
synced 2026-08-02 19:50:29 +03:00
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:
parent
e5843470e8
commit
f2b6ebed7b
5 changed files with 78 additions and 34 deletions
|
|
@ -32,6 +32,7 @@ typedef enum {
|
|||
PARAM_HELP_REQUESTED,
|
||||
PARAM_GOT_EXTRA_PARAMETER,
|
||||
PARAM_BAD_NUMERIC,
|
||||
PARAM_NEGATIVE_NUMERIC,
|
||||
PARAM_LIBCURL_DOESNT_SUPPORT,
|
||||
PARAM_NO_MEM,
|
||||
PARAM_LAST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue