--- ray/src/hd/rhd_ctab.c 1997/11/19 18:01:03 3.1 +++ ray/src/hd/rhd_ctab.c 2003/06/30 14:59:11 3.4 @@ -1,9 +1,6 @@ -/* Copyright (c) 1997 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rhd_ctab.c,v 3.4 2003/06/30 14:59:11 schorsch Exp $"; #endif - /* * Allocate and control dynamic color table. * @@ -19,6 +16,8 @@ static char SCCSid[] = "$SunId$ SGI"; * except there is no color mapping, since the tm library is used. */ +#include + #include "standard.h" #include "color.h" /* histogram resolution */ @@ -65,9 +64,9 @@ int ncolors; return(0); /* free old tables */ if (clrtab != NULL) - free((char *)clrtab); + free((void *)clrtab); if (ctree != NULL) - free((char *)ctree); + free((void *)ctree); /* get new tables */ for (treesize = 1; treesize < ncolors; treesize <<= 1) ; @@ -79,7 +78,7 @@ int ncolors; /* partition color space */ cut(ctree, 0, CLRCUBE, 0, ncolors); /* clear histogram */ - bzero((char *)histo, sizeof(histo)); + memset((void *)histo, '\0', sizeof(histo)); /* return number of colors used */ return(ncolors); } @@ -155,7 +154,7 @@ int c0, c1; } /* split box */ *tree = split(box); - bcopy((char *)box, (char *)kb, sizeof(kb)); + memcpy((void *)kb, (void *)box, sizeof(kb)); /* do left (lesser) branch */ kb[prim(*tree)][1] = part(*tree); cut(tree+(1<>1);