summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-06-02 03:49:40 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-06-02 03:49:40 +0000
commit6b7671419beb4b4aa4236314c3eb4d01fb22f6c9 (patch)
treed79b2b07ce79073362b1d00abfa1f20f566d866a /lib/libc/stdlib
parent4f9e7ba6ffa6df1d3b6db39c8ad90c68835a0bad (diff)
Remove some lies
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/getopt.314
-rw-r--r--lib/libc/stdlib/getopt_long.35
2 files changed, 8 insertions, 11 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
index ce85f678dfa..d7d69cf15b2 100644
--- a/lib/libc/stdlib/getopt.3
+++ b/lib/libc/stdlib/getopt.3
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: getopt.3,v 1.23 2003/06/01 19:27:27 jmc Exp $
+.\" $OpenBSD: getopt.3,v 1.24 2003/06/02 03:49:39 millert Exp $
.\"
-.Dd December 8, 2002
+.Dd December 17, 2002
.Dt GETOPT 3
.Os
.Sh NAME
@@ -85,10 +85,6 @@ contains the index to the next
argument for a subsequent call
to
.Fn getopt .
-The variable
-.Va optopt
-saves the last known option character returned by
-.Fn getopt .
.Pp
The variables
.Va opterr
@@ -137,7 +133,8 @@ encounters a character not found in
.Fa optstring
or if it detects a missing option argument,
it returns
-.Sq ? .
+.Sq ?
+(question mark).
If
.Fa optstring
has a leading
@@ -146,6 +143,9 @@ then a missing option argument causes
.Sq \:
to be returned instead of
.Sq ? .
+In either case, the variable
+.Va optopt
+is set to the character that caused the error.
The
.Fn getopt
function returns \-1 when the argument list is exhausted.
diff --git a/lib/libc/stdlib/getopt_long.3 b/lib/libc/stdlib/getopt_long.3
index 2589bd7b03b..f69f72d9081 100644
--- a/lib/libc/stdlib/getopt_long.3
+++ b/lib/libc/stdlib/getopt_long.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getopt_long.3,v 1.6 2003/05/10 06:48:30 jmc Exp $
+.\" $OpenBSD: getopt_long.3,v 1.7 2003/06/02 03:49:39 millert Exp $
.\" $NetBSD: getopt_long.3,v 1.11 2002/10/02 10:54:19 wiz Exp $
.\"
.\" Copyright (c) 1988, 1991, 1993
@@ -368,6 +368,3 @@ argument is not really
as its elements may be permuted (unless
.Ev POSIXLY_CORRECT
is set).
-.Pp
-In a future release, this implementation should completely replace
-.Xr getopt 3 .