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.38 by greg, Sat Jan 1 12:12:32 1994 UTC vs.
Revision 2.40 by greg, Thu Apr 21 12:22:44 1994 UTC

# Line 701 | Line 701 | oconv()                                /* run oconv and mkillum if necessary */
701                          exit(1);
702                  }
703                  octreedate = time((time_t *)NULL);
704 +                if (octreedate < scenedate)     /* in case clock is off */
705 +                        octreedate = scenedate;
706          }
707          if (oct1name == vval(OCTREE))           /* no mkillum? */
708                  oct1date = octreedate > matdate ? octreedate : matdate;
# Line 727 | Line 729 | oconv()                                /* run oconv and mkillum if necessary */
729                          exit(1);
730                  }
731                  oct0date = time((time_t *)NULL);
732 +                if (oct0date < octreedate)      /* in case clock is off */
733 +                        oct0date = octreedate;
734 +                if (oct0date < illumdate)       /* ditto */
735 +                        oct0date = illumdate;
736          }
737          mkillumopts(mkopts);                    /* build mkillum command */
738          mktemp(illumtmp);
# Line 755 | Line 761 | oconv()                                /* run oconv and mkillum if necessary */
761                  exit(1);
762          }
763          oct1date = time((time_t *)NULL);
764 +        if (oct1date < oct0date)        /* in case clock is off */
765 +                oct1date = oct0date;
766          rmfile(illumtmp);
767   }
768  
# Line 850 | Line 858 | char   *po;
858                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
859                  badvalue(ZONE);
860          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
861 +        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
862 +                badvalue(ZONE);
863          getoctcube(org, &d);
864          d *= 3./(siz[0]+siz[1]+siz[2]);
865          switch (vscale(DETAIL)) {
# Line 916 | Line 926 | char   *po;
926                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
927                  badvalue(ZONE);
928          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
929 +        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
930 +                badvalue(ZONE);
931          getoctcube(org, &d);
932          d *= 3./(siz[0]+siz[1]+siz[2]);
933          switch (vscale(DETAIL)) {
# Line 985 | Line 997 | char   *po;
997                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
998                  badvalue(ZONE);
999          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
1000 +        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
1001 +                badvalue(ZONE);
1002          getoctcube(org, &d);
1003          d *= 3./(siz[0]+siz[1]+siz[2]);
1004          switch (vscale(DETAIL)) {
# Line 1157 | Line 1171 | register char  *vs;
1171                          badvalue(ZONE);
1172                  for (i = 0; i < 3; i++) {
1173                          dim[i] -= cent[i];
1174 +                        if (dim[i] <= FTINY)
1175 +                                badvalue(ZONE);
1176                          cent[i] += .5*dim[i];
1177                  }
1178                  mult = vlet(ZONE)=='E' ? 2. : .45 ;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines