3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS system libraries
5 * FILE: lib/msvcrt/stdlib/itow.c
6 * PURPOSE: converts a integer to wchar_t
10 * 1998: Added ltoa by Ariadne
11 * 2000: derived from ./itoa.c by ea
13 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
20 wchar_t* _i64tow(__int64 value
, wchar_t* string
, int radix
)
29 if (radix
> 36 || radix
<= 1) {
34 sign
= (radix
== 10 && value
< 0);
39 while (v
|| tp
== tmp
) {
45 *tp
++ = i
+ L
'a' - 10;
49 string
= (wchar_t*)malloc(((tp
-tmp
)+sign
+1)*sizeof(wchar_t));
63 wchar_t* _ui64tow(unsigned __int64 value
, wchar_t* string
, int radix
)
68 unsigned long v
= value
;
71 if (radix
> 36 || radix
<= 1) {
76 while (v
|| tp
== tmp
) {
82 *tp
++ = i
+ L
'a' - 10;
86 string
= (wchar_t*)malloc(((tp
-tmp
)+1)*sizeof(wchar_t));