Commit 3acb238f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added _wtoi_l implementation.

parent c4d085bc
......@@ -1604,7 +1604,7 @@
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ stub _wtoi_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ stub _wtol_l
@ cdecl _wunlink(wstr) msvcrt._wunlink
......
......@@ -1268,7 +1268,7 @@
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ stub _wtoi_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ stub _wtol_l
@ cdecl _wunlink(wstr) msvcrt._wunlink
......
......@@ -1259,7 +1259,7 @@
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ stub _wtoi_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ stub _wtol_l
@ cdecl _wunlink(wstr) msvcrt._wunlink
......
......@@ -1199,7 +1199,7 @@
@ cdecl _wtoi(wstr) ntdll._wtoi
@ cdecl -ret64 _wtoi64(wstr) ntdll._wtoi64
# stub -ret64 _wtoi64_l(wstr ptr)
# stub _wtoi_l(wstr ptr)
@ cdecl _wtoi_l(wstr ptr) MSVCRT__wtoi_l
@ cdecl _wtol(wstr) ntdll._wtol
# stub _wtol_l(wstr ptr)
@ cdecl _wunlink(wstr) MSVCRT__wunlink
......
......@@ -1438,6 +1438,23 @@ __int64 CDECL MSVCRT__wcstoi64(const MSVCRT_wchar_t *nptr,
}
/*********************************************************************
* _wtoi_l (MSVCRT.@)
*/
int MSVCRT__wtoi_l(const MSVCRT_wchar_t *str, MSVCRT__locale_t locale)
{
__int64 ret = MSVCRT__wcstoi64_l(str, NULL, 10, locale);
if(ret > INT_MAX) {
ret = INT_MAX;
*MSVCRT__errno() = MSVCRT_ERANGE;
} else if(ret < INT_MIN) {
ret = INT_MIN;
*MSVCRT__errno() = MSVCRT_ERANGE;
}
return ret;
}
/*********************************************************************
* _wcstoui64_l (MSVCRT.@)
*
* FIXME: locale parameter is ignored
......
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