Open System Services Library Calls Reference Manual (G06.28+, H06.05+)

OSS Library Calls (n - r) rewind(3)
NAME
|
rewind - Repositions the le pointer of a stream |
LIBRARY |
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL |
G-series native OSS processes: /G/system/sysnn/zcrtlsrl |
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL |
H-series OSS processes: /G/system/zdllnnn/zcrtldll |
SYNOPSIS
|
#include <stdio.h> |
void rewind( |
FILE stream); |
PARAMETERS
|
stream ||
Species the I/O stream. |
DESCRIPTION |
The rewind() function is equivalent to (void) fseek (stream, 0L, SEEK_SET), except that it also |
clears the error indicator. |
RETURN VALUES
|
The rewind() function does not return a value. |
ERRORS |
The rewind() function fails if either the stream is unbuffered, or the streams buffer needed to be |
ushed and the call caused an underlying lseek() or write() function to be invoked. In addition, |
if any of the following conditions occurs, the rewind() function sets errno to the corresponding |
value: |
[EAGAIN] ||
The O_NONBLOCK ag is set for the le descriptor underlying the stream |
parameter and the process would be delayed in the write operation. |
[EBADF] ||
The le descriptor underlying the stream parameter is not a valid le descriptor |
open for writing. |
[EFBIG] ||
An attempt was made to write to a le that exceeds the processs le size limit or |
the maximum le size. |
[EINTR] ||
The write operation was terminated by a signal, and either none, some, or all the |
data was transferred. If there is buffered I/O, it is recommended that you call the |
fush( ) function before the rewind() function to guarantee that the buffer char- |
acters were written. |
[EIO] ||
The process is a member of a background process group attempting to write to its |
controlling terminal, the TOSTOP signal is set, the process is neither ignoring |
nor blocking SIGTTOU, and the process group of the process is orphaned. |
527187-007 Hewlett-Packard Company 5111