50 #define required_argument 1 51 #define optional_argument 2 55 extern int gk_getopt(
int __argc,
char **__argv,
char *__shortopts);
56 extern int gk_getopt_long(
int __argc,
char **__argv,
char *__shortopts,
57 struct gk_option *__longopts,
int *__longind);
59 char *__shortopts,
struct gk_option *__longopts,
int *__longind);
The structure that stores the information about the command-line options.
int gk_optind
Index in ARGV of the next element to be scanned.
char * gk_optarg
For communication arguments to the caller.
int gk_opterr
Controls error reporting for unrecognized options.
int gk_getopt_long(int __argc, char **__argv, char *__shortopts, struct gk_option *__longopts, int *__longind)
Parse command-line arguments with long options.
int gk_getopt_long_only(int __argc, char **__argv, char *__shortopts, struct gk_option *__longopts, int *__longind)
Parse command-line arguments with only long options.
int gk_optopt
Stores unknown option characters.
int gk_getopt(int __argc, char **__argv, char *__shortopts)
Parse command-line arguments.