Module Name:    src
Committed By:   dholland
Date:           Tue Jun 19 05:46:09 UTC 2012

Modified Files:
        src/games: Makefile.inc
        src/games/arithmetic: arithmetic.c
        src/games/battlestar: command1.c command5.c
        src/games/fortune/fortune: fortune.c
        src/games/fortune/unstr: unstr.c
        src/games/hack: hack.shk.c hack.shknam.c
        src/games/morse: morse.c
        src/games/number: number.c
        src/games/pig: pig.c
        src/games/snake/snake: snake.c
        src/games/snake/snscore: snscore.c
        src/games/worms: worms.c
        src/games/wump: wump.c

Log Message:
WARNS=5, and make WARNS=5 the default for src/games.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/Makefile.inc
cvs rdiff -u -r1.26 -r1.27 src/games/arithmetic/arithmetic.c
cvs rdiff -u -r1.4 -r1.5 src/games/battlestar/command1.c
cvs rdiff -u -r1.3 -r1.4 src/games/battlestar/command5.c
cvs rdiff -u -r1.63 -r1.64 src/games/fortune/fortune/fortune.c
cvs rdiff -u -r1.13 -r1.14 src/games/fortune/unstr/unstr.c
cvs rdiff -u -r1.13 -r1.14 src/games/hack/hack.shk.c
cvs rdiff -u -r1.7 -r1.8 src/games/hack/hack.shknam.c
cvs rdiff -u -r1.16 -r1.17 src/games/morse/morse.c
cvs rdiff -u -r1.14 -r1.15 src/games/number/number.c
cvs rdiff -u -r1.14 -r1.15 src/games/pig/pig.c
cvs rdiff -u -r1.27 -r1.28 src/games/snake/snake/snake.c
cvs rdiff -u -r1.18 -r1.19 src/games/snake/snscore/snscore.c
cvs rdiff -u -r1.21 -r1.22 src/games/worms/worms.c
cvs rdiff -u -r1.29 -r1.30 src/games/wump/wump.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/Makefile.inc
diff -u src/games/Makefile.inc:1.14 src/games/Makefile.inc:1.15
--- src/games/Makefile.inc:1.14	Sun Jan 18 20:22:45 2009
+++ src/games/Makefile.inc	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.14 2009/01/18 20:22:45 dholland Exp $
+#	$NetBSD: Makefile.inc,v 1.15 2012/06/19 05:46:08 dholland Exp $
 #	@(#)Makefile.inc	8.1 (Berkeley) 5/31/93
 
 MKHIDEGAME?=	no
@@ -20,4 +20,4 @@ BINGRP=		games
 BINMODE=	2555
 .endif
 .endif
-WARNS?=		4
+WARNS?=		5

Index: src/games/arithmetic/arithmetic.c
diff -u src/games/arithmetic/arithmetic.c:1.26 src/games/arithmetic/arithmetic.c:1.27
--- src/games/arithmetic/arithmetic.c:1.26	Wed Aug 31 16:24:55 2011
+++ src/games/arithmetic/arithmetic.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: arithmetic.c,v 1.26 2011/08/31 16:24:55 plunky Exp $	*/
+/*	$NetBSD: arithmetic.c,v 1.27 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)arithmetic.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: arithmetic.c,v 1.26 2011/08/31 16:24:55 plunky Exp $");
+__RCSID("$NetBSD: arithmetic.c,v 1.27 2012/06/19 05:46:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -155,8 +155,7 @@ main(int argc, char **argv)
 
 /* Handle interrupt character.  Print score and exit. */
 static void
