index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/pacman/log.c | 6 |
diff --git a/src/pacman/log.c b/src/pacman/log.c index ccdd9a66..4bed22ae 100644 --- a/src/pacman/log.c +++ b/src/pacman/log.c @@ -126,19 +126,19 @@ void pm_fprintf(FILE *file, unsigned short line, char *fmt, ...) } fprintf(file, str); + if(needpad == 1) { unsigned int i, cols = getcols(); for(i=len; i < cols; ++i) { fprintf(file, " "); } - if(neednl == 1) { + if(neednl == 1 && line == NL) { fprintf(file, "\n"); neednl = 0; - } else { - neednl = 1; } } fflush(file); + neednl = (str[strlen(str)-1] == '\n') ? 0 : 1; } /* Check verbosity option and, if set, print the |