win32tty: allow ^C to abort game

at the "Who are you?" prompt.
This commit is contained in:
nethack.allison
2002-08-05 02:06:32 +00:00
parent ef39746418
commit 4bdcf771b2
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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) {