From 1bb96be3372ee03925cdb9f4b5da4f5fa989c55e Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 25 May 2009 23:24:54 +0000 Subject: ANSIfy function declarations. Object file diffs checked. --- mille/comp.c | 13 +++++-------- mille/end.c | 16 +++++++++------- mille/init.c | 12 ++++++------ mille/mille.c | 14 +++++--------- mille/misc.c | 16 +++++++--------- mille/move.c | 25 ++++++++++--------------- mille/print.c | 14 +++++--------- mille/roll.c | 7 +++---- mille/save.c | 9 ++++----- mille/table.c | 8 +++----- mille/types.c | 10 ++++------ mille/varpush.c | 8 +++----- 12 files changed, 64 insertions(+), 88 deletions(-) (limited to 'mille') diff --git a/mille/comp.c b/mille/comp.c index ef42f102..99479b3a 100644 --- a/mille/comp.c +++ b/mille/comp.c @@ -1,4 +1,4 @@ -/* $NetBSD: comp.c,v 1.10 2006/03/19 00:29:27 christos Exp $ */ +/* $NetBSD: comp.c,v 1.11 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)comp.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: comp.c,v 1.10 2006/03/19 00:29:27 christos Exp $"); +__RCSID("$NetBSD: comp.c,v 1.11 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -47,7 +47,7 @@ __RCSID("$NetBSD: comp.c,v 1.10 2006/03/19 00:29:27 christos Exp $"); # define V_VALUABLE 40 void -calcmove() +calcmove(void) { CARD card; int *value; @@ -401,8 +401,7 @@ play_it: * Return true if the given player could conceivably win with his next card. */ int -onecard(pp) - const PLAY *pp; +onecard(const PLAY *pp) { CARD bat, spd, card; @@ -434,9 +433,7 @@ onecard(pp) } int -canplay(pp, op, card) - const PLAY *pp, *op; - CARD card; +canplay(const PLAY *pp, const PLAY *op, CARD card) { switch (card) { case C_200: diff --git a/mille/end.c b/mille/end.c index 77afa9d4..e0981d06 100644 --- a/mille/end.c +++ b/mille/end.c @@ -1,4 +1,4 @@ -/* $NetBSD: end.c,v 1.7 2003/08/07 09:37:25 agc Exp $ */ +/* $NetBSD: end.c,v 1.8 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)end.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: end.c,v 1.7 2003/08/07 09:37:25 agc Exp $"); +__RCSID("$NetBSD: end.c,v 1.8 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -49,8 +49,7 @@ __RCSID("$NetBSD: end.c,v 1.7 2003/08/07 09:37:25 agc Exp $"); * the end-of-games points to the user who deserves it (if any). */ void -finalscore(pp) - PLAY *pp; +finalscore(PLAY *pp) { int temp, tot, num; @@ -93,8 +92,9 @@ static int Last_tot[2]; /* last tot used for extrapolate */ * print out the score as if it was final, and add the totals for * the end-of-games points to the user who deserves it (if any). */ -extrapolate(pp) -reg PLAY *pp; { +void +extrapolate(PLAY *pp) +{ reg int x, num, tot, count; @@ -137,7 +137,9 @@ reg PLAY *pp; { Last_tot[num] = tot; } -undoex() { +void +undoex(void) +{ reg PLAY *pp; reg int i; diff --git a/mille/init.c b/mille/init.c index 7b0e65f2..928b2ad6 100644 --- a/mille/init.c +++ b/mille/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.9 2003/08/07 09:37:25 agc Exp $ */ +/* $NetBSD: init.c,v 1.10 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: init.c,v 1.9 2003/08/07 09:37:25 agc Exp $"); +__RCSID("$NetBSD: init.c,v 1.10 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -45,7 +45,7 @@ __RCSID("$NetBSD: init.c,v 1.9 2003/08/07 09:37:25 agc Exp $"); */ void -init() +init(void) { PLAY *pp; int i, j; @@ -89,7 +89,7 @@ init() } void -shuffle() +shuffle(void) { int i, r; CARD temp; @@ -108,7 +108,7 @@ shuffle() } void -newboard() +newboard(void) { int i; PLAY *pp; @@ -167,7 +167,7 @@ newboard() } void -newscore() +newscore(void) { int i, new; PLAY *pp; diff --git a/mille/mille.c b/mille/mille.c index 293b7491..85cd73ff 100644 --- a/mille/mille.c +++ b/mille/mille.c @@ -1,4 +1,4 @@ -/* $NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: mille.c,v 1.17 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\ #if 0 static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $"); +__RCSID("$NetBSD: mille.c,v 1.17 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -51,9 +51,7 @@ __RCSID("$NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $"); */ int -main(ac, av) - int ac; - char *av[]; +main(int ac, char *av[]) { bool restore; @@ -139,8 +137,7 @@ main(ac, av) * quit. */ void -rub(dummy) - int dummy __unused; +rub(int dummy __unused) { (void)signal(SIGINT, SIG_IGN); if (getyn(REALLYPROMPT)) @@ -152,8 +149,7 @@ rub(dummy) * Time to go beddy-by */ void -die(code) - int code; +die(int code) { (void)signal(SIGINT, SIG_IGN); diff --git a/mille/misc.c b/mille/misc.c index f3cb7882..bccec889 100644 --- a/mille/misc.c +++ b/mille/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.11 2003/08/07 09:37:25 agc Exp $ */ +/* $NetBSD: misc.c,v 1.12 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: misc.c,v 1.11 2003/08/07 09:37:25 agc Exp $"); +__RCSID("$NetBSD: misc.c,v 1.12 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -71,7 +71,7 @@ error(const char *str, ...) } CARD -getcard() +getcard(void) { int c, c1; @@ -120,8 +120,7 @@ cont: ; } int -check_ext(forcomp) - bool forcomp; +check_ext(bool forcomp) { @@ -176,8 +175,7 @@ done: * also allowed. Return TRUE if the answer was yes, FALSE if no. */ int -getyn(promptno) - int promptno; +getyn(int promptno) { char c; @@ -221,7 +219,7 @@ getyn(promptno) * it. Exit appropriately. */ void -check_more() +check_more(void) { On_exit = TRUE; if (Player[PLAYER].total >= 5000 || Player[COMP].total >= 5000) @@ -248,7 +246,7 @@ check_more() } int -readch() +readch(void) { int cnt; static char c; diff --git a/mille/move.c b/mille/move.c index e383e9c8..e79b0a1b 100644 --- a/mille/move.c +++ b/mille/move.c @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $ */ +/* $NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1983, 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.15 2004/11/05 21:30:32 dsl Exp $"); +__RCSID("$NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -57,7 +57,7 @@ __RCSID("$NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $"); #define CTRL(c) (c - 'A' + 1) void -domove() +domove(void) { PLAY *pp; int i, j; @@ -168,7 +168,7 @@ acc: * the game is over */ void -check_go() +check_go(void) { CARD card; PLAY *pp, *op; @@ -199,8 +199,7 @@ check_go() } int -playcard(pp) - PLAY *pp; +playcard(PLAY *pp) { int v; CARD card; @@ -349,7 +348,7 @@ protected: } void -getmove() +getmove(void) { char c; #ifdef EXTRAP @@ -483,8 +482,7 @@ ret: * return whether or not the player has picked */ int -haspicked(pp) - const PLAY *pp; +haspicked(const PLAY *pp) { int card; @@ -503,8 +501,7 @@ haspicked(pp) } void -account(card) - CARD card; +account(CARD card) { CARD oppos; @@ -529,8 +526,7 @@ account(card) } void -prompt(promptno) - int promptno; +prompt(int promptno) { static const char *const names[] = { ">>:Move:", @@ -561,8 +557,7 @@ prompt(promptno) } void -sort(hand) - CARD *hand; +sort(CARD *hand) { CARD *cp, *tp; CARD temp; diff --git a/mille/print.c b/mille/print.c index 83be11b7..4988cbc2 100644 --- a/mille/print.c +++ b/mille/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.12 2007/12/15 19:44:42 perry Exp $ */ +/* $NetBSD: print.c,v 1.13 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: print.c,v 1.12 2007/12/15 19:44:42 perry Exp $"); +__RCSID("$NetBSD: print.c,v 1.13 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -48,7 +48,7 @@ __RCSID("$NetBSD: print.c,v 1.12 2007/12/15 19:44:42 perry Exp $"); # define CARD_STRT 2 void -prboard() +prboard(void) { PLAY *pp; int i, j, k, temp; @@ -103,9 +103,7 @@ prboard() * Show the given card if it is different from the last one shown */ void -show_card(y, x, c, lc) - int y, x; - CARD c, *lc; +show_card(int y, int x, CARD c, CARD *lc) { if (c == *lc) return; @@ -168,9 +166,7 @@ prscore(for_real) * showed it. */ void -show_score(y, x, s, ls) - int y, x; - int s, *ls; +show_score(int y, int x, int s, int *ls) { if (s == *ls) return; diff --git a/mille/roll.c b/mille/roll.c index 3c0ecfbb..8e34d366 100644 --- a/mille/roll.c +++ b/mille/roll.c @@ -1,4 +1,4 @@ -/* $NetBSD: roll.c,v 1.7 2003/08/07 09:37:26 agc Exp $ */ +/* $NetBSD: roll.c,v 1.8 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)roll.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: roll.c,v 1.7 2003/08/07 09:37:26 agc Exp $"); +__RCSID("$NetBSD: roll.c,v 1.8 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -48,8 +48,7 @@ __RCSID("$NetBSD: roll.c,v 1.7 2003/08/07 09:37:26 agc Exp $"); */ int -roll(ndie, nsides) - int ndie, nsides; +roll(int ndie, int nsides) { int tot; diff --git a/mille/save.c b/mille/save.c index a2fd7be7..eff5c9a8 100644 --- a/mille/save.c +++ b/mille/save.c @@ -1,4 +1,4 @@ -/* $NetBSD: save.c,v 1.13 2009/05/25 23:17:31 dholland Exp $ */ +/* $NetBSD: save.c,v 1.14 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: save.c,v 1.13 2009/05/25 23:17:31 dholland Exp $"); +__RCSID("$NetBSD: save.c,v 1.14 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -57,7 +57,7 @@ typedef struct stat STAT; * Returns FALSE if it couldn't be done. */ bool -save() +save(void) { char *sp; int outfd; @@ -141,8 +141,7 @@ over: * be cleaned up before the game starts. */ bool -rest_f(file) - const char *file; +rest_f(const char *file) { char *sp; diff --git a/mille/table.c b/mille/table.c index 73ac4f0b..084d5d01 100644 --- a/mille/table.c +++ b/mille/table.c @@ -1,4 +1,4 @@ -/* $NetBSD: table.c,v 1.8 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: table.c,v 1.9 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\ #if 0 static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: table.c,v 1.8 2008/07/20 01:03:21 lukem Exp $"); +__RCSID("$NetBSD: table.c,v 1.9 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -54,9 +54,7 @@ __RCSID("$NetBSD: table.c,v 1.8 2008/07/20 01:03:21 lukem Exp $"); int main(int, char **); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int i, j, count; diff --git a/mille/types.c b/mille/types.c index 3794322d..0b6cb93f 100644 --- a/mille/types.c +++ b/mille/types.c @@ -1,4 +1,4 @@ -/* $NetBSD: types.c,v 1.8 2003/08/07 09:37:26 agc Exp $ */ +/* $NetBSD: types.c,v 1.9 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)types.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: types.c,v 1.8 2003/08/07 09:37:26 agc Exp $"); +__RCSID("$NetBSD: types.c,v 1.9 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -45,8 +45,7 @@ __RCSID("$NetBSD: types.c,v 1.8 2003/08/07 09:37:26 agc Exp $"); */ int -is_repair(card) - CARD card; +is_repair(CARD card) { return card == C_GAS || card == C_SPARE || @@ -54,8 +53,7 @@ is_repair(card) } int -safety(card) - CARD card; +safety(CARD card) { switch (card) { case C_EMPTY: diff --git a/mille/varpush.c b/mille/varpush.c index 47c10555..67f061da 100644 --- a/mille/varpush.c +++ b/mille/varpush.c @@ -1,4 +1,4 @@ -/* $NetBSD: varpush.c,v 1.8 2004/01/27 20:30:30 jsm Exp $ */ +/* $NetBSD: varpush.c,v 1.9 2009/05/25 23:24:54 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)varpush.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: varpush.c,v 1.8 2004/01/27 20:30:30 jsm Exp $"); +__RCSID("$NetBSD: varpush.c,v 1.9 2009/05/25 23:24:54 dholland Exp $"); #endif #endif /* not lint */ @@ -50,9 +50,7 @@ __RCSID("$NetBSD: varpush.c,v 1.8 2004/01/27 20:30:30 jsm Exp $"); * channel file. func() is either read or write. */ bool -varpush(file, func) - int file; - ssize_t (*func)(int, const struct iovec *, int); +varpush(int file, ssize_t (*func)(int, const struct iovec *, int)) { int temp; const struct iovec vec[] = { -- cgit v1.2.3-56-ge451