--- ray/src/common/objset.c 1990/09/19 08:26:02 1.4 +++ ray/src/common/objset.c 1992/07/13 14:23:21 2.3 @@ -19,8 +19,12 @@ static char SCCSid[] = "$SunId$ LBL"; #include "otypes.h" #ifndef OSTSIZ +#ifdef BIGMEM +#define OSTSIZ 56437 /* object table size (a prime!) */ +#else #define OSTSIZ 12329 /* object table size (a prime!) */ #endif +#endif static OBJECT *ostable[OSTSIZ]; /* the object set table */ @@ -46,8 +50,12 @@ OBJECT obj; { register int i; - for (i = (*os++)--; i > 0 && *os < obj; i--, os++) - ; + i = (*os)--; + os++; + while (i > 0 && *os < obj) { + i--; + os++; + } while (--i > 0) { os[0] = os[1]; os++; @@ -185,20 +193,17 @@ int orig, nobjs; { int n; register OBJECT *os; - register OBJECT i, t; + register OBJECT i, s; for (n = 0; n < OSTSIZ; n++) { if ((os = ostable[n]) == NULL) continue; while ((i = *os++) > 0) - while (i--) { - t = *os++; - if (t >= orig && t < orig+nobjs) { - t = objptr(t)->otype; - if (!issurface(t)) - return(1); - } - } + do + if ((s = *os++) >= orig && s < orig+nobjs && + ismodifier(objptr(s)->otype)) + return(1); + while (--i); } return(0); }