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

Comparing ray/src/common/caldefn.c (file contents):
Revision 1.18 by greg, Wed Aug 14 08:27:56 1991 UTC vs.
Revision 2.1 by greg, Tue Nov 12 16:55:27 1991 UTC

# Line 38 | Line 38 | static char SCCSid[] = "$SunId$ LBL";
38  
39   extern char  *ecalloc(), *savestr(), *strcpy();
40  
41 + static int  hash();
42 +
43   static double  dvalue();
44  
45   long  eclock = -1;                      /* value storage timer */
# Line 258 | Line 260 | incontext(qn)                  /* is qualified name in current contex
260   register char  *qn;
261   {
262      while (*qn && *qn != CNTXMARK)      /* find context mark */
263 <        ;
263 >        qn++;
264      return(!strcmp(qn, context));
265   }
266  
# Line 398 | Line 400 | EPNODE *
400   dnext()                         /* return pointer to next definition */
401   {
402      register EPNODE  *ep;
403 +    register char  *nm;
404  
405      while (htndx < NHASH) {
406          if (htpos == NULL)
407                  htpos = hashtbl[htndx++];
408          while (htpos != NULL) {
409              ep = htpos->def;
410 +            nm = htpos->name;
411              htpos = htpos->next;
412 <            if (ep != NULL)
412 >            if (ep != NULL && incontext(nm))
413                  return(ep);
414          }
415      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines