-/* $NetBSD: bdinit.c,v 1.7 2009/06/04 05:43:29 dholland Exp $ */
+/* $NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $ */
/*
* Copyright (c) 1994
#if 0
static char sccsid[] = "from: @(#)bdinit.c 8.2 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: bdinit.c,v 1.7 2009/06/04 05:43:29 dholland Exp $");
+__RCSID("$NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $");
#endif
#endif /* not lint */
#include <string.h>
#include "gomoku.h"
+static void init_overlap(void);
+
void
bdinit(struct spotstr *bp)
{
* As pieces are played, it can make frames not overlap if there are no
* common open spaces shared between the two frames.
*/
-void
+static void
init_overlap(void)
{
struct spotstr *sp1, *sp2;
struct combostr *cbp;
+ unsigned frameix;
int i, f, r, n, d1, d2;
int mask, bmask, vertex, s;
u_char *str;
memset(intersect, 0, sizeof(intersect));
str = &overlap[FAREA * FAREA];
ip = &intersect[FAREA * FAREA];
- for (cbp = frames + FAREA; --cbp >= frames; ) { /* each frame */
+ for (frameix = FAREA; frameix-- > 0; ) { /* each frame */
+ cbp = &frames[frameix];
str -= FAREA;
ip -= FAREA;
sp1 = &board[vertex = cbp->c_vertex];