summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/getopt.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/getopt.3')
-rw-r--r--lib/libc/stdlib/getopt.314
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
index 95ff6e6..3047183 100644
--- a/lib/libc/stdlib/getopt.3
+++ b/lib/libc/stdlib/getopt.3
@@ -122,9 +122,11 @@ The
function
returns an
.Dv EOF
-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
@@ -142,10 +144,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.
OpenPOWER on IntegriCloud