X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;h=5e7d84035e8b0a8ca84d542b21ad485879fc3ffb;hb=7bcac73ac7bf61de3dd1bbeaf6071894c7805e7f;hp=42f5e8f2dbf82967f3d8515655cf17dd971205eb;hpb=12e17136786afb1775c9dc946cbe41f5e230c24a;p=pdclib.old diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index 42f5e8f..5e7d840 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 */ + _PDCLIB_size_t bufsize; /* size of buffer */ + int status; /* misc. status bits */ + /*mbstate_t mbstate; multibyte parse state - TODO: Unmask. */ + struct _PDCLIB_file_t * next; /* provisions for linked list handling */ +} _PDCLIB_file_t; + /* -------------------------------------------------------------------------- */ /* Declaration of helper functions (implemented in functions/_PDCLIB). */ /* -------------------------------------------------------------------------- */