diff options
author | jmc <> | 2004-12-22 16:24:53 +0000 |
---|---|---|
committer | jmc <> | 2004-12-22 16:24:53 +0000 |
commit | 48524b4aeb5ceb3b1634040fb37ae098ea229c4c (patch) | |
tree | 8000dc467792392dd66397fd5a40e2001ce0b8c7 /src/lib | |
parent | 114b1aac46cd445dc7c11bd8a6e5f38730542316 (diff) | |
download | openbsd-48524b4aeb5ceb3b1634040fb37ae098ea229c4c.tar.gz openbsd-48524b4aeb5ceb3b1634040fb37ae098ea229c4c.tar.bz2 openbsd-48524b4aeb5ceb3b1634040fb37ae098ea229c4c.zip |
tweaks from michael knudsen;
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/stdlib/getopt.3 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3 index 76546d2946..831d35c0ba 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.29 2004/12/07 16:14:35 millert Exp $ | 28 | .\" $OpenBSD: getopt.3,v 1.30 2004/12/22 16:24:53 jmc Exp $ |
29 | .\" | 29 | .\" |
30 | .Dd December 17, 2002 | 30 | .Dd December 17, 2002 |
31 | .Dt GETOPT 3 | 31 | .Dt GETOPT 3 |
@@ -36,9 +36,9 @@ | |||
36 | .Sh SYNOPSIS | 36 | .Sh SYNOPSIS |
37 | .Fd #include <unistd.h> | 37 | .Fd #include <unistd.h> |
38 | .Vt extern char *optarg; | 38 | .Vt extern char *optarg; |
39 | .Vt extern int opterr; | ||
39 | .Vt extern int optind; | 40 | .Vt extern int optind; |
40 | .Vt extern int optopt; | 41 | .Vt extern int optopt; |
41 | .Vt extern int opterr; | ||
42 | .Vt extern int optreset; | 42 | .Vt extern int optreset; |
43 | .Ft int | 43 | .Ft int |
44 | .Fn getopt "int argc" "char * const *argv" "const char *optstring" | 44 | .Fn getopt "int argc" "char * const *argv" "const char *optstring" |
@@ -61,9 +61,8 @@ may contain the following elements: individual characters, | |||
61 | characters followed by a colon, and characters followed by two colons. | 61 | characters followed by a colon, and characters followed by two colons. |
62 | A character followed by a single colon indicates that an argument | 62 | A character followed by a single colon indicates that an argument |
63 | is to follow the option on the command line. | 63 | is to follow the option on the command line. |
64 | Two colons indicates that the argument is optional--this is an | 64 | Two colons indicates that the argument is optional \- this is an |
65 | extension not covered by | 65 | extension not covered by POSIX. |
66 | .Px . | ||
67 | For example, an option string | 66 | For example, an option string |
68 | .Qq x | 67 | .Qq x |
69 | recognizes an option | 68 | recognizes an option |
@@ -97,7 +96,9 @@ The | |||
97 | .Va optind | 96 | .Va optind |
98 | variable may be set to another value larger than 0 before a set of calls to | 97 | variable may be set to another value larger than 0 before a set of calls to |
99 | .Fn getopt | 98 | .Fn getopt |
100 | in order to skip over more or less argv entries. | 99 | in order to skip over more or less |
100 | .Fa argv | ||
101 | entries. | ||
101 | An | 102 | An |
102 | .Va optind | 103 | .Va optind |
103 | value of 0 is reserved for compatibility with GNU | 104 | value of 0 is reserved for compatibility with GNU |