]> pd.if.org Git - pdclib/blobdiff - internals/_PDCLIB_int.h
Corrected _PDCLIB_CHAR_SIGNED handling.
[pdclib] / internals / _PDCLIB_int.h
index 562393233195b2f4c77fa43432ff8e2fa01cbc12..848f66ad6781f281b77ced7a6ed26a225c4ed112 100644 (file)
@@ -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 <time.h> 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                                                                      */
 /* -------------------------------------------------------------------------- */