| 716 | } |
| 717 | |
| 718 | int |
| 719 | get_token(struct _s_x *table, const char *string, const char *errbase) |
| 720 | { |
| 721 | int tcmd; |
| 722 | |
| 723 | if ((tcmd = match_token_relaxed(table, string)) < 0) |
| 724 | errx(EX_USAGE, "%s %s %s", |
| 725 | (tcmd == 0) ? "invalid" : "ambiguous", errbase, string); |
| 726 | |
| 727 | return (tcmd); |
| 728 | } |
| 729 | |
| 730 | /** |
| 731 | * match_value takes a table and a value, returns the string associated |
no test coverage detected