| 607 | } |
| 608 | |
| 609 | static enum parse_opt_result parse_subcommand(const char *arg, |
| 610 | const struct option *options) |
| 611 | { |
| 612 | for (; options->type != OPTION_END; options++) |
| 613 | if (options->type == OPTION_SUBCOMMAND && |
| 614 | !strcmp(options->long_name, arg)) { |
| 615 | *(parse_opt_subcommand_fn **)options->value = options->subcommand_fn; |
| 616 | return PARSE_OPT_SUBCOMMAND; |
| 617 | } |
| 618 | |
| 619 | return PARSE_OPT_UNKNOWN; |
| 620 | } |
| 621 | |
| 622 | static void check_typos(const char *arg, const struct option *options) |
| 623 | { |
no outgoing calls
no test coverage detected