mirror of https://github.com/mkerrisk/man-pages
getopt.3: EXAMPLE: Add subheadings to distinguish the two example programs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
d1c2e0f2cb
commit
81e10454a2
|
@ -38,7 +38,7 @@
|
|||
.\" the start of optstring
|
||||
.\" Modified 2006-12-15, mtk, Added getopt() example program.
|
||||
.\"
|
||||
.TH GETOPT 3 2010-11-01 "GNU" "Linux Programmer's Manual"
|
||||
.TH GETOPT 3 2014-05-09 "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
getopt, getopt_long, getopt_long_only,
|
||||
optarg, optind, opterr, optopt \- Parse command-line options
|
||||
|
@ -374,6 +374,7 @@ The GNU
|
|||
implementation (and probably all other implementations) implements the
|
||||
correct behavior rather than that specified.
|
||||
.SH EXAMPLE
|
||||
.SS getopt()
|
||||
The following trivial example program uses
|
||||
.BR getopt ()
|
||||
to handle two program options:
|
||||
|
@ -426,7 +427,7 @@ main(int argc, char *argv[])
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.PP
|
||||
.SS getopt_long()
|
||||
The following example program illustrates the use of
|
||||
.BR getopt_long ()
|
||||
with most of its features.
|
||||
|
|
Loading…
Reference in New Issue