Piotr Caban : msvcp90: Added ctype<wchar_t>:: tolower functions implementation.
Alexandre Julliard
julliard at winehq.org
Thu Dec 22 12:35:51 CST 2011
Module: wine
Branch: master
Commit: b4e9bd74cf89fdd95ad7c78051afcc727165b933
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4e9bd74cf89fdd95ad7c78051afcc727165b933
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Dec 22 18:24:46 2011 +0100
msvcp90: Added ctype<wchar_t>::tolower functions implementation.
---
dlls/msvcp90/locale.c | 31 ++++++++++++++++++++++---------
dlls/msvcp90/msvcp90.spec | 2 +-
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index 1a71f6f..24d521f 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -2148,15 +2148,23 @@ MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const local
return LC_CTYPE;
}
+/* _Towlower */
+wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
+{
+ TRACE("(%d %p)\n", ch, ctype);
+ return tolowerW(ch);
+}
+
/* ?do_tolower@?$ctype at _W@std@@MBE_W_W at Z */
/* ?do_tolower@?$ctype at _W@std@@MEBA_W_W at Z */
/* ?do_tolower@?$ctype at G@std@@MBEGG at Z */
/* ?do_tolower@?$ctype at G@std@@MEBAGG at Z */
DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8)
-char __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
+#define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
+ wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
+wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
{
- FIXME("(%p %d) stub\n", this, ch);
- return 0;
+ return _Towlower(ch, &this->ctype);
}
/* ?do_tolower@?$ctype at _W@std@@MBEPB_WPA_WPB_W at Z */
@@ -2164,11 +2172,16 @@ char __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
/* ?do_tolower@?$ctype at G@std@@MBEPBGPAGPBG at Z */
/* ?do_tolower@?$ctype at G@std@@MEBAPEBGPEAGPEBG at Z */
DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12)
+#define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
+ const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
+ (this, first, last))
const wchar_t* __thiscall ctype_wchar_do_tolower(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 = _Towlower(*first, &this->ctype);
+ return last;
}
/* ?tolower@?$ctype at _W@std@@QBE_W_W at Z */
@@ -2178,8 +2191,8 @@ const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this,
DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8)
wchar_t __thiscall ctype_wchar_tolower_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_tolower_ch(this, ch);
}
/* ?tolower@?$ctype at _W@std@@QBEPB_WPA_WPB_W at Z */
@@ -2190,8 +2203,8 @@ DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12)
const wchar_t* __thiscall ctype_wchar_tolower(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_tolower(this, first, last);
}
/* ?do_toupper@?$ctype at _W@std@@MBE_W_W at Z */
diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec
index a5b5dbc..f03e024 100644
--- a/dlls/msvcp90/msvcp90.spec
+++ b/dlls/msvcp90/msvcp90.spec
@@ -5800,7 +5800,7 @@
@ stub _Strxfrm
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
-@ stub _Towlower
+@ cdecl _Towlower(long ptr)
@ stub _Towupper
@ cdecl _Wcrtomb(ptr long ptr ptr)
@ cdecl _Wcscoll(ptr ptr ptr ptr ptr)
More information about the wine-cvs
mailing list