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) |
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; |
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 */ |
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 |
|
; |
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); |