Module Name:    src
Committed By:   dholland
Date:           Thu Jun  4 05:27:04 UTC 2009

Modified Files:
        src/games/gomoku: bdinit.c bdisp.c main.c makemove.c pickmove.c stoc.c

Log Message:
ANSIfy function declarations.x


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/games/gomoku/bdinit.c
cvs rdiff -u -r1.9 -r1.10 src/games/gomoku/bdisp.c src/games/gomoku/stoc.c
cvs rdiff -u -r1.14 -r1.15 src/games/gomoku/main.c
cvs rdiff -u -r1.8 -r1.9 src/games/gomoku/makemove.c
cvs rdiff -u -r1.13 -r1.14 src/games/gomoku/pickmove.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/gomoku/bdinit.c
diff -u src/games/gomoku/bdinit.c:1.5 src/games/gomoku/bdinit.c:1.6
--- src/games/gomoku/bdinit.c:1.5	Thu Aug  7 09:37:15 2003
+++ src/games/gomoku/bdinit.c	Thu Jun  4 05:27:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bdinit.c,v 1.5 2003/08/07 09:37:15 agc Exp $	*/
+/*	$NetBSD: bdinit.c,v 1.6 2009/06/04 05:27:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)bdinit.c	8.2 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: bdinit.c,v 1.5 2003/08/07 09:37:15 agc Exp $");
+__RCSID("$NetBSD: bdinit.c,v 1.6 2009/06/04 05:27:04 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -45,8 +45,7 @@
 #include "gomoku.h"
 
 void
-bdinit(bp)
-	struct spotstr *bp;
+bdinit(struct spotstr *bp)
 {
 	int i, j, r;
 	struct spotstr *sp;
@@ -172,7 +171,7 @@
  * common open spaces shared between the two frames.
  */
 void
-init_overlap()
+init_overlap(void)
 {
 	struct spotstr *sp1, *sp2;
 	struct combostr *cbp;

Index: src/games/gomoku/bdisp.c
diff -u src/games/gomoku/bdisp.c:1.9 src/games/gomoku/bdisp.c:1.10
--- src/games/gomoku/bdisp.c:1.9	Fri Aug  8 16:10:47 2008
+++ src/games/gomoku/bdisp.c	Thu Jun  4 05:27:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bdisp.c,v 1.9 2008/08/08 16:10:47 drochner Exp $	*/
+/*	$NetBSD: bdisp.c,v 1.10 2009/06/04 05:27:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)bdisp.c	8.2 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: bdisp.c,v 1.9 2008/08/08 16:10:47 drochner Exp $");
+__RCSID("$NetBSD: bdisp.c,v 1.10 2009/06/04 05:27:04 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -59,7 +59,7 @@
  * Initialize screen display.
  */
 void
-cursinit()
+cursinit(void)
 {
 
 	if (!initscr()) {
@@ -75,7 +75,7 @@
  * Restore screen display.
  */
 void
-cursfini()
+cursfini(void)
 {
 
 	leaveok(stdscr, FALSE);
@@ -89,7 +89,7 @@
  * Initialize board display.
  */
 void
-bdisp_init()
+bdisp_init(void)
 {
 	int i, j;
 
@@ -121,8 +121,7 @@
  * Update who is playing whom.
  */
 void
-bdwho(update)
-	int update;
+bdwho(int update)
 {
 	int i;
 
@@ -144,7 +143,7 @@
  * Update the board display after a move.
  */
 void
-bdisp()
+bdisp(void)
 {
 	int i, j, c;
 	struct spotstr *sp;
@@ -173,8 +172,7 @@
  * Dump board display to a file.
  */
 void
-bdump(fp)
-	FILE *fp;
+bdump(FILE *fp)
 {
 	int i, j, c;
 	struct spotstr *sp;
@@ -212,8 +210,7 @@
  * Display a transcript entry
  */
 void
-dislog(str)
-	const char *str;
+dislog(const char *str)
 {
 
 	if (++lastline >= SCRNH - 1) {
@@ -232,8 +229,7 @@
  */
 
 void
-ask(str)
-	const char *str;
+ask(const char *str)
 {
 	int len = strlen(str);
 
@@ -245,9 +241,7 @@
 }
 
 int
-getline(buf, size)
-	char *buf;
-	int size;
+getline(char *buf, int size)
 {
 	char *cp, *end;
 	int c;
Index: src/games/gomoku/stoc.c
diff -u src/games/gomoku/stoc.c:1.9 src/games/gomoku/stoc.c:1.10
--- src/games/gomoku/stoc.c:1.9	Tue Apr 19 20:17:12 2005
+++ src/games/gomoku/stoc.c	Thu Jun  4 05:27:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: stoc.c,v 1.9 2005/04/19 20:17:12 rillig Exp $	*/
+/*	$NetBSD: stoc.c,v 1.10 2009/06/04 05:27:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)stoc.c	8.1 (Berkeley) 7/24/94";
 #else
-__RCSID("$NetBSD: stoc.c,v 1.9 2005/04/19 20:17:12 rillig Exp $");
+__RCSID("$NetBSD: stoc.c,v 1.10 2009/06/04 05:27:04 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -63,8 +63,7 @@
  * Turn the spot number form of a move into the character form.
  */
 const char *
-stoc(s)
-	int s;
+stoc(int s)
 {
 	static char buf[32];
 	int i;
@@ -80,8 +79,7 @@
  * Turn the character form of a move into the spot number form.
  */
 int
-ctos(mp)
-	const char *mp;
+ctos(const char *mp)
 {
 	int i;
 
@@ -100,8 +98,7 @@
  * Turn a letter into a number.
  */
 int
-lton(c)
-	int c;
+lton(int c)
 {
 	int i;
 

Index: src/games/gomoku/main.c
diff -u src/games/gomoku/main.c:1.14 src/games/gomoku/main.c:1.15
--- src/games/gomoku/main.c:1.14	Sun Jul 20 01:03:21 2008
+++ src/games/gomoku/main.c	Thu Jun  4 05:27:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.14 2008/07/20 01:03:21 lukem Exp $	*/
+/*	$NetBSD: main.c,v 1.15 2009/06/04 05:27:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c	8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.14 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.15 2009/06/04 05:27:04 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -82,9 +82,7 @@
 int	main(int, char *[]);
 
 int
-main(argc, argv)
-	int argc;
-	char **argv;
+main(int argc, char **argv)
 {
 	char buf[128];
 	int color, curmove, i, ch;
@@ -335,8 +333,7 @@
 }
 
 int
-readinput(fp)
-	FILE *fp;
+readinput(FILE *fp)
 {
 	char *cp;
 	int c;
@@ -353,8 +350,7 @@
  * Handle strange situations.
  */
 void
-whatsup(signum)
-	int signum;
+whatsup(int signum)
 {
 	int i, pnum, n, s1, s2, d1, d2;
 	struct spotstr *sp;
@@ -495,8 +491,7 @@
  * Display debug info.
  */
 void
-dlog(str)
-	const char *str;
+dlog(const char *str)
 {
 
 	if (debugfp)
@@ -508,8 +503,7 @@
 }
 
 void
-glog(str)
-	const char *str;
+glog(const char *str)
 {
 
 	if (debugfp)
@@ -521,7 +515,7 @@
 }
 
 void
-quit()
+quit(void)
 {
 	if (interactive) {
 		bdisp();		/* show final board */
@@ -531,8 +525,7 @@
 }
 
 void
-quitsig(dummy)
-	int dummy __unused;
+quitsig(int dummy __unused)
 {
 	quit();
 }
@@ -541,8 +534,7 @@
  * Die gracefully.
  */
 void
-panic(str)
-	const char *str;
+panic(const char *str)
 {
 	fprintf(stderr, "%s: %s\n", prog, str);
 	fputs("resign\n", stdout);

Index: src/games/gomoku/makemove.c
diff -u src/games/gomoku/makemove.c:1.8 src/games/gomoku/makemove.c:1.9
--- src/games/gomoku/makemove.c:1.8	Thu May 11 00:17:07 2006
+++ src/games/gomoku/makemove.c	Thu Jun  4 05:27:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemove.c,v 1.8 2006/05/11 00:17:07 mrg Exp $	*/
+/*	$NetBSD: makemove.c,v 1.9 2009/06/04 05:27:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)makemove.c	8.2 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: makemove.c,v 1.8 2006/05/11 00:17:07 mrg Exp $");
+__RCSID("$NetBSD: makemove.c,v 1.9 2009/06/04 05:27:04 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -59,8 +59,7 @@
  *	TIE	The game is a tie.
  */
 int
-makemove(us, mv)
-	int us, mv;
+makemove(int us, int mv)
 {
 	struct spotstr *sp, *fsp;
 	union comboval *cp;
@@ -217,8 +216,7 @@
  * fix up the overlap array due to updating spot osp.
  */
 void
-update_overlap(osp)
-	struct spotstr *osp;
+update_overlap(struct spotstr *osp)
 {
 	struct spotstr *sp, *sp1, *sp2;
 	int i, f, r, r1, d, d1, n;

Index: src/games/gomoku/pickmove.c
diff -u src/games/gomoku/pickmove.c:1.13 src/games/gomoku/pickmove.c:1.14
--- src/games/gomoku/pickmove.c:1.13	Mon Jan 28 07:01:01 2008
+++ src/games/gomoku/pickmove.c	Thu Jun  4 05:27:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pickmove.c,v 1.13 2008/01/28 07:01:01 dholland Exp $	*/
+/*	$NetBSD: pickmove.c,v 1.14 2009/06/04 05:27:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)pickmove.c	8.2 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: pickmove.c,v 1.13 2008/01/28 07:01:01 dholland Exp $");
+__RCSID("$NetBSD: pickmove.c,v 1.14 2009/06/04 05:27:04 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -66,8 +66,7 @@
 int	nforce;				/* count of opponent <1,x> combos */
 
 int
-pickmove(us)
-	int us;
+pickmove(int us)
 {
 	struct spotstr *sp, *sp1, *sp2;
 	union comboval *Ocp, *Tcp;
@@ -166,10 +165,7 @@
  * Return true if spot 'sp' is better than spot 'sp1' for color 'us'.
  */
 int
-better(sp, sp1, us)
-	const struct spotstr *sp;
-	const struct spotstr *sp1;
-	int us;
+better(const struct spotstr *sp, const struct spotstr *sp1, int us)
 {
 	int them, s, s1;
 
@@ -227,8 +223,7 @@
  * Also, try to combine frames to find more complex (chained) moves.
  */
 void
-scanframes(color)
-	int color;
+scanframes(int color)
 {
 	struct combostr *cbp, *ecbp;
 	struct spotstr *sp;
@@ -412,11 +407,7 @@
  * within the frame 'ocbp' and combo value 's'.
  */
 void
-makecombo2(ocbp, osp, off, s)
-	struct combostr *ocbp;
-	struct spotstr *osp;
-	int off;
-	int s;
+makecombo2(struct combostr *ocbp, struct spotstr *osp, int off, int s)
 {
 	struct spotstr *fsp;
 	struct combostr *ncbp;
@@ -546,8 +537,7 @@
  * combinations of 'level' number of frames.
  */
 void
-addframes(level)
-	int level;
+addframes(int level)
 {
 	struct combostr *cbp, *ecbp;
 	struct spotstr *sp, *fsp;
@@ -647,11 +637,7 @@
  * within the frame 'ocbp' and combo value 's'.
  */
 void
-makecombo(ocbp, osp, off, s)
-	struct combostr *ocbp;
-	struct spotstr *osp;
-	int off;
-	int s;
+makecombo(struct combostr *ocbp, struct spotstr *osp, int off, int s)
 {
 	struct combostr *cbp, *ncbp;
 	struct spotstr *sp;
@@ -798,8 +784,7 @@
  * in 'ocbp' that will complete the combo.
  */
 void
-makeempty(ocbp)
-	struct combostr *ocbp;
+makeempty(struct combostr *ocbp)
 {
 	struct combostr *cbp, *tcbp, **cbpp;
 	struct elist *ep, *nep;
@@ -957,9 +942,7 @@
  * would be trying to "complete" the combo or trying to block it.
  */
 void
-updatecombo(cbp, color)
-	struct combostr *cbp;
-	int color;
+updatecombo(struct combostr *cbp, int color)
 {
 	struct spotstr *sp;
 	struct combostr *tcbp;
@@ -1048,9 +1031,7 @@
  * Add combo to the end of the list.
  */
 void
-appendcombo(cbp, color)
-	struct combostr *cbp;
-	int color __unused;
+appendcombo(struct combostr *cbp, int color __unused)
 {
 	struct combostr *pcbp, *ncbp;
 
@@ -1079,12 +1060,8 @@
  * 's' is the combo value for frame 'fcpb'.
  */
 int
-checkframes(cbp, fcbp, osp, s, vertices)
-	struct combostr *cbp;
-	struct combostr *fcbp;
-	struct spotstr *osp;
-	int s;
-	struct ovlp_info *vertices;
+checkframes(struct combostr *cbp, struct combostr *fcbp, struct spotstr *osp,
+	    int s, struct ovlp_info *vertices)
 {
 	struct combostr *tcbp, *lcbp;
 	int i, n, mask, flg, verts, loop, myindex, fcnt;
@@ -1221,10 +1198,8 @@
  * Otherwise, add the new combo to the hash list.
  */
 int
-sortcombo(scbpp, cbpp, fcbp)
-	struct combostr **scbpp;
-	struct combostr **cbpp;
-	struct combostr *fcbp;
+sortcombo(struct combostr **scbpp, struct combostr **cbpp,
+	  struct combostr *fcbp)
 {
 	struct combostr **spp, **cpp;
 	struct combostr *cbp, *ecbp;
@@ -1335,9 +1310,7 @@
  * Print the combo into string 'str'.
  */
 void
-printcombo(cbp, str)
-	struct combostr *cbp;
-	char *str;
+printcombo(struct combostr *cbp, char *str)
 {
 	struct combostr *tcbp;
 
@@ -1353,8 +1326,7 @@
 
 #ifdef DEBUG
 void
-markcombo(ocbp)
-	struct combostr *ocbp;
+markcombo(struct combostr *ocbp)
 {
 	struct combostr *cbp, *tcbp, **cbpp;
 	struct elist *ep, *nep, **epp;
@@ -1468,9 +1440,7 @@
 }
 
 void
-clearcombo(cbp, open)
-	struct combostr *cbp;
-	int open;
+clearcombo(struct combostr *cbp, int open)
 {
 	struct spotstr *sp;
 	struct combostr *tcbp;
@@ -1489,10 +1459,7 @@
 }
 
 int
-list_eq(scbpp, cbpp, n)
-	struct combostr **scbpp;
-	struct combostr **cbpp;
-	int n;
+list_eq(struct combostr **scbpp, struct combostr **cbpp, int n)
 {
 	struct combostr **spp, **cpp;
 

Reply via email to