… | |
… | |
996 | #define ECB_I2A_MAX_X10 2932500665 // limit for ecb_i2a_x10 |
996 | #define ECB_I2A_MAX_X10 2932500665 // limit for ecb_i2a_x10 |
997 | ecb_i2a_def ( x5, ptr, v, uint32_t, 26, 10000, 0) |
997 | ecb_i2a_def ( x5, ptr, v, uint32_t, 26, 10000, 0) |
998 | ecb_i2a_def (x10, ptr, v, uint64_t, 60, 1000000000, 0) |
998 | ecb_i2a_def (x10, ptr, v, uint64_t, 60, 1000000000, 0) |
999 | |
999 | |
1000 | // non-leading zero versions, all digits, 4 and 9 are optimal for 32/64 bit |
1000 | // non-leading zero versions, all digits, 4 and 9 are optimal for 32/64 bit |
1001 | ecb_i2a_def ( 2, ptr, v, uint32_t, 10, 10, 0) |
1001 | ecb_i2a_def ( 2, ptr, v, uint32_t, 10, 10, 0) |
1002 | ecb_i2a_def ( 3, ptr, v, uint32_t, 12, 100, 0) |
1002 | ecb_i2a_def ( 3, ptr, v, uint32_t, 12, 100, 0) |
1003 | ecb_i2a_def ( 4, ptr, v, uint32_t, 26, 1000, 0) |
1003 | ecb_i2a_def ( 4, ptr, v, uint32_t, 26, 1000, 0) |
1004 | ecb_i2a_def ( 5, ptr, v, uint64_t, 30, 10000, 0) |
1004 | ecb_i2a_def ( 5, ptr, v, uint64_t, 30, 10000, 0) |
1005 | ecb_i2a_def ( 6, ptr, v, uint64_t, 36, 100000, 0) |
1005 | ecb_i2a_def ( 6, ptr, v, uint64_t, 36, 100000, 0) |
1006 | ecb_i2a_def ( 7, ptr, v, uint64_t, 44, 1000000, 0) |
1006 | ecb_i2a_def ( 7, ptr, v, uint64_t, 44, 1000000, 0) |
1007 | ecb_i2a_def ( 8, ptr, v, uint64_t, 50, 10000000, 0) |
1007 | ecb_i2a_def ( 8, ptr, v, uint64_t, 50, 10000000, 0) |
1008 | ecb_i2a_def ( 9, ptr, v, uint64_t, 56, 100000000, 0) |
1008 | ecb_i2a_def ( 9, ptr, v, uint64_t, 56, 100000000, 0) |
1009 | |
1009 | |
1010 | // leading-zero versions, all digits, 04 and 09 are optimal for 32/64 bit |
1010 | // leading-zero versions, all digits, 04 and 09 are optimal for 32/64 bit |
1011 | ecb_i2a_def (02, ptr, v, uint32_t, 10, 10, 1) |
1011 | ecb_i2a_def (02, ptr, v, uint32_t, 10, 10, 1) |
1012 | ecb_i2a_def (03, ptr, v, uint32_t, 12, 100, 1) |
1012 | ecb_i2a_def (03, ptr, v, uint32_t, 12, 100, 1) |
1013 | ecb_i2a_def (04, ptr, v, uint32_t, 26, 1000, 1) |
1013 | ecb_i2a_def (04, ptr, v, uint32_t, 26, 1000, 1) |
1014 | ecb_i2a_def (05, ptr, v, uint64_t, 30, 10000, 1) |
1014 | ecb_i2a_def (05, ptr, v, uint64_t, 30, 10000, 1) |
1015 | ecb_i2a_def (06, ptr, v, uint64_t, 36, 100000, 1) |
1015 | ecb_i2a_def (06, ptr, v, uint64_t, 36, 100000, 1) |
1016 | ecb_i2a_def (07, ptr, v, uint64_t, 44, 1000000, 1) |
1016 | ecb_i2a_def (07, ptr, v, uint64_t, 44, 1000000, 1) |
1017 | ecb_i2a_def (08, ptr, v, uint64_t, 50, 10000000, 1) |
1017 | ecb_i2a_def (08, ptr, v, uint64_t, 50, 10000000, 1) |
1018 | ecb_i2a_def (09, ptr, v, uint64_t, 56, 100000000, 1) |
1018 | ecb_i2a_def (09, ptr, v, uint64_t, 56, 100000000, 1) |
1019 | |
1019 | |
1020 | #define ECB_I2A_I32_DIGITS 11 |
1020 | #define ECB_I2A_I32_DIGITS 11 |
1021 | #define ECB_I2A_U32_DIGITS 10 |
1021 | #define ECB_I2A_U32_DIGITS 10 |
1022 | #define ECB_I2A_I64_DIGITS 20 |
1022 | #define ECB_I2A_I64_DIGITS 20 |
1023 | #define ECB_I2A_U32_DIGITS 21 |
1023 | #define ECB_I2A_U64_DIGITS 21 |
1024 | #define ECB_I2A_MAX_DIGITS 21 |
1024 | #define ECB_I2A_MAX_DIGITS 21 |
1025 | |
1025 | |
1026 | ecb_inline char * |
1026 | ecb_inline char * |
1027 | ecb_i2a_u32 (char *ptr, uint32_t u) |
1027 | ecb_i2a_u32 (char *ptr, uint32_t u) |
1028 | { |
1028 | { |