Piotr Caban : msvcrt: Add _wtoi64_l implementation.
Alexandre Julliard
julliard at winehq.org
Tue Oct 1 14:54:28 CDT 2013
Module: wine
Branch: master
Commit: 3868bf06b25b16ab8e92f0c51416a2eb325d0fd0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3868bf06b25b16ab8e92f0c51416a2eb325d0fd0
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Oct 1 11:28:29 2013 +0200
msvcrt: Add _wtoi64_l implementation.
---
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcr90/msvcr90.spec | 2 +-
dlls/msvcrt/msvcrt.spec | 4 ++--
dlls/msvcrt/wcs.c | 35 +++++++++++++++++++++++++++++++++++
6 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 4323e45..646137d 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -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
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec
index 57bd107..b82a58e 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -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
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index b70d4fb..0a0adf6 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -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
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 36cf2e4..382a52e 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -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
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 7cfc370..acf53aa 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -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
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 1cf2276..4b23671 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -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);
+}
More information about the wine-cvs
mailing list