date and time created 88/10/19 19:55:11 by bostic
[unix-history] / usr / src / games / monop / prop.c
index 734c7a0..d01323d 100644 (file)
@@ -1,9 +1,28 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)prop.c     5.1 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)prop.c     5.5 (Berkeley) %G%";
+#endif /* not lint */
 
 # include      "monop.ext"
 
 
 # include      "monop.ext"
 
+extern char *calloc();
+
 /*
  *     This routine deals with buying property, setting all the
  * appropriate flags.
 /*
  *     This routine deals with buying property, setting all the
  * appropriate flags.
@@ -29,7 +48,7 @@ int   op_sqr; {
        MON     *mp;
        OWN     *op;
 
        MON     *mp;
        OWN     *op;
 
-       op = calloc(1, sizeof (OWN));
+       op = (OWN *)calloc(1, sizeof (OWN));
        op->sqr = &board[op_sqr];
        val = value(op->sqr);
        last_tp = NULL;
        op->sqr = &board[op_sqr];
        val = value(op->sqr);
        last_tp = NULL;
@@ -96,7 +115,7 @@ reg SQUARE   *sqp; {
        switch (sqp->type) {
          case SAFE:
                return 0;
        switch (sqp->type) {
          case SAFE:
                return 0;
-         case SPEC:
+         default:              /* Specials, etc */
                return 1;
          case UTIL:
                if (sqr == 12)
                return 1;
          case UTIL:
                if (sqr == 12)
@@ -106,7 +125,7 @@ reg SQUARE  *sqp; {
          case RR:
                return 4 + sqr/10;
          case PRPTY:
          case RR:
                return 4 + sqr/10;
          case PRPTY:
-               return 8 + (PROP *)(sqp->desc) - prop;
+               return 8 + (sqp->desc) - prop;
        }
 }
 /*
        }
 }
 /*
@@ -130,7 +149,7 @@ bid() {
                i = ++i % num_play;
                if (in[i]) {
                        do {
                i = ++i % num_play;
                if (in[i]) {
                        do {
-                               sprintf(buf, "%s: ", name_list[i]);
+                               (void)sprintf(buf, "%s: ", name_list[i]);
                                cur_bid = get_int(buf);
                                if (cur_bid == 0) {
                                        in[i] = FALSE;
                                cur_bid = get_int(buf);
                                if (cur_bid == 0) {
                                        in[i] = FALSE;