called by pcmain() and process_options() */
| 1021 | |
| 1022 | /* called by pcmain() and process_options() */ |
| 1023 | void |
| 1024 | consoletty_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 | } |
| 1044 | extern void set_emergency_io(void); |
| 1045 | |
| 1046 | void |
no test coverage detected