1 |
– |
/* Copyright (c) 1999 Silicon Graphics, Inc. */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Routines for tracking beam compuatations |
6 |
|
*/ |
100 |
|
p->bi = hb->b; |
101 |
|
disp_packet(p); /* display it */ |
102 |
|
if (n >= 1024) { /* free ridiculous packets */ |
103 |
< |
free((char *)p); |
103 |
> |
free((void *)p); |
104 |
|
p = NULL; n = 0; |
105 |
|
} |
106 |
|
} |
159 |
|
case BS_NEW: /* new computation set */ |
160 |
|
listpos = 0; lastin = -1; |
161 |
|
if (complen) /* free old list */ |
162 |
< |
free((char *)complist); |
162 |
> |
free((void *)complist); |
163 |
|
complist = NULL; |
164 |
|
if (!(complen = nents)) |
165 |
|
return; |
193 |
|
/* merge lists */ |
194 |
|
mergeclists(newlist, clist, n, complist, complen); |
195 |
|
if (complen) |
196 |
< |
free((char *)complist); |
196 |
> |
free((void *)complist); |
197 |
|
complist = newlist; |
198 |
|
complen += n; |
199 |
|
} |
214 |
|
hbarr[i].b = clist[i].bi; |
215 |
|
} |
216 |
|
hdloadbeams(hbarr, nents, dispbeam); |
217 |
< |
free((char *)hbarr); |
217 |
> |
free((void *)hbarr); |
218 |
|
if (hdfragflags&FF_READ) { |
219 |
|
listpos = 0; |
220 |
|
lastin = -1; /* need to re-sort list */ |
318 |
|
normaspect(viewaspect(&curview), &pa, &xr, &yr); |
319 |
|
viewbeams(&curview, xr, yr, &blist); |
320 |
|
bundle_set(BS_MAX, blist.bl, blist.nb); |
321 |
< |
free((char *)blist.bl); |
321 |
> |
free((void *)blist.bl); |
322 |
|
} |
323 |
|
} |
324 |
|
|
328 |
|
register int k; |
329 |
|
/* free old list and empty queue */ |
330 |
|
if (complen > 0) { |
331 |
< |
free((char *)complist); |
331 |
> |
free((void *)complist); |
332 |
|
done_packets(flush_queue()); |
333 |
|
} |
334 |
|
/* reseed random number generator */ |
395 |
|
qsort((char *)list2, listpos, sizeof(PACKHEAD), beamcmp); |
396 |
|
mergeclists(complist, list2, listpos, |
397 |
|
complist+listpos, complen-listpos); |
398 |
< |
free((char *)list2); |
398 |
> |
free((void *)list2); |
399 |
|
} |
400 |
|
/* drop satisfied requests */ |
401 |
|
for (i = complen; i-- && complist[i].nr <= complist[i].nc; ) |
402 |
|
; |
403 |
|
if (i < 0) { |
404 |
< |
free((char *)complist); |
404 |
> |
free((void *)complist); |
405 |
|
complist = NULL; |
406 |
|
complen = 0; |
407 |
|
} else if (i < complen-1) { |