From 6e3930a363d334f9afd686e347d56c9a8faa70b0 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 12 Jan 2020 04:36:21 +0100 Subject: [PATCH] Use PROGNAME_KEYBOARD --- src/main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main.c b/src/main.c index 73eb661..1643537 100644 --- a/src/main.c +++ b/src/main.c @@ -40,17 +40,17 @@ #define _(string) gettext(string) /* constants */ -#ifndef PROGNAME -# define PROGNAME "keyboard" +#ifndef PROGNAME_KEYBOARD +# define PROGNAME_KEYBOARD "keyboard" #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 @@ -80,7 +80,7 @@ static int _keyboard(KeyboardPrefs * prefs) /* error */ static int _error(char const * message, int ret) { - fputs(PROGNAME ": ", stderr); + fputs(PROGNAME_KEYBOARD ": ", stderr); perror(message); return ret; } @@ -96,7 +96,8 @@ static int _usage(void) " -x Start in embedded mode\n" " -f Set the font used for the keys\n" " -m Place on a particular monitor (in docked or popup mode)\n" -" -n Start without showing up directly (if not embedded)\n"), PROGNAME); +" -n Start without showing up directly (if not embedded)\n"), + PROGNAME_KEYBOARD); return 1; }