X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..2acb89982f71719aec26ca16705bd2c0400a9550:/stdlib/FreeBSD/getopt_long.3 diff --git a/stdlib/FreeBSD/getopt_long.3 b/stdlib/FreeBSD/getopt_long.3 index dde7980..fd33cfc 100644 --- a/stdlib/FreeBSD/getopt_long.3 +++ b/stdlib/FreeBSD/getopt_long.3 @@ -29,7 +29,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 -.\" $FreeBSD: src/lib/libc/stdlib/getopt_long.3,v 1.11 2004/03/06 14:47:49 ache Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/getopt_long.3,v 1.13 2005/01/20 09:17:04 ru Exp $ .\" .Dd April 1, 2000 .Dt GETOPT_LONG 3 @@ -133,7 +133,7 @@ field should be one of: no argument to the option is expect .It Dv required_argument an argument to the option is required -.It Li optional_argument +.It Dv optional_argument an argument to the option may be presented. .El .Pp @@ -190,7 +190,7 @@ the single-character option is returned. If the .Fa flag field in -.Li struct option +.Vt "struct option" is .Dv NULL , .Fn getopt_long @@ -213,6 +213,18 @@ if there was a missing option argument, .Ql \&? if the user specified an unknown or ambiguous option, and \-1 when the argument list has been exhausted. +.Sh ENVIRONMENT +.Bl -tag -width ".Ev POSIXLY_CORRECT" +.It Ev POSIXLY_CORRECT +If set, option processing stops when the first non-option is found and +a leading +.Ql - +or +.Ql + +in the +.Fa optstring +is ignored. +.El .Sh EXAMPLES .Bd -literal -compact int bflag, ch, fd; @@ -450,18 +462,6 @@ relative to current positions) are the same, though. (We do fewer variable swaps.) .El -.Sh ENVIRONMENT -.Bl -tag -width POSIXLY_CORRECT -.It Ev POSIXLY_CORRECT -If set, option processing stops when the first non-option is found and -a leading -.Ql - -or -.Ql + -in the -.Ar optstring -is ignored. -.El .Sh SEE ALSO .Xr getopt 3 .Sh HISTORY @@ -494,9 +494,9 @@ in .Fx 5.2 . .Sh BUGS The -.Ar argv +.Fa argv argument is not really -.Dv const +.Vt const as its elements may be permuted (unless .Ev POSIXLY_CORRECT is set).