Use PROGNAME_NOTES
This commit is contained in:
parent
5bd9f7fc41
commit
cc3a742e4f
10
src/main.c
10
src/main.c
|
@ -39,8 +39,8 @@
|
||||||
#define _(string) gettext(string)
|
#define _(string) gettext(string)
|
||||||
|
|
||||||
/* constants */
|
/* constants */
|
||||||
#ifndef PROGNAME
|
#ifndef PROGNAME_NOTES
|
||||||
# define PROGNAME "notes"
|
# define PROGNAME_NOTES "notes"
|
||||||
#endif
|
#endif
|
||||||
#ifndef PREFIX
|
#ifndef PREFIX
|
||||||
# define PREFIX "/usr/local"
|
# define PREFIX "/usr/local"
|
||||||
|
@ -68,7 +68,7 @@ static int _notes(void)
|
||||||
NotesWindow * notes;
|
NotesWindow * notes;
|
||||||
|
|
||||||
if((notes = noteswindow_new()) == NULL)
|
if((notes = noteswindow_new()) == NULL)
|
||||||
return error_print(PACKAGE);
|
return error_print(PROGNAME_NOTES);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
noteswindow_delete(notes);
|
noteswindow_delete(notes);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -78,7 +78,7 @@ static int _notes(void)
|
||||||
/* error */
|
/* error */
|
||||||
static int _error(char const * message, int ret)
|
static int _error(char const * message, int ret)
|
||||||
{
|
{
|
||||||
fputs(PROGNAME ": ", stderr);
|
fputs(PROGNAME_NOTES ": ", stderr);
|
||||||
perror(message);
|
perror(message);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ static int _error(char const * message, int ret)
|
||||||
/* usage */
|
/* usage */
|
||||||
static int _usage(void)
|
static int _usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("Usage: %s\n"), PROGNAME);
|
fprintf(stderr, _("Usage: %s\n"), PROGNAME_NOTES);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,10 @@ static char const _license[] = "All rights reserved.\n"
|
||||||
#define _(string) gettext(string)
|
#define _(string) gettext(string)
|
||||||
#define N_(string) (string)
|
#define N_(string) (string)
|
||||||
|
|
||||||
|
#ifndef PROGNAME_NOTES
|
||||||
|
# define PROGNAME_NOTES "notes"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Notes */
|
/* Notes */
|
||||||
/* private */
|
/* private */
|
||||||
|
@ -327,7 +331,7 @@ int notes_error(Notes * notes, char const * message, int ret)
|
||||||
|
|
||||||
static int _error_text(char const * message, int ret)
|
static int _error_text(char const * message, int ret)
|
||||||
{
|
{
|
||||||
fputs(PACKAGE ": ", stderr);
|
fputs(PROGNAME_NOTES ": ", stderr);
|
||||||
fputs(message, stderr);
|
fputs(message, stderr);
|
||||||
fputc('\n', stderr);
|
fputc('\n', stderr);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user