Module Name:    src
Committed By:   dholland
Date:           Mon May 25 23:24:54 UTC 2009

Modified Files:
        src/games/mille: comp.c end.c init.c mille.c misc.c move.c print.c
            roll.c save.c table.c types.c varpush.c

Log Message:
ANSIfy function declarations. Object file diffs checked.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/games/mille/comp.c
cvs rdiff -u -r1.7 -r1.8 src/games/mille/end.c src/games/mille/roll.c
cvs rdiff -u -r1.9 -r1.10 src/games/mille/init.c
cvs rdiff -u -r1.16 -r1.17 src/games/mille/mille.c
cvs rdiff -u -r1.11 -r1.12 src/games/mille/misc.c
cvs rdiff -u -r1.15 -r1.16 src/games/mille/move.c
cvs rdiff -u -r1.12 -r1.13 src/games/mille/print.c
cvs rdiff -u -r1.13 -r1.14 src/games/mille/save.c
cvs rdiff -u -r1.8 -r1.9 src/games/mille/table.c src/games/mille/types.c \
    src/games/mille/varpush.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/mille/comp.c
diff -u src/games/mille/comp.c:1.10 src/games/mille/comp.c:1.11
--- src/games/mille/comp.c:1.10	Sun Mar 19 00:29:27 2006
+++ src/games/mille/comp.c	Mon May 25 23:24:54 2009
@@ -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 @@
 # define	V_VALUABLE	40
 
 void
-calcmove()
+calcmove(void)
 {
 	CARD		card;
 	int		*value;
@@ -401,8 +401,7 @@
  * 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 @@
 }
 
 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:

Index: src/games/mille/end.c
diff -u src/games/mille/end.c:1.7 src/games/mille/end.c:1.8
--- src/games/mille/end.c:1.7	Thu Aug  7 09:37:25 2003
+++ src/games/mille/end.c	Mon May 25 23:24:54 2009
@@ -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 @@
  * 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 @@
  *	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 @@
 	Last_tot[num] = tot;
 }
 
