Go to the source code of this file.
Functions | |
Option * | find_option (Option_set *opt, char *flag) |
Returns a pointer to the Option data structure that represents a given option. | |
int | get_argument (Option_set *opt, char *flag, char **arg) |
Returns a pointer to the argument associated with a given option. | |
int | is_argument_required (Option_set *opt, char *flag) |
This function returns a value that represents the number of arguments (0 or 1 argument) required by for a given option. | |
int | init_options (Option_set *opt) |
Initialize the array of option definitions. | |
int | parse_command_line (char *argv[], int argc, Option_set *opt, char **err, char **flag, char **arg) |
Parse the command line and set up the option's data structure. | |
Variables | |
char | self_option [] = "" |
Pointer used to set the argument of the options that do not require arguments (ex: --help). |
Definition in file option.c.
|
Returns a pointer to the Option data structure that represents a given option.
Definition at line 24 of file option.c. References Option_set_::count, Option_::flag, and Option_set_::opt. Referenced by get_argument(), is_argument_required(), and parse_command_line(). |
|
Returns a pointer to the argument associated with a given option.
Definition at line 65 of file option.c. References find_option(), and Option_::pointer. |
|
Initialize the array of option definitions.
Definition at line 124 of file option.c. References Option_set_::count, Option_::flag, Option_set_::last_index, and Option_set_::opt. |
|
This function returns a value that represents the number of arguments (0 or 1 argument) required by for a given option.
Definition at line 96 of file option.c. References Option_::arg, and find_option(). |
|
Parse the command line and set up the option's data structure.
Definition at line 185 of file option.c. References Option_::arg, find_option(), Option_set_::last_index, Option_::max_size, Option_::pointer, Option_::reg_exp, and self_option. |