Definition in file cmdline.h.
Go to the source code of this file.
Data Structures | |
| struct | gengetopt_args_info |
| Where the command line options are stored. More... | |
| struct | cmdline_parser_params |
| The additional parameters to pass to parser functions. More... | |
Defines | |
| #define | CMDLINE_PARSER_PACKAGE PACKAGE |
| the program name | |
| #define | CMDLINE_PARSER_VERSION VERSION |
| the program version | |
Functions | |
| int | cmdline_parser (int argc, char *const *argv, struct gengetopt_args_info *args_info) |
| int | cmdline_parser2 (int argc, char *const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) |
| int | cmdline_parser_ext (int argc, char *const *argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) |
| int | cmdline_parser_file_save (const char *filename, struct gengetopt_args_info *args_info) |
| void | cmdline_parser_print_help (void) |
| void | cmdline_parser_print_version (void) |
| cmdline_parser_params * | cmdline_parser_params_init () |
| void | cmdline_parser_init (struct gengetopt_args_info *args_info) |
| void | cmdline_parser_free (struct gengetopt_args_info *args_info) |
| int | cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) |
Variables | |
| const char * | gengetopt_args_info_purpose |
| the purpose string of the program | |
| const char * | gengetopt_args_info_usage |
| the usage string of the program | |
| const char * | gengetopt_args_info_help [] |
| all the lines making the help output | |
| int cmdline_parser | ( | int | argc, | |
| char *const * | argv, | |||
| struct gengetopt_args_info * | args_info | |||
| ) |
| int cmdline_parser2 | ( | int | argc, | |
| char *const * | argv, | |||
| struct gengetopt_args_info * | args_info, | |||
| int | override, | |||
| int | initialize, | |||
| int | check_required | |||
| ) |
The command line parser (version with additional parameters - deprecated)
| argc | the number of command line options | |
| argv | the command line options | |
| args_info | the structure where option information will be stored | |
| override | whether to override possibly already present options | |
| initialize | whether to initialize the option structure my_args_info | |
| check_required | whether to check that all required options were provided |
| int cmdline_parser_ext | ( | int | argc, | |
| char *const * | argv, | |||
| struct gengetopt_args_info * | args_info, | |||
| struct cmdline_parser_params * | params | |||
| ) |
The command line parser (version with additional parameters)
| argc | the number of command line options | |
| argv | the command line options | |
| args_info | the structure where option information will be stored | |
| params | additional parameters for the parser |
| int cmdline_parser_file_save | ( | const char * | filename, | |
| struct gengetopt_args_info * | args_info | |||
| ) |
Save the contents of the option struct into a (text) file. This file can be read by the config file parser (if generated by gengetopt)
| filename | the file where to save | |
| args_info | the option struct to save |
| void cmdline_parser_free | ( | struct gengetopt_args_info * | args_info | ) |
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the structure itself)
| args_info | the structure to deallocate |
| void cmdline_parser_init | ( | struct gengetopt_args_info * | args_info | ) |
Initializes the passed gengetopt_args_info structure's fields (also set default values for options that have a default)
| args_info | the structure to initialize |
| struct cmdline_parser_params* cmdline_parser_params_init | ( | ) |
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to 0
| void cmdline_parser_print_version | ( | void | ) |
| int cmdline_parser_required | ( | struct gengetopt_args_info * | args_info, | |
| const char * | prog_name | |||
| ) |
1.5.0