Read in an extended command - doing command line completion for * when enough characters have been entered to make a unique command. * This is just a modified getlin() followed by a lookup. -jsb */
| 58 | * This is just a modified getlin() followed by a lookup. -jsb |
| 59 | */ |
| 60 | int |
| 61 | mac_get_ext_cmd() |
| 62 | { |
| 63 | char bufp[BUFSZ]; |
| 64 | int i; |
| 65 | |
| 66 | if (iflags.extmenu) |
| 67 | return extcmd_via_menu(); |
| 68 | topl_getlin("# ", bufp, true); |
| 69 | for (i = 0; extcmdlist[i].ef_txt != (char *) 0; i++) |
| 70 | if (!strcmp(bufp, extcmdlist[i].ef_txt)) |
| 71 | break; |
| 72 | if (extcmdlist[i].ef_txt == (char *) 0) |
| 73 | i = -1; /* not found */ |
| 74 | |
| 75 | return i; |
| 76 | } |
| 77 | |
| 78 | /* macgetline.c */ |
nothing calls this directly
no test coverage detected