aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-07-15 07:56:45 +0200
committerGitea <gitea@fake.local>2022-09-05 03:52:51 +0200
commit7e3e6008fec8f7de8fa3c3545a76d5380ba48944 (patch)
tree7f0233a34af33b1c1a80743bb73c6124405c30ee
parentfbe186e79d2083a7bbd1588b317cd5782bc5ae73 (diff)
downloadnsxiv-7e3e6008fec8f7de8fa3c3545a76d5380ba48944.tar.zst
remove some hardcoded "nsxiv", use progname instead
-rw-r--r--main.c2
-rw-r--r--options.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index a7b6fa9..8754dae 100644
--- a/main.c
+++ b/main.c
@@ -158,7 +158,7 @@ void remove_file(int n, bool manual)
if (filecnt == 1) {
if (!manual)
- fprintf(stderr, "nsxiv: no more files to display, aborting\n");
+ fprintf(stderr, "%s: no more files to display, aborting\n", progname);
exit(manual ? EXIT_SUCCESS : EXIT_FAILURE);
}
if (files[n].flags & FF_MARK)
diff --git a/options.c b/options.c
index c94c9be..812a01a 100644
--- a/options.c
+++ b/options.c
@@ -38,9 +38,9 @@ const opt_t *options;
void print_usage(void)
{
- printf("usage: nsxiv [-abcfhiopqrtvZ0] [-A FRAMERATE] [-e WID] [-G GAMMA] "
+ printf("usage: %s [-abcfhiopqrtvZ0] [-A FRAMERATE] [-e WID] [-G GAMMA] "
"[-g GEOMETRY] [-N NAME] [-n NUM] [-S DELAY] [-s MODE] "
- "[-z ZOOM] FILES...\n");
+ "[-z ZOOM] FILES...\n", progname);
}
static void title_deprecation_notice(void)
@@ -58,7 +58,7 @@ static void title_deprecation_notice(void)
static void print_version(void)
{
- puts("nsxiv " VERSION);
+ printf("%s %s\n", progname, VERSION);
}
void parse_options(int argc, char **argv)