Using PROGNAME with the XML editor as well

This commit is contained in:
Pierre Pronchery 2013-12-09 00:23:14 +01:00
parent 8fc6dbdd74
commit 8ddb2089fb

View File

@ -24,6 +24,9 @@
#define _(string) gettext(string)
/* constants */
#ifndef PROGNAME
# define PROGNAME "xmleditor"
#endif
#ifndef PREFIX
# define PREFIX "/usr/local"
#endif
@ -44,7 +47,7 @@ static int _usage(void);
/* error */
static int _error(char const * message, int ret)
{
fputs("xmleditor: ", stderr);
fputs(PROGNAME ": ", stderr);
perror(message);
return ret;
}
@ -53,7 +56,7 @@ static int _error(char const * message, int ret)
/* usage */
static int _usage(void)
{
fputs(_("Usage: xmleditor [filename]\n"), stderr);
fprintf(stderr, _("Usage: %s [filename]\n"), PROGNAME);
return 1;
}