2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/sdk/crt/string/witow.c
5 * PURPOSE: converts a integer to wchar_t
9 * 1998: Added ltoa by Ariadne
10 * 2000: derived from ./itoa.c by ea
12 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
19 wchar_t* _i64tow(__int64 value
, wchar_t* string
, int radix
)
28 if (radix
> 36 || radix
<= 1) {
33 sign
= (radix
== 10 && value
< 0);
38 while (v
|| tp
== tmp
) {
44 *tp
++ = i
+ L
'a' - 10;
48 string
= (wchar_t*)malloc(((tp
-tmp
)+sign
+1)*sizeof(wchar_t));
62 wchar_t* _ui64tow(unsigned __int64 value
, wchar_t* string
, int radix
)
67 unsigned long v
= value
;
70 if (radix
> 36 || radix
<= 1) {
75 while (v
|| tp
== tmp
) {
81 *tp
++ = i
+ L
'a' - 10;
85 string
= (wchar_t*)malloc(((tp
-tmp
)+1)*sizeof(wchar_t));