BSD 4_3 release
[unix-history] / usr / src / games / battlestar / room.c
index e0c1a8c..e0449f3 100644 (file)
@@ -1,5 +1,11 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California,
+ * All rights reserved.  Redistribution permitted subject to
+ * the terms of the Berkeley Software License Agreement.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)room.c     1.1 %G%";
+static char sccsid[] = "@(#)room.c     1.3 4/24/85";
 #endif
 
 #include "externs.h"
 #endif
 
 #include "externs.h"
@@ -11,7 +17,7 @@ writedes()
        register c;
 
        printf("\n\t%s\n", location[position].name);
        register c;
 
        printf("\n\t%s\n", location[position].name);
-       if (beenthere[position]++ < 3) {
+       if (beenthere[position] < 3) {
                compass = NORTH;
                for (p = location[position].desc; c = *p++;)
                        if (c != '-' && c != '*' && c != '+')
                compass = NORTH;
                for (p = location[position].desc; c = *p++;)
                        if (c != '-' && c != '*' && c != '+')
@@ -26,13 +32,13 @@ writedes()
 
 printobjs()
 {
 
 printobjs()
 {
+       register unsigned int *p = location[position].objects;
        register n;
 
        printf("\n");
        register n;
 
        printf("\n");
-       for (n = 0; n < NUMOFOBJECTS; n++) {
-               if (testbit(location[position].objects, n) && objdes[n])
-                       printf("%s\n", objdes[n]);
-       }
+       for (n = 0; n < NUMOFOBJECTS; n++)
+               if (testbit(p, n) && objdes[n])
+                       puts(objdes[n]);
 }
 
 whichway(here)
 }
 
 whichway(here)