64 |
|
register unsigned char *p; |
65 |
|
register int i; |
66 |
|
|
67 |
< |
if (xr->image->depth > 8 | xr->ncolors != 0) |
67 |
> |
if ((xr->image->depth > 8) | (xr->ncolors != 0)) |
68 |
|
return(xr->ncolors); |
69 |
|
xr->pmap = (short *)malloc(256*sizeof(short)); |
70 |
|
if (xr->pmap == NULL) |
85 |
|
xr->cdefs[xr->ncolors].flags = DoRed|DoGreen|DoBlue; |
86 |
|
xr->pmap[*p] = xr->ncolors++; |
87 |
|
} |
88 |
< |
xr->cdefs = (XColor *)realloc((char *)xr->cdefs, |
88 |
> |
xr->cdefs = (XColor *)realloc((void *)xr->cdefs, |
89 |
|
xr->ncolors*sizeof(XColor)); |
90 |
|
if (xr->cdefs == NULL) |
91 |
|
return(0); |