Small changes due to "bugs" in the C compiler used by BBN.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 4 Feb 1987 17:48:52 +0000 (17:48 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 4 Feb 1987 17:48:52 +0000 (17:48 +0000)
v7/src/microcode/bitstr.c
v7/src/microcode/string.c

index 8a4ca3617935e2860f38de209ca091182ceed497..cfa7e21a09c1bb314291f6dece38192ecd604c31 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/bitstr.c,v 9.21 1987/01/22 14:29:24 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/bitstr.c,v 9.22 1987/02/04 17:47:44 jinx Exp $
 
    Bit string primitives. 
 
@@ -487,11 +487,12 @@ copy_bits( source, source_offset, destination, destination_offset, nbits)
              nbits = 0;
            }
          else
-           {
+           { Pointer temp;
              long mask;
 
              mask = low_mask( head);
-             *destination++ = ((*source++ & mask) | (*destination & ~mask));
+             temp = *destination;
+             *destination++ = ((*source++ & mask) | (temp & ~mask));
              nbits -= head;
            }
        }
@@ -529,12 +530,13 @@ copy_bits( source, source_offset, destination, destination_offset, nbits)
        {
          long mask1, mask2;
 
-         {
+         { Pointer temp;
            long mask;
 
            mask = low_mask( head);
+           temp = *destination;
            *destination++ =
-             (((*source >> offset1) & mask) | (*destination & ~mask));
+             (((*source >> offset1) & mask) | (temp & ~mask));
          }
          nbits -= head;
          mask1 = low_mask( offset1);
index f85d4bfaea34680e0b5b7f123c0357c6eeee1358..8fa45fd6c058086ee9e9abfa42dbb536db3f5a16 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/string.c,v 9.20 1987/01/21 20:27:56 jinx Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/string.c,v 9.21 1987/02/04 17:48:52 jinx Exp $ */
 
 /* String primitives. */
 
@@ -401,8 +401,9 @@ Built_In_Primitive (Prim_Substring_Less, 6, "SUBSTRING<?")
 }
 
 #define substring_modification_prefix()                                \
-  long start, end, length;                                     \
-  char *scan;                                                  \
+  long start, end;                                             \
+  fast long length;                                            \
+  fast char *scan, temp;                                       \
   Primitive_3_Args ();                                         \
                                                                \
   guarantee_string_arg_1 ();                                   \
@@ -422,7 +423,9 @@ Built_In_Primitive(Prim_Substring_Upcase, 3, "SUBSTRING-UPCASE!")
   substring_modification_prefix ();
 
   while (length-- > 0)
-    *scan++ = (char_upcase (*scan));
+  { temp = *scan;
+    *scan++ = (char_upcase (temp));
+  }
   return (NIL);
 }
 
@@ -431,7 +434,9 @@ Built_In_Primitive(Prim_Substring_Downcase, 3, "SUBSTRING-DOWNCASE!")
   substring_modification_prefix ();
 
   while (length-- > 0)
-    *scan++ = (char_downcase (*scan));
+  { temp = *scan;
+    *scan++ = (char_downcase (temp));
+  }
   return (NIL);
 }
 \f