+
+/* Open the file with the given filename in the given mode, and return a stream
+ handle for it in which error and end-of-file indicator are cleared. Defined
+ values for mode are:
+
+ READ MODES
+ text files binary files
+ without update "r" "rb"
+ with update "r+" "rb+" or "r+b"
+
+ Opening in read mode fails if no file with the given filename exists, or if
+ cannot be read.
+
+ WRITE MODES
+ text files binary files
+ without update "w" "wb"
+ with update "w+" "wb+" or "w+b"
+
+ With write modes, if a file with the given filename already exists, it is
+ truncated to zero length.
+
+ APPEND MODES
+ text files binary files
+ without update "a" "ab"
+ with update "a+" "ab+" or "a+b"
+
+ With update modes, if a file with the given filename already exists, it is
+ not truncated to zero length, but all writes are forced to end-of-file (this
+ regardless to fseek() calls). Note that binary files opened in append mode
+ might have their end-of-file padded with '\0' characters.
+
+ Update modes mean that both input and output functions can be performed on
+ the stream, but output must be terminated with a call to either fflush(),
+ fseek(), fsetpos(), or rewind() before input is performed, and input must
+ be terminated with a call to either fseek(), fsetpos(), or rewind() before
+ output is performed, unless input encountered end-of-file.
+
+ If a text file is opened with update mode, the implementation is at liberty
+ to open a binary stream instead. This implementation honors the exact mode
+ given.
+
+ The stream is fully buffered if and only if it can be determined not to
+ refer to an interactive device. As the generic code of this implementation
+ cannot determine this, _IOLBF (line buffering) is used for all streams.
+
+ If the mode string begins with but is longer than one of the above sequences
+ the implementation is at liberty to ignore the additional characters, or do
+ implementation-defined things. This implementation only accepts the exact
+ modes above.
+
+ Returns a pointer to the stream handle if successfull, NULL otherwise.
+*/