diff options
Diffstat (limited to 'lib/libc/stdlib/getopt.3')
-rw-r--r-- | lib/libc/stdlib/getopt.3 | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index 39cc5de..ad4a4dc 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -121,9 +121,11 @@ The .Fn getopt function returns \-1 -when the argument list is exhausted, or a non-recognized +when the argument list is exhausted, or +.Ql ? +if a non-recognized option is encountered. -The interpretation of options in the argument list may be cancelled +The interpretation of options in the argument list may be canceled by the option .Ql -- (double dash) which causes @@ -139,10 +141,10 @@ If the function encounters a character not found in the string .Va optarg or detects -a missing option argument it writes an error message and returns -.Ql ? -to the -.Em stderr . +a missing option argument it writes an error message to the +.Em stderr +and returns +.Ql ? . Setting .Va opterr to a zero will disable these error messages. @@ -213,7 +215,7 @@ from .Pp A single dash .Dq Li - -may be specified as an character in +may be specified as a character in .Fa optstring , however it should .Em never |