-/* $NetBSD: dr_3.c,v 1.9 2001/01/01 21:57:37 jwise Exp $ */
+/* $NetBSD: dr_3.c,v 1.15 2003/08/07 09:37:42 agc Exp $ */
/*
* Copyright (c) 1983, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)dr_3.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dr_3.c,v 1.9 2001/01/01 21:57:37 jwise Exp $");
+__RCSID("$NetBSD: dr_3.c,v 1.15 2003/08/07 09:37:42 agc Exp $");
#endif
#endif /* not lint */
-#include "driver.h"
#include <stdlib.h>
+#include <string.h>
+#include "extern.h"
+#include "driver.h"
+
+static int stillmoving(int);
+static int is_isolated(struct ship *);
+static int push(struct ship *, struct ship *);
+static void step(struct ship *, int, char *);
/* move all comp ships */
void
if (!sp->file->movebuf[k])
sp->file->movebuf[k+1] = '\0';
else if (sp->file->dir)
- step(sp->file->movebuf[k], sp, &moved[n]);
+ step(sp, sp->file->movebuf[k], &moved[n]);
n++;
}
/*
}
}
-int
+static int
stillmoving(int k)
{
struct ship *sp;
return 0;
}
-int
+static int
is_isolated(struct ship *ship)
{
struct ship *sp;
return 1;
}
-int
+static int
push(struct ship *from, struct ship *to)
{
int bs, sb;
return from < to;
}
-void
-step(int com, struct ship *sp, char *moved)
+static void
+step(struct ship *sp, int com, char *moved)
{
int dist;