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

Function get_line_from_key_queue

outdated/sys/mac/mgetline.c:16–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14typedef Boolean (*key_func)(unsigned char);
15
16int
17get_line_from_key_queue(char *bufp)
18{
19 *bufp = 0;
20 if (try_key_queue(bufp)) {
21 while (*bufp) {
22 if (*bufp == 10 || *bufp == 13) {
23 *bufp = 0;
24 }
25 bufp++;
26 }
27 return true;
28 }
29 return false;
30}
31
32static void
33topl_getlin(const char *query, char *bufp, Boolean ext)

Callers 1

topl_getlinFunction · 0.85

Calls 1

try_key_queueFunction · 0.85

Tested by

no test coverage detected