]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - monop/prop.c
add a 'down' key to tetris, defaulting to 'n'. it move the block down
[bsdgames-darwin.git] / monop / prop.c
index f85c87f979db5cfdf02835d120ba00050ce289ab..0b6bef81dd0eb2efa1606e4281503882c380e460 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop.c,v 1.16 2008/02/23 22:17:02 dholland Exp $       */
+/*     $NetBSD: prop.c,v 1.20 2012/06/19 05:35:32 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.16 2008/02/23 22:17:02 dholland Exp $");
+__RCSID("$NetBSD: prop.c,v 1.20 2012/06/19 05:35:32 dholland Exp $");
 #endif
 #endif /* not lint */
 
 #include <stdlib.h>
-#include "monop.ext"
+
+#include "monop.h"
 
 static int value(SQUARE *);
 
@@ -48,9 +49,7 @@ static int value(SQUARE *);
  * appropriate flags.
  */
 void
-buy(playernum, sqrp)
-       int playernum;
-       SQUARE *sqrp;
+buy(int playernum, SQUARE *sqrp)
 {
        trading = FALSE;
        sqrp->owner = playernum;
@@ -61,16 +60,13 @@ buy(playernum, sqrp)
  *     This routine adds an item to the list.
  */
 void
-add_list(plr, head, op_sqr)
-       int plr;
-       OWN **head;
-       int op_sqr;
+add_list(int plr, OWN **head, int op_sqr)
 {
        int val;
        OWN *tp, *last_tp;
        OWN *op;
 
-       op = (OWN *)calloc(1, sizeof (OWN));
+       op = calloc(1, sizeof (OWN));
        if (op == NULL)
                errx(1, "out of memory");
        op->sqr = &board[op_sqr];
@@ -96,10 +92,7 @@ add_list(plr, head, op_sqr)
  *     This routine deletes property from the list.
  */
 void
-del_list(plr, head, op_sqr)
-       int plr;
-       OWN **head;
-       short op_sqr;
+del_list(int plr, OWN **head, short op_sqr)
 {
        OWN *op, *last_op;
 
@@ -135,8 +128,7 @@ del_list(plr, head, op_sqr)
  * given square.
  */
 static int
-value(sqp)
-       SQUARE *sqp;
+value(SQUARE *sqp)
 {
        int sqr;
 
@@ -162,7 +154,7 @@ value(sqp)
  * This routine accepts bids for the current piece of property.
  */
 void
-bid()
+bid(void)
 {
        static bool in[MAX_PL];
        int i, num_in, cur_max;
@@ -216,8 +208,7 @@ bid()
  * of given player.
  */
 int
-prop_worth(plp)
-       PLAY *plp;
+prop_worth(PLAY *plp)
 {
        OWN *op;
        int worth;