Commit 01b9fd36 authored by Arno Teigseth's avatar Arno Teigseth Committed by Alexandre Julliard

msvcrt: Added _ui64tow_s.

parent 74ce3e53
......@@ -1197,7 +1197,7 @@
@ cdecl _ui64toa(int64 ptr long) msvcrt._ui64toa
@ cdecl _ui64toa_s(int64 ptr long long) msvcrt._ui64toa_s
@ cdecl _ui64tow(int64 ptr long) msvcrt._ui64tow
@ stub _ui64tow_s
@ cdecl _ui64tow_s(int64 ptr long long) msvcrt._ui64tow_s
@ cdecl _ultoa(long ptr long) msvcrt._ultoa
@ cdecl _ultoa_s(long ptr long long) msvcrt._ultoa_s
@ cdecl _ultow(long ptr long) msvcrt._ultow
......
......@@ -1050,7 +1050,7 @@
@ cdecl _ui64toa(int64 ptr long) msvcrt._ui64toa
@ cdecl _ui64toa_s(int64 ptr long long) msvcrt._ui64toa_s
@ cdecl _ui64tow(int64 ptr long) msvcrt._ui64tow
@ stub _ui64tow_s
@ cdecl _ui64tow_s(int64 ptr long long) msvcrt._ui64tow_s
@ cdecl _ultoa(long ptr long) msvcrt._ultoa
@ cdecl _ultoa_s(long ptr long long) msvcrt._ultoa_s
@ cdecl _ultow(long ptr long) msvcrt._ultow
......
......@@ -1037,7 +1037,7 @@
@ cdecl _ui64toa(int64 ptr long) msvcrt._ui64toa
@ cdecl _ui64toa_s(int64 ptr long long) msvcrt._ui64toa_s
@ cdecl _ui64tow(int64 ptr long) msvcrt._ui64tow
@ stub _ui64tow_s
@ cdecl _ui64tow_s(int64 ptr long long) msvcrt._ui64tow_s
@ cdecl _ultoa(long ptr long) msvcrt._ultoa
@ cdecl _ultoa_s(long ptr long long) msvcrt._ultoa_s
@ cdecl _ultow(long ptr long) msvcrt._ultow
......
......@@ -976,7 +976,7 @@
@ cdecl _ui64toa(int64 ptr long) ntdll._ui64toa
@ cdecl _ui64toa_s(int64 ptr long long) MSVCRT__ui64toa_s
@ cdecl _ui64tow(int64 ptr long) ntdll._ui64tow
# stub _ui64tow_s
@ cdecl _ui64tow_s(int64 ptr long long) MSVCRT__ui64tow_s
@ cdecl _ultoa(long ptr long) ntdll._ultoa
@ cdecl _ultoa_s(long ptr long long)
@ cdecl _ultow(long ptr long) ntdll._ultow
......
......@@ -919,6 +919,43 @@ int CDECL MSVCRT__ui64toa_s(unsigned __int64 value, char *str,
}
/*********************************************************************
* _ui64tow_s (MSVCRT.@)
*/
int CDECL MSVCRT__ui64tow_s( unsigned __int64 value, MSVCRT_wchar_t *str,
MSVCRT_size_t size, int radix )
{
MSVCRT_wchar_t buffer[65], *pos;
int digit;
if (!MSVCRT_CHECK_PMT(str != NULL) || !MSVCRT_CHECK_PMT(size > 0) ||
!MSVCRT_CHECK_PMT(radix>=2) || !MSVCRT_CHECK_PMT(radix<=36)) {
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
pos = &buffer[64];
*pos = '\0';
do {
digit = value % radix;
value = value / radix;
if (digit < 10)
*--pos = '0' + digit;
else
*--pos = 'a' + digit - 10;
} while (value != 0);
if(buffer-pos+65 > size) {
MSVCRT_INVALID_PMT("str[size] is too small");
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
memcpy(str, pos, buffer-pos+65);
return 0;
}
/*********************************************************************
* _ultoa_s (MSVCRT.@)
*/
int CDECL _ultoa_s(MSVCRT_ulong value, char *str, MSVCRT_size_t size, int radix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment