summaryrefslogtreecommitdiff
path: root/games/hack
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-15 17:13:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-15 17:13:38 +0000
commitaa5b84bf565847f24dd5120d70a864b959bf47de (patch)
tree49875c64e41231250ee2cb367ef9295b4d6d95b2 /games/hack
parent815afe8b69836957d01ec41a1f76b056f27b4bd5 (diff)
NR_OF_EOFS is a festering boil, lance & drain.
ok millert
Diffstat (limited to 'games/hack')
-rw-r--r--games/hack/hack.tty.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/games/hack/hack.tty.c b/games/hack/hack.tty.c
index 6c8765057af..a4386b048f2 100644
--- a/games/hack/hack.tty.c
+++ b/games/hack/hack.tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.tty.c,v 1.11 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: hack.tty.c,v 1.12 2015/01/15 17:13:37 deraadt Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -100,14 +100,6 @@
#include <stdlib.h>
#include <termios.h>
-/*
- * Some systems may have getchar() return EOF for various reasons, and
- * we should not quit before seeing at least NR_OF_EOFS consecutive EOFs.
- */
-#ifndef BSD
-#define NR_OF_EOFS 20
-#endif /* BSD */
-
static char erase_char, kill_char;
static boolean settty_needed = FALSE;
struct termios inittyb, curttyb;
@@ -330,23 +322,7 @@ readchar()
(void) fflush(stdout);
if((sym = getchar()) == EOF)
-#ifdef NR_OF_EOFS
- { /*
- * Some SYSV systems seem to return EOFs for various reasons
- * (?like when one hits break or for interrupted systemcalls?),
- * and we must see several before we quit.
- */
- int cnt = NR_OF_EOFS;
- while (cnt--) {
- clearerr(stdin); /* omit if clearerr is undefined */
- if((sym = getchar()) != EOF) goto noteof;
- }
- end_of_input();
- noteof: ;
- }
-#else
end_of_input();
-#endif /* NR_OF_EOFS */
if(flags.toplin == 1)
flags.toplin = 2;
return((char) sym);