Main: include/kernaux/ntoa.h: Make constants more readable

This commit is contained in:
Alex Kotov 2022-05-30 15:07:35 +03:00 committed by GitHub
parent 2290fce88b
commit 68dc376052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -8,25 +8,25 @@ extern "C" {
#include <stdint.h>
// "1111111111111111111111111111111111111111111111111111111111111111"
#define KERNAUX_UTOA_BUFFER_SIZE 65
#define KERNAUX_UTOA_BUFFER_SIZE (64 + 1)
// "111111111111111111111111111111111111111111111111111111111111111"
// "-1000000000000000000000000000000000000000000000000000000000000000"
#define KERNAUX_ITOA_BUFFER_SIZE 66
#define KERNAUX_ITOA_BUFFER_SIZE (65 + 1)
// "18446744073709551615"
#define KERNAUX_UTOA10_BUFFER_SIZE 21
#define KERNAUX_UTOA10_BUFFER_SIZE (20 + 1)
// "9223372036854775807"
// "-9223372036854775808"
#define KERNAUX_ITOA10_BUFFER_SIZE 21
#define KERNAUX_ITOA10_BUFFER_SIZE (20 + 1)
// "ffffffffffffffff"
#define KERNAUX_UTOA16_BUFFER_SIZE 17
#define KERNAUX_UTOA16_BUFFER_SIZE (16 + 1)
// "7fffffffffffffff"
// "-8000000000000000"
#define KERNAUX_ITOA16_BUFFER_SIZE 18
#define KERNAUX_ITOA16_BUFFER_SIZE (17 + 1)
char *kernaux_utoa(uint64_t value, char *buffer, int base, const char *prefix);
char *kernaux_itoa(int64_t value, char *buffer, int base, const char *prefix);