mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
tool_getparam: Moved tool_version_info() call into operate()
This commit is contained in:
parent
e6e8b14405
commit
c10bf9bb36
@ -1701,10 +1701,8 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
config->tracetype = TRACE_NONE;
|
config->tracetype = TRACE_NONE;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
if(toggle) { /* --no-version yields no output! */
|
if(toggle) /* --no-version yields no output! */
|
||||||
tool_version_info();
|
return PARAM_VERSION_INFO_REQUESTED;
|
||||||
return PARAM_HELP_REQUESTED;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'w':
|
case 'w':
|
||||||
@ -1866,6 +1864,7 @@ ParameterError parse_args(struct Configurable *config, int argc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(result && result != PARAM_HELP_REQUESTED &&
|
if(result && result != PARAM_HELP_REQUESTED &&
|
||||||
|
result != PARAM_VERSION_INFO_REQUESTED &&
|
||||||
result != PARAM_ENGINES_REQUESTED) {
|
result != PARAM_ENGINES_REQUESTED) {
|
||||||
const char *reason = param2text(result);
|
const char *reason = param2text(result);
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ typedef enum {
|
|||||||
PARAM_REQUIRES_PARAMETER,
|
PARAM_REQUIRES_PARAMETER,
|
||||||
PARAM_BAD_USE,
|
PARAM_BAD_USE,
|
||||||
PARAM_HELP_REQUESTED,
|
PARAM_HELP_REQUESTED,
|
||||||
|
PARAM_VERSION_INFO_REQUESTED,
|
||||||
PARAM_ENGINES_REQUESTED,
|
PARAM_ENGINES_REQUESTED,
|
||||||
PARAM_GOT_EXTRA_PARAMETER,
|
PARAM_GOT_EXTRA_PARAMETER,
|
||||||
PARAM_BAD_NUMERIC,
|
PARAM_BAD_NUMERIC,
|
||||||
|
@ -1828,6 +1828,9 @@ CURLcode operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
if(res) {
|
if(res) {
|
||||||
result = CURLE_OK;
|
result = CURLE_OK;
|
||||||
|
|
||||||
|
/* Check if we were asked for the version information */
|
||||||
|
if(res == PARAM_VERSION_INFO_REQUESTED)
|
||||||
|
tool_version_info();
|
||||||
/* Check if we were asked to list the SSL engines */
|
/* Check if we were asked to list the SSL engines */
|
||||||
if(res == PARAM_ENGINES_REQUESTED)
|
if(res == PARAM_ENGINES_REQUESTED)
|
||||||
tool_list_engines(config->easy);
|
tool_list_engines(config->easy);
|
||||||
|
@ -231,6 +231,7 @@ int parseconfig(const char *filename,
|
|||||||
filename = (char *)"<stdin>";
|
filename = (char *)"<stdin>";
|
||||||
}
|
}
|
||||||
if(res != PARAM_HELP_REQUESTED &&
|
if(res != PARAM_HELP_REQUESTED &&
|
||||||
|
res != PARAM_VERSION_INFO_REQUESTED &&
|
||||||
res != PARAM_ENGINES_REQUESTED) {
|
res != PARAM_ENGINES_REQUESTED) {
|
||||||
const char *reason = param2text(res);
|
const char *reason = param2text(res);
|
||||||
warnf(config, "%s:%d: warning: '%s' %s\n",
|
warnf(config, "%s:%d: warning: '%s' %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user