1 |
– |
/* Copyright (c) 1993 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Simple median-cut color quantization based on colortab.c |
6 |
|
*/ |
119 |
|
|
120 |
|
if (n != N) { /* get error propogation array */ |
121 |
|
if (N) { |
122 |
< |
free((char *)cerr); |
122 |
> |
free((void *)cerr); |
123 |
|
cerr = NULL; |
124 |
|
} |
125 |
|
if (n) |
337 |
|
if (nl[i][t] == i) { /* add to list */ |
338 |
|
nl[i][t++] = j; |
339 |
|
if (t % NBSIZ == 0) { /* enlarge list */ |
340 |
< |
if ((nnl = realloc(nl[i], t+NBSIZ)) == NULL) |
340 |
> |
if ((nnl = realloc((void *)nl[i], |
341 |
> |
t+NBSIZ)) == NULL) |
342 |
|
t--; |
343 |
|
else |
344 |
|
nl[i] = (BYTE *)nnl; |