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.15 by greg, Thu Mar 24 18:48:28 2016 UTC vs.
Revision 1.17 by greg, Thu Aug 18 00:52:47 2016 UTC

# Line 14 | Line 14 | static const char      RCSid[] = "$Id$";
14  
15   #include "platform.h"
16   #include "rtprocess.h"
17 + #include "rtio.h"
18  
19   #define MAXFILE         512             /* maximum number of files */
20  
# Line 149 | Line 150 | char   *argv[];
150                          puteol++;
151                          break;
152                  }
153 <        while (--incnt) {                       /* main loop */
153 >        do {                                    /* main loop */
154                  for (i = 0; i < nfiles; i++) {
155                          if (bytsiz[i]) {                /* binary file */
156 <                                if (fread(buf, bytsiz[i], 1, input[i]) < 1)
156 >                                if (getbinary(buf, bytsiz[i], 1, input[i]) < 1)
157                                          break;
158                                  if (i)
159                                          fputs(tabc[i], stdout);
160 <                                fwrite(buf, bytsiz[i], 1, stdout);
160 >                                putbinary(buf, bytsiz[i], 1, stdout);
161                          } else {
162                                  if (fgets(buf, MAXLINE, input[i]) == NULL)
163                                          break;
# Line 172 | Line 173 | char   *argv[];
173                          putchar('\n');
174                  if (unbuff)
175                          fflush(stdout);
176 <        }
176 >        } while (--incnt);
177          return(0);
178   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines