Prefix error/warning messages with program name if DEBUG is defined
This commit is contained in:
		@@ -33,7 +33,9 @@ enprintf(int status, const char *fmt, ...)
 | 
			
		||||
void
 | 
			
		||||
venprintf(int status, const char *fmt, va_list ap)
 | 
			
		||||
{
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
	fprintf(stderr, "%s: ", argv0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	vfprintf(stderr, fmt, ap);
 | 
			
		||||
 | 
			
		||||
@@ -50,7 +52,9 @@ weprintf(const char *fmt, ...)
 | 
			
		||||
{
 | 
			
		||||
	va_list ap;
 | 
			
		||||
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
	fprintf(stderr, "%s: ", argv0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	va_start(ap, fmt);
 | 
			
		||||
	vfprintf(stderr, fmt, ap);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user