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

Comparing ray/src/rt/func.c (file contents):
Revision 1.21 by greg, Thu Aug 8 13:08:01 1991 UTC vs.
Revision 1.23 by greg, Fri Aug 9 08:26:02 1991 UTC

# Line 16 | Line 16 | static char SCCSid[] = "$SunId$ LBL";
16  
17  
18   #define  INITFILE       "rayinit.cal"
19 < #define  DEFVNAME       "FILE_LOADED`"
19 > #define  DEFVNAME       "`FILE_LOADED"
20  
21   XF  unitxf = {                  /* identity transform */
22          1.0, 0.0, 0.0, 0.0,
# Line 141 | Line 141 | l_erfc()                       /* cumulative error function */
141  
142  
143   funcfile(fname)                 /* set context, load file if necessary */
144 < char  *fname;
144 > register char  *fname;
145   {
146          extern char  *setcontext();
147          static char  initfile[] = INITFILE;
# Line 163 | Line 163 | char  *fname;
163                  loadfunc(initfile);
164                  initfile[0] = '\0';
165          }
166 <        setcontext(fname);
167 <        if (!vardefined(DEFVNAME)) {
168 <                loadfunc(fname);
169 <                varset(DEFVNAME, ':', 1.0);
166 >        if (fname[0] == '.' && fname[1] == '\0')
167 >                setcontext("");                 /* "." means no file */
168 >        else {
169 >                setcontext(fname);
170 >                if (!vardefined(DEFVNAME)) {
171 >                        loadfunc(fname);
172 >                        varset(DEFVNAME, ':', 1.0);
173 >                }
174          }
175   }
176  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines