1 |
– |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Bundle holodeck beams together into clumps. |
6 |
|
*/ |
98 |
|
int (*cf)(); |
99 |
|
{ |
100 |
|
static short primes[] = {9431,6803,4177,2659,1609,887,587,251,47,1}; |
101 |
< |
unsigned int4 *bflags; |
101 |
> |
uint32 *bflags; |
102 |
|
int *bqueue; |
103 |
|
int bqlen; |
104 |
< |
int4 bqtotal; |
104 |
> |
int32 bqtotal; |
105 |
|
int bc, bci, bqc, myprime; |
106 |
|
register int i; |
107 |
|
/* get clump size */ |
110 |
|
maxsiz /= sizeof(RAYVAL); |
111 |
|
/* allocate beam queue */ |
112 |
|
bqueue = (int *)malloc(maxcnt*sizeof(int)); |
113 |
< |
bflags = (unsigned int4 *)calloc((nbeams(hp)>>5)+1, |
114 |
< |
sizeof(unsigned int4)); |
113 |
> |
bflags = (uint32 *)calloc((nbeams(hp)>>5)+1, |
114 |
> |
sizeof(uint32)); |
115 |
|
if (bqueue == NULL | bflags == NULL) |
116 |
|
error(SYSTEM, "out of memory in clumpbeams"); |
117 |
|
/* mark empty beams as done */ |
153 |
|
(*cf)(hp, bqueue, bqlen); /* transfer clump */ |
154 |
|
} |
155 |
|
/* all done; clean up */ |
156 |
< |
free((char *)bqueue); |
157 |
< |
free((char *)bflags); |
156 |
> |
free((void *)bqueue); |
157 |
> |
free((void *)bflags); |
158 |
|
} |