◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The fgetpos function gets the current value of the <stream> argument's file-position indicator and stores it in the object pointed to by <pos>. Later, the fsetpos function uses information stored in <pos> to reset a stream's pointer to its position at the time fgetpos was called. The fsetpos function sets the file-position indicator for <stream> to the value of <pos>, which is obtained in a prior call to fgetpos against <stream>. The fsetpos function clears the end-of- file indicator and undoes any effects of the ungetc function on <stream>. After calling fsetpos, the next operation on <stream> can be either input or output. The <pos> value is stored in an internal format and is intended for use only by the fgetpos and fsetpos functions. Return Value If successful, the fgetpos and fsetpos functions return 0. On failure, they return a nonzero value and set errno to EINVAL or EBADF. -♦-