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

Comparing ray/src/util/rad.c (file contents):
Revision 2.10 by greg, Thu May 27 17:41:46 1993 UTC vs.
Revision 2.11 by greg, Mon Jun 14 10:49:08 1993 UTC

# Line 105 | Line 105 | extern long    fdate(), time();
105  
106   long    scenedate;              /* date of latest scene or object file */
107   long    octreedate;             /* date of octree */
108 + long    matdate;                /* date of latest material file */
109  
110   int     explicate = 0;          /* explicate variables */
111   int     silent = 0;             /* do work silently */
# Line 423 | Line 424 | checkfiles()                   /* check for existence and modified tim
424                                  vnam(OCTREE), vnam(SCENE));
425                  exit(1);
426          }
427 +        matdate = -1;
428 +        if (vdef(MATERIAL))
429 +                matdate = checklast(vval(MATERIAL));
430   }      
431  
432  
# Line 561 | Line 565 | checkambfile()                 /* check date on ambient file */
565   {
566          long    afdate;
567  
568 <        if (vdef(AMBFILE)) {
569 <                afdate = fdate(vval(AMBFILE));
570 <                if (afdate >= 0 & octreedate > afdate)
571 <                        rmfile(vval(AMBFILE));
572 <        }
568 >        if (!vdef(AMBFILE))
569 >                return;
570 >        if ((afdate = fdate(vval(AMBFILE))) < 0)
571 >                return;
572 >        if (octreedate > afdate | matdate > afdate)
573 >                rmfile(vval(AMBFILE));
574   }
575  
576  
# Line 1052 | Line 1057 | char   *opts;
1057                          sprintf(vs, "%d", vn);
1058                  sprintf(picfile, "%s_%s.pic", vval(PICTURE), vs);
1059                                                  /* check date on picture */
1060 <                if (fdate(picfile) > octreedate)
1060 >                if (fdate(picfile) >= octreedate)
1061                          continue;
1062                                                  /* build rpict command */
1063                  sprintf(rawfile, "%s_%s.raw", vval(PICTURE), vs);
1064 <                if (fdate(rawfile) > octreedate)        /* recover */
1064 >                if (fdate(rawfile) >= octreedate)       /* recover */
1065                          sprintf(combuf, "rpict%s%s -ro %s %s",
1066                                          rep, opts, rawfile, vval(OCTREE));
1067                  else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines