tool: Moved --stderr to the global config

This commit is contained in:
Steve Holme 2014-03-01 13:00:31 +00:00
parent 1f07718123
commit 5513bbd5c3
12 changed files with 69 additions and 68 deletions

View file

@ -681,14 +681,14 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
if(!newfile)
warnf(config, "Failed to open %s!\n", nextarg);
else {
if(config->errors_fopened)
fclose(config->errors);
config->errors = newfile;
config->errors_fopened = TRUE;
if(global->errors_fopened)
fclose(global->errors);
global->errors = newfile;
global->errors_fopened = TRUE;
}
}
else
config->errors = stdout;
global->errors = stdout;
break;
case 'w': /* --interface */
/* interface */
@ -1875,9 +1875,9 @@ ParameterError parse_args(struct GlobalConfig *config, int argc,
const char *reason = param2text(result);
if(!curlx_strequal(":", orig_opt))
helpf(operation->errors, "option %s: %s\n", orig_opt, reason);
helpf(config->errors, "option %s: %s\n", orig_opt, reason);
else
helpf(operation->errors, "%s\n", reason);
helpf(config->errors, "%s\n", reason);
}
return result;