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

Comparing ray/src/cal/total.c (file contents):
Revision 1.8 by greg, Fri Jun 7 18:49:30 2013 UTC vs.
Revision 1.10 by greg, Tue Mar 25 05:36:22 2014 UTC

# Line 213 | Line 213 | putrecord(                     /* write out results record */
213                  return;
214          }
215                                                  /* ASCII output */
216 <        while (n-- > 0)
217 <                fprintf(fp, "%.9g%c", *field++, tabc);
216 >        while (n-- > 0) {
217 >                fprintf(fp, "%.9g", *field++);
218 >                if (n) fputc(tabc, fp);
219 >        }
220          fputc('\n', fp);
221   }
222  
# Line 241 | Line 243 | char  *fname
243          }
244          if (nbicols)
245                  SET_FILE_BINARY(fp);
246 + #ifdef getc_unlocked                            /* avoid lock/unlock overhead */
247 +        flockfile(fp);
248 + #endif
249 +
250          ltotal = 0;
251          while (!feof(fp)) {
252                  if (ltotal == 0) {                      /* initialize */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines