hangup has occurred; switch to no-op user interface */
| 612 | |
| 613 | /* hangup has occurred; switch to no-op user interface */ |
| 614 | void |
| 615 | nhwindows_hangup(void) |
| 616 | { |
| 617 | char *(*previnterface_getmsghistory)(boolean) = 0; |
| 618 | |
| 619 | #ifdef ALTMETA |
| 620 | /* command processor shouldn't look for 2nd char after seeing ESC */ |
| 621 | iflags.altmeta = FALSE; |
| 622 | #endif |
| 623 | |
| 624 | /* don't call exit_nhwindows() directly here; if a hangup occurs |
| 625 | while interface code is executing, exit_nhwindows could knock |
| 626 | the interface's active data structures out from under itself */ |
| 627 | if (iflags.window_inited |
| 628 | && windowprocs.win_exit_nhwindows != hup_exit_nhwindows) |
| 629 | previnterface_exit_nhwindows = windowprocs.win_exit_nhwindows; |
| 630 | |
| 631 | /* also, we have to leave the old interface's getmsghistory() |
| 632 | in place because it will be called while saving the game */ |
| 633 | if (windowprocs.win_getmsghistory != hup_procs.win_getmsghistory) |
| 634 | previnterface_getmsghistory = windowprocs.win_getmsghistory; |
| 635 | |
| 636 | windowprocs = hup_procs; |
| 637 | |
| 638 | if (previnterface_getmsghistory) |
| 639 | windowprocs.win_getmsghistory = previnterface_getmsghistory; |
| 640 | } |
| 641 | |
| 642 | staticfn void |
| 643 | hup_exit_nhwindows(const char *lastgasp) |