[pacman-dev] [PATCH 08/16] colourize colon_printf

Simon Gomizelj simongmzlj at gmail.com
Fri Mar 1 16:32:37 EST 2013


Signed-off-by: Simon Gomizelj <simongmzlj at gmail.com>
---
 src/pacman/util.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 6e06690..1cd955e 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1491,7 +1491,7 @@ static int question(short preset, const char *format, va_list args)
 	fflush(stdout);
 	fflush(stderr);
 
-	fprintf(stream, ":: ");
+	fprintf(stream, "%s ", colstr.colon);
 	vfprintf(stream, format, args);
 
 	if(preset) {
@@ -1558,11 +1558,13 @@ int colon_printf(const char *fmt, ...)
 	int ret;
 	va_list args;
 
-	printf(":: ");
 	va_start(args, fmt);
+	printf("%s ", colstr.colon);
 	ret = vprintf(fmt, args);
+	printf("%s", colstr.nc);
 	va_end(args);
 
+	fflush(stdout);
 	return ret;
 }
 
-- 
1.8.1.4



More information about the pacman-dev mailing list