Alexandre Julliard : msvcp: Use C runtime wchar functions instead of wine/ unicode.h.

Alexandre Julliard julliard at winehq.org
Mon Apr 1 16:32:02 CDT 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Apr  1 12:20:30 2019 +0200

msvcp: Use C runtime wchar functions instead of wine/unicode.h.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp90/locale.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index 068e81e..08d8737 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -34,7 +34,6 @@
 #include "winbase.h"
 #include "winnls.h"
 #include "msvcp90.h"
-#include "wine/unicode.h"
 #include "wine/list.h"
 #include "wine/debug.h"
 
@@ -2004,7 +2003,7 @@ int __cdecl _Tolower(int ch, const _Ctypevec *ctype)
         if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
             return ch;
 
-        lower = tolowerW(wide);
+        lower = towlower(wide);
         if(lower == wide)
             return ch;
 
@@ -2100,7 +2099,7 @@ int __cdecl _Toupper(int ch, const _Ctypevec *ctype)
         if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
             return ch;
 
-        upper = toupperW(wide);
+        upper = towupper(wide);
         if(upper == wide)
             return ch;
 
@@ -2770,7 +2769,7 @@ MSVCP_size_t __cdecl ctype_short__Getcat_old(const locale_facet **facet)
 wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
 {
     TRACE("(%d %p)\n", ch, ctype);
-    return tolowerW(ch);
+    return towlower(ch);
 }
 
 ctype_wchar* ctype_wchar_use_facet(const locale *loc)
@@ -2896,7 +2895,7 @@ const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this,
 wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
 {
     TRACE("(%d %p)\n", ch, ctype);
-    return toupperW(ch);
+    return towupper(ch);
 }
 
 /* ?do_toupper@?$ctype at _W@std@@MBE_W_W at Z */
@@ -10650,7 +10649,7 @@ static wchar_t* create_time_get_str(const wchar_t *str)
     wchar_t *ret;
     int len;
 
-    len = strlenW(str)+1;
+    len = lstrlenW(str)+1;
     ret = MSVCRT_operator_new(len * sizeof(wchar_t));
     if(ret)
         memcpy(ret, str, len*sizeof(wchar_t));
@@ -10944,9 +10943,9 @@ static int find_longest_match_wchar(istreambuf_iterator_wchar *iter, const wchar
         match = -1;
         for(p=str+1, i=0; *p; p = (*end ? end+1 : end), i++)
         {
-            end = strchrW(p, ':');
+            end = wcschr(p, ':');
             if (!end)
-                end = p + strlenW(p);
+                end = p + lstrlenW(p);
 
             if (end-p >= len && !memcmp(p, buf, len*sizeof(wchar_t)))
             {




More information about the wine-cvs mailing list