summaryrefslogtreecommitdiffstats
path: root/trek/klmove.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-10-12 21:24:24 +0000
committerchristos <christos@NetBSD.org>1997-10-12 21:24:24 +0000
commit634cb6ceab3191623a3daed5e953821e3f37a4cb (patch)
tree2bb707d4d2f4e28a241cac2e70f7392be0acb329 /trek/klmove.c
parenta77b3f8edc13dc6efdbcf80e336689cfa1de08ab (diff)
downloadbsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.tar.gz
bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.tar.zst
bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.zip
Warnsify and remove local implementations of libc functions.
Diffstat (limited to 'trek/klmove.c')
-rw-r--r--trek/klmove.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/trek/klmove.c b/trek/klmove.c
index 060bcc74..1c03ccd9 100644
--- a/trek/klmove.c
+++ b/trek/klmove.c
@@ -1,4 +1,4 @@
-/* $NetBSD: klmove.c,v 1.3 1995/04/22 10:59:07 cgd Exp $ */
+/* $NetBSD: klmove.c,v 1.4 1997/10/12 21:24:57 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,15 +33,17 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)klmove.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: klmove.c,v 1.3 1995/04/22 10:59:07 cgd Exp $";
+__RCSID("$NetBSD: klmove.c,v 1.4 1997/10/12 21:24:57 christos Exp $");
#endif
#endif /* not lint */
-# include "trek.h"
+#include <stdio.h>
+#include "trek.h"
/*
** Move Klingons Around
@@ -66,14 +68,15 @@ static char rcsid[] = "$NetBSD: klmove.c,v 1.3 1995/04/22 10:59:07 cgd Exp $";
** course around stars.
*/
+void
klmove(fl)
int fl;
{
int n;
- register struct kling *k;
+ struct kling *k;
double dx, dy;
int nextx, nexty;
- register int lookx, looky;
+ int lookx, looky;
int motion;
int fudgex, fudgey;
int qx, qy;
@@ -84,7 +87,7 @@ int fl;
if (Trace)
printf("klmove: fl = %d, Etc.nkling = %d\n", fl, Etc.nkling);
# endif
- for (n = 0; n < Etc.nkling; k && n++)
+ for (n = 0; n < Etc.nkling; n++)
{
k = &Etc.klingon[n];
i = 100;
@@ -151,7 +154,7 @@ int fl;
Sect[k->x][k->y] = EMPTY;
Quad[qx][qy].klings += 1;
Etc.nkling -= 1;
- bmove(&Etc.klingon[Etc.nkling], k, sizeof *k);
+ *k = Etc.klingon[Etc.nkling];
Quad[Ship.quadx][Ship.quady].klings -= 1;
k = 0;
break;