ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/sm.c
(Generate patch)

Comparing ray/src/hd/sm.c (file contents):
Revision 3.18 by greg, Fri Jun 20 00:25:49 2003 UTC vs.
Revision 3.19 by schorsch, Mon Jun 30 14:59:12 2003 UTC

# Line 4 | Line 4 | static const char      RCSid[] = "$Id$";
4   /*
5   *  sm.c
6   */
7 +
8 + #include <string.h>
9 +
10   #include "standard.h"
11   #include "sm_flag.h"
12   #include "sm_list.h"
# Line 285 | Line 288 | int which;
288  
289    if(which== -1)
290      for(i=0; i < T_FLAGS;i++)
291 <      bzero(SM_NTH_FLAGS(sm,i),FLAG_BYTES(SM_MAX_TRIS(sm)));
291 >      memset(SM_NTH_FLAGS(sm,i), '\0', FLAG_BYTES(SM_MAX_TRIS(sm)));
292    else
293 <    bzero(SM_NTH_FLAGS(sm,which),FLAG_BYTES(SM_MAX_TRIS(sm)));
293 >    memset(SM_NTH_FLAGS(sm,which), '\0', FLAG_BYTES(SM_MAX_TRIS(sm)));
294   }
295  
296   /* Given an allocated mesh- initialize */
# Line 401 | Line 404 | smAlloc(max_samples)
404    {
405      if(!(smMesh = (SM *)malloc(sizeof(SM))))
406         error(SYSTEM,"smAlloc():Unable to allocate memory\n");
407 <    bzero(smMesh,sizeof(SM));
407 >    memset(smMesh, '\0', sizeof(SM));
408    }
409    else
410    {   /* If existing structure: first deallocate */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines