--- ray/src/hd/sm_qtree.c 2003/04/23 00:52:34 3.15 +++ ray/src/hd/sm_qtree.c 2003/06/30 14:59:12 3.17 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: sm_qtree.c,v 3.15 2003/04/23 00:52:34 greg Exp $"; +static const char RCSid[] = "$Id: sm_qtree.c,v 3.17 2003/06/30 14:59:12 schorsch Exp $"; #endif /* * sm_qtree.c: adapted from octree.c from radiance code @@ -10,6 +10,8 @@ static const char RCSid[] = "$Id: sm_qtree.c,v 3.15 20 * 7/28/85 */ +#include + #include "standard.h" #include "sm_flag.h" #include "sm_geom.h" @@ -19,7 +21,7 @@ static const char RCSid[] = "$Id: sm_qtree.c,v 3.15 20 QUADTREE *quad_block[QT_MAX_BLK]; /* our quadtree */ static QUADTREE quad_free_list = EMPTY; /* freed octree nodes */ static QUADTREE treetop = 0; /* next free node */ -int4 *quad_flag= NULL; /* quadtree flags */ +int32 *quad_flag= NULL; /* quadtree flags */ qtremovelast(qt,id) @@ -52,7 +54,7 @@ qtAlloc() /* allocate a quadtree */ error(SYSTEM,"qtAlloc(): Unable to allocate memory\n"); /* Realloc the per/node flags */ - quad_flag = (int4 *)realloc((void *)quad_flag, + quad_flag = (int32 *)realloc((void *)quad_flag, (QT_BLOCK(freet)+1)*((QT_BLOCK_SIZE+7)>>3)); if (quad_flag == NULL) error(SYSTEM,"qtAlloc(): Unable to allocate memory\n"); @@ -68,7 +70,8 @@ qtClearAllFlags() /* clear all quadtree branch flags return; /* Clear the node flags*/ - bzero((char *)quad_flag, (QT_BLOCK(treetop-4)+1)*((QT_BLOCK_SIZE+7)>>3)); + memset((char *)quad_flag, '\0', + (QT_BLOCK(treetop-4)+1)*((QT_BLOCK_SIZE+7)>>3)); /* Clear set flags */ qtclearsetflags(); }