-/* $NetBSD: cards.c,v 1.16 2008/02/19 09:30:26 dholland Exp $ */
+/* $NetBSD: cards.c,v 1.17 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: cards.c,v 1.16 2008/02/19 09:30:26 dholland Exp $");
+__RCSID("$NetBSD: cards.c,v 1.17 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
{
int32_t nc;
- if ((deckf=fopen(cardfile, "r")) == NULL) {
+ if ((deckf = fopen(cardfile, "r")) == NULL) {
file_err:
err(1, "%s", cardfile);
}
-/* $NetBSD: execute.c,v 1.13 2008/02/19 09:30:26 dholland Exp $ */
+/* $NetBSD: execute.c,v 1.14 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)execute.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: execute.c,v 1.13 2008/02/19 09:30:26 dholland Exp $");
+__RCSID("$NetBSD: execute.c,v 1.14 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
*/
void
execute(com_num)
- int com_num;
+ int com_num;
{
new_play = FALSE; /* new_play is true if fixing */
(*func[com_num])();
* This routine moves a piece around.
*/
void
-do_move()
+do_move()
{
int r1, r2;
bool was_jail;
*/
void
move(rl)
- int rl;
+ int rl;
{
int old_loc;
* This routine shows the results of a move
*/
static void
-show_move()
+show_move()
{
SQUARE *sqp;
printf("That is a safe place\n");
break;
case CC:
- cc(); break;
+ cc();
+ break;
case CHANCE:
- chance(); break;
+ chance();
+ break;
case INC_TAX:
- inc_tax(); break;
+ inc_tax();
+ break;
case GOTO_J:
- goto_jail(); break;
+ goto_jail();
+ break;
case LUX_TAX:
- lux_tax(); break;
+ lux_tax();
+ break;
case PRPTY:
case RR:
case UTIL:
* This routine saves the current game for use at a later date
*/
void
-save()
+save()
{
char *sp;
int outf, num;
printf("Which file do you wish to save it in? ");
sp = buf;
- while ((*sp++=getchar()) != '\n')
+ while ((*sp++ = getchar()) != '\n')
continue;
*--sp = '\0';
&& getyn("File exists. Do you wish to overwrite? ") > 0)
return;
- if ((outf=creat(buf, 0644)) < 0) {
+ if ((outf = creat(buf, 0644)) < 0) {
warn("%s", buf);
return;
}
* This routine restores an old game from a file
*/
void
-restore()
+restore()
{
char *sp;
printf("Which file do you wish to restore from? ");
- for (sp = buf; (*sp=getchar()) != '\n'; sp++)
+ for (sp = buf; (*sp = getchar()) != '\n'; sp++)
continue;
*sp = '\0';
rest_f(buf);
*/
int
rest_f(file)
- const char *file;
+ const char *file;
{
char *sp;
int inf, num;
char *start, *end;
STAT sbuf;
- if ((inf=open(file, O_RDONLY)) < 0) {
+ if ((inf = open(file, O_RDONLY)) < 0) {
warn("%s", file);
return FALSE;
}
-/* $NetBSD: getinp.c,v 1.15 2008/01/28 06:16:13 dholland Exp $ */
+/* $NetBSD: getinp.c,v 1.16 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)getinp.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getinp.c,v 1.15 2008/01/28 06:16:13 dholland Exp $");
+__RCSID("$NetBSD: getinp.c,v 1.16 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
int
getinp(prompt, lst)
- const char *prompt, *const lst[];
+ const char *prompt, *const lst[];
{
int i, n_match, match = 0;
char *sp;
for (;;) {
printf("%s", prompt);
- for (sp = buf; (c=getchar()) != '\n'; ) {
+ for (sp = buf; (c = getchar()) != '\n'; ) {
if (c == -1)
return 0;
*sp = c;
-/* $NetBSD: jail.c,v 1.6 2003/08/07 09:37:28 agc Exp $ */
+/* $NetBSD: jail.c,v 1.7 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)jail.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: jail.c,v 1.6 2003/08/07 09:37:28 agc Exp $");
+__RCSID("$NetBSD: jail.c,v 1.7 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
return TRUE;
}
return FALSE;
- }
- else {
+ } else {
printf("Double roll gets you out.\n");
goto moveit;
}
-/* $NetBSD: monop.c,v 1.16 2007/12/15 19:44:42 perry Exp $ */
+/* $NetBSD: monop.c,v 1.17 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)monop.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: monop.c,v 1.16 2007/12/15 19:44:42 perry Exp $");
+__RCSID("$NetBSD: monop.c,v 1.17 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
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;
-/* $NetBSD: morg.c,v 1.12 2008/02/19 09:05:55 dholland Exp $ */
+/* $NetBSD: morg.c,v 1.13 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)morg.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: morg.c,v 1.12 2008/02/19 09:05:55 dholland Exp $");
+__RCSID("$NetBSD: morg.c,v 1.13 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
* to be unmortgaged.
*/
void
-unmortgage()
+unmortgage()
{
int propnum;
-/* $NetBSD: print.c,v 1.8 2004/01/27 20:30:30 jsm Exp $ */
+/* $NetBSD: print.c,v 1.9 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: print.c,v 1.8 2004/01/27 20:30:30 jsm Exp $");
+__RCSID("$NetBSD: print.c,v 1.9 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
* This routine prints out the current board
*/
void
-printboard()
+printboard()
{
int i;
* This routine lists where each player is.
*/
void
-where()
+where()
{
int i;
-/* $NetBSD: prop.c,v 1.13 2008/02/19 09:32:34 dholland Exp $ */
+/* $NetBSD: prop.c,v 1.14 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)prop.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: prop.c,v 1.13 2008/02/19 09:32:34 dholland Exp $");
+__RCSID("$NetBSD: prop.c,v 1.14 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
add_list(plr, head, op_sqr)
int plr;
OWN **head;
- int op_sqr;
+ int op_sqr;
{
int val;
OWN *tp, *last_tp;
-/* $NetBSD: trade.c,v 1.10 2008/01/28 06:16:13 dholland Exp $ */
+/* $NetBSD: trade.c,v 1.11 2008/02/19 09:45:02 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)trade.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: trade.c,v 1.10 2008/01/28 06:16:13 dholland Exp $");
+__RCSID("$NetBSD: trade.c,v 1.11 2008/02/19 09:45:02 dholland Exp $");
#endif
#endif /* not lint */
*/
static void
get_list(struct_no, play_no)
- int struct_no, play_no;
+ int struct_no, play_no;
{
int sn, pn;
PLAY *pp;
*/
static int
set_list(the_list)
- OWN *the_list;
+ OWN *the_list;
{
int i;
OWN *op;
*/
static void
move_em(from, to)
- TRADE *from, *to;
+ TRADE *from, *to;
{
PLAY *pl_fr, *pl_to;
OWN *op;