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

Comparing ray/src/common/calfunc.c (file contents):
Revision 2.2 by greg, Fri May 15 16:38:47 1992 UTC vs.
Revision 2.3 by greg, Mon May 18 14:15:49 1992 UTC

# Line 371 | Line 371 | register VARDEF  *vp;
371   static double
372   libfunc(fname, vp)                      /* execute library function */
373   char  *fname;
374 < register VARDEF  *vp;
374 > VARDEF  *vp;
375   {
376 <    VARDEF  dumdef;
376 >    register LIBR  *lp;
377      double  d;
378      int  lasterrno;
379  
380 <    if (vp == NULL) {
381 <        vp = &dumdef;
382 <        vp->lib = liblookup(fname);
383 <    }
384 <    if (vp->lib == NULL) {
380 >    if (vp != NULL)
381 >        lp = vp->lib;
382 >    else
383 >        lp = liblookup(fname);
384 >    if (lp == NULL) {
385          eputs(fname);
386          eputs(": undefined function\n");
387          quit(1);
388      }
389      lasterrno = errno;
390      errno = 0;
391 <    d = (*vp->lib->f)(vp->lib->fname);
391 >    d = (*lp->f)(lp->fname);
392   #ifdef  IEEE
393      if (errno == 0)
394          if (isnan(d))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines