delorie.com/archives/browse.cgi | search |
> From: Jason Green <mail AT jgreen4 DOT fsnet DOT co DOT uk> > Date: Thu, 31 Aug 2000 23:45:28 +0100 > > AFAICT, fseek() only fails when seeking to before the start of file. `fseek' fails when `lseek' fails. > fread(), in effect, never fails. It just returns less bytes than you > asked for ;-). No, `fread' also fails when `_filbuf' (which actually reads) fails. Try reading from a file on a floppy and remove the floppy half way through, for example. > I suspect if ferror() returns true then errno will have some > meaningful value. No, `ferror' doesn't set errno at all.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |