diff options
Diffstat (limited to 'src/lib/libc/stdlib')
| -rw-r--r-- | src/lib/libc/stdlib/getopt_long.3 | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/getopt_long.3 b/src/lib/libc/stdlib/getopt_long.3 index 88e0dffb1b..706619203f 100644 --- a/src/lib/libc/stdlib/getopt_long.3 +++ b/src/lib/libc/stdlib/getopt_long.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: getopt_long.3,v 1.21 2016/01/04 19:43:13 tb Exp $ | 1 | .\" $OpenBSD: getopt_long.3,v 1.22 2020/01/13 18:05:10 stsp Exp $ |
| 2 | .\" $NetBSD: getopt_long.3,v 1.11 2002/10/02 10:54:19 wiz Exp $ | 2 | .\" $NetBSD: getopt_long.3,v 1.11 2002/10/02 10:54:19 wiz Exp $ |
| 3 | .\" | 3 | .\" |
| 4 | .\" Copyright (c) 1988, 1991, 1993 | 4 | .\" Copyright (c) 1988, 1991, 1993 |
| @@ -30,7 +30,7 @@ | |||
| 30 | .\" | 30 | .\" |
| 31 | .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 | 31 | .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 |
| 32 | .\" | 32 | .\" |
| 33 | .Dd $Mdocdate: January 4 2016 $ | 33 | .Dd $Mdocdate: January 13 2020 $ |
| 34 | .Dt GETOPT_LONG 3 | 34 | .Dt GETOPT_LONG 3 |
| 35 | .Os | 35 | .Os |
| 36 | .Sh NAME | 36 | .Sh NAME |
| @@ -98,6 +98,22 @@ Abbreviated long option names are accepted when | |||
| 98 | processes long options if the abbreviation is unique. | 98 | processes long options if the abbreviation is unique. |
| 99 | An exact match is always preferred for a defined long option. | 99 | An exact match is always preferred for a defined long option. |
| 100 | .Pp | 100 | .Pp |
| 101 | By default, | ||
| 102 | .Fn getopt_long | ||
| 103 | permutes | ||
| 104 | .Ar argv | ||
| 105 | such that all option arguments are evaluated before any non-options arguments. | ||
| 106 | If the first character of | ||
| 107 | .Fa optstring | ||
| 108 | is a plus sign | ||
| 109 | .Pq Ql + | ||
| 110 | or if the environment variable | ||
| 111 | .Ev POSIXLY_CORRECT | ||
| 112 | is set, then | ||
| 113 | .Ar argv | ||
| 114 | is processed in order and option processing stops as soon as the first | ||
| 115 | non-option argument is encountered. | ||
| 116 | .Pp | ||
| 101 | The | 117 | The |
| 102 | .Fn getopt_long | 118 | .Fn getopt_long |
| 103 | call requires an array to be initialized describing the long | 119 | call requires an array to be initialized describing the long |
