summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorJared Yanovich <jaredy@cvs.openbsd.org>2005-07-26 04:14:59 +0000
committerJared Yanovich <jaredy@cvs.openbsd.org>2005-07-26 04:14:59 +0000
commit0a4b30eab9f26b397c8990000026ed3c80c5cccf (patch)
treee4ee78f683b0a94f1238c8d8bddc6014d296f0bd /lib/libc
parentb22a85fa4f85fa243a882865ea3a07300fa0b5c1 (diff)
provide a description of the EXAMPLE; ok jmc
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/getopt.313
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
index c721bbcff9a..ed4456f52ff 100644
--- a/lib/libc/stdlib/getopt.3
+++ b/lib/libc/stdlib/getopt.3
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: getopt.3,v 1.33 2005/07/01 05:18:57 jmc Exp $
+.\" $OpenBSD: getopt.3,v 1.34 2005/07/26 04:14:58 jaredy Exp $
.\"
.Dd December 17, 2002
.Dt GETOPT 3
@@ -166,7 +166,16 @@ in
is ignored.
.El
.Sh EXAMPLES
-.Bd -literal -compact
+The following code accepts the options
+.Fl b
+and
+.Fl f Ar argument
+and adjusts
+.Va argc
+and
+.Va argv
+after option argument processing has completed.
+.Bd -literal -offset indent
extern char *optarg;
extern int optind;
int bflag, ch, fd;