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

Comparing ray/src/util/dctimestep.c (file contents):
Revision 2.16 by greg, Mon Apr 11 03:47:46 2011 UTC vs.
Revision 2.19 by greg, Tue Feb 21 20:09:25 2012 UTC

# Line 300 | Line 300 | cm_bsdf(const COLOR bsdfLamb, const COLOR specCol, con
300          CMATRIX *cm = cm_alloc(bsdf->nout, bsdf->ninc);
301          int     nbadohm = 0;
302          int     nneg = 0;
303        float   dom;
304        int     doforward;
303          int     r, c;
304                                          /* reciprocity is "transparent" */
305          for (c = 0; c < cm->ncols; c++) {
306 <                                        /* get projected solid angle */
307 <                dom = mBSDF_incohm(bsdf,c);
306 >                const double    dom = mBSDF_incohm(bsdf,c);
307 >                                        /* projected solid angle */
308                  nbadohm += (dom <= 0);
309  
310                  for (r = 0; r < cm->nrows; r++) {
# Line 384 | Line 382 | sum_images(const char *fspec, const CMATRIX *cv, FILE
382                  int             dt, xr, yr;
383                  COLORV          *psp;
384                                                          /* check for zero */
385 <                if ((scv[RED] == 0) & (scv[GRN] == 0) & (scv[BLU] == 0))
385 >                if ((scv[RED] == 0) & (scv[GRN] == 0) & (scv[BLU] == 0) &&
386 >                                (myDT != DTfromHeader) | (i < cv->nrows-1))
387                          continue;
388                                                          /* open next picture */
389                  sprintf(fname, fspec, i);
# Line 446 | Line 445 | sum_images(const char *fspec, const CMATRIX *cv, FILE
445   static int
446   hasNumberFormat(const char *s)
447   {
448 <        while (*s && *s != '%')
449 <                s++;
450 <        if (!*s)
451 <                return(0);
452 <        do
453 <                ++s;
454 <        while (isdigit(*s));
455 <
456 <        return((*s == 'd') | (*s == 'i') | (*s == 'o') |
457 <                        (*s == 'x') | (*s == 'X'));
448 >        while (*s) {
449 >                while (*s != '%')
450 >                        if (!*s++)
451 >                                return(0);
452 >                if (*++s == '%') {              /* ignore "%%" */
453 >                        ++s;
454 >                        continue;
455 >                }
456 >                while (isdigit(*s))             /* field length */
457 >                        ++s;
458 >                                                /* field we'll use? */
459 >                if ((*s == 'd') | (*s == 'i') | (*s == 'o') |
460 >                                        (*s == 'x') | (*s == 'X'))
461 >                        return(1);
462 >        }
463 >        return(0);                              /* didn't find one */
464   }
465  
466   int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines