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

Comparing ray/src/cal/lam.c (file contents):
Revision 1.12 by greg, Fri Jul 26 16:45:04 2013 UTC vs.
Revision 1.14 by greg, Sun Mar 9 20:07:27 2014 UTC

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17  
18   #define MAXFILE         512             /* maximum number of files */
19  
20 < #define MAXLINE         4096            /* maximum input line */
20 > #define MAXLINE         65536           /* maximum input line */
21  
22   FILE    *input[MAXFILE];
23   int     bytsiz[MAXFILE];
# Line 32 | Line 32 | int    argc;
32   char    *argv[];
33   {
34          int     unbuff = 0;
35 +        int     binout = 0;
36          int     i;
37          char    *curtab;
38          int     curbytes;
# Line 79 | Line 80 | char   *argv[];
80                                          fputs(": input size too big\n", stderr);
81                                          exit(1);
82                                  }
83 <                                if (curbytes)
83 >                                if (curbytes) {
84                                          curtab = "";
85 +                                        ++binout;
86 +                                }
87                                  break;
88                          case '\0':
89                                  tabc[nfiles] = curtab;
# Line 128 | Line 131 | char   *argv[];
131                          exit(1);
132                  }
133          }
134 +        if (binout)                             /* binary output? */
135 +                SET_FILE_BINARY(stdout);
136 + #ifdef getc_unlocked                            /* avoid lock/unlock overhead */
137 +        for (i = nfiles; i--; )
138 +                flockfile(input[i]);
139 +        flockfile(stdout);
140 + #endif
141          puteol = 0;                             /* check for ASCII output */
142          for (i = nfiles; i--; )
143                  if (!bytsiz[i] || isprint(tabc[i][0]) || tabc[i][0] == '\t') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines