REWIND(3) Library Functions Manual REWIND(3)

rewindreset file position indicator in a stream

#include <stdio.h>

void rewind(FILE *stream);

The call:

rewind(stream)
is equivalent to:
(void) fseek(stream, 0L, SEEK_SET)

except that also clears the error indicator.

The rewind() function returns no value.

Refer to fseek(3) with the exception of [EINVAL] which does not apply.

None.

Because rewind() does not return a value, an application wishing to detect errors should clear errno , then call rewind() , and if errno is non-zero, assume an error has occurred.

None.

fseek(3) , <stdio.h> .

Derived from Issue 1 of the SVID.

February 1997 posix.fail