Piotr Caban : msvcp90: Added ctype<char>::widen functions implementation.

Alexandre Julliard julliard at winehq.org
Wed Dec 21 12:38:08 CST 2011


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Dec 21 15:58:35 2011 +0100

msvcp90: Added ctype<char>::widen functions implementation.

---

 dlls/msvcp90/locale.c |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index 1bae73e..8105ca0 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -1339,30 +1339,40 @@ const char* __thiscall ctype_char__Narrow_s(const ctype_char *this, const char *
 /* ?do_widen@?$ctype at D@std@@MBEDD at Z */
 /* ?do_widen@?$ctype at D@std@@MEBADD at Z */
 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch, 8)
+#define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
+        char, (const ctype_char*, char), (this, ch))
 char __thiscall ctype_char_do_widen_ch(const ctype_char *this, char ch)
 {
-    FIXME("(%p %c) stub\n", this, ch);
-    return 0;
+    TRACE("(%p %c)\n", this, ch);
+    return ch;
 }
 
 /* ?do_widen@?$ctype at D@std@@MBEPBDPBD0PAD at Z */
 /* ?do_widen@?$ctype at D@std@@MEBAPEBDPEBD0PEAD at Z */
 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen, 16)
+#define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
+        const char*, (const ctype_char*, const char*, const char*, char*), \
+        (this, first, last, dest))
 const char* __thiscall ctype_char_do_widen(const ctype_char *this,
         const char *first, const char *last, char *dest)
 {
-    FIXME("(%p %p %p %p) stub\n", this, first, last, dest);
-    return NULL;
+    TRACE("(%p %p %p %p)\n", this, first, last, dest);
+    memcpy(dest, first, last-first);
+    return last;
 }
 
 /* ?_Do_widen_s@?$ctype at D@std@@MBEPBDPBD0PADI at Z */
 /* ?_Do_widen_s@?$ctype at D@std@@MEBAPEBDPEBD0PEAD_K at Z */
 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s, 20)
+#define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
+        const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
+        (this, first, last, dest, size))
 const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this,
         const char *first, const char *last, char *dest, MSVCP_size_t size)
 {
-    FIXME("(%p %p %p %p %lu) stub\n", this, first, last, dest, size);
-    return NULL;
+    TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
+    memcpy_s(dest, size, first, last-first);
+    return last;
 }
 
 /* ?widen@?$ctype at D@std@@QBEDD at Z */
@@ -1370,8 +1380,8 @@ const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this,
 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch, 8)
 char __thiscall ctype_char_widen_ch(const ctype_char *this, char ch)
 {
-    FIXME("(%p %c) stub\n", this, ch);
-    return 0;
+    TRACE("(%p %c)\n", this, ch);
+    return call_ctype_char_do_widen_ch(this, ch);
 }
 
 /* ?widen@?$ctype at D@std@@QBEPBDPBD0PAD at Z */
@@ -1380,8 +1390,8 @@ DEFINE_THISCALL_WRAPPER(ctype_char_widen, 16)
 const char* __thiscall ctype_char_widen(const ctype_char *this,
         const char *first, const char *last, char *dest)
 {
-    FIXME("(%p %p %p %p) stub\n", this, first, last, dest);
-    return NULL;
+    TRACE("(%p %p %p %p)\n", this, first, last, dest);
+    return call_ctype_char_do_widen(this, first, last, dest);
 }
 
 /* ?_Widen_s@?$ctype at D@std@@QBEPBDPBD0PADI at Z */
@@ -1390,8 +1400,8 @@ DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s, 20)
 const char* __thiscall ctype_char__Widen_s(const ctype_char *this,
         const char *first, const char *last, char *dest, MSVCP_size_t size)
 {
-    FIXME("(%p %p %p %p %lu) stub\n", this, first, last, dest, size);
-    return NULL;
+    TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
+    return call_ctype_char__Do_widen_s(this, first, last, dest, size);
 }
 
 /* ?_Getcat@?$ctype at D@std@@SAIPAPBVfacet at locale@2 at PBV42@@Z */




More information about the wine-cvs mailing list