Piotr Caban : msvcp90: Added ctype<wchar_t>:: toupper functions implementation.
Alexandre Julliard
julliard at winehq.org
Thu Dec 22 12:35:51 CST 2011
Module: wine
Branch: master
Commit: 8f3a5198bc5abe1a0f105c1665f82fdc3973ce74
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f3a5198bc5abe1a0f105c1665f82fdc3973ce74
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Dec 22 18:24:55 2011 +0100
msvcp90: Added ctype<wchar_t>::toupper functions implementation.
---
dlls/msvcp90/locale.c | 29 +++++++++++++++++++++--------
dlls/msvcp90/msvcp90.spec | 2 +-
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index 24d521f..0ffc25c 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -2207,15 +2207,23 @@ const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this,
return call_ctype_wchar_do_tolower(this, first, last);
}
+/* _Towupper */
+wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
+{
+ TRACE("(%d %p)\n", ch, ctype);
+ return toupperW(ch);
+}
+
/* ?do_toupper@?$ctype at _W@std@@MBE_W_W at Z */
/* ?do_toupper@?$ctype at _W@std@@MEBA_W_W at Z */
/* ?do_toupper@?$ctype at G@std@@MBEGG at Z */
/* ?do_toupper@?$ctype at G@std@@MEBAGG at Z */
DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8)
+#define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
+ wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch)
{
- FIXME("(%p %d) stub\n", this, ch);
- return 0;
+ return _Towupper(ch, &this->ctype);
}
/* ?do_toupper@?$ctype at _W@std@@MBEPB_WPA_WPB_W at Z */
@@ -2223,11 +2231,16 @@ wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch
/* ?do_toupper@?$ctype at G@std@@MBEPBGPAGPBG at Z */
/* ?do_toupper@?$ctype at G@std@@MEBAPEBGPEAGPEBG at Z */
DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12)
+#define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
+ const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
+ (this, first, last))
const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this,
wchar_t *first, const wchar_t *last)
{
- FIXME("(%p %p %p) stub\n", this, first, last);
- return NULL;
+ TRACE("(%p %p %p)\n", this, first, last);
+ for(; first<last; first++)
+ *first = _Towupper(*first, &this->ctype);
+ return last;
}
/* ?toupper@?$ctype at _W@std@@QBE_W_W at Z */
@@ -2237,8 +2250,8 @@ const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this,
DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8)
wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch)
{
- FIXME("(%p %d) stub\n", this, ch);
- return 0;
+ TRACE("(%p %d)\n", this, ch);
+ return call_ctype_wchar_do_toupper_ch(this, ch);
}
/* ?toupper@?$ctype at _W@std@@QBEPB_WPA_WPB_W at Z */
@@ -2249,8 +2262,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12)
const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this,
wchar_t *first, const wchar_t *last)
{
- FIXME("(%p %p %p) stub\n", this, first, last);
- return NULL;
+ TRACE("(%p %p %p)\n", this, first, last);
+ return call_ctype_wchar_do_toupper(this, first, last);
}
/* ?do_is@?$ctype at _W@std@@MBE_NF_W at Z */
diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec
index f03e024..1555fac 100644
--- a/dlls/msvcp90/msvcp90.spec
+++ b/dlls/msvcp90/msvcp90.spec
@@ -5801,7 +5801,7 @@
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Towlower(long ptr)
-@ stub _Towupper
+@ cdecl _Towupper(long ptr)
@ cdecl _Wcrtomb(ptr long ptr ptr)
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
@ stub _Wcsxfrm
More information about the wine-cvs
mailing list