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.
This commit is contained in:
sin 2013-11-14 13:06:48 +00:00
parent 3b3dffd24f
commit 078fce3f77
1 changed files with 3 additions and 1 deletions

View File

@ -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);