Skip to content

Commit 905e2f9

Browse files
committed
ANSIfy function declarations. Object file diffs checked.
1 parent ebb769a commit 905e2f9

File tree

12 files changed

+64
-88
lines changed

12 files changed

+64
-88
lines changed

games/mille/comp.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: comp.c,v 1.10 2006/03/19 00:29:27 christos Exp $ */
1+
/* $NetBSD: comp.c,v 1.11 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)comp.c 8.1 (Berkeley) 5/31/93";
3636
#else
37-
__RCSID("$NetBSD: comp.c,v 1.10 2006/03/19 00:29:27 christos Exp $");
37+
__RCSID("$NetBSD: comp.c,v 1.11 2009/05/25 23:24:54 dholland Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -47,7 +47,7 @@ __RCSID("$NetBSD: comp.c,v 1.10 2006/03/19 00:29:27 christos Exp $");
4747
# define V_VALUABLE 40
4848

4949
void
50-
calcmove()
50+
calcmove(void)
5151
{
5252
CARD card;
5353
int *value;
@@ -401,8 +401,7 @@ calcmove()
401401
* Return true if the given player could conceivably win with his next card.
402402
*/
403403
int
404-
onecard(pp)
405-
const PLAY *pp;
404+
onecard(const PLAY *pp)
406405
{
407406
CARD bat, spd, card;
408407

@@ -434,9 +433,7 @@ onecard(pp)
434433
}
435434

