hangup revamp (trunk only)

[See cvs log for src/cmd.c for more complete description.]

     This turns clearlocks() into a no-op during the period when the UNIX
port is asking the user to confirm whether to overwrite an existing game.
Also, this removes the duplication of code and function between hangup()
and end_of_input(), and it simplifies the check for whether hangups are
supported by adding new macro HANGUPHANDLING.  (I don't think global.h is
the best place to be defining that but I couldn't figure out where else
it would fit, other than repeating for individual xxxconf.h files.)  And
adds a couple more done_hup checks to try to cope with situations where
rhack() is being bypassed.  Lastly, having readchar() return EOF was
ignored for non-UNIX configs; now everybody gets ESC instead of letting
EOF be seen further inside the core.
This commit is contained in:
nethack.rankin
2007-01-16 04:54:38 +00:00
parent b01f1f804f
commit 151dcad8fa
11 changed files with 53 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)allmain.c 3.5 2006/11/27 */
/* SCCS Id: @(#)allmain.c 3.5 2007/01/12 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -72,6 +72,9 @@ boolean resuming;
context.move = 0;
for(;;) {
#ifdef SAFERHANGUP
if (program_state.done_hup) end_of_input();
#endif
get_nh_event();
#ifdef POSITIONBAR
do_positionbar();