-/* $NetBSD: monop.c,v 1.12 2001/09/18 18:15:49 wiz Exp $ */
+/* $NetBSD: monop.c,v 1.17 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)monop.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: monop.c,v 1.12 2001/09/18 18:15:49 wiz Exp $");
+__RCSID("$NetBSD: monop.c,v 1.17 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
#include <unistd.h>
#include "monop.def"
-int main __P((int, char *[]));
-static void getplayers __P((void));
-static void init_players __P((void));
-static void init_monops __P((void));
-static void do_quit __P((int));
+int main(int, char *[]);
+static void getplayers(void);
+static void init_players(void);
+static void init_monops(void);
+static void do_quit(int);
+void *heapstart;
/*
* This program implements a monopoly game
setgid(getgid());
srand(getpid());
+ heapstart = sbrk(0);
if (ac > 1) {
if (!rest_f(av[1]))
restore();
/*ARGSUSED*/
static void
do_quit(n)
- int n __attribute__((__unused__));
+ int n __unused;
{
quit();
}
blew_it:
for (;;) {
- if ((num_play=get_int("How many players? ")) <= 0 ||
+ if ((num_play = get_int("How many players? ")) <= 0 ||
num_play > MAX_PL)
printf("Sorry. Number must range from 1 to 9\n");
else
for (i = 0; i < num_play; i++) {
over:
printf("Player %d's name: ", i + 1);
- for (sp = buf; (*sp=getchar()) != '\n'; sp++)
+ for (sp = buf; (*sp = getchar()) != '\n'; sp++)
continue;
if (sp == buf)
goto over;
* This routine initializes the monopoly structures.
*/
static void
-init_monops()
+init_monops()
{
MON *mp;
int i;