aboutsummaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-10-16 23:39:59 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-10-16 23:39:59 +0200
commitb229c8ca8b34df4e1cb4fe806721b64ea242c4ae (patch)
tree2719cacb816c0200c33954e531ac6050b606799a /src/tool_getparam.c
parent337252bdd421ce8262da183a577a7f8b44641385 (diff)
--show-error: position indepdenent
Previously we required that -S/--show-error was used _after_ -s/--silent. This was slightly confusing since we strive to make arguments as position independent as possible. Now, you can use them in any order and the result should still be the same. Bug: http://curl.haxx.se/bug/view.cgi?id=3424286 Reported by: Andreas Olsson
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index bb36b4246..bd7375fd9 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1426,11 +1426,15 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
config->mute = config->noprogress = TRUE;
else
config->mute = config->noprogress = FALSE;
- config->showerror = (!toggle)?TRUE:FALSE; /* toggle off */
+ if(config->showerror < 0)
+ /* if still on the default value, set showerror to the reverse of
+ toggle. This is to allow -S and -s to be used in an independent
+ order but still have the same effect. */
+ config->showerror = (!toggle)?TRUE:FALSE; /* toggle off */
break;
case 'S':
/* show errors */
- config->showerror = toggle; /* toggle on if used with -s */
+ config->showerror = toggle?1:0; /* toggle on if used with -s */
break;
case 't':
/* Telnet options */