summaryrefslogtreecommitdiffstats
path: root/monop/houses.c
diff options
context:
space:
mode:
authorsimonb <simonb@NetBSD.org>1999-08-21 10:40:03 +0000
committersimonb <simonb@NetBSD.org>1999-08-21 10:40:03 +0000
commite6fd9858739827671b4b260dd533f89f860a9fa7 (patch)
tree972e93ee56db748e5c589b841304a69ecc01bc25 /monop/houses.c
parentca104a29f1236b5c4ee454e8c132ed8518df7a27 (diff)
downloadbsdgames-darwin-e6fd9858739827671b4b260dd533f89f860a9fa7.tar.gz
bsdgames-darwin-e6fd9858739827671b4b260dd533f89f860a9fa7.tar.zst
bsdgames-darwin-e6fd9858739827671b4b260dd533f89f860a9fa7.zip
Convert to something resembling KNF.
Diffstat (limited to 'monop/houses.c')
-rw-r--r--monop/houses.c73
1 files changed, 37 insertions, 36 deletions
diff --git a/monop/houses.c b/monop/houses.c
index bda0ad7b..79a9703d 100644
--- a/monop/houses.c
+++ b/monop/houses.c
@@ -1,4 +1,4 @@
-/* $NetBSD: houses.c,v 1.4 1997/10/12 17:45:11 christos Exp $ */
+/* $NetBSD: houses.c,v 1.5 1999/08/21 10:40:03 simonb Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)houses.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: houses.c,v 1.4 1997/10/12 17:45:11 christos Exp $");
+__RCSID("$NetBSD: houses.c,v 1.5 1999/08/21 10:40:03 simonb Exp $");
#endif
#endif /* not lint */
@@ -58,12 +58,11 @@ static void list_cur __P((MON *));
void
buy_houses()
{
-
int num_mon;
- MON *mp;
- OWN *op;
- bool good,got_morg;
- int i,p;
+ MON *mp;
+ OWN *op;
+ bool good,got_morg;
+ int i,p;
over:
num_mon = 0;
@@ -103,7 +102,9 @@ over:
else {
names[num_mon++] = "done";
names[num_mon--] = 0;
- if ((p=getinp("Which property do you wish to buy houses for? ", names)) == num_mon)
+ if ((p = getinp(
+ "Which property do you wish to buy houses for? ",
+ names)) == num_mon)
return;
buy_h(monops[p]);
goto over;
@@ -112,15 +113,14 @@ over:
static void
buy_h(mnp)
-MON *mnp;
+ MON *mnp;
{
-
- int i;
- MON *mp;
- int price;
- short input[3],temp[3];
- int tot;
- PROP *pp;
+ int i;
+ MON *mp;
+ int price;
+ short input[3],temp[3];
+ int tot;
+ PROP *pp;
mp = mnp;
price = mp->h_cost * 50;
@@ -172,12 +172,11 @@ err: printf("That makes the spread too wide. Try again\n");
void
sell_houses()
{
-
- int num_mon;
- MON *mp;
- OWN *op;
- bool good;
- int p;
+ int num_mon;
+ MON *mp;
+ OWN *op;
+ bool good;
+ int p;
over:
num_mon = 0;
@@ -205,7 +204,9 @@ over:
else {
names[num_mon++] = "done";
names[num_mon--] = 0;
- if ((p=getinp("Which property do you wish to sell houses from? ", names)) == num_mon)
+ if ((p = getinp(
+ "Which property do you wish to sell houses from? ",
+ names)) == num_mon)
return;
sell_h(monops[p]);
notify();
@@ -215,15 +216,14 @@ over:
static void
sell_h(mnp)
-MON *mnp;
+ MON *mnp;
{
-
- int i;
- MON *mp;
- int price;
- short input[3],temp[3];
- int tot;
- PROP *pp;
+ int i;
+ MON *mp;
+ int price;
+ short input[3],temp[3];
+ int tot;
+ PROP *pp;
mp = mnp;
price = mp->h_cost * 25;
@@ -247,7 +247,9 @@ over:
input[i] = get_int(cur_prop);
temp[i] = pp->houses - input[i];
if (temp[i] < 0) {
- printf("That's too many. The most you can sell is %d\n", pp->houses);
+ printf(
+ "That's too many. The most you can sell is %d\n",
+ pp->houses);
goto over;
}
}
@@ -272,11 +274,10 @@ err: printf("That makes the spread too wide. Try again\n");
static void
list_cur(mp)
-MON *mp;
+ MON *mp;
{
-
- int i;
- SQUARE *sqp;
+ int i;
+ SQUARE *sqp;
for (i = 0; i < mp->num_in; i++) {
sqp = mp->sq[i];