diff --git a/canplayer.c b/canplayer.c index eb9c569b..892deb73 100644 --- a/canplayer.c +++ b/canplayer.c @@ -279,7 +279,7 @@ int main(int argc, char **argv) char *fret; unsigned long long sec, usec; - while ((opt = getopt(argc, argv, "I:l:tin:g:s:xv?")) != -1) { + while ((opt = getopt(argc, argv, "I:l:tin:g:s:xvh")) != -1) { switch (opt) { case 'I': infile = fopen(optarg, "r"); @@ -334,10 +334,14 @@ int main(int argc, char **argv) verbose++; break; - case '?': + case 'h': + print_usage(basename(argv[0])); + exit(EXIT_SUCCESS); + break; + default: print_usage(basename(argv[0])); - return 1; + exit(EXIT_FAILURE); break; } }