From 5eb792c7992946bb65822823a24eb406b15cb875 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Wed, 4 Feb 1987 17:48:52 +0000 Subject: [PATCH] Small changes due to "bugs" in the C compiler used by BBN. --- v7/src/microcode/bitstr.c | 12 +++++++----- v7/src/microcode/string.c | 15 ++++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/v7/src/microcode/bitstr.c b/v7/src/microcode/bitstr.c index 8a4ca3617..cfa7e21a0 100644 --- a/v7/src/microcode/bitstr.c +++ b/v7/src/microcode/bitstr.c @@ -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); diff --git a/v7/src/microcode/string.c b/v7/src/microcode/string.c index f85d4bfae..8fa45fd6c 100644 --- a/v7/src/microcode/string.c +++ b/v7/src/microcode/string.c @@ -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 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); } -- 2.25.1