[Scummvm-devel] eof & err
Willem Jan Palenstijn
wjp at usecode.org
Sun Jul 12 21:57:38 CEST 2009
On Sun, Jul 12, 2009 at 09:54:35PM +0200, sunmax at libero.it wrote:
> Thanks Willem!
>
> > "
> > If size or nitems is 0, fread() shall return 0 and the contents
> > of the array and the state of the stream remain unchanged.
> > "
>
> Ah ah!
>
> If this fixes it (I am sure it will), should we still modify
> ps2_ferror to return "false" even when eof is true [*]?
>
> [*] note: in the actual PS2 implementation we are only tracing
> _eof as a file condition, so we either return that or
> default to false. Whatever you think is smarter ;-)
If you don't keep track of I/O errors (like the scratched disks Johannes
mentioned), always return false.
The "error indicator" (return by err() ) and the "end of file indicator"
(returned by eos() ) are separate.
-Willem Jan
More information about the Scummvm-devel
mailing list