X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;h=848f66ad6781f281b77ced7a6ed26a225c4ed112;hb=41deaf7c54dafcea0c9afbfad7d7ab948504ca1e;hp=562393233195b2f4c77fa43432ff8e2fa01cbc12;hpb=0d8315ee192608e94b6ab4f079aa32ae5799c437;p=pdclib diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index 5623932..848f66a 100644 --- a/internals/_PDCLIB_int.h +++ b/internals/_PDCLIB_int.h @@ -33,7 +33,7 @@ #define _PDCLIB_UCHAR_MAX 0xff #define _PDCLIB_SCHAR_MIN (-0x7f - 1) #define _PDCLIB_SCHAR_MAX 0x7f -#ifdef _PDCLIB_CHAR_SIGNED +#if _PDCLIB_CHAR_SIGNED == 1 #define _PDCLIB_CHAR_MIN _PDCLIB_SCHAR_MIN #define _PDCLIB_CHAR_MAX _PDCLIB_SCHAR_MAX #else @@ -301,6 +301,13 @@ struct _PDCLIB_file_t struct _PDCLIB_file_t * next; /* Pointer to next struct (internal) */ }; +/* -------------------------------------------------------------------------- */ +/* Various internals */ +/* -------------------------------------------------------------------------- */ + +typedef _PDCLIB_time _PDCLIB_time_t; +typedef _PDCLIB_clock _PDCLIB_clock_t; + /* -------------------------------------------------------------------------- */ /* Internal data types */ /* -------------------------------------------------------------------------- */ @@ -337,7 +344,7 @@ struct _PDCLIB_status_t char * s; /* *sprintf(): target buffer */ /* *sscanf(): source string */ _PDCLIB_size_t width; /* specified field width */ - _PDCLIB_size_t prec; /* specified field precision */ + int prec; /* specified field precision */ struct _PDCLIB_file_t * stream; /* *fprintf() / *fscanf() stream */ _PDCLIB_va_list arg; /* argument stack */ }; @@ -397,6 +404,9 @@ int _PDCLIB_prepwrite( struct _PDCLIB_file_t * stream ); /* Closing all streams on program exit */ void _PDCLIB_closeall( void ); +/* Check if a given year is a leap year. Parameter is offset to 1900. */ +int _PDCLIB_is_leap( int year_offset ); + /* -------------------------------------------------------------------------- */ /* errno */ /* -------------------------------------------------------------------------- */