Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The function sets the file position indicator for the stream pointed to by The new position, measured in bytes, is obtained by adding bytes to the position specified by If is set to or the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the function clears the end-of-file indicator for the stream and undoes any effects of the function on the same stream. The function obtains the current value of the file position indicator for the stream pointed to by The function sets the file position indicator for the stream pointed to by to the beginning of the file. It is equivalent to: except that the error indicator for the stream is also cleared (see The and functions are alternate interfaces equivalent to and (with whence set to ), setting and storing the current value of the file offset into or from the object referenced by On some systems an object may be a complex object and these routines may be the only way to portably reposition a text stream.

RETURN VALUES

The function returns no value. Upon successful completion, return 0, and returns the current offset. Otherwise, returns -1 and the others return a nonzero value and the global variable is set to indicate the error.

ERRORS

The specified is not a seekable stream. The argument to was not or The function and may also fail and set for any of the errors specified for the routines and

SEE ALSO

STANDARDS

The and functions conform to


Table of Contents