parse_cmd(): * Return the command number for the command string given * or -1 if one is not found */
| 274 | * or -1 if one is not found |
| 275 | */ |
| 276 | protected int |
| 277 | parse_cmd(EditLine *el, const Char *cmd) |
| 278 | { |
| 279 | el_bindings_t *b = el->el_map.help; |
| 280 | size_t i; |
| 281 | |
| 282 | for (i = 0; i < el->el_map.nfunc; i++) |
| 283 | if (Strcmp(b[i].name, cmd) == 0) |
| 284 | return b[i].func; |
| 285 | return -1; |
| 286 | } |