Use PROGNAME_FONTSEL and PROGNAME_COMPARE

This commit is contained in:
Pierre Pronchery 2019-12-18 05:40:04 +01:00
parent f9828bfe30
commit 3ac7b1c166
2 changed files with 14 additions and 14 deletions

View File

@ -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;
}

View File

@ -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;
}