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

Comparing ray/src/util/rcollate.c (file contents):
Revision 2.12 by greg, Fri May 30 18:10:20 2014 UTC vs.
Revision 2.13 by greg, Fri May 30 18:24:06 2014 UTC

# Line 237 | Line 237 | output_stream(FILE *fp)
237  
238          if (fp == NULL)
239                  return(0);
240 <        fflush(stdout);                 /* assumes nothing in input buffer */
241 <        while ((n = read(fileno(fp), buf, sizeof(buf))) > 0)
240 >        fflush(stdout);
241 >        while ((n = fread(buf, 1, sizeof(buf), fp)) > 0)
242                  if (write(fileno(stdout), buf, n) != n)
243                          return(0);
244 <        return(n >= 0);
244 >        return(!ferror(fp));
245   }
246  
247   /* get next word from stream, leaving stream on EOL or start of next word */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines