summaryrefslogtreecommitdiff
path: root/games/rogue
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2000-07-23 22:23:43 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2000-07-23 22:23:43 +0000
commit722786328ebb9bc3a9908e1199f5820495967c9e (patch)
tree8b980bfd8764be70c0a9ac4a874808ee11f9993f /games/rogue
parentc0c45ffbae560ab416f07c82adf9390466da1bd2 (diff)
Handle EOF on stdin.
Diffstat (limited to 'games/rogue')
-rw-r--r--games/rogue/inventory.c6
-rw-r--r--games/rogue/message.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/games/rogue/inventory.c b/games/rogue/inventory.c
index f31d6e5590a..2db81877a2b 100644
--- a/games/rogue/inventory.c
+++ b/games/rogue/inventory.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inventory.c,v 1.3 1998/08/22 08:55:28 pjanzen Exp $ */
+/* $OpenBSD: inventory.c,v 1.4 2000/07/23 22:23:42 pjanzen Exp $ */
/* $NetBSD: inventory.c,v 1.3 1995/04/22 10:27:35 cgd Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)inventory.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: inventory.c,v 1.3 1998/08/22 08:55:28 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: inventory.c,v 1.4 2000/07/23 22:23:42 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -281,7 +281,7 @@ id_com()
message("Character you want help for (* for all):", 0);
refresh();
- ch = getchar();
+ ch = rgetchar();
switch(ch) {
case LIST:
diff --git a/games/rogue/message.c b/games/rogue/message.c
index 11ea4719e89..8d7137b54cb 100644
--- a/games/rogue/message.c
+++ b/games/rogue/message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: message.c,v 1.4 1999/05/26 13:51:01 espie Exp $ */
+/* $OpenBSD: message.c,v 1.5 2000/07/23 22:23:42 pjanzen Exp $ */
/* $NetBSD: message.c,v 1.5 1995/04/22 10:27:43 cgd Exp $ */
/*
@@ -216,6 +216,9 @@ rgetchar()
case '&':
save_screen();
break;
+ case EOF:
+ clean_up("");
+ break;
default:
return(ch);
}