--- ray/src/common/objset.c 1998/09/11 15:26:43 2.7 +++ ray/src/common/objset.c 2003/02/25 02:47:21 2.9 @@ -1,15 +1,14 @@ -/* Copyright (c) 1986 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: objset.c,v 2.9 2003/02/25 02:47:21 greg Exp $"; #endif - /* * objset.c - routines for maintaining object sets. * - * 7/28/85 + * External symbols declared in object.h */ +#include "copyright.h" + #include "standard.h" #include "octree.h" @@ -27,6 +26,7 @@ static char SCCSid[] = "$SunId$ LBL"; static OBJECT *ostable[OSTSIZ]; /* the object set table */ +void insertelem(os, obj) /* insert obj into os, no questions */ register OBJECT *os; OBJECT obj; @@ -42,6 +42,7 @@ OBJECT obj; } +void deletelem(os, obj) /* delete obj from os, no questions */ register OBJECT *os; OBJECT obj; @@ -61,6 +62,7 @@ OBJECT obj; } +int inset(os, obj) /* determine if object is in set */ register OBJECT *os; OBJECT obj; @@ -92,6 +94,7 @@ OBJECT obj; } +int setequal(os1, os2) /* determine if two sets are equal */ register OBJECT *os1, *os2; { @@ -104,6 +107,7 @@ register OBJECT *os1, *os2; } +void setcopy(os1, os2) /* copy object set os2 into os1 */ register OBJECT *os1, *os2; { @@ -130,6 +134,7 @@ register OBJECT *os; } +void setunion(osr, os1, os2) /* osr = os1 Union os2 */ register OBJECT *osr, *os1, *os2; { @@ -149,6 +154,7 @@ register OBJECT *osr, *os1, *os2; } +void setintersect(osr, os1, os2) /* osr = os1 Intersect os2 */ register OBJECT *osr, *os1, *os2; { @@ -226,6 +232,7 @@ memerr: } +void objset(oset, ot) /* get object set for full node */ register OBJECT *oset; OCTREE ot; @@ -269,13 +276,14 @@ int (*f)(); } +void donesets() /* free ALL SETS in our table */ { register int n; for (n = 0; n < OSTSIZ; n++) if (ostable[n] != NULL) { - free((char *)ostable[n]); + free((void *)ostable[n]); ostable[n] = NULL; } }