Tools for parsing command line arguments.
More...
|
#define | MAUG_CLI_SIGIL_SZ 1 |
|
#define | MAUG_CLI_SIGIL "-" |
| Default flag to prepend to CLI arguments. Is "/" on Windows/DOS and "-" on other platforms. Can be overridden with a -D flag or define.
|
|
#define | MAUG_CLI_ARG_C_DEFAULT -1 |
|
#define | MAUG_CLI_ARG_LIST_SZ_MAX 20 |
|
#define | MAUG_CLI_ARG_HELP_SZ_MAX 127 |
|
#define | MAUG_CLI_ARG_SZ_MAX 20 |
|
#define | MAUG_CLI(f) |
| Default CLI arguments for all RetroFlat programs.
|
|
|
typedef MERROR_RETVAL(* | maug_cli_cb) (const char *arg, ssize_t arg_c, void *data) |
|
|
int | 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.
◆ MAUG_CLI
Value:
#define MAUG_CLI_SIGIL
Default flag to prepend to CLI arguments. Is "/" on Windows/DOS and "-" on other platforms....
Definition marge.h:39
Default CLI arguments for all RetroFlat programs.
◆ maug_add_arg()
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.
- Parameters
-
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. |