-void clearerr( FILE * stream );
-int fclose( FILE * stream );
-int feof( FILE * stream );
-int ferror( FILE * stream );
-int fflush( FILE * stream );
-FILE * fopen( const char * restrict filename, const char * restrict mode );
-FILE * freopen( const char * restrict filename, const char * restrict mode, FILE * stream );
+/* Input/output <stdio.h>
+
+ This file is part of the Public Domain C Library (PDCLib).
+ Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#ifndef _PDCLIB_STDIO_H
+#define _PDCLIB_STDIO_H _PDCLIB_STDIO_H
+
+#ifndef _PDCLIB_INT_H
+#define _PDCLIB_INT_H _PDCLIB_INT_H
+#include <_PDCLIB_int.h>
+#endif
+
+#ifndef _PDCLIB_SIZE_T_DEFINED
+#define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED
+typedef _PDCLIB_size_t size_t;
+#endif
+
+#ifndef _PDCLIB_NULL_DEFINED
+#define _PDCLIB_NULL_DEFINED _PDCLIB_NULL_DEFINED
+#define NULL _PDCLIB_NULL
+#endif
+
+/* See setvbuf(), third argument */
+/* Fully buffered - transmit block-wise */
+#define _IOFBF 2
+/* Line buffered - transmit line-wise */
+#define _IOLBF 1
+/* Not buffered - transmit immediately */
+#define _IONBF 0
+
+/* The following are platform-dependant, and defined in _PDCLIB_config.h. */
+typedef _PDCLIB_fpos_t fpos_t;
+typedef struct _PDCLIB_file_t FILE;
+#define EOF -1
+#define BUFSIZ _PDCLIB_BUFSIZ
+#define FOPEN_MAX _PDCLIB_FOPEN_MAX
+#define FILENAME_MAX _PDCLIB_FILENAME_MAX
+#define L_tmpnam _PDCLIB_L_tmpnam
+#define TMP_MAX _PDCLIB_TMP_MAX
+
+/* See fseek(), third argument */
+#define SEEK_CUR 1
+#define SEEK_END 2
+#define SEEK_SET 4
+
+/* Text-mode I/O is at liberty to skip non-printing characters and trailing spaces.
+ Binary I/O is at liberty to add trailing zero bytes.
+ First operation decides "orientation" of the stream (wide / byte).
+ freopen() removes orientation; see also fwide().
+ Binary wide-oriented streams have the file-positioning restrictions ascribed to both text and binary streams.
+ For wide-oriented streams, after a successful call to a file-positioning function that leaves the file position indicator prior to the end-of-file, a wide character output function can overwrite a partial multibyte character; any file contents beyond the byte(s) written are henceforth indeterminate.
+ Whether a file of zero length (unwritten-to) actually exists is implementation-defined.
+ Wide text input from file: fgetwc() / mbrtowc()
+ Wide text output to file: wcrtomb() / fputwc()
+ Multibyte encoding in file may contain embedded null bytes
+ Multibyte encoding in file need not begin / end in initial shift state.
+ Conversion may trigger EILSEQ.
+*/
+
+/* Operations on files */
+
+/* Remove the given file. Returns zero if successful, non-zero otherwise. If
+ the file is open, this implementation does flush its buffer and closes the
+ file before removing it. (It might be still accessible by another hard link
+ etc.
+*/