]> pd.if.org Git - pdclib/blobdiff - internals/_PDCLIB_int.h
Moving platform specifics from stdio.h to _PDCLIB_config.h. More docs.
[pdclib] / internals / _PDCLIB_int.h
index 67df3e1f640cb06e6cb22813a539feab1ab8f723..e8ce60bf2190a33a0042f92c8b0c828952a1af73 100644 (file)
@@ -250,6 +250,28 @@ typedef unsigned _PDCLIB_intmax _PDCLIB_uintmax_t;
 #define _PDCLIB_INTMAX_C( value )  concat( value, _PDCLIB_INTMAX_LITERAL )
 #define _PDCLIB_UINTMAX_C( value ) concat( value, concat( u, _PDCLIB_INTMAX_LITERAL ) )
 
+/* -------------------------------------------------------------------------- */
+/* Various <stdio.h> internals                                                */
+/* -------------------------------------------------------------------------- */
+
+/* Flags for representing mode (see fopen()). */
+#define _PDCLIB_FREAD    1
+#define _PDCLIB_FWRITE   2
+#define _PDCLIB_FAPPEND  4
+#define _PDCLIB_FRW      8
+#define _PDCLIB_FBIN    16
+
+struct
+{
+    _PDCLIB_fd_t   handle;   /* OS-specific file descriptor */
+    _PDCLIB_fpos_t position; /* file position indicator */
+    void *         buffer;   /* file buffer */
+    size_t         bufsize;  /* size of buffer */
+    int            status;   /* misc. status bits */
+  /*mbstate_t      mbstate;*//* multibyte parse state */ /* TODO: Unmask. */
+    FILE *         next;     /* provisions for linked list handling */
+} _PDCLIB_file_t;
+
 /* -------------------------------------------------------------------------- */
 /* Declaration of helper functions (implemented in functions/_PDCLIB).        */
 /* -------------------------------------------------------------------------- */