mvcrt.ungetc and stdio buffering

Jon Griffiths jon_p_griffiths at yahoo.com
Wed Jan 2 07:58:24 CST 2002


>Have a look at the following two messages from Marcus Meissner to
>wine-devel and wine-patches:

Hmm, those links dont work for me, however I remember:

The header files for stdio have macro versions of putc/getc so your
implementation must use the FILE structure fields in a binary
compatable way (as they are currently; I implemented the code to
pretend that the buffer is alway empty and needs to be reread/put on
every operation).

Provided you can make optimised VC++ compiled programs (i.e. those
that use the macro version of get/putc) work, you dont have any extra
threading issues that the code should handle already (but probably
doesn't; large sections are not yet thread safed). The performance
improvement would be significant also.

You should make sure you test your changes thoroughly tho, as the
file code is rather vital to avoiding  needing native msvcrt ;-)

Cheers,
Jon


=====
"Don't wait for the seas to part, or messiahs to come;
 Don't you sit around and waste this chance..." - Live

jon_p_griffiths at yahoo.com

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com




More information about the wine-devel mailing list