From e5194cb2b2b8163cdd2721989a980424bb8e6d05 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 21 Oct 2014 23:30:59 +0200 Subject: [PATCH] Using PROGNAME for phone(1) --- src/phone.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/phone.c b/src/phone.c index 6b94f75..a113378 100644 --- a/src/phone.c +++ b/src/phone.c @@ -44,6 +44,9 @@ static char const _license[] = #define min(a, b) ((a) < (b) ? (a) : (b)) +#ifndef PROGNAME +# define PROGNAME "phone" +#endif #ifndef PREFIX # define PREFIX "/usr/local" #endif @@ -630,7 +633,7 @@ int phone_error(Phone * phone, char const * message, int ret) static int _error_text(char const * message, int ret) { - fprintf(stderr, "phone: %s\n", message); + fprintf(stderr, PROGNAME ": %s\n", message); return ret; }