repositories
/
TP_AL_C.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2569672
)
print usage message if options are invalid.
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Thu, 30 Nov 2017 20:27:30 +0000
(21:27 +0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Thu, 30 Nov 2017 20:27:30 +0000
(21:27 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
lexer/main.c
patch
|
blob
|
blame
|
history
diff --git
a/lexer/main.c
b/lexer/main.c
index a187f8ebb3fd88456aa01653418f00abd66e87c8..85adea092562d8c3c248b632060eff1933158b36 100644
(file)
--- a/
lexer/main.c
+++ b/
lexer/main.c
@@
-91,6
+91,8
@@
int main(int argc, char **argv) {
/* invalid option */
pr_error("%s: option '-%c' is invalid: ignored\n",
argv[0], optopt);
+ /* print the help message for invalid options */
+ hflag = 1;
break;
}
}