From a9ea88b748a36504648eb9ae3a195fc7b1790176 Mon Sep 17 00:00:00 2001 From: mpp Date: Wed, 21 Aug 1996 19:48:50 +0000 Subject: Correctly document when getopt returns EOF and '?', and some other minor cleanup. --- lib/libc/stdlib/getopt.3 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/libc/stdlib/getopt.3') diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index 4d51bac..3047183 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -122,7 +122,9 @@ 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 canceled by the option @@ -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. -- cgit v1.1