-/* $NetBSD: morg.c,v 1.10 2004/01/27 20:30:30 jsm Exp $ */
+/* $NetBSD: morg.c,v 1.14 2008/02/20 05:08:46 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.10 2004/01/27 20:30:30 jsm Exp $");
+__RCSID("$NetBSD: morg.c,v 1.14 2008/02/20 05:08:46 dholland Exp $");
#endif
#endif /* not lint */
static short square[MAX_PRP+2];
-static int num_good,got_houses;
+static int num_good, got_houses;
static int set_mlist(void);
void
mortgage()
{
- int prop;
+ int propnum;
for (;;) {
if (set_mlist() == 0) {
m(square[0]);
return;
}
- prop = getinp("Which property do you want to mortgage? ",names);
- if (prop == num_good)
+ propnum = getinp("Which property do you want to mortgage? ",
+ names);
+ if (propnum == num_good)
return;
- m(square[prop]);
+ m(square[propnum]);
notify();
}
}
* This routine actually mortgages the property.
*/
static void
-m(prop)
- int prop;
+m(propnum)
+ int propnum;
{
int price;
- price = board[prop].cost/2;
- board[prop].desc->morg = TRUE;
+ price = board[propnum].cost/2;
+ board[propnum].desc->morg = TRUE;
printf("That got you $%d\n",price);
cur_p->money += price;
}
* to be unmortgaged.
*/
void
-unmortgage()
+unmortgage()
{
- int prop;
+ int propnum;
for (;;) {
if (set_umlist() == 0) {
unm(square[0]);
return;
}
- prop = getinp("Which property do you want to unmortgage? ",
+ propnum = getinp("Which property do you want to unmortgage? ",
names);
- if (prop == num_good)
+ if (propnum == num_good)
return;
- unm(square[prop]);
+ unm(square[propnum]);
}
}
* This routine actually unmortgages the property
*/
static void
-unm(prop)
- int prop;
+unm(propnum)
+ int propnum;
{
int price;
- price = board[prop].cost/2;
- board[prop].desc->morg = FALSE;
+ price = board[propnum].cost/2;
+ board[propnum].desc->morg = FALSE;
price += price/10;
printf("That cost you $%d\n",price);
cur_p->money -= price;