--- ray/src/common/cone.c 1992/09/06 11:53:47 2.2 +++ ray/src/common/cone.c 2003/02/25 02:47:21 2.6 @@ -1,15 +1,12 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: cone.c,v 2.6 2003/02/25 02:47:21 greg Exp $"; #endif - /* * cone.c - routines for making cones - * - * 2/12/86 */ +#include "copyright.h" + #include "standard.h" #include "object.h" @@ -48,7 +45,6 @@ getcone(o, getxf) /* get cone structure */ register OBJREC *o; int getxf; { - extern double sqrt(); int sgn0, sgn1; register CONE *co; @@ -150,24 +146,25 @@ raderr: } +void freecone(o) /* free memory associated with cone */ OBJREC *o; { register CONE *co = (CONE *)o->os; - if (o->os == NULL) + if (co == NULL) return; if (co->tm != NULL) - free((char *)co->tm); - free(o->os); + free((void *)co->tm); + free((void *)co); o->os = NULL; } +void conexform(co) /* get cone transformation matrix */ register CONE *co; { - extern double sqrt(); MAT4 m4; register double d; register int i;