msvcp: Sync implementations.

This commit is contained in:
Piotr Caban 2012-11-16 10:54:27 +01:00 committed by Alexandre Julliard
parent a497d36a62
commit 15bef00d65
10 changed files with 80 additions and 14 deletions

View File

@ -26,6 +26,7 @@
#include "limits.h" #include "limits.h"
#include "math.h" #include "math.h"
#include "stdio.h" #include "stdio.h"
#include "wctype.h"
#include "wine/list.h" #include "wine/list.h"
@ -7778,6 +7779,27 @@ locale* __cdecl locale_global(locale *ret, const locale *loc)
return ret; return ret;
} }
/* wctrans */
wctrans_t __cdecl wctrans(const char *property)
{
static const char str_tolower[] = "tolower";
static const char str_toupper[] = "toupper";
if(!strcmp(property, str_tolower))
return 2;
if(!strcmp(property, str_toupper))
return 1;
return 0;
}
/* towctrans */
wint_t __cdecl towctrans(wint_t c, wctrans_t category)
{
if(category == 1)
return towupper(c);
return towlower(c);
}
DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@"); DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@");
DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@"); DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@");
DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@"); DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@");

View File

@ -2865,6 +2865,6 @@
@ stub _Wcsxfrm @ stub _Wcsxfrm
# extern _Xbig # extern _Xbig
@ stub __Wcrtomb_lk @ stub __Wcrtomb_lk
@ stub towctrans @ cdecl towctrans(long long)
@ stub wctrans @ cdecl wctrans(str)
@ cdecl wctype(str) @ cdecl wctype(str)

View File

@ -26,6 +26,7 @@
#include "limits.h" #include "limits.h"
#include "math.h" #include "math.h"
#include "stdio.h" #include "stdio.h"
#include "wctype.h"
#include "wine/list.h" #include "wine/list.h"
@ -7652,6 +7653,27 @@ locale* __cdecl locale_global(locale *ret, const locale *loc)
return ret; return ret;
} }
/* wctrans */
wctrans_t __cdecl wctrans(const char *property)
{
static const char str_tolower[] = "tolower";
static const char str_toupper[] = "toupper";
if(!strcmp(property, str_tolower))
return 2;
if(!strcmp(property, str_toupper))
return 1;
return 0;
}
/* towctrans */
wint_t __cdecl towctrans(wint_t c, wctrans_t category)
{
if(category == 1)
return towupper(c);
return towlower(c);
}
DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@"); DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@");
DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@"); DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@");
DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@"); DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@");

View File

@ -4312,9 +4312,9 @@
@ stub mbrlen # msvcrt.mbrlen @ stub mbrlen # msvcrt.mbrlen
@ stub mbrtowc # msvcrt.mbrtowc @ stub mbrtowc # msvcrt.mbrtowc
@ stub mbsrtowcs # msvcrt.mbsrtowcs @ stub mbsrtowcs # msvcrt.mbsrtowcs
@ stub towctrans @ cdecl towctrans(long long)
@ stub wcrtomb # msvcrt.wcrtomb @ stub wcrtomb # msvcrt.wcrtomb
@ cdecl wcsrtombs(ptr ptr long ptr) msvcrt.wcsrtombs @ cdecl wcsrtombs(ptr ptr long ptr) msvcrt.wcsrtombs
@ cdecl wctob(long) msvcrt.wctob @ cdecl wctob(long) msvcrt.wctob
@ stub wctrans @ cdecl wctrans(str)
@ cdecl wctype(str) @ cdecl wctype(str)

View File

@ -5101,9 +5101,9 @@
@ stub mbrlen @ stub mbrlen
@ stub mbrtowc @ stub mbrtowc
@ stub mbsrtowcs @ stub mbsrtowcs
@ stub towctrans @ cdecl towctrans(long long) msvcp90.towctrans
@ stub wcrtomb @ stub wcrtomb
@ cdecl wcsrtombs(ptr ptr long ptr) msvcrt.wcsrtombs @ cdecl wcsrtombs(ptr ptr long ptr) msvcrt.wcsrtombs
@ cdecl wctob(long) msvcrt.wctob @ cdecl wctob(long) msvcrt.wctob
@ stub wctrans @ cdecl wctrans(str) msvcp90.wctrans
@ cdecl wctype(str) msvcp90.wctype @ cdecl wctype(str) msvcp90.wctype

View File

@ -26,6 +26,7 @@
#include "limits.h" #include "limits.h"
#include "math.h" #include "math.h"
#include "stdio.h" #include "stdio.h"
#include "wctype.h"
#include "wine/list.h" #include "wine/list.h"
@ -8275,6 +8276,27 @@ locale* __cdecl locale_global(locale *ret, const locale *loc)
return ret; return ret;
} }
/* wctrans */
wctrans_t __cdecl wctrans(const char *property)
{
static const char str_tolower[] = "tolower";
static const char str_toupper[] = "toupper";
if(!strcmp(property, str_tolower))
return 2;
if(!strcmp(property, str_toupper))
return 1;
return 0;
}
/* towctrans */
wint_t __cdecl towctrans(wint_t c, wctrans_t category)
{
if(category == 1)
return towupper(c);
return towlower(c);
}
DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@"); DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@");
DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@"); DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@");
DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@"); DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@");

View File

@ -5161,9 +5161,9 @@
@ stub mbrlen @ stub mbrlen
@ stub mbrtowc @ stub mbrtowc
@ stub mbsrtowcs @ stub mbsrtowcs
@ stub towctrans @ cdecl towctrans(long long)
@ stub wcrtomb @ stub wcrtomb
@ cdecl wcsrtombs(ptr ptr long ptr) msvcrt.wcsrtombs @ cdecl wcsrtombs(ptr ptr long ptr) msvcrt.wcsrtombs
@ cdecl wctob(long) msvcrt.wctob @ cdecl wctob(long) msvcrt.wctob
@ stub wctrans @ cdecl wctrans(str)
@ cdecl wctype(str) @ cdecl wctype(str)

View File

@ -565,7 +565,7 @@ MSVCP_bool __thiscall basic_string_char_inside(
{ {
char *cstr = basic_string_char_ptr(this); char *cstr = basic_string_char_ptr(this);
return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE; return ptr>=cstr && ptr<cstr+this->size;
} }
/* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */ /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */
@ -2256,7 +2256,7 @@ MSVCP_bool __thiscall basic_string_wchar_inside(
{ {
wchar_t *cstr = basic_string_wchar_ptr(this); wchar_t *cstr = basic_string_wchar_ptr(this);
return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE; return ptr>=cstr && ptr<cstr+this->size;
} }
/* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */ /* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */

View File

@ -5785,6 +5785,6 @@
@ stub __Stofx @ stub __Stofx
@ stub __Stoldx @ stub __Stoldx
@ stub __Wcrtomb_lk @ stub __Wcrtomb_lk
@ stub towctrans @ cdecl towctrans(long long) msvcp90.towctrans
@ stub wctrans @ cdecl wctrans(str) msvcp90.wctrans
@ cdecl wctype(str) msvcp90.wctype @ cdecl wctype(str) msvcp90.wctype

View File

@ -563,7 +563,7 @@ MSVCP_bool __thiscall basic_string_char_inside(
{ {
char *cstr = basic_string_char_ptr(this); char *cstr = basic_string_char_ptr(this);
return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE; return ptr>=cstr && ptr<cstr+this->size;
} }
/* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */ /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */
@ -2377,7 +2377,7 @@ MSVCP_bool __thiscall basic_string_wchar_inside(
{ {
wchar_t *cstr = basic_string_wchar_ptr(this); wchar_t *cstr = basic_string_wchar_ptr(this);
return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE; return ptr>=cstr && ptr<cstr+this->size;
} }
/* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */ /* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */