summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjmc <>2004-12-22 16:24:53 +0000
committerjmc <>2004-12-22 16:24:53 +0000
commit48524b4aeb5ceb3b1634040fb37ae098ea229c4c (patch)
tree8000dc467792392dd66397fd5a40e2001ce0b8c7 /src/lib
parent114b1aac46cd445dc7c11bd8a6e5f38730542316 (diff)
downloadopenbsd-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.313
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,
61characters followed by a colon, and characters followed by two colons. 61characters followed by a colon, and characters followed by two colons.
62A character followed by a single colon indicates that an argument 62A character followed by a single colon indicates that an argument
63is to follow the option on the command line. 63is to follow the option on the command line.
64Two colons indicates that the argument is optional--this is an 64Two colons indicates that the argument is optional \- this is an
65extension not covered by 65extension not covered by POSIX.
66.Px .
67For example, an option string 66For example, an option string
68.Qq x 67.Qq x
69recognizes an option 68recognizes an option
@@ -97,7 +96,9 @@ The
97.Va optind 96.Va optind
98variable may be set to another value larger than 0 before a set of calls to 97variable may be set to another value larger than 0 before a set of calls to
99.Fn getopt 98.Fn getopt
100in order to skip over more or less argv entries. 99in order to skip over more or less
100.Fa argv
101entries.
101An 102An
102.Va optind 103.Va optind
103value of 0 is reserved for compatibility with GNU 104value of 0 is reserved for compatibility with GNU