From eba197161a5917631dd7732de842c68e3159c951 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 1 Mar 2014 13:49:28 +0000 Subject: tool: Moved internal variable isatty to the global config --- src/tool_operate.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/tool_operate.c') diff --git a/src/tool_operate.c b/src/tool_operate.c index 8e1b1a58d..02841c12a 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -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. @@ -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) { @@ -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); -- cgit v1.2.3