summaryrefslogtreecommitdiff
path: root/games/battlestar
diff options
context:
space:
mode:
Diffstat (limited to 'games/battlestar')
-rw-r--r--games/battlestar/battlestar.c8
-rw-r--r--games/battlestar/com1.c23
-rw-r--r--games/battlestar/com2.c20
-rw-r--r--games/battlestar/com3.c14
-rw-r--r--games/battlestar/com4.c19
-rw-r--r--games/battlestar/com5.c14
-rw-r--r--games/battlestar/com6.c31
-rw-r--r--games/battlestar/com7.c7
-rw-r--r--games/battlestar/cypher.c16
-rw-r--r--games/battlestar/fly.c22
-rw-r--r--games/battlestar/getcom.c13
-rw-r--r--games/battlestar/init.c15
-rw-r--r--games/battlestar/misc.c12
-rw-r--r--games/battlestar/parse.c17
-rw-r--r--games/battlestar/room.c18
-rw-r--r--games/battlestar/save.c14
16 files changed, 116 insertions, 147 deletions
diff --git a/games/battlestar/battlestar.c b/games/battlestar/battlestar.c
index 83b7915d64f..cd94a6d14d9 100644
--- a/games/battlestar/battlestar.c
+++ b/games/battlestar/battlestar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: battlestar.c,v 1.13 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: battlestar.c,v 1.14 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: battlestar.c,v 1.3 1995/03/21 15:06:47 cgd Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)battlestar.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: battlestar.c,v 1.13 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: battlestar.c,v 1.14 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -57,9 +57,7 @@ static char rcsid[] = "$OpenBSD: battlestar.c,v 1.13 2003/06/03 03:01:38 millert
int main(int, char *[]);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
char mainbuf[LINELENGTH];
char *next;
diff --git a/games/battlestar/com1.c b/games/battlestar/com1.c
index ad7d9b41b2e..85b1970462a 100644
--- a/games/battlestar/com1.c
+++ b/games/battlestar/com1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com1.c,v 1.12 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com1.c,v 1.13 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com1.c,v 1.3 1995/03/21 15:06:51 cgd Exp $ */
/*
@@ -34,15 +34,14 @@
#if 0
static char sccsid[] = "@(#)com1.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com1.c,v 1.12 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com1.c,v 1.13 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
int
-moveplayer(thataway, token)
- int thataway, token;
+moveplayer(int thataway, int token)
{
wordnumber++;
if ((!notes[CANTMOVE] && !notes[LAUNCHED]) ||
@@ -66,10 +65,14 @@ moveplayer(thataway, token)
return (1);
}
+/*
+ * Converts day to night and vice versa.
+ * Day objects are permanent. Night objects
+ * are added at dusk, and subtracted at dawn.
+ */
void
-convert(tothis) /* Converts day to night and vice versa. */
- int tothis; /* Day objects are permanent. Night objects */
-{ /* are added at dusk, and subtracted at dawn.*/
+convert(int tothis)
+{
const struct objs *p;
unsigned int i, j;
@@ -91,7 +94,7 @@ convert(tothis) /* Converts day to night and vice versa. */
}
void
-news()
+news(void)
{
int n;
int hurt;
@@ -232,7 +235,7 @@ news()
}
void
-crash()
+crash(void)
{
int hurt1, hurt2;
@@ -267,7 +270,7 @@ crash()
}
void
-newlocation()
+newlocation(void)
{
news();
if (beenthere[position] <= ROOMDESC)
diff --git a/games/battlestar/com2.c b/games/battlestar/com2.c
index f273292de82..b869e25c26c 100644
--- a/games/battlestar/com2.c
+++ b/games/battlestar/com2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com2.c,v 1.14 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com2.c,v 1.15 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com2.c,v 1.3 1995/03/21 15:06:55 cgd Exp $ */
/*
@@ -34,14 +34,14 @@
#if 0
static char sccsid[] = "@(#)com2.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com2.c,v 1.14 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com2.c,v 1.15 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
int
-wearit()
+wearit(void)
{ /* synonyms = {sheathe, sheath} */
int firstnumber, value;
@@ -109,7 +109,7 @@ wearit()
}
int
-put()
+put(void)
{ /* synonyms = {buckle, strap, tie} */
if (inc_wordnumber(words[wordnumber], "what"))
return(-1);
@@ -128,13 +128,13 @@ put()
}
int
-draw()
+draw(void)
{ /* synonyms = {pull, carry} */
return (take(wear));
}
int
-use()
+use(void)
{
if (inc_wordnumber(words[wordnumber], "what"))
return(-1);
@@ -178,7 +178,7 @@ use()
}
void
-murder()
+murder(void)
{
int n;
@@ -278,7 +278,7 @@ murder()
}
void
-ravage()
+ravage(void)
{
if (inc_wordnumber(words[wordnumber], "whom"))
return;
@@ -335,7 +335,7 @@ ravage()
}
int
-follow()
+follow(void)
{
if (followfight == ourtime) {
puts("The Dark Lord leaps away and runs down secret tunnels and corridors.");
@@ -360,7 +360,7 @@ follow()
}
void
-undress()
+undress(void)
{
if (inc_wordnumber(words[wordnumber], "whom"))
return;
diff --git a/games/battlestar/com3.c b/games/battlestar/com3.c
index a42a0ab667d..ea5e8c56141 100644
--- a/games/battlestar/com3.c
+++ b/games/battlestar/com3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com3.c,v 1.11 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com3.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com3.c,v 1.3 1995/03/21 15:07:00 cgd Exp $ */
/*
@@ -34,14 +34,14 @@
#if 0
static char sccsid[] = "@(#)com3.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com3.c,v 1.11 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com3.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
void
-dig()
+dig(void)
{
if (TestBit(inven, SHOVEL)) {
puts("OK");
@@ -65,7 +65,7 @@ dig()
}
int
-jump()
+jump(void)
{
int n;
@@ -105,7 +105,7 @@ jump()
}
void
-bury()
+bury(void)
{
int value;
@@ -168,7 +168,7 @@ bury()
}
void
-drink()
+drink(void)
{
int n;
@@ -188,7 +188,7 @@ drink()
}
int
-shoot()
+shoot(void)
{
int firstnumber, value;
diff --git a/games/battlestar/com4.c b/games/battlestar/com4.c
index d375dce3d83..18d489f4341 100644
--- a/games/battlestar/com4.c
+++ b/games/battlestar/com4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com4.c,v 1.12 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com4.c,v 1.13 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com4.c,v 1.3 1995/03/21 15:07:04 cgd Exp $ */
/*
@@ -34,15 +34,14 @@
#if 0
static char sccsid[] = "@(#)com4.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com4.c,v 1.12 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com4.c,v 1.13 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
int
-take(from)
- unsigned int from[];
+take(unsigned int from[])
{
int firstnumber, heavy, bulky, value;
@@ -187,8 +186,7 @@ take(from)
}
int
-throw(name)
- const char *name;
+throw(const char *name)
{
unsigned int n;
int deposit = 0;
@@ -267,8 +265,7 @@ throw(name)
}
int
-drop(name)
- const char *name;
+drop(const char *name)
{
int firstnumber, value;
@@ -346,21 +343,21 @@ drop(name)
}
int
-takeoff()
+takeoff(void)
{
wordnumber = take(wear);
return (drop("Dropped"));
}
int
-puton()
+puton(void)
{
wordnumber = take(location[position].objects);
return (wearit());
}
int
-eat()
+eat(void)
{
int firstnumber, value;
diff --git a/games/battlestar/com5.c b/games/battlestar/com5.c
index e754e1a93a4..d78cead9523 100644
--- a/games/battlestar/com5.c
+++ b/games/battlestar/com5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com5.c,v 1.10 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com5.c,v 1.11 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com5.c,v 1.3 1995/03/21 15:07:07 cgd Exp $ */
/*
@@ -34,14 +34,14 @@
#if 0
static char sccsid[] = "@(#)com5.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com5.c,v 1.10 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com5.c,v 1.11 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
void
-kiss()
+kiss(void)
{
if (inc_wordnumber(words[wordnumber], "whom"))
return;
@@ -93,7 +93,7 @@ kiss()
}
void
-love()
+love(void)
{
int n;
@@ -159,7 +159,7 @@ love()
}
int
-zzz()
+zzz(void)
{
int oldtime;
int n;
@@ -213,7 +213,7 @@ zzz()
}
void
-chime()
+chime(void)
{
if ((ourtime / CYCLE + 1) % 2 && OUTSIDE)
switch ((ourtime % CYCLE) / (CYCLE / 7)) {
@@ -268,7 +268,7 @@ chime()
}
int
-give()
+give(void)
{
int obj = -1, result = -1, person = 0, firstnumber, last1, last2;
diff --git a/games/battlestar/com6.c b/games/battlestar/com6.c
index 7b06058c100..6e834acd488 100644
--- a/games/battlestar/com6.c
+++ b/games/battlestar/com6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com6.c,v 1.17 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com6.c,v 1.18 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com6.c,v 1.5 1995/04/27 21:30:23 mycroft Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)com6.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com6.c,v 1.17 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com6.c,v 1.18 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -42,7 +42,7 @@ static char rcsid[] = "$OpenBSD: com6.c,v 1.17 2003/06/03 03:01:38 millert Exp $
#include "pathnames.h"
int
-launch()
+launch(void)
{
if (TestBit(location[position].objects, VIPER) && !notes[CANTLAUNCH]) {
if (fuel > 4) {
@@ -62,7 +62,7 @@ launch()
}
int
-land()
+land(void)
{
if (notes[LAUNCHED] && TestBit(location[position].objects, LAND) &&
location[position].down) {
@@ -78,17 +78,17 @@ land()
return (0);
}
+/* endgame */
void
-die(sigraised)
- int sigraised;
-{ /* endgame */
+die(int sigraised)
+{
printf("bye.\nYour rating was %s.\n", rate());
post(' ');
exit(0);
}
void
-live()
+live(void)
{
puts("\nYou win!");
post('!');
@@ -98,15 +98,14 @@ live()
static FILE *score_fp;
void
-open_score_file()
+open_score_file(void)
{
if ((score_fp = fopen(_PATH_SCORE, "a")) == NULL)
warn("can't append to high scores file (%s)", _PATH_SCORE);
}
void
-post(ch)
- char ch;
+post(char ch)
{
time_t tv;
char *date;
@@ -133,7 +132,7 @@ post(ch)
}
const char *
-rate()
+rate(void)
{
int score;
@@ -172,7 +171,7 @@ rate()
}
int
-drive()
+drive(void)
{
if (TestBit(location[position].objects, CAR)) {
puts("You hop in the car and turn the key. There is a perceptible grating noise,");
@@ -189,7 +188,7 @@ drive()
}
int
-ride()
+ride(void)
{
if (TestBit(location[position].objects, HORSE)) {
puts("You climb onto the stallion and kick it in the guts. The stupid steed launches");
@@ -213,7 +212,7 @@ ride()
}
void
-light()
+light(void)
{ /* synonyms = {strike, smoke} */
if (TestBit(inven, MATCHES) && matchcount) {
puts("Your match splutters to life.");
@@ -229,7 +228,7 @@ light()
}
void
-dooropen()
+dooropen(void)
{ /* synonyms = {open, unlock} */
wordnumber++;
if (wordnumber <= wordcount && wordtype[wordnumber] == NOUNS
diff --git a/games/battlestar/com7.c b/games/battlestar/com7.c
index f39cebd1191..fab9bcb5fbb 100644
--- a/games/battlestar/com7.c
+++ b/games/battlestar/com7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com7.c,v 1.10 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: com7.c,v 1.11 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: com7.c,v 1.3 1995/03/21 15:07:12 cgd Exp $ */
/*
@@ -34,15 +34,14 @@
#if 0
static char sccsid[] = "@(#)com7.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: com7.c,v 1.10 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: com7.c,v 1.11 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
int
-fight(enemy, strength)
- int enemy, strength;
+fight(int enemy, int strength)
{
int lifeline = 0;
int hurt;
diff --git a/games/battlestar/cypher.c b/games/battlestar/cypher.c
index f4fa2c5086a..18c35401b71 100644
--- a/games/battlestar/cypher.c
+++ b/games/battlestar/cypher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cypher.c,v 1.14 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: cypher.c,v 1.15 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: cypher.c,v 1.3 1995/03/21 15:07:15 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cypher.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: cypher.c,v 1.14 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: cypher.c,v 1.15 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -47,7 +47,7 @@ static void verb_with_all(unsigned int *, int, int (*)(void), const char *);
* 1 if there are more commands remaining on the current input line
*/
int
-cypher()
+cypher(void)
{
int n;
int junk;
@@ -469,8 +469,7 @@ cypher()
}
int
-inc_wordnumber(v, adv)
- const char *v, *adv;
+inc_wordnumber(const char *v, const char *adv)
{
wordnumber++;
if (wordnumber >= wordcount) {
@@ -481,11 +480,8 @@ inc_wordnumber(v, adv)
}
static void
-verb_with_all(testarray, objflg, verbfunc, verbname)
- unsigned int *testarray;
- int objflg;
- int (*verbfunc)(void);
- const char *verbname;
+verb_with_all(unsigned int *testarray, int objflg, int (*verbfunc)(void),
+ const char *verbname)
{
int things, n;
diff --git a/games/battlestar/fly.c b/games/battlestar/fly.c
index 2a0d83b4b78..96d1e4aba51 100644
--- a/games/battlestar/fly.c
+++ b/games/battlestar/fly.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fly.c,v 1.11 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: fly.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: fly.c,v 1.3 1995/03/21 15:07:28 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)fly.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: fly.c,v 1.11 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: fly.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -62,8 +62,7 @@ static void succumb(int);
static void target(void);
static void
-succumb(sigraised)
- int sigraised;
+succumb(int sigraised)
{
if (oldsig == SIG_DFL) {
endfly();
@@ -76,7 +75,7 @@ succumb(sigraised)
}
int
-visual()
+visual(void)
{
destroyed = 0;
if (initscr() == NULL) {
@@ -183,7 +182,7 @@ visual()
}
static void
-screen()
+screen(void)
{
int r, c, n;
int i;
@@ -200,7 +199,7 @@ screen()
}
static void
-target()
+target(void)
{
int n;
@@ -213,7 +212,7 @@ target()
}
static void
-notarget()
+notarget(void)
{
int n;
@@ -226,7 +225,7 @@ notarget()
}
static void
-blast()
+blast(void)
{
int n;
@@ -248,8 +247,7 @@ blast()
}
static void
-moveenemy(sigraised)
- int sigraised;
+moveenemy(int sigraised)
{
double d;
int oldr, oldc;
@@ -288,7 +286,7 @@ moveenemy(sigraised)
}
static void
-endfly()
+endfly(void)
{
alarm(0);
signal(SIGALRM, SIG_DFL);
diff --git a/games/battlestar/getcom.c b/games/battlestar/getcom.c
index e46ff8c7375..e7bfb98e2b4 100644
--- a/games/battlestar/getcom.c
+++ b/games/battlestar/getcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getcom.c,v 1.11 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: getcom.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: getcom.c,v 1.3 1995/03/21 15:07:30 cgd Exp $ */
/*
@@ -34,17 +34,14 @@
#if 0
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: getcom.c,v 1.11 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: getcom.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
char *
-getcom(buf, size, prompt, error)
- char *buf;
- int size;
- const char *prompt, *error;
+getcom(char *buf, int size, const char *prompt, const char *error)
{
for (;;) {
fputs(prompt, stdout);
@@ -76,9 +73,7 @@ getcom(buf, size, prompt, error)
* and leaves it unchanged if flag = 0
*/
char *
-getword(buf1, buf2, flag)
- char *buf1, *buf2;
- int flag;
+getword(char *buf1, char *buf2, int flag)
{
int cnt;
diff --git a/games/battlestar/init.c b/games/battlestar/init.c
index 588295a2d17..9e8c073adcc 100644
--- a/games/battlestar/init.c
+++ b/games/battlestar/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.11 2003/09/26 18:58:01 tedu Exp $ */
+/* $OpenBSD: init.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: init.c,v 1.4 1995/03/21 15:07:35 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.4 (Berkeley) 4/30/95";
#else
-static char rcsid[] = "$OpenBSD: init.c,v 1.11 2003/09/26 18:58:01 tedu Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -45,8 +45,7 @@ static const char *getutmp(void);
static int wizard(const char *);
void
-initialize(filename)
- const char *filename;
+initialize(const char *filename)
{
const struct objs *p;
char *savefile;
@@ -80,7 +79,7 @@ initialize(filename)
}
static const char *
-getutmp()
+getutmp(void)
{
struct passwd *ptr;
@@ -111,8 +110,7 @@ static const char *const badguys[] = {
};
static int
-wizard(username)
- const char *username;
+wizard(const char *username)
{
int flag;
@@ -122,8 +120,7 @@ wizard(username)
}
static int
-checkout(username)
- const char *username;
+checkout(const char *username)
{
const char *const *ptr;
diff --git a/games/battlestar/misc.c b/games/battlestar/misc.c
index 24c30a8d3aa..2f9eb4a6f38 100644
--- a/games/battlestar/misc.c
+++ b/games/battlestar/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.6 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.7 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: misc.c,v 1.3 1995/03/21 15:07:37 cgd Exp $ */
/*
@@ -34,16 +34,15 @@
#if 0
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: misc.c,v 1.6 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.7 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
+/* for beenthere, injuries */
int
-card(array, size) /* for beenthere, injuries */
- const char *array;
- int size;
+card(const char *array, int size)
{
const char *end = array + size;
int i = 0;
@@ -55,8 +54,7 @@ card(array, size) /* for beenthere, injuries */
}
int
-ucard(array)
- const unsigned int *array;
+ucard(const unsigned int *array)
{
int j = 0, n;
diff --git a/games/battlestar/parse.c b/games/battlestar/parse.c
index f12aa299aae..399216e24b1 100644
--- a/games/battlestar/parse.c
+++ b/games/battlestar/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.12 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: parse.c,v 1.13 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: parse.c,v 1.3 1995/03/21 15:07:48 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: parse.c,v 1.12 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: parse.c,v 1.13 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -51,7 +51,7 @@ static struct wlist *lookup(const char *);
struct wlist *hashtab[HASHSIZE];
void
-wordinit()
+wordinit(void)
{
struct wlist *w;
@@ -60,8 +60,7 @@ wordinit()
}
static int
-hash(s)
- const char *s;
+hash(const char *s)
{
int hashval = 0;
@@ -74,8 +73,7 @@ hash(s)
}
static struct wlist *
-lookup(s)
- const char *s;
+lookup(const char *s)
{
struct wlist *wp;
@@ -86,8 +84,7 @@ lookup(s)
}
static void
-install(wp)
- struct wlist *wp;
+install(struct wlist *wp)
{
int hashval;
@@ -100,7 +97,7 @@ install(wp)
}
void
-parse()
+parse(void)
{
struct wlist *wp;
int n;
diff --git a/games/battlestar/room.c b/games/battlestar/room.c
index ec04e2752ff..961a043f503 100644
--- a/games/battlestar/room.c
+++ b/games/battlestar/room.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: room.c,v 1.7 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: room.c,v 1.8 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: room.c,v 1.3 1995/03/21 15:07:54 cgd Exp $ */
/*
@@ -34,14 +34,14 @@
#if 0
static char sccsid[] = "@(#)room.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: room.c,v 1.7 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: room.c,v 1.8 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
void
-writedes()
+writedes(void)
{
int compass;
const char *p;
@@ -65,7 +65,7 @@ writedes()
}
void
-printobjs()
+printobjs(void)
{
unsigned int *p = location[position].objects;
int n;
@@ -77,8 +77,7 @@ printobjs()
}
void
-whichway(here)
- struct room here;
+whichway(struct room here)
{
switch (direction) {
@@ -114,9 +113,7 @@ whichway(here)
}
const char *
-truedirec(way, option)
- int way;
- char option;
+truedirec(int way, char option)
{
switch (way) {
@@ -175,8 +172,7 @@ truedirec(way, option)
}
void
-newway(thisway)
- int thisway;
+newway(int thisway)
{
switch (direction) {
diff --git a/games/battlestar/save.c b/games/battlestar/save.c
index 6b77b48158f..e2f49ed413c 100644
--- a/games/battlestar/save.c
+++ b/games/battlestar/save.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: save.c,v 1.9 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: save.c,v 1.10 2004/07/10 07:26:22 deraadt Exp $ */
/* $NetBSD: save.c,v 1.3 1995/03/21 15:07:57 cgd Exp $ */
/*
@@ -34,15 +34,14 @@
#if 0
static char sccsid[] = "@(#)save.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: save.c,v 1.9 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: save.c,v 1.10 2004/07/10 07:26:22 deraadt Exp $";
#endif
#endif /* not lint */
#include "extern.h"
void
-restore(filename)
- const char *filename;
+restore(const char *filename)
{
int n;
int tmp;
@@ -93,8 +92,7 @@ restore(filename)
}
void
-save(filename)
- const char *filename;
+save(const char *filename)
{
int n;
int tmp;
@@ -156,9 +154,7 @@ save(filename)
* with malloc(3).
*/
char *
-save_file_name(filename, len)
- const char *filename;
- size_t len;
+save_file_name(const char *filename, size_t len)
{
char *home;
char *newname;