From 360f38c761c19369bd6476bb7558d9b9113c4abf Mon Sep 17 00:00:00 2001 From: dholland Date: Tue, 19 Feb 2008 09:45:02 +0000 Subject: KNF/whitespace nits. No functional changes. --- monop/cards.c | 6 +++--- monop/execute.c | 41 +++++++++++++++++++++++------------------ monop/getinp.c | 8 ++++---- monop/jail.c | 7 +++---- monop/monop.c | 10 +++++----- monop/morg.c | 6 +++--- monop/print.c | 8 ++++---- monop/prop.c | 6 +++--- monop/trade.c | 10 +++++----- 9 files changed, 53 insertions(+), 49 deletions(-) (limited to 'monop') diff --git a/monop/cards.c b/monop/cards.c index 4eee055b..bf878ee9 100644 --- a/monop/cards.c +++ b/monop/cards.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -69,7 +69,7 @@ init_decks() { int32_t nc; - if ((deckf=fopen(cardfile, "r")) == NULL) { + if ((deckf = fopen(cardfile, "r")) == NULL) { file_err: err(1, "%s", cardfile); } diff --git a/monop/execute.c b/monop/execute.c index 72d04773..bbddcbb9 100644 --- a/monop/execute.c +++ b/monop/execute.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -64,7 +64,7 @@ static void show_move(void); */ void execute(com_num) - int com_num; + int com_num; { new_play = FALSE; /* new_play is true if fixing */ (*func[com_num])(); @@ -80,7 +80,7 @@ execute(com_num) * This routine moves a piece around. */ void -do_move() +do_move() { int r1, r2; bool was_jail; @@ -114,7 +114,7 @@ ret: */ void move(rl) - int rl; + int rl; { int old_loc; @@ -131,7 +131,7 @@ move(rl) * This routine shows the results of a move */ static void -show_move() +show_move() { SQUARE *sqp; @@ -142,15 +142,20 @@ show_move() 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: @@ -174,7 +179,7 @@ show_move() * This routine saves the current game for use at a later date */ void -save() +save() { char *sp; int outf, num; @@ -184,7 +189,7 @@ save() printf("Which file do you wish to save it in? "); sp = buf; - while ((*sp++=getchar()) != '\n') + while ((*sp++ = getchar()) != '\n') continue; *--sp = '\0'; @@ -196,7 +201,7 @@ save() && 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; } @@ -221,12 +226,12 @@ save() * 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); @@ -238,7 +243,7 @@ restore() */ int rest_f(file) - const char *file; + const char *file; { char *sp; int inf, num; @@ -246,7 +251,7 @@ rest_f(file) char *start, *end; STAT sbuf; - if ((inf=open(file, O_RDONLY)) < 0) { + if ((inf = open(file, O_RDONLY)) < 0) { warn("%s", file); return FALSE; } diff --git a/monop/getinp.c b/monop/getinp.c index 2166b9fa..4e1c2881 100644 --- a/monop/getinp.c +++ b/monop/getinp.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -51,7 +51,7 @@ static int comp(const char *); int getinp(prompt, lst) - const char *prompt, *const lst[]; + const char *prompt, *const lst[]; { int i, n_match, match = 0; char *sp; @@ -59,7 +59,7 @@ getinp(prompt, lst) for (;;) { printf("%s", prompt); - for (sp = buf; (c=getchar()) != '\n'; ) { + for (sp = buf; (c = getchar()) != '\n'; ) { if (c == -1) return 0; *sp = c; diff --git a/monop/jail.c b/monop/jail.c index f6ad0979..cb69a110 100644 --- a/monop/jail.c +++ b/monop/jail.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -112,8 +112,7 @@ moveit: return TRUE; } return FALSE; - } - else { + } else { printf("Double roll gets you out.\n"); goto moveit; } diff --git a/monop/monop.c b/monop/monop.c index 1653e136..08509622 100644 --- a/monop/monop.c +++ b/monop/monop.c @@ -1,4 +1,4 @@ -/* $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 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #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 */ @@ -110,7 +110,7 @@ getplayers() 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 @@ -122,7 +122,7 @@ blew_it: 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; @@ -188,7 +188,7 @@ again: * This routine initializes the monopoly structures. */ static void -init_monops() +init_monops() { MON *mp; int i; diff --git a/monop/morg.c b/monop/morg.c index 23194726..d654993d 100644 --- a/monop/morg.c +++ b/monop/morg.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -155,7 +155,7 @@ m(propnum) * to be unmortgaged. */ void -unmortgage() +unmortgage() { int propnum; diff --git a/monop/print.c b/monop/print.c index 9cd3c95b..898c6eef 100644 --- a/monop/print.c +++ b/monop/print.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -48,7 +48,7 @@ static void printmorg(const SQUARE *); * This routine prints out the current board */ void -printboard() +printboard() { int i; @@ -64,7 +64,7 @@ printboard() * This routine lists where each player is. */ void -where() +where() { int i; diff --git a/monop/prop.c b/monop/prop.c index 916129ad..73c3152b 100644 --- a/monop/prop.c +++ b/monop/prop.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -64,7 +64,7 @@ void add_list(plr, head, op_sqr) int plr; OWN **head; - int op_sqr; + int op_sqr; { int val; OWN *tp, *last_tp; diff --git a/monop/trade.c b/monop/trade.c index ef5d9f80..4317fe10 100644 --- a/monop/trade.c +++ b/monop/trade.c @@ -1,4 +1,4 @@ -/* $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 @@ -34,7 +34,7 @@ #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 */ @@ -103,7 +103,7 @@ over: */ static void get_list(struct_no, play_no) - int struct_no, play_no; + int struct_no, play_no; { int sn, pn; PLAY *pp; @@ -156,7 +156,7 @@ once_more: */ static int set_list(the_list) - OWN *the_list; + OWN *the_list; { int i; OWN *op; @@ -216,7 +216,7 @@ do_trade() */ static void move_em(from, to) - TRADE *from, *to; + TRADE *from, *to; { PLAY *pl_fr, *pl_to; OWN *op; -- cgit v1.2.3-56-ge451