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.29 by greg, Mon Aug 31 15:06:20 2020 UTC vs.
Revision 2.30 by greg, Sat Mar 12 15:50:13 2022 UTC

# Line 196 | Line 196 | dremove(                       /* delete all definitions of name */
196  
197  
198   int
199 < vardefined(     /* return non-zero if variable defined */
199 > vardefined(     /* return '=' or ':' if variable/constant defined */
200          char  *name
201   )
202   {
203      EPNODE  *dp;
204  
205 <    return((dp = dlookup(name)) != NULL && dp->v.kid->type == SYM);
205 >    if ((dp = dlookup(name)) == NULL || dp->v.kid->type != SYM)
206 >        return(0);
207 >    return(dp->type);
208   }
209  
210  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines