--- ray/src/rt/ambient.c 2003/06/30 14:59:12 2.52 +++ ray/src/rt/ambient.c 2003/07/27 22:12:03 2.54 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ambient.c,v 2.52 2003/06/30 14:59:12 schorsch Exp $"; +static const char RCSid[] = "$Id: ambient.c,v 2.54 2003/07/27 22:12:03 schorsch Exp $"; #endif /* * ambient.c - routines dealing with ambient (inter-reflected) component. @@ -280,7 +280,7 @@ FVECT nrm; return; dumbamb: /* return global value */ copycolor(acol, ambval); - if (ambvwt <= 0 | navsum == 0) + if ((ambvwt <= 0) | (navsum == 0)) return; l = bright(ambval); /* average in computations */ if (l > FTINY) { @@ -529,7 +529,7 @@ register AMBVAL *aval; if ((av = newambval()) == NULL) error(SYSTEM, "out of memory in avstore"); - copystruct(av, aval); + *av = *aval; av->latick = ambclock; av->next = NULL; nambvals++; @@ -741,7 +741,7 @@ int always; if (avlist2 != NULL) free((void *)avlist2); if (always) { /* rebuild without sorting */ - copystruct(&oldatrunk, &atrunk); + oldatrunk = atrunk; atrunk.alist = NULL; atrunk.kid = NULL; unloadatree(&oldatrunk, avinsert); @@ -772,14 +772,14 @@ int always; if (avlist1[i].p == NULL) continue; tap = avlist2[i]; - copystruct(&tav, tap); + tav = *tap; for (j = i; (pnext = avlist1[j].p) != tap; j = avlmemi(pnext)) { - copystruct(avlist2[j], pnext); + *(avlist2[j]) = *pnext; avinsert(avlist2[j]); avlist1[j].p = NULL; } - copystruct(avlist2[j], &tav); + *(avlist2[j]) = tav; avinsert(avlist2[j]); avlist1[j].p = NULL; } @@ -831,7 +831,7 @@ ambsync() /* synchronize ambient file */ /* see if file has grown */ if ((flen = lseek(fileno(ambfp), (off_t)0L, 2)) < 0) goto seekerr; - if (n = flen - lastpos) { /* file has grown */ + if ( (n = flen - lastpos) ) { /* file has grown */ if (ambinp == NULL) { /* use duplicate filedes */ ambinp = fdopen(dup(fileno(ambfp)), "r"); if (ambinp == NULL)