mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:53:54 +03:00
tool_getparam: reduce opt_string complexity
- move arguments taking unsigned numbers into opt_num - move arugments taking seconds into opt_secs Closes #21261
This commit is contained in:
parent
4c9af8b6d1
commit
80b2a5dd37
2 changed files with 136 additions and 91 deletions
|
|
@ -317,8 +317,10 @@ typedef enum {
|
|||
#define ARG_BOOL 1 /* accepts a --no-[name] prefix */
|
||||
#define ARG_STRG 2 /* requires an argument */
|
||||
#define ARG_FILE 3 /* requires an argument, usually a filename */
|
||||
#define ARG_SECS 4 /* requires a time in seconds */
|
||||
#define ARG_UNUM 5 /* requires a non-negative number */
|
||||
|
||||
#define ARG_TYPEMASK 0x03
|
||||
#define ARG_TYPEMASK 0x07
|
||||
#define ARGTYPE(x) ((x) & ARG_TYPEMASK)
|
||||
|
||||
#define ARG_DEPR 0x10 /* deprecated option */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue