Hi,

Generally very useful - consider going through a configure script or similar
that bombs out because of an unimplemented option.  This provides
a quick indication as to which program actually failed.

We should probably default to that.

bye,
sin
>From ec613aeea190bdd9330bdf6394e51df519bb1118 Mon Sep 17 00:00:00 2001
From: sin <s...@2f30.org>
Date: Thu, 14 Nov 2013 13:06:48 +0000
Subject: [PATCH] Always print the program name

This is generally very useful for sbase, especially when we
hit some case that is not implemented and we want to know which
program failed.
---
 util/eprintf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/util/eprintf.c b/util/eprintf.c
index 4b12902..c878e81 100644
--- a/util/eprintf.c
+++ b/util/eprintf.c
@@ -33,7 +33,7 @@ enprintf(int status, const char *fmt, ...)
 void
 venprintf(int status, const char *fmt, va_list ap)
 {
-       /*fprintf(stderr, "%s: ", argv0);*/
+       fprintf(stderr, "%s: ", argv0);
 
        vfprintf(stderr, fmt, ap);
 
@@ -50,6 +50,8 @@ weprintf(const char *fmt, ...)
 {
        va_list ap;
 
+       fprintf(stderr, "%s: ", argv0);
+
        va_start(ap, fmt);
        vfprintf(stderr, fmt, ap);
        va_end(ap);
-- 
1.8.3.4

Reply via email to