summaryrefslogtreecommitdiffstats
path: root/larn/io.c
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-04-24 12:21:37 +0000
committercgd <cgd@NetBSD.org>1995-04-24 12:21:37 +0000
commita65a873e56c35780711e9f73872c4fe0254589b0 (patch)
tree5e3a2578839def2becc14922977dc641dfd01c20 /larn/io.c
parentd7c608df67f7b99aee31ddf6c13d8870695f6827 (diff)
downloadbsdgames-darwin-a65a873e56c35780711e9f73872c4fe0254589b0.tar.gz
bsdgames-darwin-a65a873e56c35780711e9f73872c4fe0254589b0.zip
Various changes to make games compile w/o warnings on the alpha:
Include appropriate includes, delete bogus function declarations, change sizes of variables and casts.
Diffstat (limited to 'larn/io.c')
-rw-r--r--larn/io.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/larn/io.c b/larn/io.c
index ded2ac2a..dc91b346 100644
--- a/larn/io.c
+++ b/larn/io.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: io.c,v 1.3 1995/03/23 08:33:38 cgd Exp $";
+static char rcsid[] = "$NetBSD: io.c,v 1.4 1995/04/24 12:23:57 cgd Exp $";
#endif /* not lint */
/* io.c Larn is copyrighted 1986 by Noah Morgan.
@@ -60,6 +60,7 @@ static char rcsid[] = "$NetBSD: io.c,v 1.3 1995/03/23 08:33:38 cgd Exp $";
*/
#include "header.h"
+#include <string.h>
#ifdef SYSV /* system III or system V */
#include <termio.h>
@@ -851,15 +852,15 @@ lflush()
#endif VT100
#ifndef VT100
-static int index=0;
+static int vindex=0;
/*
* putchar(ch) Print one character in decoded output buffer.
*/
int putchar(c)
int c;
{
- outbuf[index++] = c;
- if (index >= BUFBIG) flush_buf();
+ outbuf[vindex++] = c;
+ if (vindex >= BUFBIG) flush_buf();
}
/*
@@ -867,8 +868,8 @@ int c;
*/
flush_buf()
{
- if (index) write(lfd, outbuf, index);
- index = 0;
+ if (vindex) write(lfd, outbuf, vindex);
+ vindex = 0;
}
/*