--- ray/src/hd/sm.c 2003/02/22 02:07:25 3.16 +++ ray/src/hd/sm.c 2003/06/30 14:59:12 3.19 @@ -1,9 +1,12 @@ #ifndef lint -static const char RCSid[] = "$Id: sm.c,v 3.16 2003/02/22 02:07:25 greg Exp $"; +static const char RCSid[] = "$Id: sm.c,v 3.19 2003/06/30 14:59:12 schorsch Exp $"; #endif /* * sm.c */ + +#include + #include "standard.h" #include "sm_flag.h" #include "sm_list.h" @@ -257,7 +260,7 @@ int resize; #endif if (len > tempbuflen) { if (tempbuflen > 0) - tempbuf = realloc(tempbuf, len); + tempbuf = realloc((void *)tempbuf, len); else tempbuf = malloc(len); tempbuflen = tempbuf==NULL ? 0 : len; @@ -285,9 +288,9 @@ int which; if(which== -1) for(i=0; i < T_FLAGS;i++) - bzero(SM_NTH_FLAGS(sm,i),FLAG_BYTES(SM_MAX_TRIS(sm))); + memset(SM_NTH_FLAGS(sm,i), '\0', FLAG_BYTES(SM_MAX_TRIS(sm))); else - bzero(SM_NTH_FLAGS(sm,which),FLAG_BYTES(SM_MAX_TRIS(sm))); + memset(SM_NTH_FLAGS(sm,which), '\0', FLAG_BYTES(SM_MAX_TRIS(sm))); } /* Given an allocated mesh- initialize */ @@ -327,7 +330,7 @@ int max_verts,max_tris; goto memerr; for(i=0; i< T_FLAGS; i++) - if(!(SM_NTH_FLAGS(sm,i)=(int4 *)malloc(fbytes))) + if(!(SM_NTH_FLAGS(sm,i)=(int32 *)malloc(fbytes))) goto memerr; SM_MAX_VERTS(sm) = max_verts; @@ -401,7 +404,7 @@ smAlloc(max_samples) { if(!(smMesh = (SM *)malloc(sizeof(SM)))) error(SYSTEM,"smAlloc():Unable to allocate memory\n"); - bzero(smMesh,sizeof(SM)); + memset(smMesh, '\0', sizeof(SM)); } else { /* If existing structure: first deallocate */