From 276de8b68e18a6dca9474ad165dff236093a1152 Mon Sep 17 00:00:00 2001 From: Sven Wick Date: Thu, 2 Sep 2021 22:08:33 +0200 Subject: [PATCH] changes the usage output to not include the full contents of argv[0] --- src/ttysolitaire.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ttysolitaire.c b/src/ttysolitaire.c index 286e96a..58fd634 100644 --- a/src/ttysolitaire.c +++ b/src/ttysolitaire.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -33,7 +34,7 @@ int main(int argc, char *argv[]) { {"no-background-color", no_argument, &no_background_color, 1}, {0, 0, 0, 0}}; - program_name = argv[0]; + program_name = basename(argv[0]); while ((option = getopt_long(argc, argv, "hvp:", options, &option_index)) != -1) {