The options
field in a struct argp
points to a vector of
struct argp_option
structures, each of which specifies an option
that argp parser supports (actually, sometimes multiple entries may used
for a single option if it has many names). It should be terminated by
an entry with zero in all fields (note that when using an initialized C
array for options, writing { 0 }
is enough to achieve this).
const char *name
OPTION_ALIAS
flag set (see section Flags for Argp Options).
int key
isascii (key)
is
true), it also specifies a short option `-char', where
char is the ASCII character with the code key.
const char *arg
OPTION_ARG_OPTIONAL
flag (see section Flags for Argp Options) is set, in which case it may be provided.
int flags
const char *doc
name
and key
fields are zero, this string
will be printed out-dented from the normal option column, making it
useful as a group header (it will be the first thing printed in its
group); in this usage, it's conventional to end the string with a
`:' character.
int group
name
and
key
fields both zero), in which case, the previous entry + 1 is
the default. Automagic options such as `--help' are put into group
-1.
Note that because of C structure initialization rules, this field
often need not be specified, because 0 is the right value.
Go to the first, previous, next, last section, table of contents.