argp-ex1.c 403 B

123456789101112131415
  1. /* Argp example #1 -- a minimal program using argp */
  2. /* This is (probably) the smallest possible program that
  3. uses argp. It won't do much except give an error
  4. messages and exit when there are any arguments, and print
  5. a (rather pointless) messages for --help. */
  6. #include <stdlib.h>
  7. #include <argp.h>
  8. int main (int argc, char **argv)
  9. {
  10. argp_parse (0, argc, argv, 0, 0, 0);
  11. exit (0);
  12. }