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.49 by greg, Thu May 15 05:13:35 2003 UTC vs.
Revision 2.51 by schorsch, Thu Jun 26 00:58:10 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "copyright.h"
11  
12 + #include  "platform.h"
13   #include  "ray.h"
13
14   #include  "otypes.h"
15
15   #include  "ambient.h"
17
16   #include  "random.h"
17  
18   #ifndef  OCTSCALE
# Line 165 | Line 163 | setambient()                           /* initialize calculation */
163                                          (flen - pos)/AMBVALSIZ);
164                          error(WARNING, errmsg);
165                          fseek(ambfp, pos, 0);
166 + #ifndef _WIN32 /* XXX we need a replacement for that one */
167                          ftruncate(fileno(ambfp), (off_t)pos);
168 + #endif
169                  }
170          } else if ((ambfp = fopen(ambfile, "w+")) != NULL) {
171                  initambfile(1);                 /* else create new file */
# Line 474 | Line 474 | int  creat;
474   #ifdef  F_SETLKW
475          aflock(creat ? F_WRLCK : F_RDLCK);
476   #endif
477 < #ifdef MSDOS
478 <        setmode(fileno(ambfp), O_BINARY);
479 < #endif
477 >        SET_FILE_BINARY(ambfp);
478          if (mybuf == NULL)
479                  mybuf = (char *)bmalloc(BUFSIZ+8);
480          setbuf(ambfp, mybuf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines