| 469 | } |
| 470 | |
| 471 | static int is_alias(struct parse_opt_ctx_t *ctx, |
| 472 | const struct option *one_opt, |
| 473 | const struct option *another_opt) |
| 474 | { |
| 475 | const char **group; |
| 476 | |
| 477 | if (!ctx->alias_groups) |
| 478 | return 0; |
| 479 | |
| 480 | if (!one_opt->long_name || !another_opt->long_name) |
| 481 | return 0; |
| 482 | |
| 483 | for (group = ctx->alias_groups; *group; group += 3) { |
| 484 | /* it and other are from the same family? */ |
| 485 | if (has_string(one_opt->long_name, group) && |
| 486 | has_string(another_opt->long_name, group)) |
| 487 | return 1; |
| 488 | } |
| 489 | return 0; |
| 490 | } |
| 491 | |
| 492 | struct parsed_option { |
| 493 | const struct option *option; |
no test coverage detected