X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71b59b447fbb112530576ca7a0bd0824709de886..80a24267cbc17d85e278e1f10cdfdaea12199639:/src/xpm/scan.c diff --git a/src/xpm/scan.c b/src/xpm/scan.c index f1b35d0e12..8660ff99ed 100644 --- a/src/xpm/scan.c +++ b/src/xpm/scan.c @@ -261,7 +261,7 @@ XpmCreateXpmImageFromImage(display, image, shapeimage, /* * scan shape mask if any */ - if (shapeimage) + if (shapeimage) { #ifndef FOR_MSW # ifndef AMIGA @@ -293,7 +293,7 @@ XpmCreateXpmImageFromImage(display, image, shapeimage, * */ - if (image) + if (image) { #ifndef FOR_MSW # ifndef AMIGA @@ -301,7 +301,7 @@ XpmCreateXpmImageFromImage(display, image, shapeimage, (image->byte_order == image->bitmap_bit_order)) ErrorStatus = GetImagePixels1(image, width, height, &pmap, storePixel); - else if (image->format == ZPixmap) + else if (image->format == ZPixmap) { if (image->bits_per_pixel == 8) ErrorStatus = GetImagePixels8(image, width, height, &pmap); @@ -309,19 +309,19 @@ XpmCreateXpmImageFromImage(display, image, shapeimage, ErrorStatus = GetImagePixels16(image, width, height, &pmap); else if (image->bits_per_pixel == 32) ErrorStatus = GetImagePixels32(image, width, height, &pmap); - } + } else ErrorStatus = GetImagePixels(image, width, height, &pmap); # else ErrorStatus = AGetImagePixels(image, width, height, &pmap, storePixel); # endif /* AMIGA */ - #else +#ifndef __VISAGECPP30__ ErrorStatus = MSWGetImagePixels(display, image, width, height, &pmap, storePixel); -/* calling convention all messed up OS/2 -- figure out later */ +#endif #endif @@ -506,7 +506,7 @@ ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes) return (XpmNoMemory); for (i = 0, i2 = mask, color = colors, xcolor = xcolors; - i < ncolors; i++, i2++, color++, xcolor++, pixels++) { + i < (unsigned)ncolors; i++, i2++, color++, xcolor++, pixels++) { if (!(s = color->string = (char *) XpmMalloc(cpp + 1))) { XpmFree(xcolors); @@ -549,7 +549,7 @@ ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes) } /* end 3.2 bc */ - for (i = 0, color = colors, xcolor = xcolors; i < ncolors; + for (i = 0, color = colors, xcolor = xcolors; i < (unsigned)ncolors; i++, color++, xcolor++) { /* look for related info from the attributes if any */ @@ -989,9 +989,18 @@ AGetImagePixels ( #else /* ndef FOR_MSW */ #ifdef __OS2__ -/* Visual Age cannot deal with old, non-ansi, code */ -static int -MSWGetImagePixels( + +#ifdef __VISAGECPP30__ +static int MSWGetImagePixels( + Display* display +, XImage* image +, unsigned int width +, unsigned int height +, PixelsMap* pmap +, int (*storeFunc) (Pixel, PixelsMap*, unsigned int*) +) +#else +static int MSWGetImagePixels( Display* display , XImage* image , unsigned int width @@ -999,6 +1008,8 @@ MSWGetImagePixels( , PixelsMap* pmap , int (*storeFunc) () ) +#endif + #else static int MSWGetImagePixels(display, image, width, height, pmap, storeFunc)