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 2.2 by greg, Fri May 15 16:38:49 1992 UTC vs.
Revision 2.3 by greg, Mon Aug 10 16:20:43 1992 UTC

# Line 335 | Line 335 | varinsert(name)                        /* get a link to a variable */
335   char  *name;
336   {
337      register VARDEF  *vp;
338    register LIBR  *libp;
338      int  hv;
339      
340      if ((vp = varlookup(name)) != NULL) {
341          vp->nlinks++;
342          return(vp);
343      }
344 +    vp = (VARDEF *)emalloc(sizeof(VARDEF));
345   #ifdef  FUNCTION
346 <    libp = liblookup(name);
346 >    vp->lib = liblookup(name);
347   #else
348 <    libp = NULL;
348 >    vp->lib = NULL;
349   #endif
350 <    if (libp == NULL)                   /* if name not in library */
350 >    if (vp->lib == NULL)                /* if name not in library */
351          name = qualname(name, 0);       /* use fully qualified version */
352      hv = hash(name);
353    vp = (VARDEF *)emalloc(sizeof(VARDEF));
353      vp->name = savestr(name);
354      vp->nlinks = 1;
355      vp->def = NULL;
357    vp->lib = libp;
356      vp->next = hashtbl[hv];
357      hashtbl[hv] = vp;
358      return(vp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines