
Go to the source code of this file.
Classes | |
| struct | option |
Defines | |
| #define | no_argument 0 |
| #define | required_argument 1 |
| #define | optional_argument 2 |
Functions | |
| int | my_getopt_reset (void) |
| int | my_getopt (int argc, char *argv[], const char *opts) |
| int | my_getopt_long (int argc, char *argv[], const char *shortopts, const struct option *longopts, int *longind) |
| int | my_getopt_long_only (int argc, char *argv[], const char *shortopts, const struct option *longopts, int *longind) |
| int | _my_getopt_internal (int argc, char *argv[], const char *shortopts, const struct option *longopts, int *longind, int long_only) |
Variables | |
| int | my_optind |
| int | my_opterr |
| int | my_optopt |
| char * | my_optarg |
| #define no_argument 0 |
Definition at line 51 of file my_getopt.h.
| #define optional_argument 2 |
Definition at line 55 of file my_getopt.h.
| #define required_argument 1 |
Definition at line 53 of file my_getopt.h.
| int _my_getopt_internal | ( | int | argc, | |
| char * | argv[], | |||
| const char * | shortopts, | |||
| const struct option * | longopts, | |||
| int * | longind, | |||
| int | long_only | |||
| ) |
Definition at line 145 of file my_getopt.c.
References _my_getopt_internal(), option::flag, my_getopt(), my_optarg, my_opterr, my_optind, my_optopt, option::name, and option::val.
Referenced by _my_getopt_internal(), my_getopt_long(), and my_getopt_long_only().


| int my_getopt | ( | int | argc, | |
| char * | argv[], | |||
| const char * | opts | |||
| ) |
Definition at line 49 of file my_getopt.c.
References my_getopt(), my_optarg, my_opterr, my_optind, and my_optopt.
Referenced by _my_getopt_internal(), and my_getopt().


| int my_getopt_long | ( | int | argc, | |
| char * | argv[], | |||
| const char * | shortopts, | |||
| const struct option * | longopts, | |||
| int * | longind | |||
| ) |
Definition at line 271 of file my_getopt.c.
References _my_getopt_internal().

| int my_getopt_long_only | ( | int | argc, | |
| char * | argv[], | |||
| const char * | shortopts, | |||
| const struct option * | longopts, | |||
| int * | longind | |||
| ) |
Definition at line 277 of file my_getopt.c.
References _my_getopt_internal().

| int my_getopt_reset | ( | void | ) |
| char* my_optarg |
Definition at line 33 of file my_getopt.c.
Referenced by _my_getopt_internal(), my_getopt(), and my_getopt_reset().
| int my_opterr |
Definition at line 32 of file my_getopt.c.
Referenced by _my_getopt_internal(), my_getopt(), and my_getopt_reset().
| int my_optind |
Definition at line 32 of file my_getopt.c.
Referenced by _my_getopt_internal(), my_getopt(), and my_getopt_reset().
| int my_optopt |
Definition at line 32 of file my_getopt.c.
Referenced by _my_getopt_internal(), my_getopt(), and my_getopt_reset().
1.6.3