Skip to content

Commit 5f3ed2a

Browse files
hubertfhubertf
authored andcommitted
Kill unused parameters, per PR 6023 by Joseph Myers <jsm28@cam.ac.uk>.
1 parent 103b7e7 commit 5f3ed2a

File tree

5 files changed

+39
-41
lines changed

5 files changed

+39
-41
lines changed

games/adventure/extern.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: extern.h,v 1.3 1997/10/11 01:55:27 lukem Exp $ */
1+
/* $NetBSD: extern.h,v 1.4 1998/08/24 22:07:37 hubertf Exp $ */
22

33
/*
44
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -39,7 +39,7 @@ void done __P((int));
3939
int die __P((int));
4040

4141
/* init.c */
42-
void init __P((char *));
42+
void init __P((void));
4343
char *decr __P((int, int, int, int, int));
4444
void linkdata __P((void));
4545
void trapdel __P((int));
@@ -82,11 +82,11 @@ int toting __P((int));
8282
int here __P((int));
8383
int at __P((int));
8484
int liq2 __P((int));
85-
int liq __P((int));
85+
int liq __P((void));
8686
int liqloc __P((int));
8787
int bitset __P((int, int));
8888
int forced __P((int));
89-
int dark __P((int));
89+
int dark __P((void));
9090
int pct __P((int));
9191
int fdwarf __P((void));
9292
int march __P((void));
@@ -124,7 +124,7 @@ void prht __P((void));
124124
/* wizard.c */
125125
void datime __P((int *, int *));
126126
void poof __P((void));
127-
int Start __P((int));
127+
int Start __P((void));
128128
int wizard __P((void));
129-
void ciao __P((char *));
129+
void ciao __P((void));
130130
int ran __P((int));

games/adventure/init.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: init.c,v 1.8 1998/02/03 05:32:13 perry Exp $ */
1+
/* $NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1993
@@ -43,7 +43,7 @@
4343
#if 0
4444
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93";
4545
#else
46-
__RCSID("$NetBSD: init.c,v 1.8 1998/02/03 05:32:13 perry Exp $");
46+
__RCSID("$NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $");
4747
#endif
4848
#endif /* not lint */
4949

