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

Function consoletty_open

sys/windows/consoletty.c:1023–1043  ·  view source on GitHub ↗

called by pcmain() and process_options() */

Source from the content-addressed store, hash-verified

1021
1022/* called by pcmain() and process_options() */
1023void
1024consoletty_open(int mode UNUSED)
1025{
1026 int debugvar;
1027
1028 /* Initialize the function pointer that points to
1029 * the kbhit() equivalent, in this TTY case consoletty_kbhit()
1030 */
1031 nt_kbhit = consoletty_kbhit;
1032
1033 if (!SetConsoleCtrlHandler((PHANDLER_ROUTINE) CtrlHandler, TRUE)) {
1034 /* Unable to set control handler */
1035 debugvar = 0; /* just to have a statement to break on for debugger */
1036 }
1037
1038 LI = console.height;
1039 CO = console.width;
1040
1041 really_move_cursor();
1042 nhUse(debugvar);
1043}
1044extern void set_emergency_io(void);
1045
1046void

Callers 1

MAINFunction · 0.85

Calls 1

really_move_cursorFunction · 0.85

Tested by

no test coverage detected