msvcrt: Add _wtoi64_l implementation.

This commit is contained in:
Piotr Caban 2013-10-01 11:28:29 +02:00 committed by Alexandre Julliard
parent d99090aff8
commit 3868bf06b2
6 changed files with 41 additions and 6 deletions

View File

@ -1609,7 +1609,7 @@
@ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l

View File

@ -1967,7 +1967,7 @@
@ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l

View File

@ -1291,7 +1291,7 @@
@ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l

View File

@ -1264,7 +1264,7 @@
@ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l
@ cdecl _wtoi(wstr) msvcrt._wtoi
@ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64
@ stub _wtoi64_l
@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l
@ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l
@ cdecl _wtol(wstr) msvcrt._wtol
@ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l

View File

@ -1229,8 +1229,8 @@
@ cdecl _wtof(wstr) MSVCRT__wtof
@ cdecl _wtof_l(wstr ptr) MSVCRT__wtof_l
@ cdecl _wtoi(wstr) MSVCRT__wtoi
@ cdecl -ret64 _wtoi64(wstr) ntdll._wtoi64
# stub -ret64 _wtoi64_l(wstr ptr)
@ cdecl -ret64 _wtoi64(wstr)
@ cdecl -ret64 _wtoi64_l(wstr ptr)
@ cdecl _wtoi_l(wstr ptr) MSVCRT__wtoi_l
@ cdecl _wtol(wstr) MSVCRT__wtol
@ cdecl _wtol_l(wstr ptr) MSVCRT__wtol_l

View File

@ -1888,3 +1888,38 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcsstr(const MSVCRT_wchar_t *str, const MSVCRT_wcha
{
return strstrW(str, sub);
}
/*********************************************************************
* _wtoi64_l (MSVCRT.@)
*/
__int64 CDECL _wtoi64_l(const MSVCRT_wchar_t *str, MSVCRT__locale_t locale)
{
ULONGLONG RunningTotal = 0;
char bMinus = 0;
while (isspaceW(*str)) {
str++;
} /* while */
if (*str == '+') {
str++;
} else if (*str == '-') {
bMinus = 1;
str++;
} /* if */
while (*str >= '0' && *str <= '9') {
RunningTotal = RunningTotal * 10 + *str - '0';
str++;
} /* while */
return bMinus ? -RunningTotal : RunningTotal;
}
/*********************************************************************
* _wtoi64 (MSVCRT.@)
*/
__int64 CDECL _wtoi64(const MSVCRT_wchar_t *str)
{
return _wtoi64_l(str, NULL);
}