From bd25319775249fe52d6e0353c984d682d457ecc2 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 1 Feb 2006 22:14:17 +0000 Subject: fixed vprint implementation (patch from VMiklos ) --- src/pacman/log.c | 12 ++++-------- 1 file 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); } } -- cgit v1.2.3-70-g09d2