-/** TeMPorary NAMe. Generates a random file name that does not yet exist in the
- file system. Note that a file generated with this name is not "temporary",
- and must be remove()d normally.
- @param dest NULL, or a char[ L_tmpnam ] array.
- @return A pointer to a static internal buffer containing the file name,
- or NULL if no file name could be generated. If 'dest' is not NULL,
- writes the file name to and returns 'dest'.
- */
-char * tmpnam( char * dest );
-
-int fseek( FILE * stream, long offset, int mode );
-int fsetpos( FILE * stream, const fpos_t * pos );
-int fgetpos( FILE * restrict stream, fpos_t * restrict pos );
-long ftell( FILE * stream );
-
-int fgetc( FILE * stream );
-char *fgets( char * restrict s, int n, FILE * restrict stream );
-size_t fread( void * restrict ptr, size_t size, size_t nelem, FILE * restrict stream );
-int getc( FILE * stream );
+/** TeMPorary NAMe. Generates a file name that does not yet exist in the file
+ system, and is different from the last call to the function. Note that a
+ file generated with this name is not "temporary", and must be remove()d
+ normally.
+ @param filename NULL, or a char[ L_tmpnam ] array. (Beware, calling this
+ function with a NULL parameter is not thread-safe.)
+ @return If 'filename' is NULL, a pointer to an internal static buffer
+ holding the generated name. If 'filename' is not null, the
+ generated name is stored in 'filename', and 'filename' is returned.
+ If the filename generation fails, function returns NULL.
+ */
+char * tmpnam( char * filename );
+
+// ----------------------------------------------------------------------------
+
+/** File SEEK. Sets the current position in a file to the values specified by
+ start and offset.
+ @param fh The file handle.
+ @param offset The offset from 'start' to position to.
+ @param start The starting point from which to calculate the offset. May be
+ one of SEEK_SET, SEEK_CUR, SEEK_END.
+ @return 0 if successful, non-zero if error encountered.
+ */
+int fseek( FILE * fh, long offset, int start );
+
+/** REWIND file. Equivalent to (void) fseek( fh, 0, SEEK_SET ).
+ @param fh The file handle.
+ */
+void rewind( FILE * fh );
+
+/** File TELL position. Tells the current offset into a given file.
+ @param fh The file handle.
+ @return The offset into the file.
+ */
+long ftell( FILE * fh );
+
+/** File GET POSition. Stores the current state and position in a file.
+ @param fh The file handle.
+ @param pos The object to store the current state in.
+ @return 0 if successful, non-zero if error encountered.
+ */
+int fgetpos( FILE * restrict fh, fpos_t * restrict pos );
+
+/** File SET POSition. Sets the current file position to the value stored in a
+ given fpos_t object.
+ @param fh The file handle.
+ @param pos The fpos_t object.
+ @return 0 if successful, non-zero if error encountered.
+ */
+int fsetpos( FILE * fh, const fpos_t * pos );
+
+// ----------------------------------------------------------------------------
+
+/** File GET Character. Reads a character from file.
+ @param fh The file handle.
+ @return The next character in the file, as unsigned char converted to int,
+ or EOF if end of file is reached.
+ */
+int fgetc( FILE * fh );
+
+/** GET Character. Equivalent to fgetc(), but may be implemented as macro, and
+ is allowed to evaluate its parameter more than once.
+ @param fh The file handle.
+ @return The character read, or EOF if end of file / error encountered.
+ */
+int getc( FILE * fh );
+
+/** GET CHARacter. Equivalent to getc( stdin ).
+ @return The character read, or EOF if end of file / error encountered.
+ */