summaryrefslogtreecommitdiffstats
path: root/trek
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-05-24 19:18:44 +0000
committerdholland <dholland@NetBSD.org>2009-05-24 19:18:44 +0000
commitf31fc2c1d85c05180f4cedad70ca7ec4eb8bb85f (patch)
tree1e15cca5fb3f9fb257f16fa6e62d5d340c2b5a7e /trek
parent90b64f7f9542e62fa50679637aa870abd315f331 (diff)
downloadbsdgames-darwin-f31fc2c1d85c05180f4cedad70ca7ec4eb8bb85f.tar.gz
bsdgames-darwin-f31fc2c1d85c05180f4cedad70ca7ec4eb8bb85f.tar.zst
bsdgames-darwin-f31fc2c1d85c05180f4cedad70ca7ec4eb8bb85f.zip
ANSIfy function declarations. No object file diffs except for two functions
whose K&R declaration didn't fully match the prototype (char vs. int) and the diff of the disassembly of those looks plausible.
Diffstat (limited to 'trek')
-rw-r--r--trek/abandon.c7
-rw-r--r--trek/attack.c9
-rw-r--r--trek/autover.c6
-rw-r--r--trek/capture.c10
-rw-r--r--trek/check_out.c7
-rw-r--r--trek/checkcond.c6
-rw-r--r--trek/compkl.c11
-rw-r--r--trek/computer.c18
-rw-r--r--trek/damage.c11
-rw-r--r--trek/damaged.c7
-rw-r--r--trek/dcrept.c7
-rw-r--r--trek/destruct.c7
-rw-r--r--trek/dock.c10
-rw-r--r--trek/dumpgame.c12
-rw-r--r--trek/dumpme.c7
-rw-r--r--trek/dumpssradio.c6
-rw-r--r--trek/getcodi.c8
-rw-r--r--trek/getpar.c35
-rw-r--r--trek/help.c7
-rw-r--r--trek/impulse.c7
-rw-r--r--trek/initquad.c10
-rw-r--r--trek/kill.c24
-rw-r--r--trek/klmove.c7
-rw-r--r--trek/lose.c7
-rw-r--r--trek/lrscan.c7
-rw-r--r--trek/main.c8
-rw-r--r--trek/move.c11
-rw-r--r--trek/nova.c7
-rw-r--r--trek/out.c7
-rw-r--r--trek/phaser.c7
-rw-r--r--trek/play.c9
-rw-r--r--trek/ram.c7
-rw-r--r--trek/ranf.c10
-rw-r--r--trek/rest.c7
-rw-r--r--trek/schedule.c29
-rw-r--r--trek/score.c7
-rw-r--r--trek/setup.c6
-rw-r--r--trek/setwarp.c7
-rw-r--r--trek/shield.c7
-rw-r--r--trek/snova.c7
-rw-r--r--trek/srscan.c7
-rw-r--r--trek/systemname.c8
-rw-r--r--trek/torped.c10
-rw-r--r--trek/visual.c7
-rw-r--r--trek/warp.c11
-rw-r--r--trek/win.c6
46 files changed, 187 insertions, 251 deletions
diff --git a/trek/abandon.c b/trek/abandon.c
index dc1be461..7d67ddb7 100644
--- a/trek/abandon.c
+++ b/trek/abandon.c
@@ -1,4 +1,4 @@
-/* $NetBSD: abandon.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: abandon.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)abandon.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: abandon.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: abandon.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -68,8 +68,7 @@ __RCSID("$NetBSD: abandon.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-abandon(v)
- int v __unused;
+abandon(int v __unused)
{
struct quad *q;
int i;
diff --git a/trek/attack.c b/trek/attack.c
index 8a34b938..a984faee 100644
--- a/trek/attack.c
+++ b/trek/attack.c
@@ -1,4 +1,4 @@
-/* $NetBSD: attack.c,v 1.5 2003/08/07 09:37:49 agc Exp $ */
+/* $NetBSD: attack.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)attack.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: attack.c,v 1.5 2003/08/07 09:37:49 agc Exp $");
+__RCSID("$NetBSD: attack.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -70,11 +70,12 @@ __RCSID("$NetBSD: attack.c,v 1.5 2003/08/07 09:37:49 agc Exp $");
** entry for the particular device.
**
** Casualties can also occur.
+**
+** resting -- set if attack while resting
*/
void
-attack(resting)
-int resting; /* set if attack while resting */
+attack(int resting)
{
int hit, i, l;
int maxhit, tothit, shldabsb;
diff --git a/trek/autover.c b/trek/autover.c
index 56706a2f..5bdc8d7e 100644
--- a/trek/autover.c
+++ b/trek/autover.c
@@ -1,4 +1,4 @@
-/* $NetBSD: autover.c,v 1.5 2003/08/07 09:37:49 agc Exp $ */
+/* $NetBSD: autover.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)autover.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: autover.c,v 1.5 2003/08/07 09:37:49 agc Exp $");
+__RCSID("$NetBSD: autover.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -60,7 +60,7 @@ __RCSID("$NetBSD: autover.c,v 1.5 2003/08/07 09:37:49 agc Exp $");
*/
void
-autover()
+autover(void)
{
double dist;
int course;
diff --git a/trek/capture.c b/trek/capture.c
index b7fb0e75..fea6ca7c 100644
--- a/trek/capture.c
+++ b/trek/capture.c
@@ -1,4 +1,4 @@
-/* $NetBSD: capture.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: capture.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)capture.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: capture.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: capture.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -57,8 +57,7 @@ __RCSID("$NetBSD: capture.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-capture(v)
- int v __unused;
+capture(int v __unused)
{
int i;
struct kling *k;
@@ -124,7 +123,8 @@ capture(v)
** Cruddy, just takes one at random. Should ask the captain.
*/
-struct kling *selectklingon()
+struct kling *
+selectklingon(void)
{
int i;
diff --git a/trek/check_out.c b/trek/check_out.c
index 10e731fa..d273b82b 100644
--- a/trek/check_out.c
+++ b/trek/check_out.c
@@ -1,4 +1,4 @@
-/* $NetBSD: check_out.c,v 1.5 2003/08/07 09:37:50 agc Exp $ */
+/* $NetBSD: check_out.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)check_out.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: check_out.c,v 1.5 2003/08/07 09:37:50 agc Exp $");
+__RCSID("$NetBSD: check_out.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -53,8 +53,7 @@ __RCSID("$NetBSD: check_out.c,v 1.5 2003/08/07 09:37:50 agc Exp $");
*/
int
-check_out(device)
-int device;
+check_out(int device)
{
int dev;
diff --git a/trek/checkcond.c b/trek/checkcond.c
index 9a969d12..560138a1 100644
--- a/trek/checkcond.c
+++ b/trek/checkcond.c
@@ -1,4 +1,4 @@
-/* $NetBSD: checkcond.c,v 1.5 2003/08/07 09:37:50 agc Exp $ */
+/* $NetBSD: checkcond.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)checkcond.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: checkcond.c,v 1.5 2003/08/07 09:37:50 agc Exp $");
+__RCSID("$NetBSD: checkcond.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -66,7 +66,7 @@ __RCSID("$NetBSD: checkcond.c,v 1.5 2003/08/07 09:37:50 agc Exp $");
*/
void
-checkcond()
+checkcond(void)
{
/* see if we are still alive and well */
if (Ship.reserves < 0.0)
diff --git a/trek/compkl.c b/trek/compkl.c
index 85a94853..1850d78e 100644
--- a/trek/compkl.c
+++ b/trek/compkl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: compkl.c,v 1.6 2004/01/27 20:30:30 jsm Exp $ */
+/* $NetBSD: compkl.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)compkl.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: compkl.c,v 1.6 2004/01/27 20:30:30 jsm Exp $");
+__RCSID("$NetBSD: compkl.c,v 1.7 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -50,13 +50,14 @@ __RCSID("$NetBSD: compkl.c,v 1.6 2004/01/27 20:30:30 jsm Exp $");
**
** This routine is used every time the Enterprise or the Klingons
** move.
+**
+** f -- set if new quadrant
*/
static void sortkl(void);
void
-compkldist(f)
-int f; /* set if new quadrant */
+compkldist(int f)
{
int i, dx, dy;
double d;
@@ -98,7 +99,7 @@ int f; /* set if new quadrant */
*/
static void
-sortkl()
+sortkl(void)
{
struct kling t;
int f, i, m;
diff --git a/trek/computer.c b/trek/computer.c
index a470cc47..62a6c73d 100644
--- a/trek/computer.c
+++ b/trek/computer.c
@@ -1,4 +1,4 @@
-/* $NetBSD: computer.c,v 1.11 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: computer.c,v 1.12 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)computer.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: computer.c,v 1.11 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: computer.c,v 1.12 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -109,8 +109,7 @@ static void prkalc(int, double);
/*ARGSUSED*/
void
-computer(v)
- int v __unused;
+computer(int v __unused)
{
int ix, iy;
int i, j;
@@ -317,12 +316,7 @@ computer(v)
*/
static int
-kalc(tqx, tqy, tsx, tsy, dist)
-int tqx;
-int tqy;
-int tsx;
-int tsy;
-double *dist;
+kalc(int tqx, int tqy, int tsx, int tsy, double *dist)
{
double dx, dy;
double quadsize;
@@ -347,9 +341,7 @@ double *dist;
}
static void
-prkalc(course, dist)
-int course;
-double dist;
+prkalc(int course, double dist)
{
printf(": course %d dist %.3f\n", course, dist);
}
diff --git a/trek/damage.c b/trek/damage.c
index 979b2303..d928883f 100644
--- a/trek/damage.c
+++ b/trek/damage.c
@@ -1,4 +1,4 @@
-/* $NetBSD: damage.c,v 1.6 2003/08/07 09:37:50 agc Exp $ */
+/* $NetBSD: damage.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)damage.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: damage.c,v 1.6 2003/08/07 09:37:50 agc Exp $");
+__RCSID("$NetBSD: damage.c,v 1.7 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -52,12 +52,13 @@ __RCSID("$NetBSD: damage.c,v 1.6 2003/08/07 09:37:50 agc Exp $");
**
** Note that the repair of the device occurs on a DATE, meaning
** that the dock() and undock() have to reschedule the event.
+**
+** dev1 -- device index
+** dam -- time to repair
*/
void
-damage(dev1, dam)
-int dev1; /* device index */
-double dam; /* time to repair */
+damage(int dev1, double dam)
{
int i;
struct event *e;
diff --git a/trek/damaged.c b/trek/damaged.c
index 8e6c08a1..ed6c4199 100644
--- a/trek/damaged.c
+++ b/trek/damaged.c
@@ -1,4 +1,4 @@
-/* $NetBSD: damaged.c,v 1.5 2003/08/07 09:37:50 agc Exp $ */
+/* $NetBSD: damaged.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)damaged.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: damaged.c,v 1.5 2003/08/07 09:37:50 agc Exp $");
+__RCSID("$NetBSD: damaged.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -48,8 +48,7 @@ __RCSID("$NetBSD: damaged.c,v 1.5 2003/08/07 09:37:50 agc Exp $");
*/
int
-damaged(dev)
-int dev;
+damaged(int dev)
{
int d;
struct event *e;
diff --git a/trek/dcrept.c b/trek/dcrept.c
index d6bbd852..e1981823 100644
--- a/trek/dcrept.c
+++ b/trek/dcrept.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dcrept.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: dcrept.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dcrept.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dcrept.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: dcrept.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -55,8 +55,7 @@ __RCSID("$NetBSD: dcrept.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-dcrept(v)
- int v __unused;
+dcrept(int v __unused)
{
int i, f;
double x;
diff --git a/trek/destruct.c b/trek/destruct.c
index 6f22517b..0ce2d0d3 100644
--- a/trek/destruct.c
+++ b/trek/destruct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: destruct.c,v 1.8 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: destruct.c,v 1.9 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)destruct.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: destruct.c,v 1.8 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: destruct.c,v 1.9 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -66,8 +66,7 @@ __RCSID("$NetBSD: destruct.c,v 1.8 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-destruct(v)
- int v __unused;
+destruct(int v __unused)
{
char checkpass[15];
int i, j;
diff --git a/trek/dock.c b/trek/dock.c
index b9ba43e1..fd50faad 100644
--- a/trek/dock.c
+++ b/trek/dock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dock.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: dock.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dock.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dock.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: dock.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -58,8 +58,7 @@ __RCSID("$NetBSD: dock.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-dock(v)
- int v __unused;
+dock(int v __unused)
{
int i, j;
int ok;
@@ -132,8 +131,7 @@ dock(v)
/*ARGSUSED*/
void
-undock(v)
- int v __unused;
+undock(int v __unused)
{
struct event *e;
int i;
diff --git a/trek/dumpgame.c b/trek/dumpgame.c
index 83c5e6ff..2d5527b6 100644
--- a/trek/dumpgame.c
+++ b/trek/dumpgame.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dumpgame.c,v 1.11 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: dumpgame.c,v 1.12 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dumpgame.c,v 1.11 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: dumpgame.c,v 1.12 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -82,8 +82,7 @@ struct dump Dump_template[] =
/*ARGSUSED*/
void
-dumpgame(v)
- int v __unused;
+dumpgame(int v __unused)
{
int version;
int fd;
@@ -121,7 +120,7 @@ dumpgame(v)
*/
int
-restartgame()
+restartgame(void)
{
int fd;
int version;
@@ -152,8 +151,7 @@ restartgame()
*/
static int
-readdump(fd1)
-int fd1;
+readdump(int fd1)
{
int fd;
struct dump *d;
diff --git a/trek/dumpme.c b/trek/dumpme.c
index c06cf12b..e777dfe1 100644
--- a/trek/dumpme.c
+++ b/trek/dumpme.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dumpme.c,v 1.5 2003/08/07 09:37:51 agc Exp $ */
+/* $NetBSD: dumpme.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dumpme.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dumpme.c,v 1.5 2003/08/07 09:37:51 agc Exp $");
+__RCSID("$NetBSD: dumpme.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -54,8 +54,7 @@ __RCSID("$NetBSD: dumpme.c,v 1.5 2003/08/07 09:37:51 agc Exp $");
*/
void
-dumpme(flag)
-int flag;
+dumpme(int flag)
{
int f;
double x;
diff --git a/trek/dumpssradio.c b/trek/dumpssradio.c
index 8062322c..99ad4aca 100644
--- a/trek/dumpssradio.c
+++ b/trek/dumpssradio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dumpssradio.c,v 1.5 2003/08/07 09:37:51 agc Exp $ */
+/* $NetBSD: dumpssradio.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dumpssradio.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dumpssradio.c,v 1.5 2003/08/07 09:37:51 agc Exp $");
+__RCSID("$NetBSD: dumpssradio.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: dumpssradio.c,v 1.5 2003/08/07 09:37:51 agc Exp $");
**/
int
-dumpssradio()
+dumpssradio(void)
{
struct event *e;
int j;
diff --git a/trek/getcodi.c b/trek/getcodi.c
index f6af1db4..e8523462 100644
--- a/trek/getcodi.c
+++ b/trek/getcodi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getcodi.c,v 1.5 2003/08/07 09:37:51 agc Exp $ */
+/* $NetBSD: getcodi.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getcodi.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getcodi.c,v 1.5 2003/08/07 09:37:51 agc Exp $");
+__RCSID("$NetBSD: getcodi.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -52,9 +52,7 @@ __RCSID("$NetBSD: getcodi.c,v 1.5 2003/08/07 09:37:51 agc Exp $");
*/
int
-getcodi(co, di)
-int *co;
-double *di;
+getcodi(int *co, double *di)
{
*co = getintpar("Course");
diff --git a/trek/getpar.c b/trek/getpar.c
index 5d568323..b51a209d 100644
--- a/trek/getpar.c
+++ b/trek/getpar.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getpar.c,v 1.12 2004/01/27 20:30:31 jsm Exp $ */
+/* $NetBSD: getpar.c,v 1.13 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getpar.c,v 1.12 2004/01/27 20:30:31 jsm Exp $");
+__RCSID("$NetBSD: getpar.c,v 1.13 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -51,8 +51,7 @@ static int testterm(void);
**/
int
-getintpar(s)
- const char *s;
+getintpar(const char *s)
{
int i;
int n;
@@ -75,8 +74,8 @@ getintpar(s)
** get floating parameter
**/
-double getfltpar(s)
- const char *s;
+double
+getfltpar(const char *s)
{
int i;
double d;
@@ -107,8 +106,7 @@ const struct cvntab Yntab[] =
};
int
-getynpar(s)
- const char *s;
+getynpar(const char *s)
{
const struct cvntab *r;
@@ -121,9 +119,8 @@ getynpar(s)
** get coded parameter
**/
-const struct cvntab *getcodpar(s, tab)
- const char *s;
- const struct cvntab tab[];
+const struct cvntab *
+getcodpar(const char *s, const struct cvntab tab[])
{
char input[100];
const struct cvntab *r;
@@ -200,11 +197,7 @@ const struct cvntab *getcodpar(s, tab)
**/
void
-getstrpar(s, r, l, t)
- const char *s;
- char *r;
- int l;
- const char *t;
+getstrpar(const char *s, char *r, int l, const char *t)
{
int i;
char format[20];
@@ -234,7 +227,7 @@ getstrpar(s, r, l, t)
**/
int
-testnl()
+testnl(void)
{
char c;
@@ -256,8 +249,7 @@ testnl()
**/
void
-skiptonl(c)
-int c;
+skiptonl(int c)
{
while (c != '\n')
if (!(c = cgetc(0)))
@@ -272,7 +264,7 @@ int c;
**/
static int
-testterm()
+testterm(void)
{
char c;
@@ -295,8 +287,7 @@ testterm()
*/
int
-readdelim(d)
-char d;
+readdelim(int d)
{
char c;
diff --git a/trek/help.c b/trek/help.c
index 5cf90d5b..2d6447a1 100644
--- a/trek/help.c
+++ b/trek/help.c
@@ -1,4 +1,4 @@
-/* $NetBSD: help.c,v 1.9 2009/03/31 18:48:16 christos Exp $ */
+/* $NetBSD: help.c,v 1.10 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)help.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: help.c,v 1.9 2009/03/31 18:48:16 christos Exp $");
+__RCSID("$NetBSD: help.c,v 1.10 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -69,8 +69,7 @@ const char *const Cntvect[3] =
/*ARGSUSED*/
void
-help(v)
- int v __unused;
+help(int v __unused)
{
int i;
double dist, x;
diff --git a/trek/impulse.c b/trek/impulse.c
index 50ceeca8..50be22b9 100644
--- a/trek/impulse.c
+++ b/trek/impulse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: impulse.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: impulse.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)impulse.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: impulse.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: impulse.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -48,8 +48,7 @@ __RCSID("$NetBSD: impulse.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-impulse(v)
- int v __unused;
+impulse(int v __unused)
{
int course;
int power;
diff --git a/trek/initquad.c b/trek/initquad.c
index bb75ee96..72de8d63 100644
--- a/trek/initquad.c
+++ b/trek/initquad.c
@@ -1,4 +1,4 @@
-/* $NetBSD: initquad.c,v 1.5 2003/08/07 09:37:52 agc Exp $ */
+/* $NetBSD: initquad.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)initquad.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: initquad.c,v 1.5 2003/08/07 09:37:52 agc Exp $");
+__RCSID("$NetBSD: initquad.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -59,8 +59,7 @@ __RCSID("$NetBSD: initquad.c,v 1.5 2003/08/07 09:37:52 agc Exp $");
*/
void
-initquad(f)
-int f;
+initquad(int f)
{
int i, j;
int rx, ry;
@@ -142,8 +141,7 @@ int f;
void
-sector(x, y)
-int *x, *y;
+sector(int *x, int *y)
{
int i, j;
diff --git a/trek/kill.c b/trek/kill.c
index 1d8f6130..6165cab9 100644
--- a/trek/kill.c
+++ b/trek/kill.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kill.c,v 1.8 2009/03/31 18:48:16 christos Exp $ */
+/* $NetBSD: kill.c,v 1.9 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)kill.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: kill.c,v 1.8 2009/03/31 18:48:16 christos Exp $");
+__RCSID("$NetBSD: kill.c,v 1.9 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -59,8 +59,7 @@ __RCSID("$NetBSD: kill.c,v 1.8 2009/03/31 18:48:16 christos Exp $");
*/
void
-killk(ix, iy)
-int ix, iy;
+killk(int ix, int iy)
{
int i;
@@ -100,8 +99,7 @@ int ix, iy;
*/
void
-killb(qx, qy)
-int qx, qy;
+killb(int qx, int qy)
{
struct quad *q;
struct xy *b;
@@ -146,12 +144,13 @@ int qx, qy;
/**
** kill an inhabited starsystem
+ **
+ ** x, y are quad coords if f == 0, else sector coords
+ ** f != 0 -- this quad; f < 0 -- Enterprise's fault
**/
void
-kills(x, y, f)
-int x, y; /* quad coords if f == 0, else sector coords */
-int f; /* f != 0 -- this quad; f < 0 -- Enterprise's fault */
+kills(int x, int y, int f)
{
struct quad *q;
struct event *e;
@@ -190,12 +189,13 @@ int f; /* f != 0 -- this quad; f < 0 -- Enterprise's fault */
/**
** "kill" a distress call
+ **
+ ** x, y are quadrant coordinates
+ ** f is set if user is to be informed
**/
void
-killd(x, y, f)
-int x, y; /* quadrant coordinates */
-int f; /* set if user is to be informed */
+killd(int x, int y, int f)
{
struct event *e;
int i;
diff --git a/trek/klmove.c b/trek/klmove.c
index 0ab26fec..17d636c9 100644
--- a/trek/klmove.c
+++ b/trek/klmove.c
@@ -1,4 +1,4 @@
-/* $NetBSD: klmove.c,v 1.5 2003/08/07 09:37:52 agc Exp $ */
+/* $NetBSD: klmove.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)klmove.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: klmove.c,v 1.5 2003/08/07 09:37:52 agc Exp $");
+__RCSID("$NetBSD: klmove.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -65,8 +65,7 @@ __RCSID("$NetBSD: klmove.c,v 1.5 2003/08/07 09:37:52 agc Exp $");
*/
void
-klmove(fl)
-int fl;
+klmove(int fl)
{
int n;
struct kling *k;
diff --git a/trek/lose.c b/trek/lose.c
index efb89fd9..eae32a91 100644
--- a/trek/lose.c
+++ b/trek/lose.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lose.c,v 1.7 2003/08/07 09:37:52 agc Exp $ */
+/* $NetBSD: lose.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)lose.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: lose.c,v 1.7 2003/08/07 09:37:52 agc Exp $");
+__RCSID("$NetBSD: lose.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -72,8 +72,7 @@ const char *const Losemsg[] =
};
void
-lose(why)
-int why;
+lose(int why)
{
Game.killed = 1;
sleep(1);
diff --git a/trek/lrscan.c b/trek/lrscan.c
index 3e18baeb..04138712 100644
--- a/trek/lrscan.c
+++ b/trek/lrscan.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lrscan.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: lrscan.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)lrscan.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: lrscan.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: lrscan.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -55,8 +55,7 @@ __RCSID("$NetBSD: lrscan.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
/*ARGSUSED*/
void
-lrscan(v)
- int v __unused;
+lrscan(int v __unused)
{
int i, j;
struct quad *q;
diff --git a/trek/main.c b/trek/main.c
index dc987ef9..c0456d9c 100644
--- a/trek/main.c
+++ b/trek/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.13 2008/07/20 01:03:22 lukem Exp $ */
+/* $NetBSD: main.c,v 1.14 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.13 2008/07/20 01:03:22 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.14 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -160,9 +160,7 @@ jmp_buf env;
int main(int, char **);
int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char **argv)
{
time_t curtime;
long vect;
diff --git a/trek/move.c b/trek/move.c
index d1941b53..912be9d3 100644
--- a/trek/move.c
+++ b/trek/move.c
@@ -1,4 +1,4 @@
-/* $NetBSD: move.c,v 1.6 2003/08/07 09:37:52 agc Exp $ */
+/* $NetBSD: move.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: move.c,v 1.6 2003/08/07 09:37:52 agc Exp $");
+__RCSID("$NetBSD: move.c,v 1.7 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -77,11 +77,8 @@ __RCSID("$NetBSD: move.c,v 1.6 2003/08/07 09:37:52 agc Exp $");
** Uses trace flag 4.
*/
-double move(ramflag, course, time, speed)
-int ramflag;
-int course;
-double time;
-double speed;
+double
+move(int ramflag, int course, double time, double speed)
{
double angle;
double x, y, dx, dy;
diff --git a/trek/nova.c b/trek/nova.c
index 7c5a8767..8a417d30 100644
--- a/trek/nova.c
+++ b/trek/nova.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nova.c,v 1.6 2003/08/07 09:37:53 agc Exp $ */
+/* $NetBSD: nova.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)nova.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: nova.c,v 1.6 2003/08/07 09:37:53 agc Exp $");
+__RCSID("$NetBSD: nova.c,v 1.7 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -56,8 +56,7 @@ __RCSID("$NetBSD: nova.c,v 1.6 2003/08/07 09:37:53 agc Exp $");
*/
void
-nova(x, y)
-int x, y;
+nova(int x, int y)
{
int i, j;
int se;
diff --git a/trek/out.c b/trek/out.c
index 550c2c26..7522b870 100644
--- a/trek/out.c
+++ b/trek/out.c
@@ -1,4 +1,4 @@
-/* $NetBSD: out.c,v 1.7 2003/08/07 09:37:53 agc Exp $ */
+/* $NetBSD: out.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)out.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: out.c,v 1.7 2003/08/07 09:37:53 agc Exp $");
+__RCSID("$NetBSD: out.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -47,8 +47,7 @@ __RCSID("$NetBSD: out.c,v 1.7 2003/08/07 09:37:53 agc Exp $");
*/
void
-out(dev)
-int dev;
+out(int dev)
{
const struct device *d;
diff --git a/trek/phaser.c b/trek/phaser.c
index 4fbd784e..7ac3b8b6 100644
--- a/trek/phaser.c
+++ b/trek/phaser.c
@@ -1,4 +1,4 @@
-/* $NetBSD: phaser.c,v 1.10 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: phaser.c,v 1.11 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)phaser.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: phaser.c,v 1.10 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: phaser.c,v 1.11 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -94,8 +94,7 @@ struct banks
/*ARGSUSED*/
void
-phaser(v)
- int v __unused;
+phaser(int v __unused)
{
int i;
int j;
diff --git a/trek/play.c b/trek/play.c
index ad9cf927..9553ee8b 100644
--- a/trek/play.c
+++ b/trek/play.c
@@ -1,4 +1,4 @@
-/* $NetBSD: play.c,v 1.9 2007/12/15 19:44:45 perry Exp $ */
+/* $NetBSD: play.c,v 1.10 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)play.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: play.c,v 1.9 2007/12/15 19:44:45 perry Exp $");
+__RCSID("$NetBSD: play.c,v 1.10 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -86,15 +86,14 @@ const struct cvntab Comtab[] =
/*ARGSUSED*/
void
-myreset(v)
- int v __unused;
+myreset(int v __unused)
{
longjmp(env, 1);
}
void
-play()
+play(void)
{
const struct cvntab *r;
diff --git a/trek/ram.c b/trek/ram.c
index 008c6916..7e6c8781 100644
--- a/trek/ram.c
+++ b/trek/ram.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ram.c,v 1.5 2003/08/07 09:37:53 agc Exp $ */
+/* $NetBSD: ram.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ram.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: ram.c,v 1.5 2003/08/07 09:37:53 agc Exp $");
+__RCSID("$NetBSD: ram.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -54,8 +54,7 @@ __RCSID("$NetBSD: ram.c,v 1.5 2003/08/07 09:37:53 agc Exp $");
*/
void
-ram(ix, iy)
-int ix, iy;
+ram(int ix, int iy)
{
int i;
char c;
diff --git a/trek/ranf.c b/trek/ranf.c
index 24e3328f..2b553d9b 100644
--- a/trek/ranf.c
+++ b/trek/ranf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ranf.c,v 1.5 2003/08/07 09:37:53 agc Exp $ */
+/* $NetBSD: ranf.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ranf.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: ranf.c,v 1.5 2003/08/07 09:37:53 agc Exp $");
+__RCSID("$NetBSD: ranf.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -43,8 +43,7 @@ __RCSID("$NetBSD: ranf.c,v 1.5 2003/08/07 09:37:53 agc Exp $");
#include "trek.h"
int
-ranf(max)
-int max;
+ranf(int max)
{
int t;
@@ -55,7 +54,8 @@ int max;
}
-double franf()
+double
+franf(void)
{
double t;
t = rand() & 077777;
diff --git a/trek/rest.c b/trek/rest.c
index d4478c6f..1478e9b4 100644
--- a/trek/rest.c
+++ b/trek/rest.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rest.c,v 1.7 2007/12/15 19:44:45 perry Exp $ */
+/* $NetBSD: rest.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)rest.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: rest.c,v 1.7 2007/12/15 19:44:45 perry Exp $");
+__RCSID("$NetBSD: rest.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -58,8 +58,7 @@ __RCSID("$NetBSD: rest.c,v 1.7 2007/12/15 19:44:45 perry Exp $");
/*ARGSUSED*/
void
-rest(v)
- int v __unused;
+rest(int v __unused)
{
double t;
int percent;
diff --git a/trek/schedule.c b/trek/schedule.c
index 455c5e06..76bf375d 100644
--- a/trek/schedule.c
+++ b/trek/schedule.c
@@ -1,4 +1,4 @@
-/* $NetBSD: schedule.c,v 1.7 2009/03/31 18:48:16 christos Exp $ */
+/* $NetBSD: schedule.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)schedule.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: schedule.c,v 1.7 2009/03/31 18:48:16 christos Exp $");
+__RCSID("$NetBSD: schedule.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -54,11 +54,8 @@ __RCSID("$NetBSD: schedule.c,v 1.7 2009/03/31 18:48:16 christos Exp $");
** The address of the slot is returned.
*/
-struct event *schedule(type, offset, x, y, z)
-int type;
-double offset;
-char x, y;
-char z;
+struct event *
+schedule(int type, double offset, int x, int y, int z)
{
struct event *e;
int i;
@@ -96,9 +93,7 @@ char z;
*/
void
-reschedule(e1, offset)
-struct event *e1;
-double offset;
+reschedule(struct event *e1, double offset)
{
double date;
struct event *e;
@@ -123,8 +118,7 @@ double offset;
*/
void
-unschedule(e1)
-struct event *e1;
+unschedule(struct event *e1)
{
struct event *e;
@@ -149,10 +143,8 @@ struct event *e1;
** figure.
*/
-struct event *xsched(ev1, factor, x, y, z)
-int ev1;
-int factor;
-int x, y, z;
+struct event *
+xsched(int ev1, int factor, int x, int y, int z)
{
int ev;
@@ -169,10 +161,7 @@ int x, y, z;
*/
void
-xresched(e1, ev1, factor)
-struct event *e1;
-int ev1;
-int factor;
+xresched(struct event *e1, int ev1, int factor)
{
int ev;
struct event *e;
diff --git a/trek/score.c b/trek/score.c
index 9deb214c..553f0a2c 100644
--- a/trek/score.c
+++ b/trek/score.c
@@ -1,4 +1,4 @@
-/* $NetBSD: score.c,v 1.5 2003/08/07 09:37:54 agc Exp $ */
+/* $NetBSD: score.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: score.c,v 1.5 2003/08/07 09:37:54 agc Exp $");
+__RCSID("$NetBSD: score.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -46,7 +46,8 @@ __RCSID("$NetBSD: score.c,v 1.5 2003/08/07 09:37:54 agc Exp $");
** PRINT OUT THE CURRENT SCORE
*/
-long score()
+long
+score(void)
{
int u;
int t;
diff --git a/trek/setup.c b/trek/setup.c
index 3a9f93f2..715a3889 100644
--- a/trek/setup.c
+++ b/trek/setup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.10 2009/03/31 18:48:16 christos Exp $ */
+/* $NetBSD: setup.c,v 1.11 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: setup.c,v 1.10 2009/03/31 18:48:16 christos Exp $");
+__RCSID("$NetBSD: setup.c,v 1.11 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -80,7 +80,7 @@ const struct cvntab Skitab[] =
};
void
-setup()
+setup(void)
{
const struct cvntab *r;
int i, j;
diff --git a/trek/setwarp.c b/trek/setwarp.c
index 17f87450..b0ab0453 100644
--- a/trek/setwarp.c
+++ b/trek/setwarp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setwarp.c,v 1.7 2007/12/15 19:44:45 perry Exp $ */
+/* $NetBSD: setwarp.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setwarp.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: setwarp.c,v 1.7 2007/12/15 19:44:45 perry Exp $");
+__RCSID("$NetBSD: setwarp.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -51,8 +51,7 @@ __RCSID("$NetBSD: setwarp.c,v 1.7 2007/12/15 19:44:45 perry Exp $");
/*ARGSUSED*/
void
-setwarp(v)
- int v __unused;
+setwarp(int v __unused)
{
double warpfac;
diff --git a/trek/shield.c b/trek/shield.c
index b49e037a..c74444b0 100644
--- a/trek/shield.c
+++ b/trek/shield.c
@@ -1,4 +1,4 @@
-/* $NetBSD: shield.c,v 1.8 2003/08/07 09:37:54 agc Exp $ */
+/* $NetBSD: shield.c,v 1.9 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)shield.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: shield.c,v 1.8 2003/08/07 09:37:54 agc Exp $");
+__RCSID("$NetBSD: shield.c,v 1.9 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -67,8 +67,7 @@ const struct cvntab Udtab[] =
};
void
-shield(f)
-int f;
+shield(int f)
{
int i;
const struct cvntab *r;
diff --git a/trek/snova.c b/trek/snova.c
index ef7a42d1..073f10de 100644
--- a/trek/snova.c
+++ b/trek/snova.c
@@ -1,4 +1,4 @@
-/* $NetBSD: snova.c,v 1.5 2003/08/07 09:37:54 agc Exp $ */
+/* $NetBSD: snova.c,v 1.6 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)snova.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: snova.c,v 1.5 2003/08/07 09:37:54 agc Exp $");
+__RCSID("$NetBSD: snova.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -64,8 +64,7 @@ __RCSID("$NetBSD: snova.c,v 1.5 2003/08/07 09:37:54 agc Exp $");
*/
void
-snova(x, y)
-int x, y;
+snova(int x, int y)
{
int qx, qy;
int ix, iy = 0;
diff --git a/trek/srscan.c b/trek/srscan.c
index 1ce750a6..a1f45f79 100644
--- a/trek/srscan.c
+++ b/trek/srscan.c
@@ -1,4 +1,4 @@
-/* $NetBSD: srscan.c,v 1.6 2003/08/07 09:37:54 agc Exp $ */
+/* $NetBSD: srscan.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)srscan.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: srscan.c,v 1.6 2003/08/07 09:37:54 agc Exp $");
+__RCSID("$NetBSD: srscan.c,v 1.7 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -66,8 +66,7 @@ const char *const Color[4] =
};
void
-srscan(f)
-int f;
+srscan(int f)
{
int i, j;
int statinfo;
diff --git a/trek/systemname.c b/trek/systemname.c
index 64193f50..b5e3ad76 100644
--- a/trek/systemname.c
+++ b/trek/systemname.c
@@ -1,4 +1,4 @@
-/* $NetBSD: systemname.c,v 1.6 2003/08/07 09:37:54 agc Exp $ */
+/* $NetBSD: systemname.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)systemname.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: systemname.c,v 1.6 2003/08/07 09:37:54 agc Exp $");
+__RCSID("$NetBSD: systemname.c,v 1.7 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -51,8 +51,8 @@ __RCSID("$NetBSD: systemname.c,v 1.6 2003/08/07 09:37:54 agc Exp $");
** starsystems, etc.
*/
-const char *systemname(q1)
- const struct quad *q1;
+const char *
+systemname(const struct quad *q1)
{
const struct quad *q;
int i;
diff --git a/trek/torped.c b/trek/torped.c
index a0e6be7b..3e1b3853 100644
--- a/trek/torped.c
+++ b/trek/torped.c
@@ -1,4 +1,4 @@
-/* $NetBSD: torped.c,v 1.9 2007/12/15 19:44:45 perry Exp $ */
+/* $NetBSD: torped.c,v 1.10 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)torped.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: torped.c,v 1.9 2007/12/15 19:44:45 perry Exp $");
+__RCSID("$NetBSD: torped.c,v 1.10 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -67,8 +67,7 @@ static int randcourse(int);
/*ARGSUSED*/
void
-torped(v)
- int v __unused;
+torped(int v __unused)
{
int ix, iy;
double x, y, dx, dy;
@@ -230,8 +229,7 @@ torped(v)
*/
static int
-randcourse(n)
-int n;
+randcourse(int n)
{
double r;
int d;
diff --git a/trek/visual.c b/trek/visual.c
index 4137ec61..258a3194 100644
--- a/trek/visual.c
+++ b/trek/visual.c
@@ -1,4 +1,4 @@
-/* $NetBSD: visual.c,v 1.7 2007/12/15 19:44:45 perry Exp $ */
+/* $NetBSD: visual.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)visual.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: visual.c,v 1.7 2007/12/15 19:44:45 perry Exp $");
+__RCSID("$NetBSD: visual.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -69,8 +69,7 @@ struct xy Visdelta[11] =
/*ARGSUSED*/
void
-visual(z)
- int z __unused;
+visual(int z __unused)
{
int ix, iy;
int co;
diff --git a/trek/warp.c b/trek/warp.c
index c82aa1b2..f4e07d60 100644
--- a/trek/warp.c
+++ b/trek/warp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: warp.c,v 1.8 2003/08/07 09:37:55 agc Exp $ */
+/* $NetBSD: warp.c,v 1.9 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)warp.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: warp.c,v 1.8 2003/08/07 09:37:55 agc Exp $");
+__RCSID("$NetBSD: warp.c,v 1.9 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -62,8 +62,7 @@ __RCSID("$NetBSD: warp.c,v 1.8 2003/08/07 09:37:55 agc Exp $");
*/
void
-dowarp(fl)
- int fl;
+dowarp(int fl)
{
int c;
double d;
@@ -74,9 +73,7 @@ dowarp(fl)
}
void
-warp(fl, c, d)
-int fl, c;
-double d;
+warp(int fl, int c, double d)
{
char *p;
int course;
diff --git a/trek/win.c b/trek/win.c
index 218680e5..31c3cfe9 100644
--- a/trek/win.c
+++ b/trek/win.c
@@ -1,4 +1,4 @@
-/* $NetBSD: win.c,v 1.7 2003/08/07 09:37:55 agc Exp $ */
+/* $NetBSD: win.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)win.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: win.c,v 1.7 2003/08/07 09:37:55 agc Exp $");
+__RCSID("$NetBSD: win.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
#endif
#endif /* not lint */
@@ -60,7 +60,7 @@ __RCSID("$NetBSD: win.c,v 1.7 2003/08/07 09:37:55 agc Exp $");
extern jmp_buf env;
void
-win()
+win(void)
{
long s;
const struct cvntab *p = NULL;