aboutsummaryrefslogtreecommitdiff
path: root/src/tool_msgs.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-02-27 20:48:38 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-02-27 21:05:52 +0000
commitc715fa0b60c86449e09b313245de621b32e329d2 (patch)
tree9c17ebd6afa3ab7725feb02f2bd10f0d368cafbe /src/tool_msgs.c
parentadf27bf60f9e4ce29ef5a6a553763737842629a1 (diff)
tool: Updated the warnf() function to use the GlobalConfig structure
As the 'error' and 'mute' options are now part of the GlobalConfig, rather than per Operation, updated the warnf() function to use this structure rather than the OperationConfig.
Diffstat (limited to 'src/tool_msgs.c')
-rw-r--r--src/tool_msgs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tool_msgs.c b/src/tool_msgs.c
index 3311b55f5..38de977aa 100644
--- a/src/tool_msgs.c
+++ b/src/tool_msgs.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -38,9 +38,9 @@
* mute (--silent) was selected.
*/
-void warnf(struct OperationConfig *config, const char *fmt, ...)
+void warnf(struct GlobalConfig *config, const char *fmt, ...)
{
- if(!config->global->mute) {
+ if(!config->mute) {
va_list ap;
int len;
char *ptr;
@@ -52,7 +52,7 @@ void warnf(struct OperationConfig *config, const char *fmt, ...)
ptr = print_buffer;
while(len > 0) {
- fputs(WARN_PREFIX, config->global->errors);
+ fputs(WARN_PREFIX, config->errors);
if(len > (int)WARN_TEXTWIDTH) {
int cut = WARN_TEXTWIDTH-1;
@@ -65,13 +65,13 @@ void warnf(struct OperationConfig *config, const char *fmt, ...)
max text width then! */
cut = WARN_TEXTWIDTH-1;
- (void)fwrite(ptr, cut + 1, 1, config->global->errors);
- fputs("\n", config->global->errors);
+ (void)fwrite(ptr, cut + 1, 1, config->errors);
+ fputs("\n", config->errors);
ptr += cut+1; /* skip the space too */
len -= cut;
}
else {
- fputs(ptr, config->global->errors);
+ fputs(ptr, config->errors);
len = 0;
}
}