Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!mit-eddie!media-lab!halazar From: halazar@media-lab.MEDIA.MIT.EDU (Michael Halle) Newsgroups: comp.windows.x Subject: Re: Help compiling XView 2.0 on decstation 3100 (w/patches) Message-ID: <4533@media-lab.MEDIA.MIT.EDU> Date: 17 Dec 90 21:55:52 GMT References: <1990Dec17.091734@dino.bellcore.com> Organization: MIT Media Lab, Cambridge, MA Lines: 72 In-reply-to: dana@dino.bellcore.com's message of 16 Dec 90 12:47:34 GMT Here are a couple of other patches that I had to apply to get Xview to work on a Decstation 5000. I hate the idea of passing out a lot of unofficial patches to Xview, but it took me a long time to track one of these down and I don't see a public patch collection showing up anywhere. So here goes. The first patch is to fix a slider core dump...looks like something got broken in the 2D->3D code transition. Pretty generic fix, not machine specific. The file is lib/libolgx/ol_slider.c . The second bug was much more sinister. My 3D-look panels were all coming up monochromatic and broken-looking. 2D was fine. Also, menus would work only the first time, then would come up blank. It turned out that the colormap was not being properly initialized because the cmap code uses a bunch of single bit bitfields for status . These bits were, unfortunately, declared as "int :1". Looks like some interesting sign error happened when a bit got set: where's the sign bit in a one bit signed field? Anyway, I changed the declaration to be "unsigned int :1" and all was well. The file is lib/libxvin/color/cms_impl.h . Patches follow. Enjoy. --Michael Halle MIT Media Lab Spatial Imaging Group mhalle@media-lab.media.mit.edu *** lib/libolgx/ol_slider.c Fri Nov 23 02:07:34 1990 --- lib/libolgx/ol_slider.c.~1~ Fri Nov 23 01:29:48 1990 *************** *** 318,325 **** /* * erase the old slider */ ! XFillRectangle(info->dpy, win, info->three_d ? info->gc_rec[OLGX_BG1]->gc ! : info->gc_rec[OLGX_WHITE]->gc, xstart, y, xwidth, info->slider_height + 1); --- 318,324 ---- /* * erase the old slider */ ! XFillRectangle(info->dpy, win, info->gc_rec[OLGX_BG1]->gc, xstart, y, xwidth, info->slider_height + 1); *** lib/libxvin/color/cms_impl.h Fri Nov 23 07:01:20 1990 --- lib/libxvin/color/cms_impl.h.~1~ Fri Nov 23 07:00:37 1990 *************** *** 43,49 **** #define STATUS(cms, field) ((cms)->status_bits.field) #define STATUS_SET(cms, field) STATUS(cms, field) = TRUE #define STATUS_RESET(cms, field) STATUS(cms, field) = FALSE ! #define BIT_FIELD(field) unsigned int field : 1 /* *********************************************************************** --- 43,49 ---- #define STATUS(cms, field) ((cms)->status_bits.field) #define STATUS_SET(cms, field) STATUS(cms, field) = TRUE #define STATUS_RESET(cms, field) STATUS(cms, field) = FALSE ! #define BIT_FIELD(field) int field : 1 /* ***********************************************************************