1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* cone.c - routines for making cones |
9 |
– |
* |
10 |
– |
* 2/12/86 |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include "copyright.h" |
9 |
+ |
|
10 |
|
#include "standard.h" |
11 |
|
|
12 |
|
#include "object.h" |
45 |
|
register OBJREC *o; |
46 |
|
int getxf; |
47 |
|
{ |
51 |
– |
extern double sqrt(); |
48 |
|
int sgn0, sgn1; |
49 |
|
register CONE *co; |
50 |
|
|
146 |
|
} |
147 |
|
|
148 |
|
|
149 |
+ |
void |
150 |
|
freecone(o) /* free memory associated with cone */ |
151 |
|
OBJREC *o; |
152 |
|
{ |
153 |
|
register CONE *co = (CONE *)o->os; |
154 |
|
|
155 |
< |
if (o->os == NULL) |
155 |
> |
if (co == NULL) |
156 |
|
return; |
157 |
|
if (co->tm != NULL) |
158 |
< |
free((char *)co->tm); |
159 |
< |
free(o->os); |
158 |
> |
free((void *)co->tm); |
159 |
> |
free((void *)co); |
160 |
|
o->os = NULL; |
161 |
|
} |
162 |
|
|
163 |
|
|
164 |
+ |
void |
165 |
|
conexform(co) /* get cone transformation matrix */ |
166 |
|
register CONE *co; |
167 |
|
{ |
170 |
– |
extern double sqrt(); |
168 |
|
MAT4 m4; |
169 |
|
register double d; |
170 |
|
register int i; |