Use PROGNAME_PANELCTL for panelctl(1)

This commit is contained in:
Pierre Pronchery 2018-02-10 15:25:53 +01:00
parent 28116fb3c2
commit 7998962715

View File

@ -27,17 +27,17 @@
#define _(string) gettext(string) #define _(string) gettext(string)
/* constants */ /* constants */
#ifndef PROGNAME #ifndef PROGNAME_PANELCTL
# define PROGNAME "panelctl" # define PROGNAME_PANELCTL "panelctl"
#endif #endif
#ifndef PREFIX #ifndef PREFIX
# define PREFIX "/usr/local" # define PREFIX "/usr/local"
#endif #endif
#ifndef DATADIR #ifndef DATADIR
# define DATADIR PREFIX "/share" # define DATADIR PREFIX "/share"
#endif #endif
#ifndef LOCALEDIR #ifndef LOCALEDIR
# define LOCALEDIR DATADIR "/locale" # define LOCALEDIR DATADIR "/locale"
#endif #endif
@ -62,7 +62,7 @@ static int _panelctl(PanelMessageShow what, gboolean show)
/* error */ /* error */
static int _error(char const * message, int ret) static int _error(char const * message, int ret)
{ {
fputs(PROGNAME ": ", stderr); fputs(PROGNAME_PANELCTL ": ", stderr);
perror(message); perror(message);
return ret; return ret;
} }
@ -80,7 +80,7 @@ static int _usage(void)
" -b Hide the bottom panel\n" " -b Hide the bottom panel\n"
" -l Hide the left panel\n" " -l Hide the left panel\n"
" -r Hide the right panel\n" " -r Hide the right panel\n"
" -t Hide the top panel\n"), PROGNAME); " -t Hide the top panel\n"), PROGNAME_PANELCTL);
return 1; return 1;
} }