Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!sri-spam!ames!sdcsvax!ucbvax!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: color fix to clients/bitmap/bitmap.c Message-ID: <870923101137.4.RWS@KILLINGTON.LCS.MIT.EDU> Date: Wed, 23-Sep-87 10:11:00 EDT Article-I.D.: KILLINGT.870923101137.4.RWS Posted: Wed Sep 23 10:11:00 1987 Date-Received: Sat, 26-Sep-87 02:44:29 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 63 The following diffs should stop bitmap from dumping core when specifying colors on a color screen: *** /tmp/,RCSt1015165 Wed Sep 23 10:04:37 1987 --- bitmap.c Wed Sep 23 09:31:07 1987 *************** *** 1,5 **** #ifndef lint ! static char *rcsid_bitmap_c = "$Header: bitmap.c,v 1.12 87/09/11 23:19:52 sun Exp $"; #endif #include --- 1,5 ---- #ifndef lint ! static char *rcsid_bitmap_c = "$Header: bitmap.c,v 1.14 87/09/23 09:30:32 rws Exp $"; #endif #include *************** *** 380,400 **** XAllocColorCells(d, cmap, FALSE, masks, high_color ? 2 : 1, &background, 1)) { bdef.pixel = background; ! XStoreColor(&bdef); invertplane = masks[0]; if (high_color) { highlightplane = masks[1]; hdef.pixel = background | highlightplane; ! XStoreColor(&hdef); hdef.pixel |= invertplane; ! XStoreColor(&hdef); } else highlightplane = invertplane; fdef.pixel = foreground = background | invertplane; ! XStoreColor(&fdef); } if (brdr_color && XParseColor(d, cmap, brdr_color, &bdef) && ! XAllocColor(&bdef)) border = bdef.pixel; } --- 380,400 ---- XAllocColorCells(d, cmap, FALSE, masks, high_color ? 2 : 1, &background, 1)) { bdef.pixel = background; ! XStoreColor(d, cmap, &bdef); invertplane = masks[0]; if (high_color) { highlightplane = masks[1]; hdef.pixel = background | highlightplane; ! XStoreColor(d, cmap, &hdef); hdef.pixel |= invertplane; ! XStoreColor(d, cmap, &hdef); } else highlightplane = invertplane; fdef.pixel = foreground = background | invertplane; ! XStoreColor(d, cmap, &fdef); } if (brdr_color && XParseColor(d, cmap, brdr_color, &bdef) && ! XAllocColor(d, cmap, &bdef)) border = bdef.pixel; }