From 24a5006f57193bc6f65e21eff3cd4ab3122114c1 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 28 Mar 2014 15:55:08 +0000 Subject: [PATCH] Prefix error/warning messages with program name if DEBUG is defined --- util/eprintf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/eprintf.c b/util/eprintf.c index bd4e090..91b19b7 100644 --- a/util/eprintf.c +++ b/util/eprintf.c @@ -33,7 +33,9 @@ enprintf(int status, const char *fmt, ...) void venprintf(int status, const char *fmt, va_list ap) { +#ifdef DEBUG fprintf(stderr, "%s: ", argv0); +#endif vfprintf(stderr, fmt, ap); @@ -50,7 +52,9 @@ weprintf(const char *fmt, ...) { va_list ap; +#ifdef DEBUG fprintf(stderr, "%s: ", argv0); +#endif va_start(ap, fmt); vfprintf(stderr, fmt, ap);