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.
Definition: gk_getopt.h:28
char * name
Definition: gk_getopt.h:29
int gk_optind
Index in ARGV of the next element to be scanned.
Definition: getopt.c:68
char * gk_optarg
For communication arguments to the caller.
Definition: getopt.c:56
int gk_opterr
Controls error reporting for unrecognized options.
Definition: getopt.c:81
int has_arg
Definition: gk_getopt.h:30
int * flag
Definition: gk_getopt.h:34
int gk_getopt_long(int __argc, char **__argv, char *__shortopts, struct gk_option *__longopts, int *__longind)
Parse command-line arguments with long options.
Definition: getopt.c:833
int val
Definition: gk_getopt.h:35
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.
Definition: getopt.c:849
int gk_optopt
Stores unknown option characters.
Definition: getopt.c:92
int gk_getopt(int __argc, char **__argv, char *__shortopts)
Parse command-line arguments.
Definition: getopt.c:769