aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-02-27 20:21:23 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-02-27 20:31:27 +0000
commit5577540ad5d5dc4737c5d4714d15c6b5fcfb8a74 (patch)
tree3e5aea1b5f6eba9a8f234fc905ef1b10155bac86 /src/tool_operate.c
parent17df2d8f8ee7864996c8a6a45886ccd6e34d065d (diff)
tool: Moved --silient to the global config
Other global options such as --libcurl, --trace and --verbose to follow.
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index faecd8f46..e48a2d595 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -209,6 +209,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
bool orig_isatty;
errorbuffer[0] = '\0';
+
/* default headers output stream is stdout */
memset(&hdrcbdata, 0, sizeof(struct HdrCbData));
memset(&heads, 0, sizeof(struct OutStruct));
@@ -752,7 +753,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
config->isatty = orig_isatty;
}
- if(urlnum > 1 && !(config->mute)) {
+ if(urlnum > 1 && !global->mute) {
fprintf(config->errors, "\n[%lu/%lu]: %s --> %s\n",
li+1, urlnum, this_url, outfile ? outfile : "<stdout>");
if(separator)
@@ -1105,7 +1106,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
progressbarinit(&progressbar, config);
if((config->progressmode == CURL_PROGRESS_BAR) &&
- !config->noprogress && !config->mute) {
+ !config->noprogress && !global->mute) {
/* we want the alternative style, then we have to implement it
ourselves! */
my_setopt(curl, CURLOPT_XFERINFOFUNCTION, tool_progress_cb);
@@ -1371,7 +1372,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
#endif
res = curl_easy_perform(curl);
- if(outs.is_cd_filename && outs.stream && !config->mute &&
+ if(outs.is_cd_filename && outs.stream && !global->mute &&
outs.filename)
printf("curl: Saved to filename '%s'\n", outs.filename);
@@ -1459,7 +1460,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(outs.bytes && outs.filename) {
/* We have written data to a output file, we truncate file
*/
- if(!config->mute)
+ if(!global->mute)
fprintf(config->errors, "Throwing away %"
CURL_FORMAT_CURL_OFF_T " bytes\n",
outs.bytes);
@@ -1469,7 +1470,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(ftruncate( fileno(outs.stream), outs.init)) {
/* when truncate fails, we can't just append as then we'll
create something strange, bail out */
- if(!config->mute)
+ if(!global->mute)
fprintf(config->errors,
"failed to truncate, exiting\n");
res = CURLE_WRITE_ERROR;