Update.
[glibc.git] / manual / examples / argp-ex2.c
blobd1b149b4942483458a61982f904187986785cba2
1 /* Argp example #2 -- a pretty minimal program using argp */
3 #include <argp.h>
5 const char *argp_program_version =
6 "argp-ex2 1.0";
7 const char *argp_program_bug_address =
8 "<bug-gnu-utils@@prep.ai.mit.edu>";
10 /* Program documentation. */
11 static char doc[] =
12 "Argp example #2 -- a pretty minimal program using argp";
14 /* Our argpument parser. The @code{options}, @code{parser}, and
15 @code{args_doc} fields are zero because we have neither options or
16 arguments; @code{doc} and @code{argp_program_bug_address} will be
17 used in the output for @samp{--help}, and the @samp{--version}
18 option will print out @code{argp_program_version}. */
19 static struct argp argp = { 0, 0, 0, doc };
21 int main (int argc, char **argv)
23 argp_parse (&argp, argc, argv, 0, 0, 0);
24 exit (0);