sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 078fce3f77ff56dfd7d8824333302b9f435ec717
parent 3b3dffd24f9e84f6bf24d6903366fb588be7480d
Author: sin <sin@2f30.org>
Date:   Thu, 14 Nov 2013 13:06:48 +0000

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.

Diffstat:
Mutil/eprintf.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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);