Skip to content

Commit

Permalink
Merge pull request #60 from vaporup/master
Browse files Browse the repository at this point in the history
change the usage output to not include the full contents of argv[0]
  • Loading branch information
mpereira authored Sep 3, 2021
2 parents 9561b23 + 276de8b commit 9d32aae
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 9d32aae

Please sign in to comment.