mirror of
https://github.com/curl/curl.git
synced 2026-08-25 15:33:39 +03:00
tool_getparam: refactored, simplified
- add dedicated option functions for bools/none/strings
- simplify clearing (some) arguments, use '*' instead of ' '
- scripts/top-complexity: remove getparameter from whitelist
- handle --help separately
- getstr and getstrn do not allow a NULL input
- improve the ;auto check, it needs to be trailing
- add toggle bit helper function
- unify an error message for bad --no- use
- introduce generic handling of deprecated options: ARG_DEPR
- handle --no- prefix on more booleans:
--cert-status
--doh-cert-status
--false-start
--mptcp
--ssl-no-revoke
--ssl-revoke-best-effort
--tcp-fastopen
Closes #17448
This commit is contained in:
parent
6eea7219a5
commit
698491f444
6 changed files with 1208 additions and 1233 deletions
|
|
@ -172,8 +172,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
|||
#ifdef DEBUG_CONFIG
|
||||
fprintf(tool_stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
|
||||
#endif
|
||||
res = getparameter(option, param, NULL, NULL,
|
||||
&usedarg, global, operation);
|
||||
res = getparameter(option, param, &usedarg, global, operation);
|
||||
operation = global->last;
|
||||
|
||||
if(!res && param && *param && !usedarg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue