diff --git a/programs/benchmark.c b/programs/benchmark.c index fce7a6d..953e939 100644 --- a/programs/benchmark.c +++ b/programs/benchmark.c @@ -406,7 +406,7 @@ show_usage(FILE *fp) " -s SIZE chunk size\n" " -V show version and legal information\n" " -z use zlib wrapper\n" -"\n", program_invocation_name); +"\n", prog_invocation_name); show_available_engines(fp); } diff --git a/programs/checksum.c b/programs/checksum.c index 6c0133d..0d39472 100644 --- a/programs/checksum.c +++ b/programs/checksum.c @@ -42,7 +42,7 @@ show_usage(FILE *fp) " -s SIZE chunk size\n" " -t show checksum speed, excluding I/O\n" " -Z use zlib implementation instead of libdeflate\n", - program_invocation_name); + prog_invocation_name); } typedef u32 (*cksum_fn_t)(u32, const void *, size_t); diff --git a/programs/gzip.c b/programs/gzip.c index 30f1ad6..1940ac1 100644 --- a/programs/gzip.c +++ b/programs/gzip.c @@ -67,7 +67,7 @@ show_usage(FILE *fp) " -k don't delete input files\n" " -S SUF use suffix SUF instead of .gz\n" " -V show version and legal information\n", - program_invocation_name); + prog_invocation_name); } static void @@ -87,14 +87,14 @@ show_version(void) static bool is_gunzip(void) { - if (tstrxcmp(program_invocation_name, T("gunzip")) == 0) + if (tstrxcmp(prog_invocation_name, T("gunzip")) == 0) return true; - if (tstrxcmp(program_invocation_name, T("libdeflate-gunzip")) == 0) + if (tstrxcmp(prog_invocation_name, T("libdeflate-gunzip")) == 0) return true; #ifdef _WIN32 - if (tstrxcmp(program_invocation_name, T("gunzip.exe")) == 0) + if (tstrxcmp(prog_invocation_name, T("gunzip.exe")) == 0) return true; - if (tstrxcmp(program_invocation_name, T("libdeflate-gunzip.exe")) == 0) + if (tstrxcmp(prog_invocation_name, T("libdeflate-gunzip.exe")) == 0) return true; #endif return false; diff --git a/programs/prog_util.c b/programs/prog_util.c index f736dab..54107b2 100644 --- a/programs/prog_util.c +++ b/programs/prog_util.c @@ -54,14 +54,14 @@ #endif /* The invocation name of the program (filename component only) */ -const tchar *program_invocation_name; +const tchar *prog_invocation_name; static void do_msg(const char *format, bool with_errno, va_list va) { int saved_errno = errno; - fprintf(stderr, "%"TS": ", program_invocation_name); + fprintf(stderr, "%"TS": ", prog_invocation_name); vfprintf(stderr, format, va); if (with_errno) fprintf(stderr, ": %s\n", strerror(saved_errno)); @@ -129,7 +129,7 @@ get_filename(const tchar *path) void begin_program(tchar *argv[]) { - program_invocation_name = get_filename(argv[0]); + prog_invocation_name = get_filename(argv[0]); #ifdef FREESTANDING /* This allows testing freestanding library builds. */ @@ -233,7 +233,7 @@ retry: } fprintf(stderr, "%"TS": %"TS" already exists; " "overwrite? (y/n) ", - program_invocation_name, strm->name); + prog_invocation_name, strm->name); if (getchar() != 'y') { msg("Not overwriting."); goto err; diff --git a/programs/prog_util.h b/programs/prog_util.h index 6bc4599..c50cbe4 100644 --- a/programs/prog_util.h +++ b/programs/prog_util.h @@ -133,7 +133,7 @@ int wmain(int argc, wchar_t **argv); #endif /* !_WIN32 */ -extern const tchar *program_invocation_name; +extern const tchar *prog_invocation_name; void _printf(1, 2) msg(const char *fmt, ...); void _printf(1, 2) msg_errno(const char *fmt, ...);