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

Comparing ray/src/util/getinfo.c (file contents):
Revision 2.14 by greg, Tue Aug 30 06:10:12 2016 UTC vs.
Revision 2.16 by greg, Tue Mar 20 18:18:39 2018 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   #include  <string.h>
12  
13   #include  "platform.h"
14 + #include  "rtprocess.h"
15   #include  "resolu.h"
16  
17   #ifdef getc_unlocked            /* avoid nasty file-locking overhead */
18 + #undef getc
19   #undef getchar
20   #undef putchar
21 + #define getc            getc_unlocked
22   #define getchar         getchar_unlocked
23   #define putchar         putchar_unlocked
24   #endif
25  
23 #if defined(_WIN32) || defined(_WIN64)
24 #include <process.h>
25 #define execvp  _execvp
26 #endif
27
26   static gethfunc tabstr;
27   static void getdim(FILE *fp);
28   static void copycat(void);
# Line 165 | Line 163 | copycat(void)                  /* copy input to output */
163  
164          fflush(stdout);
165          while ((n = fread(buf, 1, sizeof(buf), stdin)) > 0)
166 <                if (write(fileno(stdout), buf, n) != n)
166 >                if (writebuf(fileno(stdout), buf, n) != n)
167                          break;
168   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines