--- ray/src/rt/ambient.c 2003/02/25 02:47:22 2.48 +++ ray/src/rt/ambient.c 2003/06/05 19:29:34 2.50 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ambient.c,v 2.48 2003/02/25 02:47:22 greg Exp $"; +static const char RCSid[] = "$Id: ambient.c,v 2.50 2003/06/05 19:29:34 schorsch Exp $"; #endif /* * ambient.c - routines dealing with ambient (inter-reflected) component. @@ -9,12 +9,10 @@ static const char RCSid[] = "$Id: ambient.c,v 2.48 200 #include "copyright.h" +#include "platform.h" #include "ray.h" - #include "otypes.h" - #include "ambient.h" - #include "random.h" #ifndef OCTSCALE @@ -35,10 +33,10 @@ static FILE *ambfp = NULL; /* ambient file pointer */ static int nunflshed = 0; /* number of unflushed ambient values */ #ifndef SORT_THRESH -#ifdef BIGMEM -#define SORT_THRESH ((9L<<20)/sizeof(AMBVAL)) -#else +#ifdef SMLMEM #define SORT_THRESH ((3L<<20)/sizeof(AMBVAL)) +#else +#define SORT_THRESH ((9L<<20)/sizeof(AMBVAL)) #endif #endif #ifndef SORT_INTVL @@ -474,9 +472,7 @@ int creat; #ifdef F_SETLKW aflock(creat ? F_WRLCK : F_RDLCK); #endif -#ifdef MSDOS - setmode(fileno(ambfp), O_BINARY); -#endif + SET_FILE_BINARY(ambfp); if (mybuf == NULL) mybuf = (char *)bmalloc(BUFSIZ+8); setbuf(ambfp, mybuf);