git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1275 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2005/01/26 18:20:00... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Wed Jan 26 10:15:47 CET 2005 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * shared/output.c: change output modes (more stdout output). Patch by |
|
4 |
+ Stephen Gran <steve*lobefin.net>. |
|
5 |
+ |
|
1 | 6 |
Wed Jan 26 09:23:48 CET 2005 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* libclamav/snprintf.c: add missing MAX macro (thanks to Ted Mittelstaedt |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -240,10 +240,7 @@ void mprintf(const char *str, ...) |
240 | 240 |
return; |
241 | 241 |
} |
242 | 242 |
|
243 |
- if(mprintf_stdout) |
|
244 |
- fd = stdout; |
|
245 |
- else |
|
246 |
- fd = stderr; |
|
243 |
+ fd = stdout; |
|
247 | 244 |
|
248 | 245 |
/* legend: |
249 | 246 |
* ! - error |
... | ... |
@@ -253,11 +250,11 @@ void mprintf(const char *str, ...) |
253 | 253 |
|
254 | 254 |
/* |
255 | 255 |
* ERROR WARNING STANDARD |
256 |
- * normal yes yes yes |
|
256 |
+ * normal stderr stderr stdout |
|
257 | 257 |
* |
258 |
- * verbose yes yes yes |
|
258 |
+ * verbose stderr stderr stdout |
|
259 | 259 |
* |
260 |
- * quiet yes no no |
|
260 |
+ * quiet stderr no no |
|
261 | 261 |
*/ |
262 | 262 |
|
263 | 263 |
|
... | ... |
@@ -266,9 +263,13 @@ void mprintf(const char *str, ...) |
266 | 266 |
va_start(argscpy, str); |
267 | 267 |
|
268 | 268 |
if(*str == '!') { |
269 |
+ if(!mprintf_stdout) |
|
270 |
+ fd = stderr; |
|
269 | 271 |
fprintf(fd, "ERROR: "); |
270 | 272 |
vfprintf(fd, ++str, args); |
271 | 273 |
} else if(*str == '@') { |
274 |
+ if(!mprintf_stdout) |
|
275 |
+ fd = stderr; |
|
272 | 276 |
fprintf(fd, "ERROR: "); |
273 | 277 |
vfprintf(fd, ++str, args); |
274 | 278 |
#ifdef NO_SNPRINTF |
... | ... |
@@ -279,6 +280,8 @@ void mprintf(const char *str, ...) |
279 | 279 |
logg("ERROR: %s", logbuf); |
280 | 280 |
} else if(!mprintf_quiet) { |
281 | 281 |
if(*str == '^') { |
282 |
+ if(!mprintf_stdout) |
|
283 |
+ fd = stderr; |
|
282 | 284 |
fprintf(fd, "WARNING: "); |
283 | 285 |
vfprintf(fd, ++str, args); |
284 | 286 |
} else if(*str == '*') { |