From: Chris Hanson Date: Thu, 20 Apr 1989 04:33:52 +0000 (+0000) Subject: Fix bug: C range checks don't work the way I foolishly thought they X-Git-Tag: 20090517-FFI~12159 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b7504643924d25958fdffcf0eeb486e28dffb687;p=mit-scheme.git Fix bug: C range checks don't work the way I foolishly thought they did, but because C makes no distinction between booleans and integers, there was no error message to indicate that I was doing something wrong. --- diff --git a/v7/src/microcode/x11term.c b/v7/src/microcode/x11term.c index 14d6f287d..629c7c0ff 100644 --- a/v7/src/microcode/x11term.c +++ b/v7/src/microcode/x11term.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11term.c,v 1.1 1989/03/14 01:57:33 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11term.c,v 1.2 1989/04/20 04:33:52 cph Exp $ Copyright (c) 1989 Massachusetts Institute of Technology @@ -479,8 +479,8 @@ xterm_dump_rectangle (xt, x, y, width, height) } } if ((xt -> cursor_visible_p) && - (x_start <= (xt -> cursor_x) < x_end) && - (y_start <= (xt -> cursor_y) < y_end)) + ((x_start <= (xt -> cursor_x)) && ((xt -> cursor_x) < x_end)) && + ((y_start <= (xt -> cursor_y)) && ((xt -> cursor_y) < y_end))) xterm_draw_cursor (xt); } return; @@ -883,7 +883,7 @@ DEFINE_PRIMITIVE ("XTERM-WRITE-SUBSTRING!", Prim_xterm_write_substring, 7, 7, 0) WITH_CURSOR_PRESERVED (xt, ((y == (xt -> cursor_y)) && - (x <= (xt -> cursor_x) < (x + length))), + ((x <= (xt -> cursor_x)) && ((xt -> cursor_x) < (x + length)))), { XTERM_DRAW_CHARS (xt, x, y, char_start, length, (XTERM_HL_GC (xt, hl))); }); @@ -929,8 +929,8 @@ DEFINE_PRIMITIVE ("XTERM-CLEAR-RECTANGLE!", Prim_xterm_clear_rectangle, 6, 6, 0) } WITH_CURSOR_PRESERVED (xt, - ((start_x <= (xt -> cursor_x) < end_x) && - (start_y <= (xt -> cursor_y) < end_y)), + (((start_x <= (xt -> cursor_x)) && ((xt -> cursor_x) < end_x)) && + ((start_y <= (xt -> cursor_y)) && ((xt -> cursor_y) < end_y))), { if (hl == 0) XClearArea ((xt -> display), (xt -> window),