end_of_input()
{
# ifdef NOSAVEONHANGUP
- program_state.something_worth_saving = 0;
+# ifdef INSURANCE
+ if (flags.ins_chkpt && program_state.something_worth_saving)
+ program_statue.preserve_locks = 1; /* keep files for recovery */
+# endif
+ program_state.something_worth_saving = 0; /* don't save */
# endif
+
# ifndef SAFERHANGUP
if (!program_state.done_hup++)
# endif
if (program_state.something_worth_saving) (void) dosave0();
- exit_nhwindows((char *)0);
+ if (iflags.window_inited) exit_nhwindows((char *)0);
clearlocks();
terminate(EXIT_SUCCESS);
/*NOTREACHED*/ /* not necessarily true for vms... */
-/* SCCS Id: @(#)vmstty.c 3.5 2007/01/08 */
+/* SCCS Id: @(#)vmstty.c 3.5 2007/01/31 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* tty.c - (VMS) version */
settty(s)
const char *s;
{
- if (!bombing) end_screen();
- if (s) raw_print(s);
+ if (!bombing) end_screen();
+ if (s) raw_print(s);
+ if (settty_needed) {
disable_broadcast_trapping();
#if 0 /* let SMG's exit handler do the cleanup (as per doc) */
/* #ifndef USE_QIO_INPUT */
setctty();
settty_needed = FALSE;
+ }
}
/* same as settty, with no clearing of the screen */
-/* SCCS Id: @(#)getline.c 3.5 2002/10/06 */
+/* SCCS Id: @(#)getline.c 3.5 2007/01/31 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
register int c, x = ttyDisplay ? (int) ttyDisplay->dismiss_more : '\n';
morc = 0;
+#ifdef HANGUPHANDLING
+ if (program_state.done_hup) return;
+#endif
while((c = tty_nhgetch()) != '\n') {
if(iflags.cbreak) {