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.35 by greg, Wed Apr 23 00:52:33 2003 UTC vs.
Revision 3.36 by greg, Tue May 13 17:58:33 2003 UTC

# Line 92 | Line 92 | register HDBEAMI       *hb;
92                  CHECK(p==NULL, SYSTEM, "out of memory in dispbeam");
93          }
94                                          /* assign packet fields */
95 <        bcopy((char *)hdbray(b), (char *)packra(p), b->nrm*sizeof(RAYVAL));
95 >        bcopy((void *)hdbray(b), (void *)packra(p), b->nrm*sizeof(RAYVAL));
96          p->nr = p->nc = b->nrm;
97          for (p->hd = 0; hdlist[p->hd] != hb->h; p->hd++)
98                  if (hdlist[p->hd] == NULL)
# Line 118 | Line 118 | int    nents;
118                                          /* search for common members */
119          for (csm = clist+nents; csm-- > clist; )
120                  csm->nc = -1;
121 <        qsort((char *)clist, nents, sizeof(PACKHEAD), beamidcmp);
121 >        qsort((void *)clist, nents, sizeof(PACKHEAD), beamidcmp);
122          for (i = 0; i < complen; i++) {
123 <                csm = (PACKHEAD *)bsearch((char *)(complist+i), (char *)clist,
123 >                csm = (PACKHEAD *)bsearch((void *)(complist+i), (void *)clist,
124                                  nents, sizeof(PACKHEAD), beamidcmp);
125                  if (csm == NULL)
126                          continue;
# Line 166 | Line 166 | int    nents;
166                  complist = (PACKHEAD *)malloc(nents*sizeof(PACKHEAD));
167                  if (complist == NULL)
168                          goto memerr;
169 <                bcopy((char *)clist, (char *)complist, nents*sizeof(PACKHEAD));
169 >                bcopy((void *)clist, (void *)complist, nents*sizeof(PACKHEAD));
170                  break;
171          case BS_ADD:                    /* add to computation set */
172          case BS_MAX:                    /* maximum of quantities */
# Line 174 | Line 174 | int    nents;
174                  if (nents <= 0)
175                          return;
176                  sortcomplist();         /* sort updated list & new entries */
177 <                qsort((char *)clist, nents, sizeof(PACKHEAD), beamcmp);
177 >                qsort((void *)clist, nents, sizeof(PACKHEAD), beamcmp);
178                                          /* what can't we satisfy? */
179                  for (i = nents, csm = clist; i-- && csm->nr > csm->nc; csm++)
180                          ;
# Line 387 | Line 387 | sortcomplist()                 /* fix our list order */
387   #endif
388                  }
389          if (lastin < 0 || listpos*4 >= complen*3)
390 <                qsort((char *)complist, complen, sizeof(PACKHEAD), beamcmp);
390 >                qsort((void *)complist, complen, sizeof(PACKHEAD), beamcmp);
391          else if (listpos) {     /* else sort and merge sublist */
392                  list2 = (PACKHEAD *)malloc(listpos*sizeof(PACKHEAD));
393                  CHECK(list2==NULL, SYSTEM, "out of memory in sortcomplist");
394 <                bcopy((char *)complist,(char *)list2,listpos*sizeof(PACKHEAD));
395 <                qsort((char *)list2, listpos, sizeof(PACKHEAD), beamcmp);
394 >                bcopy((void *)complist,(void *)list2,listpos*sizeof(PACKHEAD));
395 >                qsort((void *)list2, listpos, sizeof(PACKHEAD), beamcmp);
396                  mergeclists(complist, list2, listpos,
397                                  complist+listpos, complen-listpos);
398                  free((void *)list2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines