commit 21e708abd4c9ce6817cad762a171320005d62b53
parent 07592f31be3927dd1e9e6a4d82e4049c52cde48c
Author: sin <sin@2f30.org>
Date: Fri, 28 Mar 2014 15:52:37 +0000
Prefix error/warning messages with program name if DEBUG is defined
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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)
{
+#if DEBUG
fprintf(stderr, "%s: ", argv0);
+#endif
vfprintf(stderr, fmt, ap);
@@ -50,7 +52,7 @@ weprintf(const char *fmt, ...)
{
va_list ap;
-#if 0
+#ifdef DEBUG
fprintf(stderr, "%s: ", argv0);
#endif