mirror of
https://github.com/curl/curl.git
synced 2026-08-05 21:16:13 +03:00
curl: make --silent work stand-alone
- renamed the struct field to 'silent' to match the cmdline option - make --show-error toggle independently of --silent - make --silent independent of ->noprogress as well By doing this, the three options --silent, --no-progress-meter and --show-error should work independently of each other and also work with and without '--no-' prefix as documented. Reported-by: u20221022 on github Fixes #10535 Closes #10536
This commit is contained in:
parent
6d860f1758
commit
6841f2ed5f
5 changed files with 26 additions and 34 deletions
|
|
@ -2268,21 +2268,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
/* use remote file's time */
|
||||
config->remote_time = toggle;
|
||||
break;
|
||||
case 's':
|
||||
/* don't show progress meter, don't show errors : */
|
||||
if(toggle)
|
||||
global->mute = global->noprogress = TRUE;
|
||||
else
|
||||
global->mute = global->noprogress = FALSE;
|
||||
if(global->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. */
|
||||
global->showerror = (!toggle)?TRUE:FALSE; /* toggle off */
|
||||
case 's': /* --silent */
|
||||
global->silent = toggle;
|
||||
break;
|
||||
case 'S':
|
||||
/* show errors */
|
||||
global->showerror = toggle?1:0; /* toggle on if used with -s */
|
||||
case 'S': /* --show-error */
|
||||
global->showerror = toggle;
|
||||
break;
|
||||
case 't':
|
||||
/* Telnet options */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue