ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/objset.c
(Generate patch)

Comparing ray/src/common/objset.c (file contents):
Revision 1.4 by greg, Wed Sep 19 08:26:02 1990 UTC vs.
Revision 2.3 by greg, Mon Jul 13 14:23:21 1992 UTC

# Line 19 | Line 19 | static char SCCSid[] = "$SunId$ LBL";
19   #include  "otypes.h"
20  
21   #ifndef  OSTSIZ
22 + #ifdef  BIGMEM
23 + #define  OSTSIZ         56437           /* object table size (a prime!) */
24 + #else
25   #define  OSTSIZ         12329           /* object table size (a prime!) */
26   #endif
27 + #endif
28  
29   static OBJECT  *ostable[OSTSIZ];        /* the object set table */
30  
# Line 46 | Line 50 | OBJECT  obj;
50   {
51          register int  i;
52  
53 <        for (i = (*os++)--; i > 0 && *os < obj; i--, os++)
54 <                ;
53 >        i = (*os)--;
54 >        os++;
55 >        while (i > 0 && *os < obj) {
56 >                i--;
57 >                os++;
58 >        }
59          while (--i > 0) {
60                  os[0] = os[1];
61                  os++;
# Line 185 | Line 193 | int  orig, nobjs;
193   {
194          int  n;
195          register OBJECT  *os;
196 <        register OBJECT  i, t;
196 >        register OBJECT  i, s;
197  
198          for (n = 0; n < OSTSIZ; n++) {
199                  if ((os = ostable[n]) == NULL)
200                          continue;
201                  while ((i = *os++) > 0)
202 <                        while (i--) {
203 <                                t = *os++;
204 <                                if (t >= orig && t < orig+nobjs) {
205 <                                        t = objptr(t)->otype;
206 <                                        if (!issurface(t))
199 <                                                return(1);
200 <                                }
201 <                        }
202 >                        do
203 >                                if ((s = *os++) >= orig && s < orig+nobjs &&
204 >                                                ismodifier(objptr(s)->otype))
205 >                                        return(1);
206 >                        while (--i);
207          }
208          return(0);
209   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines