--- ray/src/rt/ambient.c 2015/08/21 18:21:05 2.97 +++ ray/src/rt/ambient.c 2016/03/03 22:47:21 2.100 @@ -1,4 +1,4 @@ -static const char RCSid[] = "$Id: ambient.c,v 2.97 2015/08/21 18:21:05 greg Exp $"; +static const char RCSid[] = "$Id: ambient.c,v 2.100 2016/03/03 22:47:21 greg Exp $"; /* * ambient.c - routines dealing with ambient (inter-reflected) component. * @@ -196,9 +196,6 @@ setambient(void) /* initialize calculation */ sprintf(errmsg, "cannot open ambient file \"%s\"", ambfile); error(SYSTEM, errmsg); } -#if 0 - flockfile(ambfp); /* application-level lock */ -#endif #ifdef F_SETLKW aflock(F_UNLCK); /* release file */ #endif @@ -219,7 +216,7 @@ ambdone(void) /* close ambient file and free memory lastpos = -1; } /* free ambient tree */ - unloadatree(&atrunk, &avfree); + unloadatree(&atrunk, avfree); /* reset state variables */ avsum = 0.; navsum = 0; @@ -1229,7 +1226,7 @@ sortambvals( /* resort ambient values */ oldatrunk = atrunk; atrunk.alist = NULL; atrunk.kid = NULL; - unloadatree(&oldatrunk, &avinsert); + unloadatree(&oldatrunk, avinsert); } } else { /* sort memory by last access time */ /* @@ -1246,7 +1243,7 @@ sortambvals( /* resort ambient values */ eputs(errmsg); #endif i_avlist = 0; - unloadatree(&atrunk, &av2list); /* empty current tree */ + unloadatree(&atrunk, av2list); /* empty current tree */ #ifdef DEBUG if (i_avlist < nambvals) error(CONSISTENCY, "missing ambient values in sortambvals");