BUGS IN XDIGIT
I discovered the following bugs (or "incompatibilities")
when I compiled and ran XGRASS 4.1 and xdigit under Dell
UNIX 2.2, X11R5 and Motif 1.1.4 on a Dell 466ME system.
The bug has been reported to grassbug@zorro.cecer.army.mil.
xdigit crashes and dumped core immediately after being
called from the command line. I traced this to the function
make_button() in src/xgrass/xdigit/panel.c. The crash was
occuring because the function did not check to make sure
that it had successfully retrieved a pixmap before going
ahead and using the pixmap. I added an if-statement
(as follows) to fix this crash:
if (pix1 != XmUNSPECIFIED_PIXMAP) /*DMJ*/
{
XtSetArg (wargs[n], XmNlabelType, XmPIXMAP); n++;
XtSetArg (wargs[n], XmNlabelPixmap, pix1); n++;
XtSetArg (wargs[n], XmNlabelInsensitivePixmap, pix1); n++;
}
This prevented the crash, but once xdigit came up its button
pixmaps were all screwed up. I traced this problem to the function
make_pixmaps() in the file src/xgrass/xdigit/make_pixmaps.c.
Apparently, the Xlib functions BitmapBitOrder() and ImageByteOrder()
work differently under Dell UNIX than on the xdigit development
system (a Sun, I assume). I commented out the "!" operators
(as follows) and this problem was solved:
image->bitmap_bit_order = /*DMJ ! */BitmapBitOrder (XtDisplay (w));
image->byte_order = /*DMJ ! */ImageByteOrder (XtDisplay (w));
---------------------------------+-----------------------------------------
David M. Johnson, GIS Consultant | 1302 The Oaks, Chapel Hill, NC 27514
and Software Engineer | 919-967-9727 (djohnson@rock.concert.net)