| 22 |
|
#include "mesh.h" |
| 23 |
|
|
| 24 |
|
|
| 25 |
< |
extern int |
| 25 |
> |
int |
| 26 |
|
free_os( /* free unneeded memory for object */ |
| 27 |
< |
register OBJREC *op |
| 27 |
> |
OBJREC *op |
| 28 |
|
) |
| 29 |
|
{ |
| 30 |
|
if (op->os == NULL) |
| 57 |
|
return(1); |
| 58 |
|
case MAT_CLIP: /* clipping surface */ |
| 59 |
|
case MAT_SPOT: /* spot light source */ |
| 60 |
+ |
case PAT_SPECTRUM: /* constant spectrum */ |
| 61 |
+ |
case PAT_SPECFILE: /* spectrum from data file */ |
| 62 |
|
free((void *)op->os); |
| 63 |
|
op->os = NULL; |
| 64 |
|
return(1); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
|
| 73 |
< |
extern int |
| 73 |
> |
int |
| 74 |
|
free_objs( /* free some object structures */ |
| 75 |
< |
register OBJECT on, |
| 75 |
> |
OBJECT on, |
| 76 |
|
OBJECT no |
| 77 |
|
) |
| 78 |
|
{ |
| 79 |
|
int nfreed; |
| 80 |
< |
register OBJREC *op; |
| 80 |
> |
OBJREC *op; |
| 81 |
|
|
| 82 |
|
for (nfreed = 0; no-- > 0; on++) { |
| 83 |
|
op = objptr(on); |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
|
| 91 |
< |
extern void |
| 91 |
> |
void |
| 92 |
|
free_objmem(void) /* free all object cache memory */ |
| 93 |
|
{ |
| 94 |
|
free_objs(0, nobjects); |