| 177 | } |
| 178 | |
| 179 | bool opt_unregister(const char *names) |
| 180 | { |
| 181 | int found = -1, i; |
| 182 | |
| 183 | for (i = 0; i < opt_count; i++) { |
| 184 | if (opt_table[i].type == OPT_SUBTABLE) |
| 185 | continue; |
| 186 | if (strcmp(opt_table[i].names, names) == 0) |
| 187 | found = i; |
| 188 | } |
| 189 | if (found == -1) |
| 190 | return false; |
| 191 | opt_count--; |
| 192 | memmove(&opt_table[found], &opt_table[found+1], |
| 193 | (opt_count - found) * sizeof(opt_table[found])); |
| 194 | return true; |
| 195 | } |
| 196 | |
| 197 | void opt_register_table(const struct opt_table entry[], const char *desc) |
| 198 | { |
no outgoing calls