The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

rewind - reset file position indicator in a stream

 SYNOPSIS



#include <stdio.h>

void rewind(FILE *stream);

 DESCRIPTION

The call:

rewind(stream)

is equivalent to:

(void) fseek(stream, 0L, SEEK_SET)

except that rewind() also clears the error indicator.

 RETURN VALUE

The rewind() function returns no value.

 ERRORS

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

 EXAMPLES

None.

 APPLICATION USAGE

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.

 FUTURE DIRECTIONS

None.

 SEE ALSO

fseek(), <stdio.h>.

DERIVATION

Derived from Issue 1 of the SVID.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]