X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;h=8f2cf74ffb467618bd5ac588d52e14f2b34ea46c;hb=0292f971663afe513ec4e8881aa2ec9d57b8f152;hp=24accb0da68e221d6f34821649f9cbb79a658257;hpb=02c1ddcae6c88b55d2f4de825ee6c6456150b8ae;p=pdclib diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index 24accb0..8f2cf74 100644 --- a/internals/_PDCLIB_int.h +++ b/internals/_PDCLIB_int.h @@ -85,7 +85,7 @@ #if _PDCLIB_LONG_BYTES == 4 #define _PDCLIB_LONG_MAX 0x7fffffffL #define _PDCLIB_LONG_MIN (-0x7fffffffL - 1L) -#define _PDCLIB_ULONG_MAX 0xffffffffUL +#define _PDCLIB_ULONG_MAX 0xffffffffUL #elif _PDCLIB_LONG_BYTES == 8 #define _PDCLIB_LONG_MAX 0x7fffffffffffffffL #define _PDCLIB_LONG_MIN (-0x7fffffffffffffffL - 1L) @@ -251,3 +251,17 @@ typedef unsigned _PDCLIB_intmax _PDCLIB_uintmax_t; #define _PDCLIB_UINTMAX_MAX concat( concat( _PDCLIB_U, _PDCLIB_INTMAX ), _MAX ) #define _PDCLIB_INTMAX_C( value ) concat( value, _PDCLIB_INTMAX_LITERAL ) #define _PDCLIB_UINTMAX_C( value ) concat( value, concat( u, _PDCLIB_INTMAX_LITERAL ) ) + +/* -------------------------------------------------------------------------- */ +/* Declaration of helper functions (implemented in functions/_PDCLIB). */ +/* -------------------------------------------------------------------------- */ + +/* This is the main function called by atoi(), atol() and atoll(). */ +_PDCLIB_intmax_t _PDCLIB_atomax( const char * s ); + +/* Two helper functions used by strtol(), strtoul() and long long variants. */ +const char * _PDCLIB_strtox_prelim( const char * p, char * sign, int * base ); +_PDCLIB_uintmax_t _PDCLIB_strtox_main( const char ** p, int base, _PDCLIB_uintmax_t error, _PDCLIB_uintmax_t limval, _PDCLIB_uintmax_t limdigit, char * sign ); + +/* Digits array used by various integer conversion functions in */ +extern char _PDCLIB_digits[];