From 4bdcf771b26a2ba73c753880119d302c28eb77e2 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Mon, 5 Aug 2002 02:06:32 +0000 Subject: [PATCH] win32tty: allow ^C to abort game at the "Who are you?" prompt. --- doc/fixes34.1 | 1 + win/tty/wintty.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index d18443548..b5860a7d0 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -195,6 +195,7 @@ win32gui: fix alignment of columns in menu windows win32gui: Window menu File|Save worked during #quit disclosure processing win32tty: honour the use_inverse option and default to ATR_BOLD if disabled win32tty: respond only to mouse clicks not mouse movement +win32tty: allow ^C to abort the game at the "Who are you?" prompt X11: restore support for non-square tiles when USE_XPM is defined Gnome: add support for non-square tiles tty: remove #define DEBUG that forced debug behavior in production builds diff --git a/win/tty/wintty.c b/win/tty/wintty.c index d550e0b1d..560f9abc8 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)wintty.c 3.4 2002/02/05 */ +/* SCCS Id: @(#)wintty.c 3.4 2002/08/04 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -678,6 +678,9 @@ tty_askname() while((c = tty_nhgetch()) != '\n') { if(c == EOF) error("End of input\n"); if (c == '\033') { ct = 0; break; } /* continue outer loop */ +#if defined(WIN32CON) + if (c == '\003') bail("^C abort.\n"); +#endif /* some people get confused when their erase char is not ^H */ if (c == '\b' || c == '\177') { if(ct) {