-int fscanf( FILE * restrict stream, const char * restrict format, ... );
-int scanf( const char * restrict format, ... );
-int sscanf( const char * restrict s, const char * restrict format, ... );
-int vfscanf( FILE * restrict stream, const char * restrict format, va_list ap );
-int vscanf( const char * restrict format, va_list ap );
-int vsscanf( const char * restrict s, const char * restrict format, va_list ap );
-
-int fprintf( FILE * restrict stream, const char * restrict format, ... );
-int printf( const char * restrict format, ... );
-int snprintf( char * restrict s, size_t n, const char * restrict format, ... );
-int sprintf( char * restrict s, const char * restrict format, ... );
-int vfprintf( FILE * restrict stream, const char * restrict format, va_list ap );
-int vprintf( const char * restrict format, va_list ap );
-int vsnprintf( char * restrict s, size_t n, const char * restrict format, va_list ap );
-int vsprintf( char * restrict s, const char * restrict format, va_list ap);
-
-#endif // __STDIO_H
+/* Push the value c (cast to unsigned char) back onto the given (input) stream.
+ A character pushed back in this way will be delivered by subsequent read
+ operations (and skipped by subsequent file positioning operations) as if it
+ has not been read. The external representation of the stream is unaffected
+ by this pushback (it is a buffer operation). One character of pushback is
+ guaranteed, further pushbacks may fail. EOF as value for c does not change
+ the input stream and results in failure of the function.
+ For text files, the file position indicator is indeterminate until all
+ pushed-back characters are read. For binary files, the file position
+ indicator is decremented by each successful call of ungetc(). If the file
+ position indicator for a binary file was zero before the call of ungetc(),
+ behaviour is undefined. (Older versions of the library allowed such a call.)
+ Returns the pushed-back character if successful, EOF if it fails.
+*/
+int ungetc( int c, FILE * stream );
+
+/* Direct input/output functions */
+
+/* Read up to nmemb elements of given size from given stream into the buffer
+ pointed to by ptr. Returns the number of elements successfully read, which
+ may be less than nmemb if a read error or EOF is encountered. If a read
+ error is encountered, the value of the file position indicator is
+ indeterminate. If a partial element is read, its value is indeterminate.
+ If size or nmemb are zero, the function does nothing and returns zero.
+*/
+size_t fread( void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, FILE * _PDCLIB_restrict stream );
+
+/* Write up to nmemb elements of given size from buffer pointed to by ptr to
+ the given stream. Returns the number of elements successfully written, which
+ will be less than nmemb only if a write error is encountered. If a write
+ error is encountered, the value of the file position indicator is
+ indeterminate. If size or nmemb are zero, the function does nothing and
+ returns zero.
+*/
+size_t fwrite( const void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, FILE * _PDCLIB_restrict stream );
+
+/* File positioning functions */
+
+/* Store the current position indicator (and, where appropriate, the current
+ mbstate_t status object) for the given stream into the given pos object. The
+ actual contents of the object are unspecified, but it can be used as second
+ parameter to fsetpos() to reposition the stream to the exact position and
+ parse state at the time fgetpos() was called.
+ Returns zero if successful, nonzero otherwise.
+ TODO: Implementation-defined errno setting for fgetpos().
+*/
+int fgetpos( FILE * _PDCLIB_restrict stream, fpos_t * _PDCLIB_restrict pos );
+
+/* Set the position indicator for the given stream to the given offset from:
+ - the beginning of the file if whence is SEEK_SET,
+ - the current value of the position indicator if whence is SEEK_CUR,
+ - end-of-file if whence is SEEK_END.
+ On text streams, non-zero offsets are only allowed with SEEK_SET, and must
+ have been returned by ftell() for the same file.
+ Any characters buffered by ungetc() are dropped, the end-of-file indicator
+ for the stream is cleared. If the given stream is an update stream, the next
+ operation after a successful fseek() may be either input or output.
+ Returns zero if successful, nonzero otherwise. If a read/write error occurs,
+ the error indicator for the given stream is set.
+*/
+int fseek( FILE * stream, long int offset, int whence );
+
+/* Set the position indicator (and, where appropriate the mbstate_t status
+ object) for the given stream to the given pos object (created by an earlier
+ call to fgetpos() on the same file).
+ Any characters buffered by ungetc() are dropped, the end-of-file indicator
+ for the stream is cleared. If the given stream is an update stream, the next
+ operation after a successful fsetpos() may be either input or output.
+ Returns zero if successful, nonzero otherwise. If a read/write error occurs,
+ the error indicator for the given stream is set.
+ TODO: Implementation-defined errno setting for fsetpos().
+*/
+int fsetpos( FILE * stream, const fpos_t * pos );
+
+/* Return the current offset of the given stream from the beginning of the
+ associated file. For text streams, the exact value returned is unspecified
+ (and may not be equal to the number of characters), but may be used in
+ subsequent calls to fseek().
+ Returns -1L if unsuccessful.
+ TODO: Implementation-defined errno setting for ftell().
+*/
+long int ftell( FILE * stream );
+
+/* Equivalent to (void)fseek( stream, 0L, SEEK_SET ), except that the error
+ indicator for the stream is also cleared.
+*/
+void rewind( FILE * stream );
+
+/* Error-handling functions */
+
+/* Clear the end-of-file and error indicators for the given stream. */
+void clearerr( FILE * stream );
+
+/* Return zero if the end-of-file indicator for the given stream is not set,
+ nonzero otherwise.
+*/
+int feof( FILE * stream );
+
+/* Return zero if the error indicator for the given stream is not set, nonzero
+ otherwise.
+*/
+int ferror( FILE * stream );
+
+/* If s is neither a NULL pointer nor an empty string, print the string to
+ stderr (with appended colon (':') and a space) first. In any case, print an
+ error message depending on the current value of errno (being the same as if
+ strerror( errno ) had been called).
+*/
+void perror( const char * s );
+
+#endif