131 {
132 char tmp[32];
133 char *tp = tmp;
134 int i;
135 uint64_t v = value;
136
137 while (v || tp == tmp) {
138 i = v % radix;
139 v = radix ? v / radix : 0;
140 if (i < 10)
141 *tp++ = i + '0';
142 else
143 *tp++ = i + 'a' - 10;
144 }
145
146 int len = tp - tmp;
147
148 while (tp > tmp)
149 *sp++ = *--tp;
150
151 return len;
152}