The structure that stores the information about the command-line options. More...
#include <gk_getopt.h>
Public Attributes | |
int * | flag |
int | has_arg |
char * | name |
int | val |
The structure that stores the information about the command-line options.
This structure describes a single long option name for the sake of gk_getopt_long(). The argument long_options
must be an array of these structures, one for each long option. Terminate the array with an element containing all zeros.
Definition at line 28 of file gk_getopt.h.
int* gk_option::flag |
See the discussion on gk_option::val
Definition at line 34 of file gk_getopt.h.
int gk_option::has_arg |
This field says whether the option takes an argument. It is an integer, and there are three legitimate values: no_argument, required_argument and optional_argument.
Definition at line 30 of file gk_getopt.h.
char* gk_option::name |
This field is the name of the option.
Definition at line 29 of file gk_getopt.h.
int gk_option::val |
These fields control how to report or act on the option when it occurs.
If flag is a null pointer, then the val is a value which identifies this option. Often these values are chosen to uniquely identify particular long options.
If flag is not a null pointer, it should be the address of an int variable which is the flag for this option. The value in val is the value to store in the flag to indicate that the option was seen.
Definition at line 35 of file gk_getopt.h.