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.7 by greg, Fri Jan 29 17:21:43 2010 UTC vs.
Revision 1.10 by greg, Tue Mar 25 05:36:22 2014 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13   #include  <math.h>
14   #include  "platform.h"
15  
16 < #define  MAXCOL         2048            /* maximum number of columns */
16 > #define  MAXCOL         8192            /* maximum number of columns */
17  
18   #define  ADD            0               /* add numbers */
19   #define  MULT           1               /* multiply numbers */
# 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