Use PROGNAME_TODO
This commit is contained in:
parent
d86387344a
commit
ac11fbc60b
10
src/main.c
10
src/main.c
|
@ -39,8 +39,8 @@
|
|||
#define _(string) gettext(string)
|
||||
|
||||
/* constants */
|
||||
#ifndef PROGNAME
|
||||
# define PROGNAME "todo"
|
||||
#ifndef PROGNAME_TODO
|
||||
# define PROGNAME_TODO "todo"
|
||||
#endif
|
||||
#ifndef PREFIX
|
||||
# define PREFIX "/usr/local"
|
||||
|
@ -68,7 +68,7 @@ static int _todo(void)
|
|||
TodoWindow * todo;
|
||||
|
||||
if((todo = todowindow_new()) == NULL)
|
||||
return error_print(PACKAGE);
|
||||
return error_print(PROGNAME_TODO);
|
||||
gtk_main();
|
||||
todowindow_delete(todo);
|
||||
return 0;
|
||||
|
@ -78,7 +78,7 @@ static int _todo(void)
|
|||
/* error */
|
||||
static int _error(char const * message, int ret)
|
||||
{
|
||||
fputs(PROGNAME ": ", stderr);
|
||||
fputs(PROGNAME_TODO ": ", stderr);
|
||||
perror(message);
|
||||
return ret;
|
||||
}
|
||||
|
@ -87,7 +87,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_TODO);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,10 @@ static char const _license[] = "All rights reserved.\n"
|
|||
#define _(string) gettext(string)
|
||||
#define N_(string) (string)
|
||||
|
||||
#ifndef PROGNAME_TODO
|
||||
# define PROGNAME_TODO "todo"
|
||||
#endif
|
||||
|
||||
|
||||
/* Todo */
|
||||
/* private */
|
||||
|
@ -428,7 +432,7 @@ int todo_error(Todo * todo, char const * message, int ret)
|
|||
|
||||
static int _error_text(char const * message, int ret)
|
||||
{
|
||||
fputs(PACKAGE ": ", stderr);
|
||||
fputs(PROGNAME_TODO ": ", stderr);
|
||||
fputs(message, stderr);
|
||||
fputc('\n', stderr);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue
Block a user