.BI "int fsetpos(FILE *" stream ", fpos_t *" pos );
.SH DESCRIPTION
The
-.B fseek
+.BR fseek ()
function sets the file position indicator for the stream pointed to by
.IR stream .
The new position, measured in bytes, is obtained by adding
.BR SEEK_END ,
the offset is relative to the start of the file, the current position
indicator, or end-of-file, respectively. A successful call to the
-.B fseek
+.BR fseek ()
function clears the end-of-file indicator for the stream and undoes
any effects of the
.BR ungetc (3)
function on the same stream.
.PP
The
-.B ftell
+.BR ftell ()
function obtains the current value of the file position indicator for the
stream pointed to by
.IR stream .
.PP
The
-.B rewind
+.BR rewind ()
function sets the file position indicator for the stream pointed to by
.I stream
to the beginning of the file. It is equivalent to:
.BR clearerr (3)).
.PP
The
-.B fgetpos
+.BR fgetpos ()
and
-.B fsetpos
+.BR fsetpos ()
functions are alternate interfaces equivalent to
-.B ftell
+.BR ftell ()
and
-.B fseek
+.BR fseek ()
(with whence set to
.BR SEEK_SET ),
setting and storing the current value of the file offset into or from the
portably reposition a text stream.
.SH "RETURN VALUE"
The
-.B rewind
+.BR rewind ()
function returns no value. Upon successful completion,
-.BR fgetpos ,
-.BR fseek ,
-.B fsetpos
+.BR fgetpos (),
+.BR fseek (),
+.BR fsetpos ()
return 0,
and
-.B ftell
+.BR ftell ()
returns the current offset. Otherwise, \-1 is returned and the global
variable errno is set to indicate the error.
.SH ERRORS
The
.I whence
argument to
-.B fseek
+.BR fseek ()
was not
.BR SEEK_SET ,
.BR SEEK_END ,
.BR SEEK_CUR .
.PP
The function
-.BR fgetpos ,
-.BR fseek ,
-.BR fsetpos ,
+.BR fgetpos (),
+.BR fseek (),
+.BR fsetpos (),
and
-.B ftell
+.BR ftell ()
may also fail and set
.I errno
for any of the errors specified for the routines
.BR malloc (3).
.SH "CONFORMING TO"
The
-.BR fgetpos ,
-.BR fsetpos ,
-.BR fseek ,
-.BR ftell ,
+.BR fgetpos (),
+.BR fsetpos (),
+.BR fseek (),
+.BR ftell (),
and
-.BR rewind
+.BR rewind ()
functions conform to ANSI X3.159-1989 (``ANSI C'').
.SH "SEE ALSO"
.BR lseek (2),