-undoex() {
+void
+undoex(void)
+{
 
 	reg PLAY	*pp;
 	reg int		i;
Index: src/games/mille/roll.c
diff -u src/games/mille/roll.c:1.7 src/games/mille/roll.c:1.8
--- src/games/mille/roll.c:1.7	Thu Aug  7 09:37:26 2003
+++ src/games/mille/roll.c	Mon May 25 23:24:54 2009
@@ -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 @@
  */
 
 int
-roll(ndie, nsides)
-	int	ndie, nsides; 
+roll(int ndie, int nsides)
 {
 
 	int		tot;

Index: src/games/mille/init.c
diff -u src/games/mille/init.c:1.9 src/games/mille/init.c:1.10
--- src/games/mille/init.c:1.9	Thu Aug  7 09:37:25 2003
+++ src/games/mille/init.c	Mon May 25 23:24:54 2009
@@ -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 @@
  */
 
 void
-init()
+init(void)
 {
 	PLAY	*pp;
 	int	i, j;
@@ -89,7 +89,7 @@
 }
 
 void
-shuffle()
+shuffle(void)
 {
 	int	i, r;
 	CARD	temp;
@@ -108,7 +108,7 @@
 }
 
 void
-newboard()
+newboard(void)
 {
 	int		i;
 	PLAY		*pp;
@@ -167,7 +167,7 @@
 }
 
 void
-newscore()
+newscore(void)
 {
 	int		i, new;
 	PLAY		*pp;

Index: src/games/mille/mille.c
diff -u src/games/mille/mille.c:1.16 src/games/mille/mille.c:1.17
--- src/games/mille/mille.c:1.16	Fri Aug  8 16:10:47 2008
+++ src/games/mille/mille.c	Mon May 25 23:24:54 2009
@@ -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 @@
 #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 @@
  */
 
 int
-main(ac, av)
-	int	ac;
-	char	*av[];
+main(int ac, char *av[])
 {
 	bool	restore;
 
@@ -139,8 +137,7 @@
  * quit.
  */
 void
-rub(dummy)
-	int dummy __unused;
+rub(int dummy __unused)
 {
 	(void)signal(SIGINT, SIG_IGN);
 	if (getyn(REALLYPROMPT))
@@ -152,8 +149,7 @@
  *	Time to go beddy-by
  */
 void
-die(code)
-	int code;
+die(int code)
 {
 
 	(void)signal(SIGINT, SIG_IGN);

Index: src/games/mille/misc.c
diff -u src/games/mille/misc.c:1.11 src/games/mille/misc.c:1.12
--- src/games/mille/misc.c:1.11	Thu Aug  7 09:37:25 2003
+++ src/games/mille/misc.c	Mon May 25 23:24:54 2009
@@ -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 @@
 }
 
 CARD
-getcard()
+getcard(void)
 {
 	int	c, c1;
 
@@ -120,8 +120,7 @@
 }
 
 int
-check_ext(forcomp)
-	bool	forcomp;
+check_ext(bool forcomp)
 {
 
 
@@ -176,8 +175,7 @@
  * 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 @@
  * 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 @@
 }
 
 int
-readch()
+readch(void)
 {
 	int	cnt;
 	static char	c;

Index: src/games/mille/move.c
diff -u src/games/mille/move.c:1.15 src/games/mille/move.c:1.16
--- src/games/mille/move.c:1.15	Fri Nov  5 21:30:32 2004
+++ src/games/mille/move.c	Mon May 25 23:24:54 2009
@@ -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 @@
 #define	CTRL(c)		(c - 'A' + 1)
 
 void
-domove()
+domove(void)
 {
 	PLAY	*pp;
 	int	i, j;
@@ -168,7 +168,7 @@
  * the game is over
  */
 void
-check_go()
+check_go(void)
 {
 	CARD	card;
 	PLAY	*pp, *op;
@@ -199,8 +199,7 @@
 }
 
 int
-playcard(pp)
-	PLAY	*pp;
+playcard(PLAY *pp)
 {
 	int	v;
 	CARD	card;
@@ -349,7 +348,7 @@
 }
 
 void
-getmove()
+getmove(void)
 {
 	char	c;
 #ifdef EXTRAP
@@ -483,8 +482,7 @@
  * return whether or not the player has picked
  */
 int
-haspicked(pp)
-	const PLAY	*pp;
+haspicked(const PLAY *pp)
 {
 	int	card;
 
@@ -503,8 +501,7 @@
 }
 
 void
-account(card)
-	CARD	card; 
+account(CARD card)
 {
 	CARD	oppos;
 
@@ -529,8 +526,7 @@
 }
 
 void
-prompt(promptno)
-	int	promptno;
+prompt(int promptno)
 {
 	static const char	*const names[] = {
 				">>:Move:",
@@ -561,8 +557,7 @@
 }
 
 void
-sort(hand)
-	CARD	*hand;
+sort(CARD *hand)
 {
 	CARD	*cp, *tp;
 	CARD	temp;

Index: src/games/mille/print.c
diff -u src/games/mille/print.c:1.12 src/games/mille/print.c:1.13
--- src/games/mille/print.c:1.12	Sat Dec 15 19:44:42 2007
+++ src/games/mille/print.c	Mon May 25 23:24:54 2009
@@ -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 @@
 # define	CARD_STRT	2
 
 void
-prboard()
+prboard(void)
 {
 	PLAY	*pp;
 	int	i, j, k, temp;
@@ -103,9 +103,7 @@
  *	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 @@
  *	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;

Index: src/games/mille/save.c
diff -u src/games/mille/save.c:1.13 src/games/mille/save.c:1.14
--- src/games/mille/save.c:1.13	Mon May 25 23:17:31 2009
+++ src/games/mille/save.c	Mon May 25 23:24:54 2009
@@ -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 @@
  *	Returns FALSE if it couldn't be done.
  */
 bool
-save()
+save(void)
 {
 	char	*sp;
 	int	outfd;
@@ -141,8 +141,7 @@
  * be cleaned up before the game starts.
  */
 bool
-rest_f(file)
-	const char	*file;
+rest_f(const char *file)
 {
 
 	char	*sp;

Index: src/games/mille/table.c
diff -u src/games/mille/table.c:1.8 src/games/mille/table.c:1.9
--- src/games/mille/table.c:1.8	Sun Jul 20 01:03:21 2008
+++ src/games/mille/table.c	Mon May 25 23:24:54 2009
@@ -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 @@
 #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 @@
 int	main(int, char **);
 
 int
-main(argc, argv)
-	int argc;
-	char *argv[];
+main(int argc, char *argv[])
 {
 	int	i, j, count;
 
Index: src/games/mille/types.c
diff -u src/games/mille/types.c:1.8 src/games/mille/types.c:1.9
--- src/games/mille/types.c:1.8	Thu Aug  7 09:37:26 2003
+++ src/games/mille/types.c	Mon May 25 23:24:54 2009
@@ -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 @@
  */
 
 int
-is_repair(card)
-	CARD	card; 
+is_repair(CARD card)
 {
 
 	return card == C_GAS || card == C_SPARE ||
@@ -54,8 +53,7 @@
 }
 
 int
-safety(card)
-	CARD	card;
+safety(CARD card)
 {
 	switch (card) {
 	  case C_EMPTY:
Index: src/games/mille/varpush.c
diff -u src/games/mille/varpush.c:1.8 src/games/mille/varpush.c:1.9
--- src/games/mille/varpush.c:1.8	Tue Jan 27 20:30:30 2004
+++ src/games/mille/varpush.c	Mon May 25 23:24:54 2009
@@ -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 @@
  * 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[] = {

Reply via email to