X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;h=e8ce60bf2190a33a0042f92c8b0c828952a1af73;hb=745d01f0f01fa22fa6a17851b24c6a34d900ee80;hp=42f5e8f2dbf82967f3d8515655cf17dd971205eb;hpb=d02f38605b53cdff5460cc6b9e1b2a80c3a2ba4c;p=pdclib diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index 42f5e8f..e8ce60b 100644 --- a/internals/_PDCLIB_int.h +++ b/internals/_PDCLIB_int.h @@ -1,7 +1,5 @@ /* $Id$ */ -/* Release $Name$ */ - /* PDCLib internal integer logic <_PDCLIB_int.h> This file is part of the Public Domain C Library (PDCLib). @@ -252,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 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). */ /* -------------------------------------------------------------------------- */