123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- #ifndef _GETOPT_H
- #ifndef __need_getopt
- # define _GETOPT_H 1
- #endif
- #if !defined __GNU_LIBRARY__
- # include <ctype.h>
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern char *optarg;
- extern int optind;
- extern int opterr;
- extern int optopt;
- #ifndef __need_getopt
- struct option
- {
- const char *name;
-
- int has_arg;
- int *flag;
- int val;
- };
- # define no_argument 0
- # define required_argument 1
- # define optional_argument 2
- #endif
- extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
- #ifndef __need_getopt
- extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
- const struct option *__longopts, int *__longind);
- extern int getopt_long_only (int __argc, char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind);
- extern int _getopt_internal (int __argc, char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only);
- #endif
- #ifdef __cplusplus
- }
- #endif
- #undef __need_getopt
- #endif
|