Commit 8313d52c authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Added char_traits<wchar_t> implementation.

parent b895c104
......@@ -1135,7 +1135,7 @@
@ stub ?_Copy_s@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPA_WIII@Z
@ cdecl ?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z(ptr long ptr long) MSVCP_char_traits_char__Copy_s
@ stub ?_Copy_s@?$char_traits@G@std@@SAPAGPAGIPBGI@Z
@ stub ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z
@ cdecl ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z(ptr long ptr long) MSVCP_char_traits_wchar__Copy_s
@ stub ?_Cosh@?$_Ctraits@M@std@@SAMMM@Z
@ stub ?_Cosh@?$_Ctraits@N@std@@SANNN@Z
@ stub ?_Cosh@?$_Ctraits@O@std@@SAOOO@Z
......@@ -1387,7 +1387,7 @@
@ stub ?_Makpat@?$_Mpunct@_W@std@@AAEXAAUpattern@money_base@2@III@Z
@ cdecl ?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z(ptr long ptr long) MSVCP_char_traits_char__Move_s
@ stub ?_Move_s@?$char_traits@G@std@@SAPAGPAGIPBGI@Z
@ stub ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z
@ cdecl ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z(ptr long ptr long) MSVCP_char_traits_wchar__Move_s
@ stub ?_Mutex_Lock@_Mutex@std@@CAXPAV12@@Z
@ stub ?_Mutex_Unlock@_Mutex@std@@CAXPAV12@@Z
@ stub ?_Mutex_ctor@_Mutex@std@@CAXPAV12@@Z
......@@ -1583,8 +1583,8 @@
@ cdecl ?assign@?$char_traits@D@std@@SAXAADABD@Z(ptr ptr) MSVCP_char_traits_char_assign
@ stub ?assign@?$char_traits@G@std@@SAPAGPAGIG@Z
@ stub ?assign@?$char_traits@G@std@@SAXAAGABG@Z
@ stub ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z
@ stub ?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z
@ cdecl ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z(ptr long long) MSVCP_char_traits_wchar_assignn
@ cdecl ?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z(ptr ptr) MSVCP_char_traits_wchar_assign
@ stub ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z
@ stub ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z
@ stub ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z
......@@ -1659,7 +1659,7 @@
@ stub ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHPB_W@Z
@ cdecl ?compare@?$char_traits@D@std@@SAHPBD0I@Z(ptr ptr long) MSVCP_char_traits_char_compare
@ stub ?compare@?$char_traits@G@std@@SAHPBG0I@Z
@ stub ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z
@ cdecl ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z(ptr ptr long) MSVCP_char_traits_wchar_compare
@ stub ?compare@?$collate@D@std@@QBEHPBD000@Z
@ stub ?compare@?$collate@G@std@@QBEHPBG000@Z
@ stub ?compare@?$collate@_W@std@@QBEHPB_W000@Z
......@@ -1671,7 +1671,7 @@
@ stub ?copy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPA_WII@Z
@ cdecl ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z(ptr ptr long) MSVCP_char_traits_char_copy
@ stub ?copy@?$char_traits@G@std@@SAPAGPAGPBGI@Z
@ stub ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z
@ cdecl ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z(ptr ptr long) MSVCP_char_traits_wchar_copy
@ stub ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z
@ stub ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z
@ stub ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z
......@@ -1977,7 +1977,7 @@
@ stub ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z
@ cdecl ?eof@?$char_traits@D@std@@SAHXZ() MSVCP_char_traits_char_eof
@ stub ?eof@?$char_traits@G@std@@SAGXZ
@ stub ?eof@?$char_traits@_W@std@@SAGXZ
@ cdecl ?eof@?$char_traits@_W@std@@SAGXZ() MSVCP_char_traits_wchar_eof
@ stub ?eof@ios_base@std@@QBE_NXZ
@ stub ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ
@ stub ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ
......@@ -2000,10 +2000,10 @@
@ stub ?epsilon@?$numeric_limits@_W@std@@SA_WXZ
@ cdecl ?eq@?$char_traits@D@std@@SA_NABD0@Z(ptr ptr) MSVCP_char_traits_char_eq
@ stub ?eq@?$char_traits@G@std@@SA_NABG0@Z
@ stub ?eq@?$char_traits@_W@std@@SA_NAB_W0@Z
@ cdecl ?eq@?$char_traits@_W@std@@SA_NAB_W0@Z(ptr ptr) MSVCP_char_traits_wchar_eq
@ cdecl ?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z(ptr ptr) MSVCP_char_traits_char_eq_int_type
@ stub ?eq_int_type@?$char_traits@G@std@@SA_NABG0@Z
@ stub ?eq_int_type@?$char_traits@_W@std@@SA_NABG0@Z
@ cdecl ?eq_int_type@?$char_traits@_W@std@@SA_NABG0@Z(ptr ptr) MSVCP_char_traits_wchar_eq_int_tpe
@ stub ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z
@ stub ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z
@ stub ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z
......@@ -2043,7 +2043,7 @@
@ stub ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z
@ cdecl ?find@?$char_traits@D@std@@SAPBDPBDIABD@Z(ptr long ptr) MSVCP_char_traits_char_find
@ stub ?find@?$char_traits@G@std@@SAPBGPBGIABG@Z
@ stub ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z
@ cdecl ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z(ptr long ptr) MSVCP_char_traits_wchar_find
@ stub ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z
@ stub ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z
@ stub ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z
......@@ -2407,7 +2407,7 @@
@ stub ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ
@ cdecl ?length@?$char_traits@D@std@@SAIPBD@Z(ptr) MSVCP_char_traits_char_length
@ stub ?length@?$char_traits@G@std@@SAIPBG@Z
@ stub ?length@?$char_traits@_W@std@@SAIPB_W@Z
@ cdecl ?length@?$char_traits@_W@std@@SAIPB_W@Z(ptr) MSVCP_char_traits_wchar_length
@ stub ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z
@ stub ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z
@ stub ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z
......@@ -2416,7 +2416,7 @@
@ stub ?log@?$_Ctraits@O@std@@SAOO@Z
@ cdecl ?lt@?$char_traits@D@std@@SA_NABD0@Z(ptr ptr) MSVCP_char_traits_lt
@ stub ?lt@?$char_traits@G@std@@SA_NABG0@Z
@ stub ?lt@?$char_traits@_W@std@@SA_NAB_W0@Z
@ cdecl ?lt@?$char_traits@_W@std@@SA_NAB_W0@Z(ptr ptr) MSVCP_char_traits_wchar_lt
@ stub ?max@?$numeric_limits@C@std@@SACXZ
@ stub ?max@?$numeric_limits@D@std@@SADXZ
@ stub ?max@?$numeric_limits@E@std@@SAEXZ
......@@ -2474,7 +2474,7 @@
@ stub ?min_exponent@_Num_base@std@@2HB
@ cdecl ?move@?$char_traits@D@std@@SAPADPADPBDI@Z(ptr ptr long) MSVCP_char_traits_char_move
@ stub ?move@?$char_traits@G@std@@SAPAGPAGPBGI@Z
@ stub ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z
@ cdecl ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z(ptr ptr long) MSVCP_char_traits_wchar_move
@ stub ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ
@ stub ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z
@ stub ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z
......@@ -2493,7 +2493,7 @@
@ stub ?negative_sign@?$_Mpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ
@ cdecl ?not_eof@?$char_traits@D@std@@SAHABH@Z(ptr) MSVCP_char_traits_char_not_eof
@ stub ?not_eof@?$char_traits@G@std@@SAGABG@Z
@ stub ?not_eof@?$char_traits@_W@std@@SAGABG@Z
@ cdecl ?not_eof@?$char_traits@_W@std@@SAGABG@Z(ptr) MSVCP_char_traits_wchar_not_eof
@ stub ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB
@ stub ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB
@ stub ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2IB
......@@ -3027,10 +3027,10 @@
@ stub ?tinyness_before@_Num_float_base@std@@2_NB
@ cdecl ?to_char_type@?$char_traits@D@std@@SADABH@Z(ptr) MSVCP_char_traits_char_to_char_type
@ stub ?to_char_type@?$char_traits@G@std@@SAGABG@Z
@ stub ?to_char_type@?$char_traits@_W@std@@SA_WABG@Z
@ cdecl ?to_char_type@?$char_traits@_W@std@@SA_WABG@Z(ptr) MSVCP_char_traits_wchar_to_char_type
@ cdecl ?to_int_type@?$char_traits@D@std@@SAHABD@Z(ptr) MSVCP_char_traits_char_to_int_type
@ stub ?to_int_type@?$char_traits@G@std@@SAGABG@Z
@ stub ?to_int_type@?$char_traits@_W@std@@SAGAB_W@Z
@ cdecl ?to_int_type@?$char_traits@_W@std@@SAGAB_W@Z(ptr) MSVCP_char_traits_wchar_to_int_type
@ stub ?tolower@?$ctype@D@std@@QBEDD@Z
@ stub ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z
@ stub ?tolower@?$ctype@G@std@@QBEGG@Z
......
......@@ -143,3 +143,137 @@ int CDECL MSVCP_char_traits_char_not_eof(int *in)
{
return (*in==EOF ? !EOF : *in);
}
/* char_traits<wchar_t> */
/* ?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z */
void CDECL MSVCP_char_traits_wchar_assign(wchar_t *ch,
const wchar_t *assign)
{
*ch = *assign;
}
/* ?eq@?$char_traits@_W@std@@SA_NAB_W0@Z */
MSVCP_BOOL CDECL MSVCP_char_traits_wchar_eq(wchar_t *ch1, wchar_t *ch2)
{
return *ch1 == *ch2;
}
/* ?lt@?$char_traits@_W@std@@SA_NAB_W0@Z */
MSVCP_BOOL CDECL MSVCP_char_traits_wchar_lt(const wchar_t *ch1,
const wchar_t *ch2)
{
return *ch1 < *ch2;
}
/* ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z */
int CDECL MSVCP_char_traits_wchar_compare(const wchar_t *s1,
const wchar_t *s2, unsigned int count)
{
int ret = memcmp(s1, s2, sizeof(wchar_t[count]));
return (ret>0 ? 1 : (ret<0 ? -1 : 0));
}
/* ?length@?$char_traits@_W@std@@SAIPB_W@Z */
int CDECL MSVCP_char_traits_wchar_length(const wchar_t *str)
{
return wcslen((WCHAR*)str);
}
/* ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
wchar_t* CDECL MSVCP_char_traits_wchar__Copy_s(wchar_t *dest,
unsigned int size, const wchar_t *src, unsigned int count)
{
if(!dest || !src || size<count) {
if(dest && size)
dest[0] = '\0';
_invalid_parameter(NULL, NULL, NULL, 0, 0);
return dest;
}
return memcpy(dest, src, sizeof(wchar_t[count]));
}
/* ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
wchar_t* CDECL MSVCP_char_traits_wchar_copy(wchar_t *dest,
const wchar_t *src, unsigned int count)
{
return MSVCP_char_traits_wchar__Copy_s(dest, count, src, count);
}
/* ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z */
const wchar_t* CDECL MSVCP_char_traits_wchar_find(
const wchar_t *str, unsigned int range, const wchar_t *c)
{
unsigned int i=0;
for(i=0; i<range; i++)
if(str[i] == *c)
return str+i;
return NULL;
}
/* ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
wchar_t* CDECL MSVCP_char_traits_wchar__Move_s(wchar_t *dest,
unsigned int size, const wchar_t *src, unsigned int count)
{
if(!dest || !src || size<count) {
if(dest && size)
dest[0] = '\0';
_invalid_parameter(NULL, NULL, NULL, 0, 0);
return dest;
}
return memmove(dest, src, sizeof(WCHAR[count]));
}
/* ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
wchar_t* CDECL MSVCP_char_traits_wchar_move(wchar_t *dest,
const wchar_t *src, unsigned int count)
{
return MSVCP_char_traits_wchar__Move_s(dest, count, src, count);
}
/* ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z */
wchar_t* CDECL MSVCP_char_traits_wchar_assignn(wchar_t *str,
unsigned int num, wchar_t c)
{
unsigned int i;
for(i=0; i<num; i++)
str[i] = c;
return str;
}
/* ?to_char_type@?$char_traits@_W@std@@SA_WABG@Z */
wchar_t CDECL MSVCP_char_traits_wchar_to_char_type(const unsigned short *i)
{
return *i;
}
/* ?to_int_type@?$char_traits@_W@std@@SAGAB_W@Z */
unsigned short CDECL MSVCP_char_traits_wchar_to_int_type(const wchar_t *ch)
{
return *ch;
}
/* ?eq_int_type@?$char_traits@_W@std@@SA_NABG0@Z */
MSVCP_BOOL CDECL MSVCP_char_traits_wchar_eq_int_tpe(const unsigned short *i1,
const unsigned short *i2)
{
return *i1 == *i2;
}
/* ?eof@?$char_traits@_W@std@@SAGXZ */
unsigned short CDECL MSVCP_char_traits_wchar_eof(void)
{
return WEOF;
}
/* ?not_eof@?$char_traits@_W@std@@SAGABG@Z */
unsigned short CDECL MSVCP_char_traits_wchar_not_eof(const unsigned short *in)
{
return (*in==WEOF ? !WEOF : *in);
}
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