K
Keith Thompson
Kenneth Brody said:On my system, rewind() says it also clears any error status, which is
something fseek() doesn't do.
I don't know if that's standard or not, however.
Yes, it is.
C99 7.19.9.5:
The rewind function sets the file position indicator for the
stream pointed to by stream to the beginning of the file. It is
equivalent to
(void)fseek(stream, 0L, SEEK_SET)
except that the error indicator for the stream is also cleared.