17 for (i = 1; i < argc; i++) {
22 if (strcmp(argv[i], map[j].long_opt) == 0) {
23 argv[i] = (
char*)map[j].short_opt;
34 return strcmp(arg,
"-h") == 0 || strcmp(arg,
"--help") == 0;
void mrtk_normalize_args(int argc, char **argv, const mrtk_optmap_t *map)
Translate --long flags to their -short aliases in argv (in place).
int mrtk_is_help_flag(const char *arg)
Returns 1 if arg is a generic help flag (-h or --help), else 0.
Long-option to short-option alias entry.