about summary refs log tree commit diff
path: root/manual/examples/argp-ex1.c
blob: 931a8264a57b674a531472b2eb0664bb618304a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Argp example #1 -- a minimal program using argp */

/* This is (probably) the smallest possible program that
   uses argp.  It won't do much except give an error
   messages and exit when there are any arguments, and print
   a (rather pointless) messages for --help.  */

#include <stdlib.h>
#include <argp.h>

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