/*
* scan the image data
- *
+ *
* In case depth is 1 or bits_per_pixel is 4, 6, 8, 24 or 32 use optimized
* functions, otherwise use slower but sure general one.
- *
+ *
*/
if (image) {
#ifndef FOR_MSW
xpmRgbName rgbn[MAX_RGBNAMES];
#else
- xpmRgbName *rgbn = NULL;
-#endif
+ xpmRgbName *rgbn = NULL;
+#endif
int rgbn_max = 0;
unsigned int i, j, c, i2;
XpmColor *color;
return (XpmNoMemory);
for (i = 0, i2 = (mask ? i + 1 : i), color = colors, xcolor = xcolors;
- i < ncolors; i++, i2++, color++, xcolor++, pixels++) {
+ i < (unsigned int)ncolors; i++, i2++, color++, xcolor++, pixels++) {
if (!(s = color->string = (char *) XpmMalloc(cpp + 1))) {
XpmFree(xcolors);
xcolor->pixel = *pixels;
}
-#ifdef wx_msw
+#if defined(wx_msw) || defined(wx_pm)
XQueryColors(display, (Colormap *)colormap, xcolors, ncolors);
#else
XQueryColors(display, (Colormap)colormap, xcolors, ncolors);
}
/* end 3.2 bc */
- for (i = 0, color = colors, xcolor = xcolors; i < ncolors;
+ for (i = 0, color = colors, xcolor = xcolors; i < (unsigned int)ncolors;
i++, color++, xcolor++) {
/* look for related info from the attributes if any */
#ifndef FOR_MSW
sprintf(buf, "#%04X%04X%04X",
xcolor->red, xcolor->green, xcolor->blue);
-#else
+#else
sprintf(buf, "#%02x%02x%02x",
xcolor->red, xcolor->green, xcolor->blue);
#endif
iptr = pmap->pixelindex;
for (y = 0; y < height; y++) {
+#if !defined(__VISAGECPP__) /* fixme for OS/2 */
for (x = 0; x < width; x++, iptr++) {
/* bitmap must be selected !!! ??? */
pixel = GetPixel(*display, x, y);
if (storePixel(pixel, pmap, iptr))
return (XpmNoMemory);
}
+#endif
}
return (XpmSuccess);
}