hangup hangup (trunk only)
The last of my intended hangup overhaul. Once hangup is detected,
replace currently loaded windowing routines with stubs that never do any
terminal I/O. Real interface routines call their siblings directly rather
than via the windowprocs pointers, so this shouldn't pull the rug out from
under them, but it also can't prevent whatever they have in progress at
the time of hangup from attempting further I/O once the handler returns.
[We might want to change nhwindows_hangup() into winprocs.hangup_nhwindows()
so that each interface has more control over its own fate.]
This assumes that user input of ESC and menu selection result of -1
everywhere in the core will eventually cause active function calls to
unwind their way back to moveloop() rather than to continually re-prompt.
(This assumption is not a new one, just a bit more explicit now.)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)display.c 3.5 2005/06/21 */
|
||||
/* SCCS Id: @(#)display.c 3.5 2007/01/17 */
|
||||
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
||||
/* and Dave Cohrs, 1990. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -648,6 +648,9 @@ newsym(x,y)
|
||||
register xchar worm_tail;
|
||||
|
||||
if (in_mklev) return;
|
||||
#ifdef HANGUPHANDLING
|
||||
if (program_state.done_hup) return;
|
||||
#endif
|
||||
|
||||
/* only permit updating the hero when swallowed */
|
||||
if (u.uswallow) {
|
||||
@@ -1383,6 +1386,9 @@ flush_screen(cursor_on_u)
|
||||
if (delay_flushing) return;
|
||||
if (flushing) return; /* if already flushing then return */
|
||||
flushing = 1;
|
||||
#ifdef HANGUPHANDLING
|
||||
if (program_state.done_hup) return;
|
||||
#endif
|
||||
|
||||
for (y = 0; y < ROWNO; y++) {
|
||||
register gbuf_entry *gptr = &gbuf[y][x = gbuf_start[y]];
|
||||
|
||||
Reference in New Issue
Block a user