summaryrefslogtreecommitdiffstats
path: root/adventure
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1998-08-24 22:07:37 +0000
committerhubertf <hubertf@NetBSD.org>1998-08-24 22:07:37 +0000
commitc250b38eecd6008a0ff88680314da5f4c40d456c (patch)
tree589d2b7f7d79eaaeee5814966dd318b7edd3a7cb /adventure
parent2e97bed1073ca965f36938e2ceb5fb26da06e3b1 (diff)
downloadbsdgames-darwin-c250b38eecd6008a0ff88680314da5f4c40d456c.tar.gz
bsdgames-darwin-c250b38eecd6008a0ff88680314da5f4c40d456c.tar.zst
bsdgames-darwin-c250b38eecd6008a0ff88680314da5f4c40d456c.zip
Kill unused parameters, per PR 6023 by Joseph Myers <jsm28@cam.ac.uk>.
Diffstat (limited to 'adventure')
-rw-r--r--adventure/extern.h12
-rw-r--r--adventure/init.c9
-rw-r--r--adventure/main.c32
-rw-r--r--adventure/subr.c18
-rw-r--r--adventure/wizard.c9
5 files changed, 39 insertions, 41 deletions
diff --git a/adventure/extern.h b/adventure/extern.h
index cc5e75aa..17372fc0 100644
--- a/adventure/extern.h
+++ b/adventure/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.3 1997/10/11 01:55:27 lukem Exp $ */
+/* $NetBSD: extern.h,v 1.4 1998/08/24 22:07:37 hubertf Exp $ */
/*
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -39,7 +39,7 @@ void done __P((int));
int die __P((int));
/* init.c */
-void init __P((char *));
+void init __P((void));
char *decr __P((int, int, int, int, int));
void linkdata __P((void));
void trapdel __P((int));
@@ -82,11 +82,11 @@ int toting __P((int));
int here __P((int));
int at __P((int));
int liq2 __P((int));
-int liq __P((int));
+int liq __P((void));
int liqloc __P((int));
int bitset __P((int, int));
int forced __P((int));
-int dark __P((int));
+int dark __P((void));
int pct __P((int));
int fdwarf __P((void));
int march __P((void));
@@ -124,7 +124,7 @@ void prht __P((void));
/* wizard.c */
void datime __P((int *, int *));
void poof __P((void));
-int Start __P((int));
+int Start __P((void));
int wizard __P((void));
-void ciao __P((char *));
+void ciao __P((void));
int ran __P((int));
diff --git a/adventure/init.c b/adventure/init.c
index b2089eb3..2f9c987e 100644
--- a/adventure/init.c
+++ b/adventure/init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.8 1998/02/03 05:32:13 perry Exp $ */
+/* $NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */
/*-
* Copyright (c) 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93";
#else
-__RCSID("$NetBSD: init.c,v 1.8 1998/02/03 05:32:13 perry Exp $");
+__RCSID("$NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $");
#endif
#endif /* not lint */
@@ -66,8 +66,7 @@ int setbit[16] = {1, 2, 4, 010, 020, 040, 0100, 0200, 0400, 01000, 02000, 04
void
-init(command) /* everything for 1st time run */
- char *command; /* command we were called with */
+init() /* everything for 1st time run */
{
rdata(); /* read data from orig. file */
linkdata();
@@ -228,7 +227,7 @@ trapdel(n) /* come here if he hits a del */
void
startup()
{
- demo = Start(0);
+ demo = Start();
srand((int) (time((time_t *) NULL))); /* random seed */
#if 0
srand(371); /* non-random seed */
diff --git a/adventure/main.c b/adventure/main.c
index c8a8108c..3285ab70 100644
--- a/adventure/main.c
+++ b/adventure/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.8 1997/10/11 01:53:31 lukem Exp $ */
+/* $NetBSD: main.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -48,7 +48,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
#else
-__RCSID("$NetBSD: main.c,v 1.8 1997/10/11 01:53:31 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $");
#endif
#endif /* not lint */
@@ -75,7 +75,7 @@ main(argc, argv)
if (setuid(getuid()) < 0)
warn("setuid");
- init(NULL); /* Initialize everything */
+ init(); /* Initialize everything */
signal(SIGINT, trapdel);
if (argc > 1) { /* Restore file specified */
@@ -83,7 +83,7 @@ main(argc, argv)
i = restore(argv[1]); /* See what we've got */
switch (i) {
case 0: /* The restore worked fine */
- yea = Start(0);
+ yea = Start();
k = null;
unlink(argv[1]); /* Don't re-use the save */
goto l8; /* Get where we're going */
@@ -113,7 +113,7 @@ l2000: if (loc == 0)
kk = &stext[loc];
if ((abb[loc] % abbnum) == 0 || kk->seekadr == 0)
kk = &ltext[loc];
- if (!forced(loc) && dark(0)) {
+ if (!forced(loc) && dark()) {
if (wzdark && pct(35)) {
die(90);
goto l2000;
@@ -131,7 +131,7 @@ l2001:
goto l8;
if (loc == 33 && pct(25) && !closng)
rspeak(8);
- if (!dark(0)) {
+ if (!dark()) {
abb[loc]++;
for (i = atloc[loc]; i != 0; i = links[i]) { /* 2004 */
obj = i;
@@ -170,7 +170,7 @@ l2600: checkhints(); /* to 2600-2602 */
if (toting(i) && prop[i] < 0) /* 2604 */
prop[i] = -1 - prop[i];
}
- wzdark = dark(0); /* 2605 */
+ wzdark = dark(); /* 2605 */
if (knfloc > 0 && knfloc != loc)
knfloc = 1;
getin(&wd1, &wd2);
@@ -442,7 +442,7 @@ l4080:
obj = obj * 100 + messag;
if (closed && toting(oyster))
obj = oyster;
- if (obj > 100 || obj == 0 || dark(0))
+ if (obj > 100 || obj == 0 || dark())
goto l8000;
goto l9270;
case 30: /* suspend=8300 */
@@ -456,7 +456,7 @@ l4080:
if (!yes(200, 54, 54))
goto l2012;
datime(&saved, &savet);
- ciao(argv[0]); /* Do we quit? */
+ ciao(); /* Do we quit? */
continue; /* Maybe not */
case 31: /* hours=8310 */
printf("Colossal cave is closed 9am-5pm Mon ");
@@ -533,7 +533,7 @@ l4090:
goto l2011;
prop[lamp] = 0;
rspeak(40);
- if (dark(0))
+ if (dark())
rspeak(16);
goto l2012;
@@ -571,7 +571,7 @@ l4090:
}
l9130: case 13:/* pour */
if (obj == bottle || obj == 0)
- obj = liq(0);
+ obj = liq();
if (obj == 0)
goto l8000;
if (!toting(obj))
@@ -608,12 +608,12 @@ l4090:
spk = 71;
goto l2011;
l9150: case 15:/* 9150 - drink */
- if (obj == 0 && liqloc(loc) != water && (liq(0) != water
+ if (obj == 0 && liqloc(loc) != water && (liq() != water
|| !here(bottle)))
goto l8000;
if (obj != 0 && obj != water)
spk = 110;
- if (spk == 110 || liq(0) != water || !here(bottle))
+ if (spk == 110 || liq() != water || !here(bottle))
goto l2011;
prop[bottle] = 1;
place[water] = 0;
@@ -640,7 +640,7 @@ l4090:
}
case 19:
case 20: /* 9190: find, invent */
- if (at(obj) || (liq(0) == obj && at(bottle))
+ if (at(obj) || (liq() == obj && at(bottle))
|| k == liqloc(loc))
spk = 94;
for (i = 1; i <= 5; i++)
@@ -680,7 +680,7 @@ l4090:
rspeak(bonus);
done(2);
l9270: case 27:/* read */
- if (dark(0))
+ if (dark())
goto l5190;
if (obj == magzin)
spk = 190;
@@ -749,7 +749,7 @@ l5110: if (k != dwarf)
for (i = 1; i <= 5; i++)
if (dloc[i] == loc && dflag >= 2)
goto l5010;
-l5120: if ((liq(0) == k && here(bottle)) || k == liqloc(loc))
+l5120: if ((liq() == k && here(bottle)) || k == liqloc(loc))
goto l5010;
if (obj != plant || !at(plant2) || prop[plant2] == 0)
goto l5130;
diff --git a/adventure/subr.c b/adventure/subr.c
index d71e3a49..1fba3b0c 100644
--- a/adventure/subr.c
+++ b/adventure/subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: subr.c,v 1.5 1997/10/11 01:53:36 lukem Exp $ */
+/* $NetBSD: subr.c,v 1.6 1998/08/24 22:07:37 hubertf Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: subr.c,v 1.5 1997/10/11 01:53:36 lukem Exp $");
+__RCSID("$NetBSD: subr.c,v 1.6 1998/08/24 22:07:37 hubertf Exp $");
#endif
#endif /* not lint */
@@ -92,7 +92,7 @@ liq2(pbotl)
}
int
-liq(foo)
+liq()
{
int i;
i = prop[bottle];
@@ -133,7 +133,7 @@ forced(locc)
}
int
-dark(foo)
+dark()
{
if ((cond[loc] % 2) == 0 && (prop[lamp] == 0 || !here(lamp)))
return (TRUE);
@@ -588,7 +588,7 @@ trtake()
if (fixed[obj] != 0)
return (2011);
if (obj == water || obj == oil) {
- if (here(bottle) && liq(0) == obj) {
+ if (here(bottle) && liq() == obj) {
obj = bottle;
goto l9017;
}
@@ -621,7 +621,7 @@ l9017: if (holdng >= 7) {
l9014: if ((obj == bird || obj == cage) && prop[bird] != 0)
carry(bird + cage - obj, loc);
carry(obj, loc);
- k = liq(0);
+ k = liq();
if (obj == bottle && k != 0)
place[k] = -1;
return (2009);
@@ -631,7 +631,7 @@ l9014: if ((obj == bird || obj == cage) && prop[bird] != 0)
int
dropper()
{ /* 9021 */
- k = liq(0);
+ k = liq();
if (k == obj)
obj = bottle;
if (obj == bottle && k != 0)
@@ -987,12 +987,12 @@ trfill()
spk = 107;
if (liqloc(loc) == 0)
spk = 106;
- if (liq(0) != 0)
+ if (liq() != 0)
spk = 105;
if (spk != 107)
return (2011);
prop[bottle] = ((cond[loc] % 4) / 2) * 2;
- k = liq(0);
+ k = liq();
if (toting(bottle))
place[k] = -1;
if (k == oil)
diff --git a/adventure/wizard.c b/adventure/wizard.c
index 487bce73..5df1b08d 100644
--- a/adventure/wizard.c
+++ b/adventure/wizard.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wizard.c,v 1.7 1998/07/24 23:18:07 hubertf Exp $ */
+/* $NetBSD: wizard.c,v 1.8 1998/08/24 22:07:37 hubertf Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)wizard.c 8.1 (Berkeley) 6/2/93";
#else
-__RCSID("$NetBSD: wizard.c,v 1.7 1998/07/24 23:18:07 hubertf Exp $");
+__RCSID("$NetBSD: wizard.c,v 1.8 1998/08/24 22:07:37 hubertf Exp $");
#endif
#endif /* not lint */
@@ -86,7 +86,7 @@ poof()
}
int
-Start(n)
+Start()
{
int d, t, delay;
@@ -130,8 +130,7 @@ wizard()
}
void
-ciao(cmdfile)
- char *cmdfile;
+ciao()
{
char *c;
char fname[80];