| 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 |
|
* Holodeck beam support for display process |
| 6 |
|
*/ |
| 27 |
|
FVECT cp[4], ip[4], pf, pb; |
| 28 |
|
double af, ab, sf2, sb2, dfb2, df2, db2, penalty; |
| 29 |
|
register int i; |
| 30 |
+ |
/* special case */ |
| 31 |
+ |
if (hr <= 0 | vr <= 0) |
| 32 |
+ |
return(0); |
| 33 |
|
/* compute cell corners in image */ |
| 34 |
|
if (!hdbcoord(gc, hp, bi)) |
| 35 |
|
error(CONSISTENCY, "bad beam index in npixels"); |
| 281 |
|
if (cl.cl == NULL) |
| 282 |
|
goto memerr; |
| 283 |
|
cl.n = 0; /* add cells within pyramid */ |
| 284 |
< |
visit_cells(org, dir, hp, addcell, &cl); |
| 284 |
> |
visit_cells(org, dir, hp, addcell, (char *)&cl); |
| 285 |
|
if (!cl.n) { |
| 286 |
< |
free((char *)cl.cl); |
| 286 |
> |
free((void *)cl.cl); |
| 287 |
|
return(NULL); |
| 288 |
|
} |
| 289 |
|
*np = cl.n * orient; |
| 292 |
|
* sorted automatically by visit_cells(), so we don't need this. |
| 293 |
|
*/ |
| 294 |
|
/* optimize memory use */ |
| 295 |
< |
cl.cl = (GCOORD *)realloc((char *)cl.cl, cl.n*sizeof(GCOORD)); |
| 295 |
> |
cl.cl = (GCOORD *)realloc((void *)cl.cl, cl.n*sizeof(GCOORD)); |
| 296 |
|
if (cl.cl == NULL) |
| 297 |
|
goto memerr; |
| 298 |
|
/* sort the list */ |