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

Comparing ray/src/rt/source.c (file contents):
Revision 1.19 by greg, Thu Jan 11 11:06:22 1990 UTC vs.
Revision 1.23 by greg, Wed Dec 12 22:43:03 1990 UTC

# Line 310 | Line 310 | char  *p;                      /* data for f */
310          double  prob, ourthresh, hwt, test2, hit2;
311          RAY  sr;
312  
313 +        if (nsources <= 0)
314 +                return;
315          srccnt = (CONTRIB *)malloc(nsources*sizeof(CONTRIB));
316          cntord = (CNTPTR *)malloc(nsources*sizeof(CNTPTR));
317          if (srccnt == NULL || cntord == NULL)
# Line 395 | Line 397 | char  *p;                      /* data for f */
397          }
398                                          /* weighted hit rate */
399          hwt = hit2 / test2;
400 < #ifdef notdef
400 > #ifdef DEBUG
401          sprintf(errmsg, "%d tested, %d untested, %f hit rate\n",
402                          sn, ncnts-sn, hwt);
403          eputs(errmsg);
# Line 408 | Line 410 | char  *p;                      /* data for f */
410                  addcolor(r->rcol, srccnt[cntord[sn].sno].val);
411          }
412                  
413 <        free(srccnt);
414 <        free(cntord);
413 >        free((char *)srccnt);
414 >        free((char *)cntord);
415   }
416  
417  
# Line 453 | Line 455 | register RAY  *r;
455                                    m->oargs.farg[2]);
456                                                  /* modify value */
457                  multcolor(r->rcol, r->pcol);
458 +                                                /* assign distance */
459 +                r->rt = r->rot;
460          }
461   }
462  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines