[hackers] [ubase] Prefix error/warning messages with program name if DEBUG is defined || sin
commit 21e708abd4c9ce6817cad762a171320005d62b53
Author: sin <sin_AT_2f30.org>
Date: Fri Mar 28 15:52:37 2014 +0000
Prefix error/warning messages with program name if DEBUG is defined
diff --git a/util/eprintf.c b/util/eprintf.c
index f3cac7b..9ca6209 100644
--- a/util/eprintf.c
+++ b/util/eprintf.c
_AT_@ -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);
_AT_@ -50,7 +52,7 @@ weprintf(const char *fmt, ...)
{
va_list ap;
-#if 0
+#ifdef DEBUG
fprintf(stderr, "%s: ", argv0);
#endif
Received on Fri Mar 28 2014 - 16:56:07 CET
This archive was generated by hypermail 2.3.0
: Fri Mar 28 2014 - 17:00:09 CET