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.17 by greg, Fri Apr 15 18:43:57 2011 UTC vs.
Revision 2.19 by greg, Tue Feb 21 20:09:25 2012 UTC

# Line 382 | 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 444 | 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