2
0

getoptx.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Interface to getopt_long_onlyx() */
  2. enum argreq {no_argument, required_argument, optional_argument};
  3. struct optionx {
  4. /* This describes an option. If the field `flag' is nonzero, it
  5. points to a variable that is to be set to the value given in
  6. the field `val' when the option is found, but left unchanged if
  7. the option is not found.
  8. */
  9. const char * name;
  10. enum argreq has_arg;
  11. int * flag;
  12. int val;
  13. };
  14. /* long_options[] is a list terminated by an element that contains
  15. a NULL 'name' member.
  16. */
  17. void
  18. getopt_long_onlyx(int const argc,
  19. char ** const argv,
  20. const char * const options,
  21. struct optionx * const long_options,
  22. unsigned int * const opt_index,
  23. int const opterrArg,
  24. int * const end_of_options,
  25. const char ** const optarg_arg,
  26. const char ** const unrecognized_option);
  27. unsigned int
  28. getopt_argstart(void);
  29. /*
  30. Copyright (C) 1989 Free Software Foundation, Inc.
  31. This program is free software; you can redistribute it and/or modify
  32. it under the terms of the GNU General Public License as published by
  33. the Free Software Foundation; either version 1, or (at your option)
  34. any later version.
  35. This program is distributed in the hope that it will be useful,
  36. but WITHOUT ANY WARRANTY; without even the implied warranty of
  37. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38. GNU General Public License for more details.
  39. You should have received a copy of the GNU General Public License
  40. along with this program; if not, write to the Free Software
  41. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */