14 char *res = format->
str[format->
pos++];
20static void format_count (
char *res, uint64_t w) {
21 if (w >= 128 && kissat_is_power_of_two (w)) {
23 for (l = 0; ((uint64_t) 1 << l) != w; l++)
26 }
else if (w >= 1000 && !(w % 1000)) {
28 for (l = 0; !(w % 10); l++)
30 sprintf (res,
"%" PRIu64
"e%u", w, l);
37 format_count (res, w);
44 if (
boolean && !
value)
55 format_count (res,
value);
61 if (bytes < (1u << 10))
62 sprintf (res,
"%" PRIu64
" bytes", bytes);
63 else if (bytes < (1u << 20))
64 sprintf (res,
"%" PRIu64
" bytes (%" PRIu64
" KB)", bytes,
65 (bytes + (1 << 9)) >> 10);
66 else if (bytes < (1u << 30))
67 sprintf (res,
"%" PRIu64
" bytes (%" PRIu64
" MB)", bytes,
68 (bytes + (1u << 19)) >> 20);
70 sprintf (res,
"%" PRIu64
" bytes (%" PRIu64
" GB)", bytes,
71 (bytes + (1u << 29)) >> 30);
79 uint64_t rounded = round (seconds);
80 uint64_t minutes = rounded / 60;
82 uint64_t hours = minutes / 60;
84 uint64_t days = hours / 24;
88 sprintf (res,
"%" PRIu64
"d", days);
94 sprintf (tmp,
"%" PRIu64
"h", hours);
100 sprintf (tmp,
"%" PRIu64
"m", minutes);
106 sprintf (tmp,
"%" PRIu64
"s", rounded);
117 for (
unsigned i = 0; i < size; i++, bit <<= 1)
118 *
p++ = (bit & signs) ?
'1' :
'0';
125 unsigned mod100 = ordinal % 100;
126 if (10 <= mod100 && mod100 <= 19)
129 switch (mod100 % 10) {
145 sprintf (res,
"%" PRIu64
"%s", ordinal, suffix);
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START typedef signed char value
#define KISSAT_assert(ignore)
unsigned __int64 word
DECLARATIONS ///.
char str[NUM_FORMAT_STRINGS][FORMAT_STRING_SIZE]