tool_getparam: Moved tool_help() call into operate()
This commit is contained in:
@@ -32,7 +32,6 @@
|
|||||||
#include "tool_cb_prg.h"
|
#include "tool_cb_prg.h"
|
||||||
#include "tool_formparse.h"
|
#include "tool_formparse.h"
|
||||||
#include "tool_getparam.h"
|
#include "tool_getparam.h"
|
||||||
#include "tool_help.h"
|
|
||||||
#include "tool_helpers.h"
|
#include "tool_helpers.h"
|
||||||
#include "tool_libinfo.h"
|
#include "tool_libinfo.h"
|
||||||
#include "tool_metalink.h"
|
#include "tool_metalink.h"
|
||||||
@@ -1395,7 +1394,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
|
|
||||||
case 'h': /* h for help */
|
case 'h': /* h for help */
|
||||||
if(toggle) {
|
if(toggle) {
|
||||||
tool_help();
|
|
||||||
return PARAM_HELP_REQUESTED;
|
return PARAM_HELP_REQUESTED;
|
||||||
}
|
}
|
||||||
/* we now actually support --no-help too! */
|
/* we now actually support --no-help too! */
|
||||||
|
@@ -1829,8 +1829,11 @@ 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 help */
|
||||||
|
if(res == PARAM_HELP_REQUESTED)
|
||||||
|
tool_help();
|
||||||
/* Check if we were asked for the manual */
|
/* Check if we were asked for the manual */
|
||||||
if(res == PARAM_MANUAL_REQUESTED)
|
else if(res == PARAM_MANUAL_REQUESTED)
|
||||||
hugehelp();
|
hugehelp();
|
||||||
/* Check if we were asked for the version information */
|
/* Check if we were asked for the version information */
|
||||||
else if(res == PARAM_VERSION_INFO_REQUESTED)
|
else if(res == PARAM_VERSION_INFO_REQUESTED)
|
||||||
@@ -1838,7 +1841,7 @@ CURLcode operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
/* 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);
|
||||||
else if(res != PARAM_HELP_REQUESTED)
|
else
|
||||||
result = CURLE_FAILED_INIT;
|
result = CURLE_FAILED_INIT;
|
||||||
}
|
}
|
||||||
/* Perform the main operations */
|
/* Perform the main operations */
|
||||||
|
Reference in New Issue
Block a user