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

Function settty

sys/share/unixtty.c:232–248  ·  view source on GitHub ↗

reset terminal to original state */

Source from the content-addressed store, hash-verified

230
231/* reset terminal to original state */
232void
233settty(const char *s)
234{
235#ifdef TTY_GRAPHICS
236 if (WINDOWPORT(tty))
237 term_end_screen();
238#endif
239 if (s)
240 raw_print(s);
241 if (STTY(&inittyb) < 0 || STTY2(&inittyb2) < 0)
242 perror("NetHack (settty)");
243 iflags.echo = (inittyb.echoflgs & ECHO) ? ON : OFF;
244 iflags.cbreak = (CBRKON(inittyb.cbrkflgs & CBRKMASK)) ? ON : OFF;
245 curttyb.inputflags |= STRIPHI;
246 setioctls();
247 settty_needed = FALSE;
248}
249
250void
251setftty(void)

Callers 1

errorFunction · 0.70

Calls 3

raw_printFunction · 0.85
setioctlsFunction · 0.85
term_end_screenFunction · 0.50

Tested by

no test coverage detected