Use PROGNAME

This commit is contained in:
Pierre Pronchery 2015-04-21 01:28:10 +02:00
parent 4c1ceacae4
commit 8af6ec40a8

View File

@ -26,6 +26,9 @@
#define _(string) gettext(string) #define _(string) gettext(string)
/* constants */ /* constants */
#ifndef PROGNAME
# define PROGNAME "todo"
#endif
#ifndef PREFIX #ifndef PREFIX
# define PREFIX "/usr/local" # define PREFIX "/usr/local"
#endif #endif
@ -55,7 +58,7 @@ static int _todo(void)
/* usage */ /* usage */
static int _usage(void) static int _usage(void)
{ {
fputs(_("Usage: todo\n"), stderr); fprintf(stderr, _("Usage: %s\n"), PROGNAME);
return 1; return 1;
} }