From 5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Apr 2012 14:58:33 +0200 Subject: Updated following packages: bigreqsproto-1.1.2 fontsproto-2.1.2 recordproto-1.14.2 scrnsaverproto-1.2.2 xcmiscproto-1.2.2 libXt-1.1.3 xhost-1.0.5 kbproto-1.0.6 libXrender-0.9.7 libxkbfile-1.0.8 freetype-2.4.9 libXaw-1.0.10 libXpm-3.5.10 xproto-7.0.23 --- libXpm/src/scan.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'libXpm/src/scan.c') diff --git a/libXpm/src/scan.c b/libXpm/src/scan.c index d2780a1ee..54c8da502 100644 --- a/libXpm/src/scan.c +++ b/libXpm/src/scan.c @@ -53,7 +53,7 @@ * minus \ and " for string compat * and ? to avoid ANSI trigraphs. */ -static char *printable = +static const char *printable = " .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjklzxcvbnmMNBVCZ\ ASDFGHJKLPIUYTREWQ!~^/()_`'][{}|"; @@ -111,8 +111,8 @@ LFUNC(MSWGetImagePixels, int, (Display *d, XImage *image, unsigned int width, LFUNC(ScanTransparentColor, int, (XpmColor *color, unsigned int cpp, XpmAttributes *attributes)); -LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors, - unsigned int ncolors, +LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors, + unsigned int ncolors, Pixel *pixels, unsigned int mask, unsigned int cpp, XpmAttributes *attributes)); @@ -244,7 +244,7 @@ XpmCreateXpmImageFromImage( if (!pmap.pixelindex) RETURN(XpmNoMemory); - if (pmap.size >= UINT_MAX / sizeof(Pixel)) + if (pmap.size >= UINT_MAX / sizeof(Pixel)) RETURN(XpmNoMemory); pmap.pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * pmap.size); @@ -273,10 +273,10 @@ XpmCreateXpmImageFromImage( /* * 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) { @@ -433,8 +433,8 @@ ScanOtherColors( #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; @@ -559,10 +559,10 @@ ScanOtherColors( #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 +#endif color->c_color = (char *) xpmstrdup(buf); } if (!color->c_color) { @@ -589,7 +589,7 @@ ScanOtherColors( * level. */ -static unsigned long Const low_bits_table[] = { +static unsigned long const low_bits_table[] = { 0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, @@ -924,15 +924,15 @@ AGetImagePixels ( unsigned int x, y; unsigned char *pixels; XImage *tmp_img; - + pixels = XpmMalloc ((((width+15)>>4)<<4)*sizeof (*pixels)); if (pixels == NULL) return XpmNoMemory; - + tmp_img = AllocXImage ((((width+15)>>4)<<4), 1, image->rp->BitMap->Depth); if (tmp_img == NULL) CLEAN_UP (XpmNoMemory); - + iptr = pmap->pixelindex; for (y = 0; y < height; ++y) { @@ -943,7 +943,7 @@ AGetImagePixels ( CLEAN_UP (XpmNoMemory); } } - + CLEAN_UP (XpmSuccess); } -- cgit v1.2.3