16 |
|
* except there is no color mapping, since the tm library is used. |
17 |
|
*/ |
18 |
|
|
19 |
+ |
#include <string.h> |
20 |
+ |
|
21 |
|
#include "standard.h" |
22 |
|
#include "color.h" |
23 |
|
/* histogram resolution */ |
78 |
|
/* partition color space */ |
79 |
|
cut(ctree, 0, CLRCUBE, 0, ncolors); |
80 |
|
/* clear histogram */ |
81 |
< |
bzero((void *)histo, sizeof(histo)); |
81 |
> |
memset((void *)histo, '\0', sizeof(histo)); |
82 |
|
/* return number of colors used */ |
83 |
|
return(ncolors); |
84 |
|
} |
154 |
|
} |
155 |
|
/* split box */ |
156 |
|
*tree = split(box); |
157 |
< |
bcopy((void *)box, (void *)kb, sizeof(kb)); |
157 |
> |
memcpy((void *)kb, (void *)box, sizeof(kb)); |
158 |
|
/* do left (lesser) branch */ |
159 |
|
kb[prim(*tree)][1] = part(*tree); |
160 |
|
cut(tree+(1<<level), level+1, kb, c0, (c0+c1)>>1); |