@@ -66,8 +66,7 @@ int setbit[16] = {1, 2, 4, 010, 020, 040, 0100, 0200, 0400, 01000, 02000, 04
6666

6767

6868
void
69-
init(command) /* everything for 1st time run */
70-
char *command; /* command we were called with */
69+
init() /* everything for 1st time run */
7170
{
7271
rdata(); /* read data from orig. file */
7372
linkdata();
@@ -228,7 +227,7 @@ trapdel(n) /* come here if he hits a del */
228227
void
229228
startup()
230229
{
231-
demo = Start(0);
230+
demo = Start();
232231
srand((int) (time((time_t *) NULL))); /* random seed */
233232
#if 0
234233
srand(371); /* non-random seed */

games/adventure/main.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: main.c,v 1.8 1997/10/11 01:53:31 lukem Exp $ */
1+
/* $NetBSD: main.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -48,7 +48,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
4848
#if 0
4949
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
5050
#else
51-
__RCSID("$NetBSD: main.c,v 1.8 1997/10/11 01:53:31 lukem Exp $");
51+
__RCSID("$NetBSD: main.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $");
5252
#endif
5353
#endif /* not lint */
5454

@@ -75,15 +75,15 @@ main(argc, argv)
7575
if (setuid(getuid()) < 0)
7676
warn("setuid");
7777

78-
init(NULL); /* Initialize everything */
78+
init(); /* Initialize everything */
7979
signal(SIGINT, trapdel);
8080

8181
if (argc > 1) { /* Restore file specified */
8282
/* Restart is label 8305 (Fortran) */
8383
i = restore(argv[1]); /* See what we've got */
8484
switch (i) {
8585
case 0: /* The restore worked fine */
86-
yea = Start(0);
86+
yea = Start();
8787
k = null;
8888
unlink(argv[1]); /* Don't re-use the save */
8989
goto l8; /* Get where we're going */
@@ -113,7 +113,7 @@ l2000: if (loc == 0)
113113
kk = &stext[loc];
114114
if ((abb[loc] % abbnum) == 0 || kk->seekadr == 0)
115115
kk = &ltext[loc];
116-
if (!forced(loc) && dark(0)) {
116+
if (!forced(loc) && dark()) {
117117
if (wzdark && pct(35)) {
118118
die(90);
119119
goto l2000;
@@ -131,7 +131,7 @@ l2000: if (loc == 0)
131131
goto l8;
132132
if (loc == 33 && pct(25) && !closng)
133133
rspeak(8);
134-
if (!dark(0)) {
134+
if (!dark()) {
135135
abb[loc]++;
136136
for (i = atloc[loc]; i != 0; i = links[i]) { /* 2004 */
137137
obj = i;
@@ -170,7 +170,7 @@ l2600: checkhints(); /* to 2600-2602 */
170170
if (toting(i) && prop[i] < 0) /* 2604 */
171171
prop[i] = -1 - prop[i];
172172
}
173-
wzdark = dark(0); /* 2605 */
173+
wzdark = dark(); /* 2605 */
174174
if (knfloc > 0 && knfloc != loc)
175175
knfloc = 1;
176176
getin(&wd1, &wd2);
@@ -442,7 +442,7 @@ l4000: verb = k;
442442
obj = obj * 100 + messag;
443443
if (closed && toting(oyster))
444444
obj = oyster;
445-
if (obj > 100 || obj == 0 || dark(0))
445+
if (obj > 100 || obj == 0 || dark())
446446
goto l8000;
447447
goto l9270;
448448
case 30: /* suspend=8300 */
@@ -456,7 +456,7 @@ l4000: verb = k;
456456
if (!yes(200, 54, 54))
457457
goto l2012;
458458
datime(&saved, &savet);
459-
ciao(argv[0]); /* Do we quit? */
459+
ciao(); /* Do we quit? */
460460
continue; /* Maybe not */
461461
case 31: /* hours=8310 */
462462
printf("Colossal cave is closed 9am-5pm Mon ");
@@ -533,7 +533,7 @@ l4000: verb = k;
533533
goto l2011;
534534
prop[lamp] = 0;
535535
rspeak(40);
536-
if (dark(0))
536+
if (dark())
537537
rspeak(16);
538538
goto l2012;
539539

@@ -571,7 +571,7 @@ l4000: verb = k;
571571
}
572572
l9130: case 13:/* pour */
573573
if (obj == bottle || obj == 0)
574-
obj = liq(0);
574+
obj = liq();
575575
if (obj == 0)
576576
goto l8000;
577577
if (!toting(obj))
@@ -608,12 +608,12 @@ l4000: verb = k;
608608
spk = 71;
609609
goto l2011;
610610
l9150: case 15:/* 9150 - drink */
611-
if (obj == 0 && liqloc(loc) != water && (liq(0) != water
611+
if (obj == 0 && liqloc(loc) != water && (liq() != water
612612
|| !here(bottle)))
613613
goto l8000;
614614
if (obj != 0 && obj != water)
615615
spk = 110;
616-
if (spk == 110 || liq(0) != water || !here(bottle))
616+
if (spk == 110 || liq() != water || !here(bottle))
617617
goto l2011;
618618
prop[bottle] = 1;
619619
place[water] = 0;
@@ -640,7 +640,7 @@ l4000: verb = k;
640640
}
641641
case 19:
642642
case 20: /* 9190: find, invent */
643-
if (at(obj) || (liq(0) == obj && at(bottle))
643+
if (at(obj) || (liq() == obj && at(bottle))
644644
|| k == liqloc(loc))
645645
spk = 94;
646646
for (i = 1; i <= 5; i++)
@@ -680,7 +680,7 @@ l4000: verb = k;
680680
rspeak(bonus);
681681
done(2);
682682
l9270: case 27:/* read */
683-
if (dark(0))
683+
if (dark())
684684
goto l5190;
685685
if (obj == magzin)
686686
spk = 190;
@@ -749,7 +749,7 @@ l5110: if (k != dwarf)
749749
for (i = 1; i <= 5; i++)
750750
if (dloc[i] == loc && dflag >= 2)
751751
goto l5010;
752-
l5120: if ((liq(0) == k && here(bottle)) || k == liqloc(loc))
752+
l5120: if ((liq() == k && here(bottle)) || k == liqloc(loc))
753753
goto l5010;
754754
if (obj != plant || !at(plant2) || prop[plant2] == 0)
755755
goto l5130;

games/adventure/subr.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: subr.c,v 1.5 1997/10/11 01:53:36 lukem Exp $ */
1+
/* $NetBSD: subr.c,v 1.6 1998/08/24 22:07:37 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
4343
#if 0
4444
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 5/31/93";
4545
#else
46-
__RCSID("$NetBSD: subr.c,v 1.5 1997/10/11 01:53:36 lukem Exp $");
46+
__RCSID("$NetBSD: subr.c,v 1.6 1998/08/24 22:07:37 hubertf Exp $");
4747
#endif
4848
#endif /* not lint */
4949

@@ -92,7 +92,7 @@ liq2(pbotl)
9292
}
9393

9494
int
95-
liq(foo)
95+
liq()
9696
{
9797
int i;
9898
i = prop[bottle];
@@ -133,7 +133,7 @@ forced(locc)
133133
}
134134

135135
int
136-
dark(foo)
136+
dark()
137137
{
138138
if ((cond[loc] % 2) == 0 && (prop[lamp] == 0 || !here(lamp)))
139139
return (TRUE);
@@ -588,7 +588,7 @@ trtake()
588588
if (fixed[obj] != 0)
589589
return (2011);
590590
if (obj == water || obj == oil) {
591-
if (here(bottle) && liq(0) == obj) {
591+
if (here(bottle) && liq() == obj) {
592592
obj = bottle;
593593
goto l9017;
594594
}
@@ -621,7 +621,7 @@ l9017: if (holdng >= 7) {
621621
l9014: if ((obj == bird || obj == cage) && prop[bird] != 0)
622622
carry(bird + cage - obj, loc);
623623
carry(obj, loc);
624-
k = liq(0);
624+
k = liq();
625625
if (obj == bottle && k != 0)
626626
place[k] = -1;
627627
return (2009);
@@ -631,7 +631,7 @@ l9014: if ((obj == bird || obj == cage) && prop[bird] != 0)
631631
int
632632
dropper()
633633
{ /* 9021 */
634-
k = liq(0);
634+
k = liq();
635635
if (k == obj)
636636
obj = bottle;
637637
if (obj == bottle && k != 0)
@@ -987,12 +987,12 @@ trfill()
987987
spk = 107;
988988
if (liqloc(loc) == 0)
989989
spk = 106;
990-
if (liq(0) != 0)
990+
if (liq() != 0)
991991
spk = 105;
992992
if (spk != 107)
993993
return (2011);
994994
prop[bottle] = ((cond[loc] % 4) / 2) * 2;
995-
k = liq(0);
995+
k = liq();
996996
if (toting(bottle))
997997
place[k] = -1;
998998
if (k == oil)

games/adventure/wizard.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: wizard.c,v 1.7 1998/07/24 23:18:07 hubertf Exp $ */
1+
/* $NetBSD: wizard.c,v 1.8 1998/08/24 22:07:37 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
4343
#if 0
4444
static char sccsid[] = "@(#)wizard.c 8.1 (Berkeley) 6/2/93";
4545
#else
46-
__RCSID("$NetBSD: wizard.c,v 1.7 1998/07/24 23:18:07 hubertf Exp $");
46+
__RCSID("$NetBSD: wizard.c,v 1.8 1998/08/24 22:07:37 hubertf Exp $");
4747
#endif
4848
#endif /* not lint */
4949

@@ -86,7 +86,7 @@ poof()
8686
}
8787

8888
int
89-
Start(n)
89+
Start()
9090
{
9191
int d, t, delay;
9292

@@ -130,8 +130,7 @@ wizard()
130130
}
131131

132132
void
133-
ciao(cmdfile)
134-
char *cmdfile;
133+
ciao()
135134
{
136135
char *c;
137136
char fname[80];

0 commit comments

Comments
 (0)