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

Function curses_nhgetch

win/curses/cursmain.c:1054–1070  ·  view source on GitHub ↗

int nhgetch() -- Returns a single character input from the user. -- In the tty window-port, nhgetch() assumes that tgetch() will be the routine the OS provides to read a character. Returned character _must_ be non-zero. */

Source from the content-addressed store, hash-verified

1052 Returned character _must_ be non-zero.
1053*/
1054int
1055curses_nhgetch(void)
1056{
1057 int ch;
1058
1059 /* curses_prehousekeeping() assumes that the map window is active;
1060 avoid it when a menu is active */
1061 if (!activemenu)
1062 curses_prehousekeeping();
1063
1064 ch = curses_read_char();
1065
1066 if (!activemenu)
1067 curses_posthousekeeping();
1068
1069 return ch;
1070}
1071
1072/*
1073int nh_poskey(coordxy *x, coordxy *y, int *mod)

Callers 1

curses_nh_poskeyFunction · 0.85

Calls 3

curses_prehousekeepingFunction · 0.85
curses_read_charFunction · 0.85
curses_posthousekeepingFunction · 0.85

Tested by

no test coverage detected