Go to the first, previous, next, last section, table of contents.


Argp Global Variables

These variables make it very easy for every user program to implement the `--version' option and provide a bug-reporting address in the `--help' output (which is implemented by argp regardless).

Variable: const char * argp_program_version
If defined or set by the user program to a non-zero value, then a `--version' option is added when parsing with argp_parse (unless the ARGP_NO_HELP flag is used), which will print this string followed by a newline and exit (unless the ARGP_NO_EXIT flag is used).

Variable: const char * argp_program_bug_address
If defined or set by the user program to a non-zero value, argp_program_bug_address should point to a string that is the bug-reporting address for the program. It will be printed at the end of the standard output for the `--help' option, embedded in a sentence that says something like `Report bugs to address.'.

Variable: argp_program_version_hook
If defined or set by the user program to a non-zero value, then a `--version' option is added when parsing with argp_parse (unless the ARGP_NO_HELP flag is used), which calls this function to print the version, and then exits with a status of 0 (unless the ARGP_NO_EXIT flag is used). It should point to a function with the following type signature:

void print-version (FILE *stream, struct argp_state *state)

See section Argp Parsing State, for an explanation of state.

This variable takes precedent over argp_program_version, and is useful if a program has version information that cannot be easily specified as a simple string.

Variable: error_t argp_err_exit_status
The exit status that argp will use when exiting due to a parsing error. If not defined or set by the user program, this defaults to EX_USAGE from `<sysexits.h>'.


Go to the first, previous, next, last section, table of contents.