> On May 13, 2016, at 2:08 AM, Georg Mischler <[email protected]> wrote: > > Ok, I think I got it figured out. > > The code in wordfile() blindly assumed that read() would always return > exactly the number of bytes requested. This is NOT garanteed by the > specification. It's perfectly valid for read() to return less, but > never more data than requested.
On Unix a short read from a regular file always means EOF. Read(2) is an operating system function call. > Windows is doing something very reasonable here. When the requested > read size would split up a CRNL, then it stops reading one byte earlier. > This ensures that the next read() will be able to correctly convert the > CRNL into a single NL. On Windows, apparently, not always. Unix handles such things in the stdio library. Bah! Randolph _______________________________________________ Radiance-dev mailing list [email protected] http://www.radiance-online.org/mailman/listinfo/radiance-dev
