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

Comparing ray/src/common/modobject.c (file contents):
Revision 2.3 by greg, Mon Feb 12 17:14:59 1996 UTC vs.
Revision 2.6 by gwlarson, Thu Nov 5 16:51:26 1998 UTC

# Line 31 | Line 31 | register OBJREC  *op;
31   {
32          register int  i, j;
33  
34 <        for (i = nobjects>>6; i >= 0; i--) {
34 >        for (i = nobjects>>OBJBLKSHFT; i >= 0; i--) {
35                  j = op - objblock[i];
36 <                if (j >= 0 && j < 077)
37 <                        return((i<<6) + j);
36 >                if (j >= 0 && j < OBJBLKSIZ)
37 >                        return((i<<OBJBLKSHFT) + j);
38          }
39          return(OVOID);
40   }
# Line 48 | Line 48 | char  *mname;
48          register OBJREC  *op;
49          register int  i;
50  
51 <        for (i = obj; i-- > 0; ) {
51 >        i = modifier(mname);            /* try hash table first */
52 >        if (i < obj)
53 >                return(i);
54 >        for (i = obj; i-- > 0; ) {      /* need to search */
55                  op = objptr(i);
56                  if (ismodifier(op->otype) && !strcmp(op->oname, mname))
57                          return(i);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines