Using PROGNAME with the XML editor as well
This commit is contained in:
parent
8fc6dbdd74
commit
8ddb2089fb
|
@ -24,6 +24,9 @@
|
||||||
#define _(string) gettext(string)
|
#define _(string) gettext(string)
|
||||||
|
|
||||||
/* constants */
|
/* constants */
|
||||||
|
#ifndef PROGNAME
|
||||||
|
# define PROGNAME "xmleditor"
|
||||||
|
#endif
|
||||||
#ifndef PREFIX
|
#ifndef PREFIX
|
||||||
# define PREFIX "/usr/local"
|
# define PREFIX "/usr/local"
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +47,7 @@ static int _usage(void);
|
||||||
/* error */
|
/* error */
|
||||||
static int _error(char const * message, int ret)
|
static int _error(char const * message, int ret)
|
||||||
{
|
{
|
||||||
fputs("xmleditor: ", stderr);
|
fputs(PROGNAME ": ", stderr);
|
||||||
perror(message);
|
perror(message);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +56,7 @@ static int _error(char const * message, int ret)
|
||||||
/* usage */
|
/* usage */
|
||||||
static int _usage(void)
|
static int _usage(void)
|
||||||
{
|
{
|
||||||
fputs(_("Usage: xmleditor [filename]\n"), stderr);
|
fprintf(stderr, _("Usage: %s [filename]\n"), PROGNAME);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user