39 static void __cdecl xtoa(
unsigned long val,
char* buf,
unsigned radix,
int is_neg )
51 val = (
unsigned long)( -(
long)val );
57 digval = (unsigned)( val % radix );
62 *p++ = (char)( digval - 10 +
'a' );
64 *p++ = (char)( digval +
'0' );
78 }
while ( firstdig < p );
86 if ( radix == 10 && val < 0 )
87 xtoa( (
unsigned long)val, buf, radix, 1 );
89 xtoa( (
unsigned long)(
unsigned int)val, buf, radix, 0 );
95 xtoa( (
unsigned long)val, buf, radix, ( radix == 10 && val < 0 ) );
99 extern "C" char*
__cdecl _ultoa(
unsigned long val,
char* buf,
int radix )
101 xtoa( val, buf, radix, 0 );
105 #if 0 // ndef _NO_INT64 108 unsigned __int64 val,
128 digval = (unsigned) (val % radix);
133 *p++ = (char) (digval - 10 +
'a');
135 *p++ = (char) (digval +
'0');
149 }
while (firstdig < p);
155 extern "C" char *
__cdecl _i64toa (__int64 val,
char *buf,
int radix ) {
156 x64toa((
unsigned __int64)val, buf, radix, (radix == 10 && val < 0));
160 extern "C" char *
__cdecl i64toa (__int64 val,
char *buf,
int radix ) {
161 x64toa((
unsigned __int64)val, buf, radix, (radix == 10 && val < 0));
165 extern "C" char *
__cdecl _ui64toa (
unsigned __int64 val,
char *buf,
int radix) {
166 x64toa(val, buf, radix, 0);
170 extern "C" char *
__cdecl ui64toa (
unsigned __int64 val,
char *buf,
int radix) {
171 x64toa(val, buf, radix, 0);
char *__cdecl _ltoa(long val, char *buf, int radix)
char *__cdecl _itoa(int val, char *buf, int radix)
char *__cdecl _ultoa(unsigned long val, char *buf, int radix)