Piotr Caban : msvcp90: Added ctype<wchar_t>::scan functions implementation.

Alexandre Julliard julliard at winehq.org
Thu Dec 22 12:35:51 CST 2011


Module: wine
Branch: master
Commit: b433f1cd04c8d4d6fa61413b71c535ffae82f7c0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b433f1cd04c8d4d6fa61413b71c535ffae82f7c0

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Dec 22 18:25:23 2011 +0100

msvcp90: Added ctype<wchar_t>::scan functions implementation.

---

 dlls/msvcp90/locale.c |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index a8d04d4..a628e4d 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -2339,11 +2339,17 @@ const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this,
 /* ?do_scan_is@?$ctype at G@std@@MBEPBGFPBG0 at Z */
 /* ?do_scan_is@?$ctype at G@std@@MEBAPEBGFPEBG0 at Z */
 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16)
+#define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
+        const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
+        (this, mask, first, last))
 const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this,
         short mask, const wchar_t *first, const wchar_t *last)
 {
-    FIXME("(%p %d %p %p) stub\n", this, mask, first, last);
-    return NULL;
+    TRACE("(%p %d %p %p)\n", this, mask, first, last);
+    for(; first<last; first++)
+        if(!ctype_wchar_is_ch(this, mask, *first))
+            break;
+    return first;
 }
 
 /* ?scan_is@?$ctype at _W@std@@QBEPB_WFPB_W0 at Z */
@@ -2354,8 +2360,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is, 16)
 const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this,
         short mask, const wchar_t *first, const wchar_t *last)
 {
-    FIXME("(%p %x %p %p) stub\n", this, mask, first, last);
-    return NULL;
+    TRACE("(%p %x %p %p)\n", this, mask, first, last);
+    return call_ctype_wchar_do_scan_is(this, mask, first, last);
 }
 
 /* ?do_scan_not@?$ctype at _W@std@@MBEPB_WFPB_W0 at Z */
@@ -2363,11 +2369,17 @@ const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this,
 /* ?do_scan_not@?$ctype at G@std@@MBEPBGFPBG0 at Z */
 /* ?do_scan_not@?$ctype at G@std@@MEBAPEBGFPEBG0 at Z */
 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not, 16)
+#define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
+        const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
+        (this, mask, first, last))
 const wchar_t* __thiscall ctype_wchar_do_scan_not(const ctype_wchar *this,
         short mask, const wchar_t *first, const wchar_t *last)
 {
-    FIXME("(%p %x %p %p) stub\n", this, mask, first, last);
-    return NULL;
+    TRACE("(%p %x %p %p)\n", this, mask, first, last);
+    for(; first<last; first++)
+        if(ctype_wchar_is_ch(this, mask, *first))
+            break;
+    return first;
 }
 
 /* ?scan_not@?$ctype at _W@std@@QBEPB_WFPB_W0 at Z */
@@ -2378,8 +2390,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not, 16)
 const wchar_t* __thiscall ctype_wchar_scan_not(const ctype_wchar *this,
         short mask, const wchar_t *first, const wchar_t *last)
 {
-    FIXME("(%p %x %p %p) stub\n", this, mask, first, last);
-    return NULL;
+    TRACE("(%p %x %p %p)\n", this, mask, first, last);
+    return call_ctype_wchar_do_scan_not(this, mask, first, last);
 }
 
 /* ??0_Locimp at locale@std@@AAE at _N@Z */




More information about the wine-cvs mailing list