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

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.50 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.52 by schorsch, Mon Jun 30 14:59:12 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "copyright.h"
11  
12 + #include <string.h>
13 +
14   #include  "platform.h"
15   #include  "ray.h"
16   #include  "otypes.h"
# Line 163 | Line 165 | setambient()                           /* initialize calculation */
165                                          (flen - pos)/AMBVALSIZ);
166                          error(WARNING, errmsg);
167                          fseek(ambfp, pos, 0);
168 + #ifndef _WIN32 /* XXX we need a replacement for that one */
169                          ftruncate(fileno(ambfp), (off_t)pos);
170 + #endif
171                  }
172          } else if ((ambfp = fopen(ambfile, "w+")) != NULL) {
173                  initambfile(1);                 /* else create new file */
# Line 560 | Line 564 | newambtree()                           /* allocate 8 ambient tree structs */
564          }
565          atp = atfreelist;
566          atfreelist = atp->kid;
567 <        bzero((char *)atp, 8*sizeof(AMBTREE));
567 >        memset((char *)atp, '\0', 8*sizeof(AMBTREE));
568          return(atp);
569   }
570  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines