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.18 by greg, Fri Oct 21 16:31:03 2011 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 446 | Line 444 | sum_images(const char *fspec, const CMATRIX *cv, FILE
444   static int
445   hasNumberFormat(const char *s)
446   {
447 <        while (*s && *s != '%')
448 <                s++;
449 <        if (!*s)
450 <                return(0);
451 <        do
452 <                ++s;
453 <        while (isdigit(*s));
454 <
455 <        return((*s == 'd') | (*s == 'i') | (*s == 'o') |
456 <                        (*s == 'x') | (*s == 'X'));
447 >        while (*s) {
448 >                while (*s != '%')
449 >                        if (!*s++)
450 >                                return(0);
451 >                if (*++s == '%') {              /* ignore "%%" */
452 >                        ++s;
453 >                        continue;
454 >                }
455 >                while (isdigit(*s))             /* field length */
456 >                        ++s;
457 >                                                /* field we'll use? */
458 >                if ((*s == 'd') | (*s == 'i') | (*s == 'o') |
459 >                                        (*s == 'x') | (*s == 'X'))
460 >                        return(1);
461 >        }
462 >        return(0);                              /* didn't find one */
463   }
464  
465   int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines