| 42 |
|
|
| 43 |
|
static int |
| 44 |
|
beamcmp(b0, b1) /* comparison for compute order */ |
| 45 |
< |
register PACKHEAD *b0, *b1; |
| 45 |
> |
PACKHEAD *b0, *b1; |
| 46 |
|
{ |
| 47 |
|
BEAMI *bip0, *bip1; |
| 48 |
< |
register long c; |
| 48 |
> |
long c; |
| 49 |
|
/* first check desired quantities */ |
| 50 |
|
if (chunkycmp) |
| 51 |
|
c = rchunk(b1->nr)*(rchunk(b0->nc)+1L) - |
| 75 |
|
|
| 76 |
|
int |
| 77 |
|
beamidcmp(b0, b1) /* comparison for beam searching */ |
| 78 |
< |
register PACKHEAD *b0, *b1; |
| 78 |
> |
PACKHEAD *b0, *b1; |
| 79 |
|
{ |
| 80 |
< |
register int c = b0->hd - b1->hd; |
| 80 |
> |
int c = b0->hd - b1->hd; |
| 81 |
|
|
| 82 |
|
if (c) return(c); |
| 83 |
|
return(b0->bi - b1->bi); |
| 86 |
|
|
| 87 |
|
static void |
| 88 |
|
dispbeam( /* display a holodeck beam */ |
| 89 |
< |
register BEAM *b, |
| 90 |
< |
register HDBEAMI *hb |
| 89 |
> |
BEAM *b, |
| 90 |
> |
HDBEAMI *hb |
| 91 |
|
) |
| 92 |
|
{ |
| 93 |
|
static int n = 0; |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
|
| 119 |
< |
extern void |
| 119 |
> |
void |
| 120 |
|
bundle_set( /* bundle set operation */ |
| 121 |
|
int op, |
| 122 |
|
PACKHEAD *clist, |
| 125 |
|
{ |
| 126 |
|
int oldnr, n; |
| 127 |
|
HDBEAMI *hbarr; |
| 128 |
< |
register PACKHEAD *csm; |
| 129 |
< |
register int i; |
| 128 |
> |
PACKHEAD *csm; |
| 129 |
> |
int i; |
| 130 |
|
/* search for common members */ |
| 131 |
|
for (csm = clist+nents; csm-- > clist; ) |
| 132 |
|
csm->nc = -1; |
| 247 |
|
FVECT cp[4], edgeA, edgeB, cent[2]; |
| 248 |
|
FVECT crossp[2], diffv; |
| 249 |
|
double vol[2]; |
| 250 |
< |
register int i; |
| 250 |
> |
int i; |
| 251 |
|
/* get grid coordinates */ |
| 252 |
|
if (!hdbcoord(gc, hp, bi)) |
| 253 |
|
error(CONSISTENCY, "bad beam index in beamvolume"); |
| 277 |
|
int32 wtotal, minrt; |
| 278 |
|
double frac; |
| 279 |
|
int i; |
| 280 |
< |
register int j, k; |
| 280 |
> |
int j, k; |
| 281 |
|
|
| 282 |
|
complen = 0; |
| 283 |
|
for (j = 0; hdlist[j] != NULL; j++) |
| 340 |
|
} |
| 341 |
|
|
| 342 |
|
|
| 343 |
< |
extern void |
| 343 |
> |
void |
| 344 |
|
init_global(void) /* initialize global ray computation */ |
| 345 |
|
{ |
| 346 |
|
/* free old list and empty queue */ |
| 362 |
|
|
| 363 |
|
static void |
| 364 |
|
mergeclists( /* merge two sorted lists */ |
| 365 |
< |
register PACKHEAD *cdest, |
| 366 |
< |
register PACKHEAD *cl1, |
| 365 |
> |
PACKHEAD *cdest, |
| 366 |
> |
PACKHEAD *cl1, |
| 367 |
|
int n1, |
| 368 |
< |
register PACKHEAD *cl2, |
| 368 |
> |
PACKHEAD *cl2, |
| 369 |
|
int n2 |
| 370 |
|
) |
| 371 |
|
{ |
| 372 |
< |
register int cmp; |
| 372 |
> |
int cmp; |
| 373 |
|
|
| 374 |
|
while (n1 | n2) { |
| 375 |
|
if (!n1) cmp = 1; |
| 392 |
|
{ |
| 393 |
|
PACKHEAD *list2; |
| 394 |
|
int listlen; |
| 395 |
< |
register int i; |
| 395 |
> |
int i; |
| 396 |
|
|
| 397 |
|
if (complen <= 0) /* check to see if there is even a list */ |
| 398 |
|
return; |
| 446 |
|
* list and start again from the beginning. Since |
| 447 |
|
* a merge sort is used, the sorting costs are minimal. |
| 448 |
|
*/ |
| 449 |
< |
extern int |
| 449 |
> |
int |
| 450 |
|
next_packet( /* prepare packet for computation */ |
| 451 |
< |
register PACKET *p, |
| 451 |
> |
PACKET *p, |
| 452 |
|
int n |
| 453 |
|
) |
| 454 |
|
{ |