| 889 | }; |
| 890 | |
| 891 | static bool valid_opt(size_t i, int c) |
| 892 | { |
| 893 | /* Check if it is one of the optstrings supported by the command. */ |
| 894 | if (strchr(commands[i].optstring, c)) |
| 895 | return true; |
| 896 | |
| 897 | /* |
| 898 | * Check if it is one of the non-ASCII characters. Currently, the |
| 899 | * non-ASCII characters are only checked against the valid list |
| 900 | * irrespective of the command. |
| 901 | */ |
| 902 | return c >= LONGOPT_START && c < LONGOPT_END; |
| 903 | } |
| 904 | |
| 905 | static void usage(const char *name) |
| 906 | { |