Loading src/tool_cb_dbg.c +1 −2 Original line number Diff line number Diff line Loading @@ -142,8 +142,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, to stderr or stdout, we don't display the alert about the data not being shown as the data _is_ shown then just not via this function */ if(!operation->isatty || ((output != stderr) && (output != stdout))) { if(!config->isatty || ((output != stderr) && (output != stdout))) { if(!newl) fprintf(output, "%s%s ", timebuf, s_infotype[type]); fprintf(output, "[data not shown]\n"); Loading src/tool_cfgable.h +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,6 @@ struct OperationConfig { bool netrc_opt; bool netrc; char *netrc_file; bool isatty; /* updated internally only if output is a tty */ struct getout *url_list; /* point to the first node */ struct getout *url_last; /* point to the last/current node */ struct getout *url_get; /* point to the node to fill in URL */ Loading Loading @@ -216,6 +215,7 @@ struct GlobalConfig { 1 => -S has been used to show errors */ bool mute; /* don't show messages, --silent given */ bool noprogress; /* don't show progress bar --silent given */ bool isatty; /* Updated internally if output is a tty */ FILE *errors; /* Error stream, defaults to stderr */ bool errors_fopened; /* Whether error stream isn't stderr */ char *trace_dump; /* file to dump the network trace to */ Loading src/tool_operate.c +7 −3 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ static CURLcode operate_do(struct GlobalConfig *global, /* save the values of noprogress and isatty to restore them later on */ orig_noprogress = global->noprogress; orig_isatty = config->isatty; orig_isatty = global->isatty; /* ** Nested loops start here. Loading Loading @@ -745,12 +745,12 @@ static CURLcode operate_do(struct GlobalConfig *global, isatty(fileno(outs.stream))) /* we send the output to a tty, therefore we switch off the progress meter */ global->noprogress = config->isatty = TRUE; global->noprogress = global->isatty = TRUE; else { /* progress meter is per download, so restore config values */ global->noprogress = orig_noprogress; config->isatty = orig_isatty; global->isatty = orig_isatty; } if(urlnum > 1 && !global->mute) { Loading Loading @@ -1750,6 +1750,10 @@ static CURLcode operate_do(struct GlobalConfig *global, quit_curl: /* Reset the global config variables */ global->noprogress = orig_noprogress; global->isatty = orig_isatty; /* Free function-local referenced allocated memory */ Curl_safefree(httpgetfields); Loading Loading
src/tool_cb_dbg.c +1 −2 Original line number Diff line number Diff line Loading @@ -142,8 +142,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, to stderr or stdout, we don't display the alert about the data not being shown as the data _is_ shown then just not via this function */ if(!operation->isatty || ((output != stderr) && (output != stdout))) { if(!config->isatty || ((output != stderr) && (output != stdout))) { if(!newl) fprintf(output, "%s%s ", timebuf, s_infotype[type]); fprintf(output, "[data not shown]\n"); Loading
src/tool_cfgable.h +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,6 @@ struct OperationConfig { bool netrc_opt; bool netrc; char *netrc_file; bool isatty; /* updated internally only if output is a tty */ struct getout *url_list; /* point to the first node */ struct getout *url_last; /* point to the last/current node */ struct getout *url_get; /* point to the node to fill in URL */ Loading Loading @@ -216,6 +215,7 @@ struct GlobalConfig { 1 => -S has been used to show errors */ bool mute; /* don't show messages, --silent given */ bool noprogress; /* don't show progress bar --silent given */ bool isatty; /* Updated internally if output is a tty */ FILE *errors; /* Error stream, defaults to stderr */ bool errors_fopened; /* Whether error stream isn't stderr */ char *trace_dump; /* file to dump the network trace to */ Loading
src/tool_operate.c +7 −3 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ static CURLcode operate_do(struct GlobalConfig *global, /* save the values of noprogress and isatty to restore them later on */ orig_noprogress = global->noprogress; orig_isatty = config->isatty; orig_isatty = global->isatty; /* ** Nested loops start here. Loading Loading @@ -745,12 +745,12 @@ static CURLcode operate_do(struct GlobalConfig *global, isatty(fileno(outs.stream))) /* we send the output to a tty, therefore we switch off the progress meter */ global->noprogress = config->isatty = TRUE; global->noprogress = global->isatty = TRUE; else { /* progress meter is per download, so restore config values */ global->noprogress = orig_noprogress; config->isatty = orig_isatty; global->isatty = orig_isatty; } if(urlnum > 1 && !global->mute) { Loading Loading @@ -1750,6 +1750,10 @@ static CURLcode operate_do(struct GlobalConfig *global, quit_curl: /* Reset the global config variables */ global->noprogress = orig_noprogress; global->isatty = orig_isatty; /* Free function-local referenced allocated memory */ Curl_safefree(httpgetfields); Loading