2020-12-09 15:04:54 -08:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_FMT_ITOA_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_FMT_ITOA_H_
|
2020-06-15 07:18:57 -07:00
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
2021-10-13 17:27:13 -07:00
|
|
|
unsigned LengthInt64(int64_t) pureconst;
|
|
|
|
unsigned LengthUint64(uint64_t) pureconst;
|
|
|
|
unsigned LengthInt64Thousands(int64_t) pureconst;
|
|
|
|
unsigned LengthUint64Thousands(uint64_t) pureconst;
|
2021-10-08 08:11:51 -07:00
|
|
|
char *FormatInt32(char[hasatleast 12], int32_t);
|
|
|
|
char *FormatUint32(char[hasatleast 12], uint32_t);
|
2021-09-27 22:58:51 -07:00
|
|
|
char *FormatInt64(char[hasatleast 21], int64_t);
|
|
|
|
char *FormatUint64(char[hasatleast 21], uint64_t);
|
|
|
|
char *FormatInt64Thousands(char[hasatleast 27], int64_t);
|
|
|
|
char *FormatUint64Thousands(char[hasatleast 27], uint64_t);
|
2022-04-22 18:55:28 -07:00
|
|
|
char *FormatOctal32(char[hasatleast 13], uint32_t, bool);
|
|
|
|
char *FormatOctal64(char[hasatleast 24], uint64_t, bool);
|
2022-04-29 06:06:23 -07:00
|
|
|
char *FormatBinary64(char[hasatleast 67], uint64_t, char);
|
|
|
|
char *FormatHex64(char[hasatleast 19], uint64_t, char);
|
|
|
|
char *FormatFlex64(char[hasatleast 24], int64_t, char);
|
2020-06-15 07:18:57 -07:00
|
|
|
size_t uint64toarray_radix16(uint64_t, char[hasatleast 17]);
|
2020-08-25 04:23:25 -07:00
|
|
|
size_t uint64toarray_fixed16(uint64_t, char[hasatleast 17], uint8_t);
|
2020-11-09 15:41:11 -08:00
|
|
|
size_t uint64toarray_radix8(uint64_t, char[hasatleast 24]);
|
2020-08-25 04:23:25 -07:00
|
|
|
|
|
|
|
#ifndef __STRICT_ANSI__
|
|
|
|
size_t int128toarray_radix10(int128_t, char *);
|
|
|
|
size_t uint128toarray_radix10(uint128_t, char *);
|
|
|
|
#endif
|
2020-06-15 07:18:57 -07:00
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
2020-12-09 15:04:54 -08:00
|
|
|
#endif /* COSMOPOLITAN_LIBC_FMT_ITOA_H_ */
|