-intr(dummy)
-	int dummy __unused;
+intr(int dummy __unused)
 {
 	showstats(1);
 	exit(0);
@@ -164,8 +163,7 @@ intr(dummy)
 
 /* Print score.  Original `arithmetic' had a delay after printing it. */
 static void
-showstats(bool_sigint)
-	int bool_sigint;
+showstats(int bool_sigint)
 {
 	if (nright + nwrong > 0) {
 		(void)printf("\n\nRights %d; Wrongs %d; Score %d%%",
@@ -190,7 +188,7 @@ showstats(bool_sigint)
  * more likely to appear in subsequent problems.
  */
 static int
-problem()
+problem(void)
 {
 	char *p;
 	time_t start, finish;
@@ -303,8 +301,7 @@ static struct penalty {
  * forget about the penalty (how likely is this, anyway?).
  */
 static void
-penalise(value, op, operand)
-	int value, op, operand;
+penalise(int value, int op, int operand)
 {
 	struct penalty *p;
 
@@ -324,8 +321,7 @@ penalise(value, op, operand)
  * we find the corresponding value and return that, decreasing its penalty.
  */
 static int
-getrandom(maxval, op, operand)
-	int maxval, op, operand;
+getrandom(int maxval, int op, int operand)
 {
 	int value;
 	struct penalty **pp, *p;
@@ -369,8 +365,7 @@ getrandom(maxval, op, operand)
 
 /* Return an index for the character op, which is one of [+-x/]. */
 static int
-opnum(op)
-	int op;
+opnum(int op)
 {
 	char *p;
 
@@ -382,7 +377,7 @@ opnum(op)
 
 /* Print usage message and quit. */
 static void
-usage()
+usage(void)
 {
 	(void)fprintf(stderr, "Usage: %s [-o +-x/] [-r range]\n",
 		getprogname());

Index: src/games/battlestar/command1.c
diff -u src/games/battlestar/command1.c:1.4 src/games/battlestar/command1.c:1.5
--- src/games/battlestar/command1.c:1.4	Wed Aug 12 05:20:38 2009
+++ src/games/battlestar/command1.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: command1.c,v 1.4 2009/08/12 05:20:38 dholland Exp $	*/
+/*	$NetBSD: command1.c,v 1.5 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)com1.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: command1.c,v 1.4 2009/08/12 05:20:38 dholland Exp $");
+__RCSID("$NetBSD: command1.c,v 1.5 2012/06/19 05:46:08 dholland Exp $");
 #endif
 #endif				/* not lint */
 
@@ -96,7 +96,7 @@ convert(int tothis)
 }
 
 void
-news()
+news(void)
 {
 	int     n;
 	int     hurt;

Index: src/games/battlestar/command5.c
diff -u src/games/battlestar/command5.c:1.3 src/games/battlestar/command5.c:1.4
--- src/games/battlestar/command5.c:1.3	Fri Jul  1 06:04:54 2005
+++ src/games/battlestar/command5.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: command5.c,v 1.3 2005/07/01 06:04:54 jmc Exp $	*/
+/*	$NetBSD: command5.c,v 1.4 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,14 +34,14 @@
 #if 0
 static char sccsid[] = "@(#)com5.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: command5.c,v 1.3 2005/07/01 06:04:54 jmc Exp $");
+__RCSID("$NetBSD: command5.c,v 1.4 2012/06/19 05:46:08 dholland Exp $");
 #endif
 #endif				/* not lint */
 
 #include "extern.h"
 
 void
-kiss()
+kiss(void)
 {
 	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount)
 		continue;

Index: src/games/fortune/fortune/fortune.c
diff -u src/games/fortune/fortune/fortune.c:1.63 src/games/fortune/fortune/fortune.c:1.64
--- src/games/fortune/fortune/fortune.c:1.63	Sun Jan 17 22:52:00 2010
+++ src/games/fortune/fortune/fortune.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fortune.c,v 1.63 2010/01/17 22:52:00 wiz Exp $	*/
+/*	$NetBSD: fortune.c,v 1.64 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 19
 #if 0
 static char sccsid[] = "@(#)fortune.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: fortune.c,v 1.63 2010/01/17 22:52:00 wiz Exp $");
+__RCSID("$NetBSD: fortune.c,v 1.64 2012/06/19 05:46:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -1061,8 +1061,7 @@ open_fp(FILEDESC *fp)
  *	Open up the dat file if we need to.
  */
 static void
-open_dat(fp)
-	FILEDESC	*fp;
+open_dat(FILEDESC *fp)
 {
 	if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, O_RDONLY)) < 0)
 		err(1, "Cannot open `%s'", fp->datfile);

Index: src/games/fortune/unstr/unstr.c
diff -u src/games/fortune/unstr/unstr.c:1.13 src/games/fortune/unstr/unstr.c:1.14
--- src/games/fortune/unstr/unstr.c:1.13	Sun Jul 20 01:03:21 2008
+++ src/games/fortune/unstr/unstr.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: unstr.c,v 1.13 2008/07/20 01:03:21 lukem Exp $	*/
+/*	$NetBSD: unstr.c,v 1.14 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19
 #if 0
 static char sccsid[] = "@(#)unstr.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: unstr.c,v 1.13 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: unstr.c,v 1.14 2012/06/19 05:46:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -85,9 +85,7 @@ void	order_unstr(STRFILE *);
 
 /* ARGSUSED */
 int
-main(ac, av)
-	int	ac __unused;
-	char	**av;
+main(int ac __unused, char **av)
 {
 	static STRFILE	tbl;		/* description table */
 
@@ -114,8 +112,7 @@ main(ac, av)
 }
 
 void
-getargs(av)
-	char	*av[];
+getargs(char *av[])
 {
 	if (!*++av) {
 		(void) fprintf(stderr, "usage: unstr datafile\n");
@@ -127,8 +124,7 @@ getargs(av)
 }
 
 void
-order_unstr(tbl)
-	STRFILE	*tbl;
+order_unstr(STRFILE *tbl)
 {
 	unsigned int	i;
 	char	*sp;

Index: src/games/hack/hack.shk.c
diff -u src/games/hack/hack.shk.c:1.13 src/games/hack/hack.shk.c:1.14
--- src/games/hack/hack.shk.c:1.13	Sun Aug  7 06:03:45 2011
+++ src/games/hack/hack.shk.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hack.shk.c,v 1.13 2011/08/07 06:03:45 dholland Exp $	*/
+/*	$NetBSD: hack.shk.c,v 1.14 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hack.shk.c,v 1.13 2011/08/07 06:03:45 dholland Exp $");
+__RCSID("$NetBSD: hack.shk.c,v 1.14 2012/06/19 05:46:08 dholland Exp $");
 #endif				/* not lint */
 
 #include <stdlib.h>
@@ -1103,8 +1103,7 @@ notonl_ok:
 
 /* He is digging in the shop. */
 void
-shopdig(fall)
-	int             fall;
+shopdig(int fall)
 {
 	if (!fall) {
 		if (u.utraptype == TT_PIT)

Index: src/games/hack/hack.shknam.c
diff -u src/games/hack/hack.shknam.c:1.7 src/games/hack/hack.shknam.c:1.8
--- src/games/hack/hack.shknam.c:1.7	Wed Aug 12 07:28:41 2009
+++ src/games/hack/hack.shknam.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hack.shknam.c,v 1.7 2009/08/12 07:28:41 dholland Exp $	*/
+/*	$NetBSD: hack.shknam.c,v 1.8 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hack.shknam.c,v 1.7 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.shknam.c,v 1.8 2012/06/19 05:46:08 dholland Exp $");
 #endif				/* not lint */
 
 #include "hack.h"
@@ -206,13 +206,16 @@ static const struct shk_nx {
 };
 
 void
-findname(nampt, let)
-	char           *nampt;
-	char            let;
+findname(char *nampt, int let_i)
 {
 	const struct shk_nx  *p = shk_nx;
 	const char          *const *q;
 	int             i;
+	char let;
+
+	/* truncate to "char" width */
+	let = let_i;
+
 	while (p->x && p->x != let)
 		p++;
 	q = p->xn;

Index: src/games/morse/morse.c
diff -u src/games/morse/morse.c:1.16 src/games/morse/morse.c:1.17
--- src/games/morse/morse.c:1.16	Wed Aug 12 08:11:37 2009
+++ src/games/morse/morse.c	Tue Jun 19 05:46:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: morse.c,v 1.16 2009/08/12 08:11:37 dholland Exp $	*/
+/*	$NetBSD: morse.c,v 1.17 2012/06/19 05:46:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)morse.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: morse.c,v 1.16 2009/08/12 08:11:37 dholland Exp $");
+__RCSID("$NetBSD: morse.c,v 1.17 2012/06/19 05:46:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -119,9 +119,7 @@ static int sflag;
 static int dflag;
 
 int
-main(argc, argv)
-	int argc;
-	char **argv;
+main(int argc, char **argv)
 {
 	int ch;
 	char *p;
@@ -201,8 +199,7 @@ main(argc, argv)
 }
 
 void
-decode(s)
-	const char *s;
+decode(const char *s)
 {
 	int i;
 	
@@ -231,8 +228,7 @@ decode(s)
 }
 
 void
-morse(c)
-	int c;
+morse(int c)
 {
 	int i;
 
@@ -255,8 +251,7 @@ morse(c)
 }
 
 void
-show(s)
-	const char *s;
+show(const char *s)
 {
 	if (sflag)
 		printf(" %s", s);

Index: src/games/number/number.c
diff -u src/games/number/number.c:1.14 src/games/number/number.c:1.15
--- src/games/number/number.c:1.14	Thu May 13 17:52:11 2010
+++ src/games/number/number.c	Tue Jun 19 05:46:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: number.c,v 1.14 2010/05/13 17:52:11 tnozaki Exp $	*/
+/*	$NetBSD: number.c,v 1.15 2012/06/19 05:46:09 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)number.c	8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: number.c,v 1.14 2010/05/13 17:52:11 tnozaki Exp $");
+__RCSID("$NetBSD: number.c,v 1.15 2012/06/19 05:46:09 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -86,9 +86,7 @@ static void usage(void) __dead;
 static int lflag;
 
 int
-main(argc, argv)
-	int argc;
-	char *argv[];
+main(int argc, char *argv[])
 {
 	int ch, first;
 	char line[256];
@@ -125,8 +123,7 @@ main(argc, argv)
 }
 
 void
-convert(line)
-	char *line;
+convert(char *line)
 {
 	int flen, len, rval;
 	char *p, *fraction;
@@ -194,9 +191,7 @@ badnum:			errx(1, "illegal number: %s", 
 }
 
 int
-unit(len, p)
-	int len;
-	const char *p;
+unit(int len, const char *p)
 {
 	int off, rval;
 
@@ -230,9 +225,7 @@ unit(len, p)
 }
 
 int
-number(p, len)
-	const char *p;
-	int len;
+number(const char *p, int len)
 {
 	int val, rval;
 
@@ -270,8 +263,7 @@ number(p, len)
 }
 
 void
-pfract(len)
-	int len;
+pfract(int len)
 {
 	static const char *const pref[] = { "", "ten-", "hundred-" };
 
@@ -289,7 +281,7 @@ pfract(len)
 }
 
 void
-usage()
+usage(void)
 {
 	(void)fprintf(stderr, "usage: number [# ...]\n");
 	exit(1);

Index: src/games/pig/pig.c
diff -u src/games/pig/pig.c:1.14 src/games/pig/pig.c:1.15
--- src/games/pig/pig.c:1.14	Wed Aug 12 08:22:24 2009
+++ src/games/pig/pig.c	Tue Jun 19 05:46:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pig.c,v 1.14 2009/08/12 08:22:24 dholland Exp $	*/
+/*	$NetBSD: pig.c,v 1.15 2012/06/19 05:46:09 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
 #if 0
 static char sccsid[] = "@(#)pig.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: pig.c,v 1.14 2009/08/12 08:22:24 dholland Exp $");
+__RCSID("$NetBSD: pig.c,v 1.15 2012/06/19 05:46:09 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -57,9 +57,7 @@ static void pigout(char *, int);
 static void usage(void) __dead;
 
 int
-main(argc, argv)
-	int argc;
-	char *argv[];
+main(int argc, char *argv[])
 {
 	int len;
 	int ch;
@@ -91,9 +89,7 @@ main(argc, argv)
 }
 
 static void
-pigout(buf, len)
-	char *buf;
-	int len;
+pigout(char *buf, int len)
 {
 	int ch, start, i;
 	int olen, allupper, firstupper;
@@ -132,7 +128,7 @@ pigout(buf, len)
 }
 
 static void
-usage()
+usage(void)
 {
 	(void)fprintf(stderr, "usage: pig\n");
 	exit(1);

Index: src/games/snake/snake/snake.c
diff -u src/games/snake/snake/snake.c:1.27 src/games/snake/snake/snake.c:1.28
--- src/games/snake/snake/snake.c:1.27	Sun Dec  5 04:34:22 2010
+++ src/games/snake/snake/snake.c	Tue Jun 19 05:46:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: snake.c,v 1.27 2010/12/05 04:34:22 pgoyette Exp $	*/
+/*	$NetBSD: snake.c,v 1.28 2012/06/19 05:46:09 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)snake.c	8.2 (Berkeley) 1/7/94";
 #else
-__RCSID("$NetBSD: snake.c,v 1.27 2010/12/05 04:34:22 pgoyette Exp $");
+__RCSID("$NetBSD: snake.c,v 1.28 2012/06/19 05:46:09 dholland Exp $");
 #endif
 #endif				/* not lint */
 
@@ -135,12 +135,8 @@ static void suspend(void);
 static void win(const struct point *);
 static void winnings(int);
 
-int		main(int, char **);
-
 int
-main(argc, argv)
-	int     argc;
-	char  **argv;
+main(int argc, char **argv)
 {
 	int     ch, i;
 	time_t tv;
@@ -251,9 +247,7 @@ main(argc, argv)
 }
 
 static struct point *
-point(ps, x, y)
-	struct point *ps;
-	int     x, y;
+point(struct point *ps, int x, int y)
 {
 	ps->col = x;
 	ps->line = y;
@@ -262,7 +256,7 @@ point(ps, x, y)
 
 /* Main command loop */
 static void
-mainloop()
+mainloop(void)
 {
 	int     k;
 	int     repeat = 1;
@@ -451,7 +445,7 @@ mainloop()
  * setup the board
  */
 static void
-setup()
+setup(void)
 {
 	int     i;
 
@@ -468,7 +462,7 @@ setup()
 }
 
 static void
-drawbox()
+drawbox(void)
 {
 	int i;
 
@@ -483,8 +477,7 @@ drawbox()
 }
 
 static void
-snrand(sp)
-	struct point *sp;
+snrand(struct point *sp)
 {
 	struct point p;
 	int i;
@@ -513,8 +506,7 @@ snrand(sp)
 }
 
 static int
-post(iscore, flag)
-	int     iscore, flag;
+post(int iscore, int flag)
 {
 	short   score = iscore;
 	short   uid;
@@ -588,7 +580,7 @@ post(iscore, flag)
  * if the terminal gets behind.
  */
 static void
-flushi()
+flushi(void)
 {
 	tcflush(0, TCIFLUSH);
 }
@@ -605,8 +597,7 @@ static const float absv[8] = {
 static int oldw = 0;
 
 static void
-chase(np, sp)
-	struct point *sp, *np;
+chase(struct point *np, struct point *sp)
 {
 	/* this algorithm has bugs; otherwise the snake would get too good */
 	struct point d;
@@ -667,8 +658,7 @@ chase(np, sp)
 }
 
 static void
-spacewarp(w)
-	int     w;
+spacewarp(int w)
 {
 	struct point p;
 	int     j;
@@ -701,7 +691,7 @@ spacewarp(w)
 }
 
 static void
-snap()
+snap(void)
 {
 #if 0 /* This code doesn't really make sense.  */
 	struct point p;
@@ -748,8 +738,7 @@ snap()
 }
 
 static int
-stretch(ps)
-	const struct point *ps;
+stretch(const struct point *ps)
 {
 	struct point p;
 
@@ -796,8 +785,7 @@ stretch(ps)
 }
 
 static void
-surround(ps)
-	struct point *ps;
+surround(struct point *ps)
 {
 	int     j;
 
@@ -840,8 +828,7 @@ surround(ps)
 }
 
 static void
-win(ps)
-	const struct point *ps;
+win(const struct point *ps)
 {
 	struct point x;
 	int     j, k;
@@ -873,7 +860,7 @@ win(ps)
 }
 
 static int
-pushsnake()
+pushsnake(void)
 {
 	int     i, bonus;
 	int     issame = 0;
@@ -930,8 +917,7 @@ pushsnake()
 }
 
 static int
-chk(sp)
-	const struct point *sp;
+chk(const struct point *sp)
 {
 	int     j;
 
@@ -968,8 +954,7 @@ chk(sp)
 }
 
 static void
-winnings(won)
-	int     won;
+winnings(int won)
 {
 	if (won > 0) {
 		mvprintw(1, 1, "$%d", won);
@@ -977,8 +962,7 @@ winnings(won)
 }
 
 static void
-stop(dummy)
-	int dummy __unused;
+stop(int dummy __unused)
 {
 	signal(SIGINT, SIG_IGN);
 	endwin();
@@ -987,7 +971,7 @@ stop(dummy)
 }
 
 static void
-suspend()
+suspend(void)
 {
 	endwin();
 	kill(getpid(), SIGTSTP);
@@ -996,15 +980,13 @@ suspend()
 }
 
 static void
-length(num)
-	int     num;
+length(int num)
 {
 	printf("You made %d moves.\n", num);
 }
 
 static void
-logit(msg)
-	const char   *msg;
+logit(const char *msg)
 {
 	time_t  t;
 

Index: src/games/snake/snscore/snscore.c
diff -u src/games/snake/snscore/snscore.c:1.18 src/games/snake/snscore/snscore.c:1.19
--- src/games/snake/snscore/snscore.c:1.18	Wed Aug 12 08:48:56 2009
+++ src/games/snake/snscore/snscore.c	Tue Jun 19 05:46:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: snscore.c,v 1.18 2009/08/12 08:48:56 dholland Exp $	*/
+/*	$NetBSD: snscore.c,v 1.19 2012/06/19 05:46:09 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)snscore.c	8.1 (Berkeley) 7/19/93";
 #else
-__RCSID("$NetBSD: snscore.c,v 1.18 2009/08/12 08:48:56 dholland Exp $");
+__RCSID("$NetBSD: snscore.c,v 1.19 2012/06/19 05:46:09 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -66,7 +66,7 @@ static struct player players[MAXPLAYERS]
 int	main(void);
 
 int
-main()
+main(void)
 {
 	short	uid, score;
 	FILE	*fd;

Index: src/games/worms/worms.c
diff -u src/games/worms/worms.c:1.21 src/games/worms/worms.c:1.22
--- src/games/worms/worms.c:1.21	Wed Aug 31 16:24:56 2011
+++ src/games/worms/worms.c	Tue Jun 19 05:46:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: worms.c,v 1.21 2011/08/31 16:24:56 plunky Exp $	*/
+/*	$NetBSD: worms.c,v 1.22 2012/06/19 05:46:09 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)worms.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: worms.c,v 1.21 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: worms.c,v 1.22 2012/06/19 05:46:09 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -184,9 +184,7 @@ static void nomem(void) __dead;
 static void onsig(int);
 
 int
-main(argc, argv)
-	int argc;
-	char *argv[];
+main(int argc, char *argv[])
 {
 	int x, y, h, n;
 	struct worm *w;
@@ -340,14 +338,13 @@ main(argc, argv)
 }
 
 static void
-onsig(signo)
-	int signo __unused;
+onsig(int signo __unused)
 {
 	sig_caught = 1;
 }
 
 static void
-nomem()
+nomem(void)
 {
 	errx(1, "not enough memory.");
 }

Index: src/games/wump/wump.c
diff -u src/games/wump/wump.c:1.29 src/games/wump/wump.c:1.30
--- src/games/wump/wump.c:1.29	Thu Sep  1 07:18:51 2011
+++ src/games/wump/wump.c	Tue Jun 19 05:46:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wump.c,v 1.29 2011/09/01 07:18:51 plunky Exp $	*/
+/*	$NetBSD: wump.c,v 1.30 2012/06/19 05:46:09 dholland Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)wump.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: wump.c,v 1.29 2011/09/01 07:18:51 plunky Exp $");
+__RCSID("$NetBSD: wump.c,v 1.30 2012/06/19 05:46:09 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -138,9 +138,7 @@ static void wump_kill(void);
 static int wump_nearby(void);
 
 int
-main(argc, argv)
-	int argc;
-	char **argv;
+main(int argc, char **argv)
 {
 	int c, e=0;
 
@@ -255,7 +253,7 @@ quiver holds %d custom super anti-evil W
 }
 
 static void
-display_room_stats()
+display_room_stats(void)
 {
 	int i;
 
@@ -285,7 +283,7 @@ display_room_stats()
 }
 
 static int
-take_action()
+take_action(void)
 {
 	/*
 	 * Do the action specified by the player, either 'm'ove, 's'hoot
@@ -314,8 +312,7 @@ take_action()
 }
 
 static int
-move_to(room_number)
-	const char *room_number;
+move_to(const char *room_number)
 {
 	int i, just_moved_by_bats, next_room, tunnel_available;
 
@@ -406,8 +403,7 @@ move_to(room_number)
 }
 
 static int
-shoot(room_list)
-	char *room_list;
+shoot(char *room_list)
 {
 	int chance, next, roomcnt;
 	int j, arrow_location, lnk, ok;
@@ -519,8 +515,7 @@ The arrow is weakly shot and can go no f
 }
 
 static int
-gcd(a, b)
-	int a, b;
+gcd(int a, int b)
 {
 	int r;
 
@@ -531,7 +526,7 @@ gcd(a, b)
 }
 
 static void
-cave_init()
+cave_init(void)
 {
 	int i, j, k, lnk;
 	int delta;
@@ -611,7 +606,7 @@ try_again:		lnk = (random() % room_num) 
 }
 
 static void
-clear_things_in_cave()
+clear_things_in_cave(void)
 {
 	int i;
 
@@ -624,7 +619,7 @@ clear_things_in_cave()
 }
 
 static void
-initialize_things_in_cave()
+initialize_things_in_cave(void)
 {
 	int i, loc;
 
@@ -668,8 +663,7 @@ initialize_things_in_cave()
 }
 
 static int
-getans(prompt)
-	const char *prompt;
+getans(const char *prompt)
 {
 	char buf[20];
 
@@ -694,7 +688,7 @@ getans(prompt)
 }
 
 static int
-bats_nearby()
+bats_nearby(void)
 { 
 	int i;
 
@@ -706,7 +700,7 @@ bats_nearby()
 }
 
 static int
-pit_nearby()
+pit_nearby(void)
 { 
 	int i;
 
@@ -718,7 +712,7 @@ pit_nearby()
 }
 
 static int
-wump_nearby()
+wump_nearby(void)
 {
 	int i, j;
 
@@ -735,20 +729,19 @@ wump_nearby()
 }
 
 static void
-move_wump()
+move_wump(void)
 {
 	wumpus_loc = cave[wumpus_loc].tunnel[random() % link_num];
 }
 
 static int
-int_compare(a, b)
-	const void *a, *b;
+int_compare(const void *a, const void *b)
 {
 	return(*(const int *)a < *(const int *)b ? -1 : 1);
 }
 
 static void
-instructions()
+instructions(void)
 {
 	const char *pager;
 	pid_t pid;
@@ -792,7 +785,7 @@ puff of greasy black smoke! (poof)\n");
 }
 
 static void
-usage()
+usage(void)
 {
 	(void)fprintf(stderr,
 "usage: wump [-h] [-a arrows] [-b bats] [-p pits] [-r rooms] [-t tunnels]\n");
@@ -802,7 +795,7 @@ usage()
 /* messages */
 
 static void
-wump_kill()
+wump_kill(void)
 {
 	(void)printf(
 "*ROAR* *chomp* *snurfle* *chomp*!\n\
@@ -814,7 +807,7 @@ passed out from the stench!\n");
 }
 
 static void
-kill_wump()
+kill_wump(void)
 {
 	(void)printf(
 "*thwock!* *groan* *crash*\n\n\
@@ -826,7 +819,7 @@ mightiest adventurer at a single whiff!!
 }
 
 static void
-no_arrows()
+no_arrows(void)
 {
 	(void)printf(
 "\nYou turn and look at your quiver, and realize with a sinking feeling\n\
@@ -836,7 +829,7 @@ you, and with a mighty *ROAR* eats you a
 }
 
 static void
-shoot_self()
+shoot_self(void)
 {
 	(void)printf(
 "\n*Thwack!*  A sudden piercing feeling informs you that the ricochet\n\
@@ -847,8 +840,7 @@ and immediately rushes to your side, not
 }
 
 static void
-jump(where)
-	int where;
+jump(int where)
 {
 	(void)printf(
 "\nWith a jaunty step you enter the magic tunnel.  As you do, you\n\
@@ -857,7 +849,7 @@ a very curious, warm sensation and find 
 }
 
 static void
-pit_kill()
+pit_kill(void)
 {
 	(void)printf(
 "*AAAUUUUGGGGGHHHHHhhhhhhhhhh...*\n\
@@ -869,7 +861,7 @@ you can at least find out if Jules Verne
 }
 
 static void
-pit_survive()
+pit_survive(void)
 {
 	(void)printf(
 "Without conscious thought you grab for the side of the cave and manage\n\

Reply via email to