MSVCRT: Handle \r at buffer boundary

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Jan 11 14:14:34 CST 2010


>>>>> "Alexandre" == Alexandre Julliard <julliard at winehq.org> writes:

    Alexandre> Uwe Bonnes <bon at hertz.ikp.physik.tu-darmstadt.de> writes:
    >> @@ -1767,6 +1771,12 @@ static int read_i(int fd, void *buf, unsigned
    >> int count) if (MSVCRT_fdesc[fd].wxflag & WX_TEXT) { DWORD i, j; + if
    >> (bufstart[num_read-1] == '\r') + { + if(pushback) +
    >> MSVCRT__lseeki64(fd, -1, SEEK_CUR);

    Alexandre> You can't use lseek for this, the file may not be seekable.

Would SetFilePointer() do the right job?

Thanks
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the wine-devel mailing list