| 45 | /* Read a character of input from the user */ |
| 46 | |
| 47 | int |
| 48 | curses_read_char(void) |
| 49 | { |
| 50 | int ch; |
| 51 | |
| 52 | /* cancel message suppression; all messages have had a chance to be read */ |
| 53 | curses_got_input(); |
| 54 | |
| 55 | ch = curses_getch(); |
| 56 | ch = curses_convert_keys(ch); |
| 57 | |
| 58 | if (ch == 0) { |
| 59 | ch = '\033'; /* map NUL to ESC since nethack doesn't expect NUL */ |
| 60 | } |
| 61 | |
| 62 | if (counting && !isdigit(ch)) { /* dismiss count window if necessary */ |
| 63 | curses_count_window(NULL); |
| 64 | curses_refresh_nethack_windows(); |
| 65 | } |
| 66 | |
| 67 | return ch; |
| 68 | } |
| 69 | |
| 70 | /* Turn on or off the specified color and / or attribute */ |
| 71 |
no test coverage detected