436435
int
437-
canplay(pp, op, card)
438-
const PLAY *pp, *op;
439-
CARD card;
436+
canplay(const PLAY *pp, const PLAY *op, CARD card)
440437
{
441438
switch (card) {
442439
case C_200:

games/mille/end.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: end.c,v 1.7 2003/08/07 09:37:25 agc Exp $ */
1+
/* $NetBSD: end.c,v 1.8 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)end.c 8.1 (Berkeley) 5/31/93";
3636
#else
37-
__RCSID("$NetBSD: end.c,v 1.7 2003/08/07 09:37:25 agc Exp $");
37+
__RCSID("$NetBSD: end.c,v 1.8 2009/05/25 23:24:54 dholland Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -49,8 +49,7 @@ __RCSID("$NetBSD: end.c,v 1.7 2003/08/07 09:37:25 agc Exp $");
4949
* the end-of-games points to the user who deserves it (if any).
5050
*/
5151
void
52-
finalscore(pp)
53-
PLAY *pp;
52+
finalscore(PLAY *pp)
5453
{
5554
int temp, tot, num;
5655

@@ -93,8 +92,9 @@ static int Last_tot[2]; /* last tot used for extrapolate */
9392
* print out the score as if it was final, and add the totals for
9493
* the end-of-games points to the user who deserves it (if any).
9594
*/
96-
extrapolate(pp)
97-
reg PLAY *pp; {
95+
void
96+
extrapolate(PLAY *pp)
97+
{
9898

9999
reg int x, num, tot, count;
100100

@@ -137,7 +137,9 @@ reg PLAY *pp; {
137137
Last_tot[num] = tot;
138138
}
139139

140-
undoex() {
140+
void
141+
undoex(void)
142+
{
141143

142144
reg PLAY *pp;
143145
reg int i;

games/mille/init.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: init.c,v 1.9 2003/08/07 09:37:25 agc Exp $ */
1+
/* $NetBSD: init.c,v 1.10 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93";
3636
#else
37-
__RCSID("$NetBSD: init.c,v 1.9 2003/08/07 09:37:25 agc Exp $");
37+
__RCSID("$NetBSD: init.c,v 1.10 2009/05/25 23:24:54 dholland Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -45,7 +45,7 @@ __RCSID("$NetBSD: init.c,v 1.9 2003/08/07 09:37:25 agc Exp $");
4545
*/
4646

4747
void
48-
init()
48+
init(void)
4949
{
5050
PLAY *pp;
5151
int i, j;
@@ -89,7 +89,7 @@ init()
8989
}
9090

9191
void
92-
shuffle()
92+
shuffle(void)
9393
{
9494
int i, r;
9595
CARD temp;
@@ -108,7 +108,7 @@ shuffle()
108108
}
109109

110110
void
111-
newboard()
111+
newboard(void)
112112
{
113113
int i;
114114
PLAY *pp;
@@ -167,7 +167,7 @@ newboard()
167167
}
168168

169169
void
170-
newscore()
170+
newscore(void)
171171
{
172172
int i, new;
173173
PLAY *pp;

games/mille/mille.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $ */
1+
/* $NetBSD: mille.c,v 1.17 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1982, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\
3939
#if 0
4040
static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93";
4141
#else
42-
__RCSID("$NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $");
42+
__RCSID("$NetBSD: mille.c,v 1.17 2009/05/25 23:24:54 dholland Exp $");
4343
#endif
4444
#endif /* not lint */
4545

@@ -51,9 +51,7 @@ __RCSID("$NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $");
5151
*/
5252

5353
int
54-
main(ac, av)
55-
int ac;
56-
char *av[];
54+
main(int ac, char *av[])
5755
{
5856
bool restore;
5957

@@ -139,8 +137,7 @@ main(ac, av)
139137
* quit.
140138
*/
141139
void
142-
rub(dummy)
143-
int dummy __unused;
140+
rub(int dummy __unused)
144141
{
145142
(void)signal(SIGINT, SIG_IGN);
146143
if (getyn(REALLYPROMPT))
@@ -152,8 +149,7 @@ rub(dummy)
152149
* Time to go beddy-by
153150
*/
154151
void
155-
die(code)
156-
int code;
152+
die(int code)
157153
{
158154

159155
(void)signal(SIGINT, SIG_IGN);

games/mille/misc.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: misc.c,v 1.11 2003/08/07 09:37:25 agc Exp $ */
1+
/* $NetBSD: misc.c,v 1.12 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93";
3636
#else
37-
__RCSID("$NetBSD: misc.c,v 1.11 2003/08/07 09:37:25 agc Exp $");
37+
__RCSID("$NetBSD: misc.c,v 1.12 2009/05/25 23:24:54 dholland Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -71,7 +71,7 @@ error(const char *str, ...)
7171
}
7272

7373
CARD
74-
getcard()
74+
getcard(void)
7575
{
7676
int c, c1;
7777

@@ -120,8 +120,7 @@ cont: ;
120120
}
121121

122122
int
123-
check_ext(forcomp)
124-
bool forcomp;
123+
check_ext(bool forcomp)
125124
{
126125

127126

@@ -176,8 +175,7 @@ check_ext(forcomp)
176175
* also allowed. Return TRUE if the answer was yes, FALSE if no.
177176
*/
178177
int
179-
getyn(promptno)
180-
int promptno;
178+
getyn(int promptno)
181179
{
182180
char c;
183181

@@ -221,7 +219,7 @@ getyn(promptno)
221219
* it. Exit appropriately.
222220
*/
223221
void
224-
check_more()
222+
check_more(void)
225223
{
226224
On_exit = TRUE;
227225
if (Player[PLAYER].total >= 5000 || Player[COMP].total >= 5000)
@@ -248,7 +246,7 @@ check_more()
248246
}
249247

250248
int
251-
readch()
249+
readch(void)
252250
{
253251
int cnt;
254252
static char c;

games/mille/move.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $ */
1+
/* $NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
3636
#else
37-
__RCSID("$NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $");
37+
__RCSID("$NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -57,7 +57,7 @@ __RCSID("$NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $");
5757
#define CTRL(c) (c - 'A' + 1)
5858

5959
void
60-
domove()
60+
domove(void)
6161
{
6262
PLAY *pp;
6363
int i, j;
@@ -168,7 +168,7 @@ domove()
168168
* the game is over
169169
*/
170170
void
171-
check_go()
171+
check_go(void)
172172
{
173173
CARD card;
174174
PLAY *pp, *op;
@@ -199,8 +199,7 @@ check_go()
199199
}
200200

201201
int
202-
playcard(pp)
203-
PLAY *pp;
202+
playcard(PLAY *pp)
204203
{
205204
int v;
206205
CARD card;
@@ -349,7 +348,7 @@ playcard(pp)
349348
}
350349

351350
void
352-
getmove()
351+
getmove(void)
353352
{
354353
char c;
355354
#ifdef EXTRAP
@@ -483,8 +482,7 @@ getmove()
483482
* return whether or not the player has picked
484483
*/
485484
int
486-
haspicked(pp)
487-
const PLAY *pp;
485+
haspicked(const PLAY *pp)
488486
{
489487
int card;
490488

@@ -503,8 +501,7 @@ haspicked(pp)
503501
}
504502

505503
void
506-
account(card)
507-
CARD card;
504+
account(CARD card)
508505
{
509506
CARD oppos;
510507

@@ -529,8 +526,7 @@ account(card)
529526
}
530527

531528
void
532-
prompt(promptno)
533-
int promptno;
529+
prompt(int promptno)
534530
{
535531
static const char *const names[] = {
536532
">>:Move:",
@@ -561,8 +557,7 @@ prompt(promptno)
561557
}
562558

563559
void
564-
sort(hand)
565-
CARD *hand;
560+
sort(CARD *hand)
566561
{
567562
CARD *cp, *tp;
568563
CARD temp;

games/mille/print.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: print.c,v 1.12 2007/12/15 19:44:42 perry Exp $ */
1+
/* $NetBSD: print.c,v 1.13 2009/05/25 23:24:54 dholland Exp $ */
22

33
/*
44
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93";
3636
#else
37-
__RCSID("$NetBSD: print.c,v 1.12 2007/12/15 19:44:42 perry Exp $");
37+
__RCSID("$NetBSD: print.c,v 1.13 2009/05/25 23:24:54 dholland Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -48,7 +48,7 @@ __RCSID("$NetBSD: print.c,v 1.12 2007/12/15 19:44:42 perry Exp $");
4848
# define CARD_STRT 2
4949

5050
void
51-
prboard()
51+
prboard(void)
5252
{
5353
PLAY *pp;
5454
int i, j, k, temp;
@@ -103,9 +103,7 @@ prboard()
103103
* Show the given card if it is different from the last one shown
104104
*/
105105
void
106-
show_card(y, x, c, lc)
107-
int y, x;
108-
CARD c, *lc;
106+
show_card(int y, int x, CARD c, CARD *lc)
109107
{
110108
if (c == *lc)
111109
return;
@@ -168,9 +166,7 @@ prscore(for_real)
168166
* showed it.
169167
*/
170168
void
171-
show_score(y, x, s, ls)
172-
int y, x;
173-
int s, *ls;
169+
show_score(int y, int x, int s, int *ls)
174170
{
175171
if (s == *ls)
176172
return;

0 commit comments

Comments
 (0)