aboutsummaryrefslogtreecommitdiff
path: root/libXpm/src/create.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 14:58:33 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 14:58:33 +0200
commit5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (patch)
treec10939819ba1167cdc905a0c105c7ae4091abbc3 /libXpm/src/create.c
parent67326634496ef21b4acbf4cef2f05040d34aef9b (diff)
downloadvcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.tar.gz
vcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.tar.bz2
vcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.zip
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
Diffstat (limited to 'libXpm/src/create.c')
-rw-r--r--libXpm/src/create.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libXpm/src/create.c b/libXpm/src/create.c
index 7c75a4211..98678d8f3 100644
--- a/libXpm/src/create.c
+++ b/libXpm/src/create.c
@@ -219,9 +219,9 @@ typedef struct {
} CloseColor;
static int
-closeness_cmp(Const void *a, Const void *b)
+closeness_cmp(const void *a, const void *b)
{
- CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b;
+ const CloseColor *x = (const CloseColor *) a, *y = (const CloseColor *) b;
/* cast to int as qsort requires */
return (int) (x->closeness - y->closeness);
@@ -309,17 +309,17 @@ SetCloseColor(
* occurred, so we try the next closest color, and so on, until no more
* colors are within closeness of the target. If we knew that the
* colormap had changed, we could skip this sequence.
- *
+ *
* If _none_ of the colors within closeness of the target can be allocated,
* then we can finally be pretty sure that the colormap has actually
* changed. In this case we try to allocate the original color (again),
* then try the closecolor stuff (again)...
- *
+ *
* In theory it would be possible for an infinite loop to occur if another
* process kept changing the colormap every time we sorted it, so we set
* a maximum on the number of iterations. After this many tries, we use
* XGrabServer() to ensure that the colormap remains unchanged.
- *
+ *
* This approach gives particularly bad worst case performance - as many as
* <MaximumIterations> colormap reads and sorts may be needed, and as
* many as <MaximumIterations> * <ColormapSize> attempted allocations
@@ -816,7 +816,7 @@ XpmCreateImageFromXpmImage(
ErrorStatus = XpmSuccess;
- if (image->ncolors >= UINT_MAX / sizeof(Pixel))
+ if (image->ncolors >= UINT_MAX / sizeof(Pixel))
return (XpmNoMemory);
/* malloc pixels index tables */
@@ -1028,7 +1028,7 @@ LFUNC(_putbits, void, (register char *src, int dstoffset,
LFUNC(_XReverse_Bytes, int, (register unsigned char *bpt, register unsigned int nb));
-static unsigned char Const _reverse_byte[0x100] = {
+static unsigned char const _reverse_byte[0x100] = {
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
@@ -1146,9 +1146,9 @@ xpm_znormalizeimagebits(
}
}
-static unsigned char Const _lomask[0x09] = {
+static unsigned char const _lomask[0x09] = {
0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff};
-static unsigned char Const _himask[0x09] = {
+static unsigned char const _himask[0x09] = {
0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00};
static void
@@ -1692,7 +1692,7 @@ APutImagePixels (
unsigned char *array;
XImage *tmp_img;
BOOL success = FALSE;
-
+
array = XpmMalloc ((((width+15)>>4)<<4)*sizeof (*array));
if (array != NULL)
{
@@ -1711,7 +1711,7 @@ APutImagePixels (
}
XpmFree (array);
}
-
+
if (!success)
{
for (y = 0; y < height; ++y)
@@ -1890,7 +1890,7 @@ PutPixel16MSB(
unsigned long pixel)
{
unsigned char *addr;
-
+
if(x < 0 || y < 0)
return 0;
@@ -1908,7 +1908,7 @@ PutPixel16LSB(
unsigned long pixel)
{
unsigned char *addr;
-
+
if(x < 0 || y < 0)
return 0;
@@ -2092,7 +2092,7 @@ xpmParseDataAndCreate(
xpmGetCmt(data, &colors_cmt);
/* malloc pixels index tables */
- if (ncolors >= UINT_MAX / sizeof(Pixel))
+ if (ncolors >= UINT_MAX / sizeof(Pixel))
RETURN(XpmNoMemory);
image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors);