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

Comparing ray/src/hd/rholo3.c (file contents):
Revision 3.4 by gregl, Tue Nov 4 11:52:21 1997 UTC vs.
Revision 3.5 by gregl, Thu Nov 6 16:11:49 1997 UTC

# Line 120 | Line 120 | int    nents;
120          for (i = 0; i < nents; i++)
121                  if (clist[i].nr > n)
122                          n = clist[i].nr;
123 <        p = (PACKHEAD *)malloc(sizeof(PACKHEAD) + n*sizeof(RAYVAL));
123 >        p = (PACKHEAD *)malloc(packsiz(n));
124          if (p == NULL)
125                  goto memerr;
126                                          /* display what we have */
127          for (i = 0; i < nents; i++)
128                  if ((b = hdgetbeam(hdlist[clist[i].hd], clist[i].bi)) != NULL) {
129 <                        bcopy((char *)hdbray(b), (char *)(p+1),
129 >                        bcopy((char *)hdbray(b), (char *)packrays(p),
130                                          (p->nr=b->nrm)*sizeof(RAYVAL));
131 <                        disp_packet((PACKET *)p);
131 >                        disp_packet(p);
132                  }
133          free((char *)p);                /* clean up */
134          return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines