2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/ntdll/stdlib/itow.c
5 * PURPOSE: converts an integer to Unicode
9 * 1998: Added ltoa Boudewijn Dekker
11 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
15 _i64tow(__int64 value
, wchar_t *string
, int radix
)
24 if (radix
> 36 || radix
<= 1)
29 sign
= (radix
== 10 && value
< 0);
33 v
= (unsigned __int64
)value
;
34 while (v
|| tp
== tmp
)
41 *tp
++ = i
+ L
'a' - 10;
55 _itow(int value
, wchar_t *string
, int radix
)
64 if (radix
> 36 || radix
<= 1)
69 sign
= (radix
== 10 && value
< 0);
74 while (v
|| tp
== tmp
)
81 *tp
++ = i
+ L
'a' - 10;
95 _ltow(long value
, wchar_t *string
, int radix
)
104 if (radix
> 36 || radix
<= 1)
109 sign
= (radix
== 10 && value
< 0);
113 v
= (unsigned long)value
;
114 while (v
|| tp
== tmp
)
121 *tp
++ = i
+ L
'a' - 10;
135 _ultow(unsigned long value
, wchar_t *string
, int radix
)
140 unsigned long v
= value
;
143 if (radix
> 36 || radix
<= 1)
148 while (v
|| tp
== tmp
)
155 *tp
++ = i
+ L
'a' - 10;