[Scummvm-devel] eof & err
Johannes Schickel
lordhoto at scummvm.org
Sun Jul 12 22:02:08 CEST 2009
sunmax at libero.it wrote:
> Thanks Johannes!
>
>
>> Just checked our ps2_ferror implementation, which calls
>> Ps2File::getErr. Seems like Ps2File::getErr returns true on eof,
>>
>
> So does the DS:
>
> int std_ferror(FILE* handle) {
> //FIXME: not implemented?
> // consolePrintf("ferror ");
>
> return readPastEndOfFile;
> }
When I'm not totally wrong "readPastEndOfFile" is not eof though. It
seems only to be set when not all data could be read in "std_fread". I
guess a better name for that variable would be "freadError". So this
behavior is different than of the PS2 backend.
BTW. that DS file access code sure looks strange, like keeping a single
variable for read error for all streams etc. I might of course just read
the code wrong though.
// Johannes
More information about the Scummvm-devel
mailing list