MCPcopy Create free account
hub / github.com/NetHack/NetHack / curses_read_char

Function curses_read_char

win/curses/cursmisc.c:47–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45/* Read a character of input from the user */
46
47int
48curses_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

Callers 4

curses_blockFunction · 0.85
curses_nhgetchFunction · 0.85

Calls 6

curses_got_inputFunction · 0.85
curses_getchFunction · 0.85
curses_convert_keysFunction · 0.85
isdigitFunction · 0.85
curses_count_windowFunction · 0.85

Tested by

no test coverage detected