File: argp-ex2.c

package info (click to toggle)
glibc-pre2.1 2.0.93-980414-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 43,920 kB
  • ctags: 42,602
  • sloc: ansic: 325,848; asm: 23,534; makefile: 3,352; sh: 3,283; awk: 582; perl: 474; csh: 15; sed: 10
file content (25 lines) | stat: -rw-r--r-- 788 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Argp example #2 -- a pretty minimal program using argp */

#include <argp.h>

const char *argp_program_version =
  "argp-ex2 1.0";
const char *argp_program_bug_address =
  "<bug-gnu-utils@@prep.ai.mit.edu>";

/* Program documentation.  */
static char doc[] =
  "Argp example #2 -- a pretty minimal program using argp";

/* Our argpument parser.  The @code{options}, @code{parser}, and
   @code{args_doc} fields are zero because we have neither options or
   arguments; @code{doc} and @code{argp_program_bug_address} will be
   used in the output for @samp{--help}, and the @samp{--version}
   option will print out @code{argp_program_version}.  */
static struct argp argp = { 0, 0, 0, doc };

int main (int argc, char **argv)
{
  argp_parse (&argp, argc, argv, 0, 0, 0);
  exit (0);
}