X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;h=2d99b911a5b1e3c78b0d59cf5570fb7eb7417c43;hb=31bc073732a9303dd6f4813f0408cb2b9fcd0add;hp=a4cf38b0823a17c97de94a0b8ec8318e8d0ca94a;hpb=327639a3101db8d83fa81338b5f1455a07f15a60;p=pdclib diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index a4cf38b..2d99b91 100644 --- a/internals/_PDCLIB_int.h +++ b/internals/_PDCLIB_int.h @@ -268,12 +268,20 @@ typedef unsigned _PDCLIB_intmax _PDCLIB_uintmax_t; #define _PDCLIB_FBIN 128u /* Internal flags, made to fit the same status field as the flags above. */ +/* -------------------------------------------------------------------------- */ +/* free() the buffer memory on closing (false for user-supplied buffer) */ #define _PDCLIB_FREEBUFFER 512u +/* stream has encountered error / EOF */ #define _PDCLIB_ERRORFLAG 1024u #define _PDCLIB_EOFFLAG 2048u +/* stream is wide-oriented */ #define _PDCLIB_WIDESTREAM 4096u +/* stream is byte-oriented */ #define _PDCLIB_BYTESTREAM 8192u +/* file associated with stream should be remove()d on closing (tmpfile()) */ #define _PDCLIB_DELONCLOSE 16384u +/* stream handle should not be free()d on close (stdin, stdout, stderr) */ +#define _PDCLIB_STATIC 32768u /* Position / status structure for getpos() / fsetpos(). */ struct _PDCLIB_fpos_t @@ -418,3 +426,27 @@ int * _PDCLIB_errno_func( void ); /* TODO: Doing this via a static array is not the way to do it. */ char const * _PDCLIB_errno_texts[ _PDCLIB_EMAX ]; + +/* -------------------------------------------------------------------------- */ +/* lookup tables */ +/* -------------------------------------------------------------------------- */ + +#define _PDCLIB_CTYPE_ALPHA 1 +#define _PDCLIB_CTYPE_BLANK 2 +#define _PDCLIB_CTYPE_CNTRL 4 +#define _PDCLIB_CTYPE_GRAPH 8 +#define _PDCLIB_CTYPE_PUNCT 16 +#define _PDCLIB_CTYPE_SPACE 32 +#define _PDCLIB_CTYPE_LOWER 64 +#define _PDCLIB_CTYPE_UPPER 128 +#define _PDCLIB_CTYPE_DIGIT 256 +#define _PDCLIB_CTYPE_XDIGT 512 + +struct _PDCLIB_ctype_t +{ + _PDCLIB_uint16_t flags; + unsigned char upper; + unsigned char lower; + unsigned char collation; +}; +