[msvcrt] short tty reads don't imply EOF

Damjan Jovanovic damjan.jov at gmail.com
Fri Nov 23 00:29:24 CST 2007


On Nov 21, 2007 3:12 PM, Alexandre Julliard <julliard at winehq.org> wrote:
> "Damjan Jovanovic" <damjan.jov at gmail.com> writes:
>
> > Changelog:
> > * For ttys, short reads don't mean we're at the end of the file.
>
> That's not limited to ttys, other file types can have short reads too.

Yes, but removing the entire block of code that handles short reads
causes many msvcrt tests to fail :-).

There is no general way to tell you're at the end of the file, before
you actually get there (by read() returning 0). But, you can't read
ahead, because that won't work for ttys. Suggestions?

While on the topic of reading, is there any reason why ReadFile()
calls ReadConsoleA() for console handles, but ReadFileEx() does not?

> --
> Alexandre Julliard
> julliard at winehq.org
>

Damjan



More information about the wine-devel mailing list