9a378aa818e91011d0f8fb124056d2468c04644a
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 */
19 * from wine cvs 2006-05-21
21 wchar_t* _itow(int value
, wchar_t* string
, int radix
)
23 return _ltow(value
, string
, radix
);
28 * from wine cvs 2006-05-21
30 wchar_t* _ltow(long value
, wchar_t* string
, int radix
)
38 if (value
< 0 && radix
== 10) {
55 *--pos
= 'a' + digit
- 10;
64 memcpy(string
, pos
, (&buffer
[32] - pos
+ 1) * sizeof(WCHAR
));
71 * from wine cvs 2006-05-21
73 wchar_t* _ultow(unsigned long value
, wchar_t* string
, int radix
)
83 digit
= value
% radix
;
84 value
= value
/ radix
;
88 *--pos
= 'a' + digit
- 10;
90 } while (value
!= 0L);
93 memcpy(string
, pos
, (&buffer
[32] - pos
+ 1) * sizeof(WCHAR
));