Commit f0fbf6f5 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 83c99c02
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "winbase.h" #include "winbase.h"
#include "winnls.h" #include "winnls.h"
#include "msvcp90.h" #include "msvcp90.h"
#include "wine/unicode.h"
#include "wine/list.h" #include "wine/list.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -2004,7 +2003,7 @@ int __cdecl _Tolower(int ch, const _Ctypevec *ctype) ...@@ -2004,7 +2003,7 @@ int __cdecl _Tolower(int ch, const _Ctypevec *ctype)
if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1)) if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
return ch; return ch;
lower = tolowerW(wide); lower = towlower(wide);
if(lower == wide) if(lower == wide)
return ch; return ch;
...@@ -2100,7 +2099,7 @@ int __cdecl _Toupper(int ch, const _Ctypevec *ctype) ...@@ -2100,7 +2099,7 @@ int __cdecl _Toupper(int ch, const _Ctypevec *ctype)
if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1)) if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
return ch; return ch;
upper = toupperW(wide); upper = towupper(wide);
if(upper == wide) if(upper == wide)
return ch; return ch;
...@@ -2770,7 +2769,7 @@ MSVCP_size_t __cdecl ctype_short__Getcat_old(const locale_facet **facet) ...@@ -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) wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
{ {
TRACE("(%d %p)\n", ch, ctype); TRACE("(%d %p)\n", ch, ctype);
return tolowerW(ch); return towlower(ch);
} }
ctype_wchar* ctype_wchar_use_facet(const locale *loc) ctype_wchar* ctype_wchar_use_facet(const locale *loc)
...@@ -2896,7 +2895,7 @@ const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this, ...@@ -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) wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
{ {
TRACE("(%d %p)\n", ch, ctype); TRACE("(%d %p)\n", ch, ctype);
return toupperW(ch); return towupper(ch);
} }
/* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */ /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
...@@ -10650,7 +10649,7 @@ static wchar_t* create_time_get_str(const wchar_t *str) ...@@ -10650,7 +10649,7 @@ static wchar_t* create_time_get_str(const wchar_t *str)
wchar_t *ret; wchar_t *ret;
int len; int len;
len = strlenW(str)+1; len = lstrlenW(str)+1;
ret = MSVCRT_operator_new(len * sizeof(wchar_t)); ret = MSVCRT_operator_new(len * sizeof(wchar_t));
if(ret) if(ret)
memcpy(ret, str, len*sizeof(wchar_t)); memcpy(ret, str, len*sizeof(wchar_t));
...@@ -10944,9 +10943,9 @@ static int find_longest_match_wchar(istreambuf_iterator_wchar *iter, const wchar ...@@ -10944,9 +10943,9 @@ static int find_longest_match_wchar(istreambuf_iterator_wchar *iter, const wchar
match = -1; match = -1;
for(p=str+1, i=0; *p; p = (*end ? end+1 : end), i++) for(p=str+1, i=0; *p; p = (*end ? end+1 : end), i++)
{ {
end = strchrW(p, ':'); end = wcschr(p, ':');
if (!end) if (!end)
end = p + strlenW(p); end = p + lstrlenW(p);
if (end-p >= len && !memcmp(p, buf, len*sizeof(wchar_t))) if (end-p >= len && !memcmp(p, buf, len*sizeof(wchar_t)))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment