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:
nethack.rankin
2007-01-18 04:16:03 +00:00
parent 151dcad8fa
commit 72abae042b
6 changed files with 385 additions and 5 deletions

View File

@@ -2517,6 +2517,9 @@ E char FDECL(genl_message_menu, (CHAR_P,int,const char *));
E void FDECL(genl_preference_update, (const char *));
E char *FDECL(genl_getmsghistory, (BOOLEAN_P));
E void FDECL(genl_putmsghistory, (const char *));
#ifdef HANGUPHANDLING
E void NDECL(nhwindows_hangup);
#endif
/* ### wizard.c ### */

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)winprocs.h 3.5 2003/01/08 */
/* SCCS Id: @(#)winprocs.h 3.5 2007/01/17 */
/* Copyright (c) David Cohrs, 1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -81,7 +81,11 @@ struct window_procs {
#endif
};
extern NEARDATA struct window_procs windowprocs;
extern
#ifdef HANGUPHANDLING
volatile
#endif
NEARDATA struct window_procs windowprocs;
/*
* If you wish to only support one window system and not use procedure