nsxiv7e3e600
remove some hardcoded "nsxiv", use progname instead
+4 −4
2 files changed
| @@ -158,7 +158,7 @@ void remove_file(int n, bool manual) | |||
| 158 | 158 | ||
| 159 | 159 | if (filecnt == 1) { | |
| 160 | 160 | if (!manual) | |
| 161 | − | fprintf(stderr, "nsxiv: no more files to display, aborting\n"); | |
| 161 | + | fprintf(stderr, "%s: no more files to display, aborting\n", progname); | |
| 162 | 162 | exit(manual ? EXIT_SUCCESS : EXIT_FAILURE); | |
| 163 | 163 | } | |
| 164 | 164 | if (files[n].flags & FF_MARK) | |
| @@ -38,9 +38,9 @@ const opt_t *options; | |||
| 38 | 38 | ||
| 39 | 39 | void print_usage(void) | |
| 40 | 40 | { | |
| 41 | − | printf("usage: nsxiv [-abcfhiopqrtvZ0] [-A FRAMERATE] [-e WID] [-G GAMMA] " | |
| 41 | + | printf("usage: %s [-abcfhiopqrtvZ0] [-A FRAMERATE] [-e WID] [-G GAMMA] " | |
| 42 | 42 | "[-g GEOMETRY] [-N NAME] [-n NUM] [-S DELAY] [-s MODE] " | |
| 43 | − | "[-z ZOOM] FILES...\n"); | |
| 43 | + | "[-z ZOOM] FILES...\n", progname); | |
| 44 | 44 | } | |
| 45 | 45 | ||
| 46 | 46 | static void title_deprecation_notice(void) | |
| @@ -58,7 +58,7 @@ static void title_deprecation_notice(void) | |||
| 58 | 58 | ||
| 59 | 59 | static void print_version(void) | |
| 60 | 60 | { | |
| 61 | − | puts("nsxiv " VERSION); | |
| 61 | + | printf("%s %s\n", progname, VERSION); | |
| 62 | 62 | } | |
| 63 | 63 | ||
| 64 | 64 | void parse_options(int argc, char **argv) | |