diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-02-01 22:14:17 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-02-01 22:14:17 +0000 |
commit | bd25319775249fe52d6e0353c984d682d457ecc2 (patch) | |
tree | 6d7568893d44153bc5d73de864b97cc877c5d69b | |
parent | a167cdb47ed5ffd5a8a660a0bd5e3283c2abbe17 (diff) | |
download | pacman-bd25319775249fe52d6e0353c984d682d457ecc2.tar.xz |
fixed vprint implementation (patch from VMiklos <vmiklos@frugalware.org>)
-rw-r--r-- | src/pacman/log.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/pacman/log.c b/src/pacman/log.c index 550065ab..dd70492f 100644 --- a/src/pacman/log.c +++ b/src/pacman/log.c @@ -103,17 +103,13 @@ void vprint(char *fmt, ...) { va_list args; + char str[LOG_STR_LEN]; + if(config->verbose > 0) { - if(neednl == 1) { - fprintf(stdout, "\n"); - neednl = 0; - } va_start(args, fmt); - /* ORE - commented for now: it produces corruption - pm_fprintf(stdout, NL, fmt, args); */ - vprintf(fmt, args); + vsnprintf(str, LOG_STR_LEN, fmt, args); va_end(args); + pm_fprintf(stdout, NL, str); } } |