This sets the len and o to indicate how far it is into the * opt_table's names field. */
| 32 | /* This sets the len and o to indicate how far it is into the |
| 33 | * opt_table's names field. */ |
| 34 | static struct opt_table *opt_find_long_extra(const char *arg, |
| 35 | const char **optarg, |
| 36 | unsigned int *len, |
| 37 | const char **o) |
| 38 | { |
| 39 | unsigned i; |
| 40 | |
| 41 | *optarg = NULL; |
| 42 | for (*o = first_lopt(&i, len); |
| 43 | *o; |
| 44 | *o = next_lopt(*o, &i, len)) { |
| 45 | if (strncmp(arg, *o, *len) != 0) |
| 46 | continue; |
| 47 | if (arg[*len] == '=') |
| 48 | *optarg = arg + *len + 1; |
| 49 | else if (arg[*len] != '\0') |
| 50 | continue; |
| 51 | return &opt_table[i]; |
| 52 | |
| 53 | } |
| 54 | return NULL; |
| 55 | } |
| 56 | |
| 57 | struct opt_table *opt_find_long(const char *arg, const char **optarg) |
| 58 | { |
no test coverage detected