dd8bdca7b931e2c98f0280390de64615910615a0
1 /* $Id: witow.c,v 1.1 2002/11/24 18:42:25 robd Exp $
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 Boudewijn Dekker
11 * 2000: derived from ./itoa.c by ea
13 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
15 #include <msvcrt/errno.h>
16 #include <msvcrt/stdlib.h>
17 #include <msvcrt/internal/file.h>
20 wchar_t* _i64tow(__int64 value
, wchar_t* string
, int radix
)
29 if (radix
> 36 || radix
<= 1)
35 sign
= (radix
== 10 && value
< 0);
40 while (v
|| tp
== tmp
)
47 *tp
++ = i
+ L
'a' - 10;
51 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)
76 while (v
|| tp
== tmp
)
83 *tp
++ = i
+ L
'a' - 10;
87 string
= (wchar_t*)malloc(((tp
-tmp
)+1)*sizeof(wchar_t));