cansequence: also show help for option "-?"

This avoids the "invalid option" error message in the auto generated
man pages.

| DESCRIPTION
|       ./cansequence: invalid option -- '?'
pull/476/head
Marc Kleine-Budde 2023-11-29 17:31:21 +01:00
parent e8a808e2ab
commit 0b0bce87c4
1 changed files with 2 additions and 1 deletions

View File

@ -273,7 +273,7 @@ int main(int argc, char **argv)
{ 0, 0, 0, 0 },
};
while ((opt = getopt_long(argc, argv, "ei:pq::rvh", long_options, NULL)) != -1) {
while ((opt = getopt_long(argc, argv, "ei:pq::rvh?", long_options, NULL)) != -1) {
switch (opt) {
case 'e':
extended = true;
@ -312,6 +312,7 @@ int main(int argc, char **argv)
break;
case 'h':
case '?':
print_usage(basename(argv[0]));
exit(EXIT_SUCCESS);
break;