summaryrefslogtreecommitdiffstats
path: root/hunt
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2014-03-30 05:38:13 +0000
committerdholland <dholland@NetBSD.org>2014-03-30 05:38:13 +0000
commit99c499af28a324719c1f812d8ba0c9c5ae50347d (patch)
treef40ac749e774fe296bc4b2592582530bdc84a232 /hunt
parent4ddaf6127ab2fdcf268b76c9a33cb08bc276bfbf (diff)
downloadbsdgames-darwin-99c499af28a324719c1f812d8ba0c9c5ae50347d.tar.gz
bsdgames-darwin-99c499af28a324719c1f812d8ba0c9c5ae50347d.tar.zst
bsdgames-darwin-99c499af28a324719c1f812d8ba0c9c5ae50347d.zip
Instead of #define STDIN 0, use STDIN_FILENO.
Diffstat (limited to 'hunt')
-rw-r--r--hunt/hunt/playit.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c
index 63da5658..9b6d3c95 100644
--- a/hunt/hunt/playit.c
+++ b/hunt/hunt/playit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: playit.c,v 1.21 2014/03/30 05:30:28 dholland Exp $ */
+/* $NetBSD: playit.c,v 1.22 2014/03/30 05:38:13 dholland Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: playit.c,v 1.21 2014/03/30 05:30:28 dholland Exp $");
+__RCSID("$NetBSD: playit.c,v 1.22 2014/03/30 05:38:13 dholland Exp $");
#endif /* not lint */
#include <sys/file.h>
@@ -66,7 +66,6 @@ static char otto_face;
#endif
#define MAX_SEND 5
-#define STDIN 0
/*
* ibuf is the input buffer used for the stream from the driver.
@@ -160,7 +159,7 @@ playit(void)
case READY:
refresh();
if (nchar_send < 0)
- tcflush(STDIN, TCIFLUSH);
+ tcflush(STDIN_FILENO, TCIFLUSH);
nchar_send = MAX_SEND;
#ifndef OTTO
(void) GETCHR();
@@ -211,7 +210,7 @@ getchr(void)
set[0].fd = huntsocket;
set[0].events = POLLIN;
- set[1].fd = STDIN;
+ set[1].fd = STDIN_FILENO;
set[1].events = POLLIN;
one_more_time:
@@ -247,7 +246,7 @@ send_stuff(void)
char *sp, *nsp;
static char inp[sizeof Buf];
- count = read(STDIN, Buf, sizeof Buf);
+ count = read(STDIN_FILENO, Buf, sizeof Buf);
if (count <= 0)
return;
if (nchar_send <= 0 && !no_beep) {