Krolyxon
Commit 7e3e600

Branches

Refs →

nsxiv7e3e600

remove some hardcoded "nsxiv", use progname instead

Author
NRK
Date
2022-07-15 11:56 +0600
Committer
Gitea · 2022-09-05 03:52 +0200
Parent
fbe186e
Commit
7e3e6008fec8f7de8fa3c3545a76d5380ba48944

+4 −4

2 files changed

  1. M main.c +1 −1
  2. M options.c +3 −3
M main.c View
@@ -158,7 +158,7 @@ void remove_file(int n, bool manual)
158158
159159 if (filecnt == 1) {
160160 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);
162162 exit(manual ? EXIT_SUCCESS : EXIT_FAILURE);
163163 }
164164 if (files[n].flags & FF_MARK)
M options.c View
@@ -38,9 +38,9 @@ const opt_t *options;
3838
3939 void print_usage(void)
4040 {
41− printf("usage: nsxiv [-abcfhiopqrtvZ0] [-A FRAMERATE] [-e WID] [-G GAMMA] "
41+ printf("usage: %s [-abcfhiopqrtvZ0] [-A FRAMERATE] [-e WID] [-G GAMMA] "
4242 "[-g GEOMETRY] [-N NAME] [-n NUM] [-S DELAY] [-s MODE] "
43− "[-z ZOOM] FILES...\n");
43+ "[-z ZOOM] FILES...\n", progname);
4444 }
4545
4646 static void title_deprecation_notice(void)
@@ -58,7 +58,7 @@ static void title_deprecation_notice(void)
5858
5959 static void print_version(void)
6060 {
61− puts("nsxiv " VERSION);
61+ printf("%s %s\n", progname, VERSION);
6262 }
6363
6464 void parse_options(int argc, char **argv)