msvcrt: Added _wtoi_l implementation.

oldstable
Piotr Caban 2012-12-12 11:16:05 +01:00 committed by Alexandre Julliard
parent c4d085bc74
commit 3acb238f15
5 changed files with 21 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1437,6 +1437,23 @@ __int64 CDECL MSVCRT__wcstoi64(const MSVCRT_wchar_t *nptr,
return MSVCRT__wcstoi64_l(nptr, endptr, base, NULL);
}
/*********************************************************************
* _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.@)
*