Skip to content

Commit

Permalink
changes the usage output to not include the full contents of argv[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
vaporup committed Sep 2, 2021
1 parent 9561b23 commit 276de8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ttysolitaire.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <errno.h>
#include <getopt.h>
#include <libgen.h>
#include <locale.h>
#include <ncurses.h>
#include <stdlib.h>
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 276de8b

Please sign in to comment.