From e37973913dcc9998ecb0da562a14fec18663062b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Feb 2007 09:48:01 +0000 Subject: - Added warning outputs if the command line uses more than one of the options -v, --trace and --trace-ascii, since it could really confuse the user. Clarified this fact in the man page. --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ed6f338ef..167bfa5a0 100644 --- a/src/main.c +++ b/src/main.c @@ -1650,10 +1650,15 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ #endif case 'g': /* --trace */ GetStr(&config->trace_dump, nextarg); + if(config->tracetype && (config->tracetype != TRACE_BIN)) + warnf(config, "--trace overrides an earlier trace/verbose option\n"); config->tracetype = TRACE_BIN; break; case 'h': /* --trace-ascii */ GetStr(&config->trace_dump, nextarg); + if(config->tracetype && (config->tracetype != TRACE_ASCII)) + warnf(config, + "--trace-ascii overrides an earlier trace/verbose option\n"); config->tracetype = TRACE_ASCII; break; case 'i': /* --limit-rate */ @@ -2398,6 +2403,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ case 'v': /* the '%' thing here will cause the trace get sent to stderr */ GetStr(&config->trace_dump, (char *)"%"); + if(config->tracetype && (config->tracetype != TRACE_PLAIN)) + warnf(config, + "-v/--verbose overrides an earlier trace/verbose option\n"); config->tracetype = TRACE_PLAIN; break; case 'V': -- cgit v1.2.3