summaryrefslogtreecommitdiffstats
path: root/gomoku/bdisp.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-10 13:36:01 +0000
committerlukem <lukem@NetBSD.org>1997-10-10 13:36:01 +0000
commit3936117409cf27503dff2c5d4d2ba20840a85873 (patch)
tree36799758f37408f4211a1a72c734889dc0eac7fe /gomoku/bdisp.c
parent34ef7ac7fd8bd4c426cd292ac4eb658d67867eab (diff)
downloadbsdgames-darwin-3936117409cf27503dff2c5d4d2ba20840a85873.tar.gz
bsdgames-darwin-3936117409cf27503dff2c5d4d2ba20840a85873.tar.zst
bsdgames-darwin-3936117409cf27503dff2c5d4d2ba20840a85873.zip
WARNSify
Diffstat (limited to 'gomoku/bdisp.c')
-rw-r--r--gomoku/bdisp.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/gomoku/bdisp.c b/gomoku/bdisp.c
index 689b0687..b530f32a 100644
--- a/gomoku/bdisp.c
+++ b/gomoku/bdisp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bdisp.c,v 1.4 1997/01/03 01:35:25 cgd Exp $ */
+/* $NetBSD: bdisp.c,v 1.5 1997/10/10 13:36:02 lukem Exp $ */
/*
* Copyright (c) 1994
@@ -36,18 +36,18 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95";
#else
-static char rcsid[] = "$NetBSD: bdisp.c,v 1.4 1997/01/03 01:35:25 cgd Exp $";
+__RCSID("$NetBSD: bdisp.c,v 1.5 1997/10/10 13:36:02 lukem Exp $");
#endif
#endif /* not lint */
-#include "gomoku.h"
-#include <stdio.h>
-#include <string.h>
#include <curses.h>
+#include <string.h>
+#include "gomoku.h"
#define SCRNH 24 /* assume 24 lines for the moment */
#define SCRNW 80 /* assume 80 chars for the moment */
@@ -58,6 +58,7 @@ static char pcolor[] = "*O.?";
/*
* Initialize screen display.
*/
+void
cursinit()
{
@@ -70,6 +71,7 @@ cursinit()
/*
* Restore screen display.
*/
+void
cursfini()
{
@@ -83,9 +85,10 @@ cursfini()
/*
* Initialize board display.
*/
+void
bdisp_init()
{
- register int i, j;
+ int i, j;
/* top border */
for (i = 1; i < BSZ1; i++) {
@@ -114,6 +117,7 @@ bdisp_init()
/*
* Update who is playing whom.
*/
+void
bdwho(update)
int update;
{
@@ -137,10 +141,11 @@ bdwho(update)
/*
* Update the board display after a move.
*/
+void
bdisp()
{
- register int i, j, c;
- register struct spotstr *sp;
+ int i, j, c;
+ struct spotstr *sp;
for (j = BSZ1; --j > 0; ) {
for (i = 1; i < BSZ1; i++) {
@@ -165,11 +170,12 @@ bdisp()
/*
* Dump board display to a file.
*/
+void
bdump(fp)
FILE *fp;
{
- register int i, j, c;
- register struct spotstr *sp;
+ int i, j, c;
+ struct spotstr *sp;
/* top border */
fprintf(fp, " A B C D E F G H J K L M N O P Q R S T\n");
@@ -203,6 +209,7 @@ bdump(fp)
/*
* Display a transcript entry
*/
+void
dislog(str)
char *str;
{
@@ -223,6 +230,8 @@ dislog(str)
/*
* Display a question.
*/
+
+void
ask(str)
char *str;
{
@@ -235,14 +244,16 @@ ask(str)
refresh();
}
+int
getline(buf, size)
char *buf;
int size;
{
- register char *cp, *end;
- register int c;
+ char *cp, *end;
+ int c;
extern int interactive;
+ c = 0;
cp = buf;
end = buf + size - 1; /* save room for the '\0' */
while (cp < end && (c = getchar()) != EOF && c != '\n' && c != '\r') {