From 3ac7b1c1666cfd38b65c7a7698bcda536abde257 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 18 Dec 2019 05:40:04 +0100 Subject: [PATCH] Use PROGNAME_FONTSEL and PROGNAME_COMPARE --- src/compare.c | 14 +++++++------- src/fontsel.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/compare.c b/src/compare.c index e9d6885..cde0674 100644 --- a/src/compare.c +++ b/src/compare.c @@ -38,17 +38,17 @@ #define _(string) gettext(string) /* constants */ -#ifndef PROGNAME -# define PROGNAME "compare" +#ifndef PROGNAME_COMPARE +# define PROGNAME_COMPARE "compare" #endif #ifndef PREFIX -# define PREFIX "/usr/local" +# define PREFIX "/usr/local" #endif #ifndef DATADIR -# define DATADIR PREFIX "/share" +# define DATADIR PREFIX "/share" #endif #ifndef LOCALEDIR -# define LOCALEDIR DATADIR "/locale" +# define LOCALEDIR DATADIR "/locale" #endif @@ -154,7 +154,7 @@ static int _compare(char const * string1, char const * string2) /* error */ static int _error(char const * message, int ret) { - fputs(PROGNAME ": ", stderr); + fputs(PROGNAME_COMPARE ": ", stderr); perror(message); return ret; } @@ -163,7 +163,7 @@ static int _error(char const * message, int ret) /* usage */ static int _usage(void) { - fprintf(stderr, _("Usage: %s [string1 [string2]]\n"), PROGNAME); + fprintf(stderr, _("Usage: %s [string1 [string2]]\n"), PROGNAME_COMPARE); return 1; } diff --git a/src/fontsel.c b/src/fontsel.c index 969b6ec..509545a 100644 --- a/src/fontsel.c +++ b/src/fontsel.c @@ -37,17 +37,17 @@ #define _(string) gettext(string) /* constants */ -#ifndef PROGNAME -# define PROGNAME "fontsel" +#ifndef PROGNAME_FONTSEL +# define PROGNAME_FONTSEL "fontsel" #endif #ifndef PREFIX -# define PREFIX "/usr/local" +# define PREFIX "/usr/local" #endif #ifndef DATADIR -# define DATADIR PREFIX "/share" +# define DATADIR PREFIX "/share" #endif #ifndef LOCALEDIR -# define LOCALEDIR DATADIR "/locale" +# define LOCALEDIR DATADIR "/locale" #endif @@ -132,7 +132,7 @@ static gboolean _fontsel_on_closex(gpointer data) /* error */ static int _error(char const * message, int ret) { - fputs(PROGNAME ": ", stderr); + fputs(PROGNAME_FONTSEL ": ", stderr); perror(message); return ret; } @@ -141,7 +141,7 @@ static int _error(char const * message, int ret) /* usage */ static int _usage(void) { - fprintf(stderr, _("Usage: %s\n"), PROGNAME); + fprintf(stderr, _("Usage: %s\n"), PROGNAME_FONTSEL); return 1; }