text: fseek man page
  Prolog
  This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
  fseek, fseeko — reposition a file-position indicator in a stream
  Synopsis
  #include <stdio.h> int fseek(FILE *stream, long offset, int whence); int fseeko(FILE *stream, off_t offset, int whence); of the file for update.
  In a locale with state-dependent encoding, whether fseek() restores the stream's shift state is implementation-defined.
  The fseeko() function shall be equivalent to the fseek() function except that the offset argument is of type off_t.
  Return Value
  The fseek() and fseeko() functions shall return 0 if they succeed.
  Otherwise, they shall return -1 and set errno to indicate the error.
  Errors
  The fseek() and fseeko() functions shall fail if, either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fseek() or fseeko()INVAL
  The whence argument is invalid. The resulting file-position indicator would be set to a negative value.
  -.
  -.
  -.
  The fseek() and fseeko() functions may fail if:
  - ENXIO
  A request was made of a nonexistent device, or the request was outside the capabilities of the device.
  The following sections are informative.
  Examples
  None.
  Application Usage
  None.
  Rationale
  None.
  Future Directions
  None.
  See Also
  Section 2.5, Standard I/O Streams, fopen(), fsetpos(), ftell(), getrlimit(), lseek(), rewind(), ulimit(), ungetc(), write()memopen(3p), ftell(3p), rewind(3p), stdin(3p), stdio.h(0p), ungetc(3p), ungetwc(3p).