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

Comparing ray/src/cv/bsdf2klems.c (file contents):
Revision 2.13 by greg, Wed Mar 12 21:15:31 2014 UTC vs.
Revision 2.16 by greg, Wed Oct 1 23:32:42 2014 UTC

# Line 41 | Line 41 | prog_show(double frac)
41          char    pbar[256];
42          int     nchars;
43  
44 <        if (do_prog <= 0) return;
44 >        if (do_prog <= 1) return;
45          if (do_prog > sizeof(pbar)-2)
46                  do_prog = sizeof(pbar)-2;
47          if (frac < 0) frac = 0;
# Line 55 | Line 55 | prog_show(double frac)
55   }
56  
57   /* Finish progress bar */
58 < #define prog_done()     if (do_prog) fputc('\n',stderr); else
58 > static void
59 > prog_done(void)
60 > {
61 >        int     n = do_prog;
62  
63 +        if (n <= 1) return;
64 +        fputc('\r', stderr);
65 +        while (n--)
66 +                fputc(' ', stderr);
67 +        fputc('\r', stderr);
68 + }
69 +
70   /* Return angle basis corresponding to the given name */
71   static ANGLE_BASIS *
72   get_basis(const char *bn)
# Line 366 | Line 376 | eval_rbf(void)
376  
377                      sum += eval_rbfrep(rbf, vout);
378                  }
379 <                fo_getvec(vout, j+.5, abp);     /* use centered secant */
370 <                bsdfarr[j*abp->nangles + i] = sum / (npsamps*vout[2]);
379 >                bsdfarr[j*abp->nangles + i] = sum / (double)npsamps;
380              }
381              if (rbf != NULL)
382                  free(rbf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines