SmartPhone: display dialog to type arbitrary command text */
| 1132 | |
| 1133 | /* SmartPhone: display dialog to type arbitrary command text */ |
| 1134 | void |
| 1135 | mswin_direct_command() |
| 1136 | { |
| 1137 | char cmd[BUFSZ]; |
| 1138 | ZeroMemory(cmd, sizeof(cmd)); |
| 1139 | mswin_getlin("Type cmd text", cmd); |
| 1140 | if (cmd[0]) { |
| 1141 | /* feed command to nethack */ |
| 1142 | char *p = cmd; |
| 1143 | cmd[32] = '\x0'; /* truncate at 32 chars */ |
| 1144 | while (*p) { |
| 1145 | NHEVENT_KBD(*p); |
| 1146 | p++; |
| 1147 | } |
| 1148 | if (cmd[0] != '\033') |
| 1149 | mswin_putstr(WIN_MESSAGE, ATR_NONE, cmd); |
| 1150 | } |
| 1151 | } |
no test coverage detected