|
maug
Quick and dirty C mini-augmentation library.
|
Tools for parsing command line arguments. More...
Data Structures | |
| struct | MARGE_ARG |
Typedefs | |
| typedef MERROR_RETVAL(* | maug_cli_cb) (const char *arg, ssize_t arg_c, void *data) |
Functions | |
| MERROR_RETVAL | maug_cli_h (const char *arg, ssize_t arg_c, void *args) |
| MERROR_RETVAL | maug_parse_args (int argc, char *argv[]) |
| MERROR_RETVAL | maug_add_arg (const char *arg, int arg_sz, const char *help, int help_sz, maug_cli_cb arg_cb, void *data) |
| Add a command-line argument to the built-in parser. | |
Tools for parsing command line arguments.
| MERROR_RETVAL maug_add_arg | ( | const char * | arg, |
| int | arg_sz, | ||
| const char * | help, | ||
| int | help_sz, | ||
| maug_cli_cb | arg_cb, | ||
| void * | data ) |
Add a command-line argument to the built-in parser.
| arg | String containing the argument to look for. |
| arg_sz | Length of arg in chars or 0 to autodetect. |
| help | Help text for the arg when -h is invoked. |
| help_sz | Length of help in chars or 0 to autodetect. |
| arg_cb | maug_cli_cb to invoke when arg is found. |