From e6e38c439b375b3f716b43ff2bd7094a96d17a0f Mon Sep 17 00:00:00 2001 From: Rory Bradford Date: Sun, 5 Jun 2022 14:13:50 +0100 Subject: Replace __progname with hardcoded name, include version in usage. Signed-off-by: Rory Bradford --- rf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rf.c b/rf.c index a8fe80e..3066720 100644 --- a/rf.c +++ b/rf.c @@ -22,8 +22,6 @@ #define IGNORE "ignore" #define RFIGNORE ".rfignore" -extern char *__progname; - struct ignores *global_ignores; struct ignores *local_ignores; @@ -42,8 +40,8 @@ static void usage(char *error) { fprintf(stderr, "Error: %s\n\n", error); } - fprintf( - stderr, "usage: %s [-d directory] [-lsvw] pattern ...\n", __progname); + fprintf(stderr, "rf version %s\n\n", VERSION); + fprintf(stderr, "usage: rf [-d directory] [-lsvw] pattern ...\n"); } static int is_child(char *dirname) { -- cgit 1.4.1-2-gfad0