msvcrt [1/4]: File read buffer tests
Duane Clark
fpga at pacbell.net
Sat Jul 29 17:23:26 CDT 2006
The primary problem these patches attempt to address is the
malfunctioning ftell when reading a file in text mode (which breaks one
of my apps). In addition a couple other small bugs are addressed.
Currently, Wine maintains an internal buffer, via the function
MSVCRT__filbuf(), to avoid many small reads directly from the file. When
it fills this buffer in text mode, it discards carriage returns, and
most of the other functions are happy with this.
Unfortunately, this breaks ftell. To make ftell work, the carriage
returns need to be left in the buffer. Since the other functions were
expecting them to be already removed, this impacts several other places.
And specifically, everywhere that uses _read() needs to be checked/fixed.
So the first step is adding a bunch of tests to check all the places
that might cause problems, and checking both binary and text mode reads.
Changelog: File read buffer tests
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file01.diff
Type: text/x-patch
Size: 9356 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060729/21990e0a/file01.bin
More information about the wine-patches
mailing list