summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authormillert <>2005-03-26 22:02:15 +0000
committermillert <>2005-03-26 22:02:15 +0000
commitd78c5b47b1ae8f1ee633026e9f1129fca7caa006 (patch)
tree6cc9b0bf36197bb6a60b0ebc06930fd6989776eb /src/lib
parent2f490723a2e673b2457f65c4b06cacb7d700a3e8 (diff)
downloadopenbsd-d78c5b47b1ae8f1ee633026e9f1129fca7caa006.tar.gz
openbsd-d78c5b47b1ae8f1ee633026e9f1129fca7caa006.tar.bz2
openbsd-d78c5b47b1ae8f1ee633026e9f1129fca7caa006.zip
Document that historic BSD getopt(3) set optopt for each char, not just
on error.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/stdlib/getopt.315
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3
index 831d35c0ba..e0dc3701f9 100644
--- a/src/lib/libc/stdlib/getopt.3
+++ b/src/lib/libc/stdlib/getopt.3
@@ -25,7 +25,7 @@
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE. 26.\" SUCH DAMAGE.
27.\" 27.\"
28.\" $OpenBSD: getopt.3,v 1.30 2004/12/22 16:24:53 jmc Exp $ 28.\" $OpenBSD: getopt.3,v 1.31 2005/03/26 22:02:15 millert Exp $
29.\" 29.\"
30.Dd December 17, 2002 30.Dd December 17, 2002
31.Dt GETOPT 3 31.Dt GETOPT 3
@@ -311,6 +311,19 @@ the
311.Ox 311.Ox
312.Fn getopt 312.Fn getopt
313supports optional arguments separated by whitespace. 313supports optional arguments separated by whitespace.
314.Pp
315Historic
316.Bx
317versions of
318.Fn getopt
319set
320.Fa optopt
321to the last option character processed.
322However, this conflicts with
323.St -p1003.1
324which stipulates that
325.Fa optopt
326be set to the last character that caused an error.
314.Sh HISTORY 327.Sh HISTORY
315The 328The
316.Fn getopt 329.Fn getopt