diff -up lesstif-0.95.2/lib/Xm-2.1/Xpmcreate.c.cutpaste64 lesstif-0.95.2/lib/Xm-2.1/Xpmcreate.c --- lesstif-0.95.2/lib/Xm-2.1/Xpmcreate.c.cutpaste64 2007-09-12 22:27:07.000000000 +0200 +++ lesstif-0.95.2/lib/Xm-2.1/Xpmcreate.c 2009-07-28 11:32:07.000000000 +0200 @@ -179,9 +179,7 @@ LFUNC(PutImagePixels1, void, (XImage *im LFUNC(PutPixel1, int, (XImage *ximage, int x, int y, unsigned long pixel)); LFUNC(PutPixel, int, (XImage *ximage, int x, int y, unsigned long pixel)); -#if !defined(WORD64) && !defined(LONG64) LFUNC(PutPixel32, int, (XImage *ximage, int x, int y, unsigned long pixel)); -#endif LFUNC(PutPixel32MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); LFUNC(PutPixel32LSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); LFUNC(PutPixel16MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); @@ -1326,7 +1324,6 @@ PutImagePixels(image, width, height, pix * write pixels into a 32-bits Z image data structure */ -#if !defined(WORD64) && !defined(LONG64) /* this item is static but deterministic so let it slide; doesn't * hurt re-entrancy of this library. Note if it is actually const then would * be OK under rules of ANSI-C but probably not C++ which may not @@ -1334,8 +1331,6 @@ PutImagePixels(image, width, height, pix */ static unsigned long byteorderpixel = MSBFirst << 24; -#endif - /* WITHOUT_SPEEDUPS is a flag to be turned on if you wish to use the original 3.2e code - by default you get the speeded-up version. @@ -1361,16 +1356,13 @@ PutImagePixels32(image, width, height, p data = (unsigned char *) image->data; iptr = pixelindex; -#if !defined(WORD64) && !defined(LONG64) if (*((char *) &byteorderpixel) == image->byte_order) { for (y = 0; y < height; y++) for (x = 0; x < width; x++, iptr++) { addr = &data[ZINDEX32(x, y, image)]; - *((unsigned long *) addr) = pixels[*iptr]; + *((unsigned int *) addr) = pixels[*iptr]; } - } else -#endif - if (image->byte_order == MSBFirst) + } else if (image->byte_order == MSBFirst) for (y = 0; y < height; y++) for (x = 0; x < width; x++, iptr++) { addr = &data[ZINDEX32(x, y, image)]; @@ -1398,21 +1390,18 @@ PutImagePixels32(image, width, height, p data = (unsigned char *) image->data; iptr = pixelindex; -#if !defined(WORD64) && !defined(LONG64) if (*((char *) &byteorderpixel) == image->byte_order) { for (y = 0; y < height; y++) { data_ptr = data; max_data = data_ptr + (width << 2); while (data_ptr < max_data) { - *((unsigned long *) data_ptr) = pixels[*(iptr++)]; + *((unsigned int *) data_ptr) = pixels[*(iptr++)]; data_ptr += (1 << 2); } data += bpl; } - } else -#endif - if (image->byte_order == MSBFirst) + } else if (image->byte_order == MSBFirst) for (y = 0; y < height; y++) { data_ptr = data; max_data = data_ptr + (width << 2); @@ -1879,7 +1868,6 @@ PutPixel(ximage, x, y, pixel) return 1; } -#if !defined(WORD64) && !defined(LONG64) static int PutPixel32(ximage, x, y, pixel) register XImage *ximage; @@ -1893,10 +1881,9 @@ PutPixel32(ximage, x, y, pixel) return 0; addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)]; - *((unsigned long *)addr) = pixel; + *((unsigned int *)addr) = pixel; return 1; } -#endif static int PutPixel32MSB(ximage, x, y, pixel) @@ -2211,15 +2198,12 @@ xpmParseDataAndCreate(display, data, ima else ximage->f.put_pixel = PutPixel16LSB; else if (ximage->bits_per_pixel == 32) -#if !defined(WORD64) && !defined(LONG64) if (*((char *)&byteorderpixel) == ximage->byte_order) ximage->f.put_pixel = PutPixel32; + else if (ximage->bitmap_bit_order == MSBFirst) + ximage->f.put_pixel = PutPixel32MSB; else -#endif - if (ximage->bitmap_bit_order == MSBFirst) - ximage->f.put_pixel = PutPixel32MSB; - else - ximage->f.put_pixel = PutPixel32LSB; + ximage->f.put_pixel = PutPixel32LSB; else if ((ximage->bits_per_pixel | ximage->depth) == 1) ximage->f.put_pixel = PutPixel1; else diff -up lesstif-0.95.2/lib/Xm-2.1/Xpmscan.c.cutpaste64 lesstif-0.95.2/lib/Xm-2.1/Xpmscan.c --- lesstif-0.95.2/lib/Xm-2.1/Xpmscan.c.cutpaste64 2007-09-12 22:27:07.000000000 +0200 +++ lesstif-0.95.2/lib/Xm-2.1/Xpmscan.c 2009-07-28 11:32:07.000000000 +0200 @@ -763,9 +763,7 @@ GetImagePixels(image, width, height, pma * scan pixels of a 32-bits Z image data structure */ -#if !defined(WORD64) && !defined(LONG64) static unsigned long byteorderpixel = MSBFirst << 24; -#endif static int GetImagePixels32(image, width, height, pmap) @@ -786,20 +784,17 @@ GetImagePixels32(image, width, height, p iptr = pmap->pixelindex; depth = image->depth; lbt = low_bits_table[depth]; -#if !defined(WORD64) && !defined(LONG64) if (*((char *) &byteorderpixel) == image->byte_order) { for (y = 0; y < height; y++) for (x = 0; x < width; x++, iptr++) { addr = &data[ZINDEX32(x, y, image)]; - pixel = *((unsigned long *) addr); + pixel = *((unsigned int *) addr); if (depth != 32) pixel &= lbt; if (storePixel(pixel, pmap, iptr)) return (XpmNoMemory); } - } else -#endif - if (image->byte_order == MSBFirst) + } else if (image->byte_order == MSBFirst) for (y = 0; y < height; y++) for (x = 0; x < width; x++, iptr++) { addr = &data[ZINDEX32(x, y, image)];