Kirill K. Smirnov wrote:
What if you try to fseek to the end of file (SEEK_END)? Should IOEOF flag be cleared in this case?
I believe that for a standards conforming fseek it should be. See:
http://www.opengroup.org/onlinepubs/000095399/functions/fseek.html
For standards conforming behaviour fseek(f,0,SEEK_END) clears the flag, and the next fread will return 0 and set it again.
However, I realize that for wine, the standards are pretty much moot as wine attempts to be bug compatible with windows. Obviously some more testing (on windows and wine) is required.
And may _lseek() function be better place for this?
I don't think so. _lseek keeps its own flags.
Erik