From 5d1af4b6f6bdcf3a8789a21bcdd26c82d8a4bb47 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 13 Oct 2011 14:08:00 +0200 Subject: [PATCH] msvcp90: Added operator+(basic_string, char) implementation. --- dlls/msvcp90/msvcp90.spec | 16 +++++++-------- dlls/msvcp90/string.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index ecde9b58c18..25bb0b968a1 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -202,12 +202,12 @@ @ stub -arch=win64 ??$?GO@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z @ cdecl -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z(ptr ptr ptr) MSVCP_basic_string_char_concatenate @ cdecl -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z(ptr ptr ptr) MSVCP_basic_string_char_concatenate -@ stub -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z -@ stub -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z +@ cdecl -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z(ptr ptr long) MSVCP_basic_string_char_concatenate_bstr_ch +@ cdecl -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z(ptr ptr long) MSVCP_basic_string_char_concatenate_bstr_ch @ cdecl -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z(ptr ptr str) MSVCP_basic_string_char_concatenate_bstr_cstr @ cdecl -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z(ptr ptr str) MSVCP_basic_string_char_concatenate_bstr_cstr -@ stub -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z -@ stub -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z +@ cdecl -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z(ptr long ptr) MSVCP_basic_string_char_concatenate_ch_bstr +@ cdecl -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z(ptr long ptr) MSVCP_basic_string_char_concatenate_ch_bstr @ cdecl -arch=win32 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z(ptr str ptr) MSVCP_basic_string_char_concatenate_cstr_bstr @ cdecl -arch=win64 ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z(ptr str ptr) MSVCP_basic_string_char_concatenate_cstr_bstr @ stub -arch=win32 ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z @@ -248,12 +248,12 @@ @ cdecl -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@0@Z(ptr ptr ptr) MSVCP_basic_string_wchar_concatenate @ cdecl -arch=win32 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@PB_W@Z(ptr ptr wstr) MSVCP_basic_string_wchar_concatenate_bstr_cstr @ cdecl -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@PEB_W@Z(ptr ptr wstr) MSVCP_basic_string_wchar_concatenate_bstr_cstr -@ stub -arch=win32 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@_W@Z -@ stub -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@_W@Z +@ cdecl -arch=win32 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@_W@Z(ptr ptr long) MSVCP_basic_string_wchar_concatenate_bstr_ch +@ cdecl -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@_W@Z(ptr ptr long) MSVCP_basic_string_wchar_concatenate_bstr_ch @ cdecl -arch=win32 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_WABV10@@Z(ptr wstr ptr) MSVCP_basic_string_wchar_concatenate_cstr_bstr @ cdecl -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_WAEBV10@@Z(ptr wstr ptr) MSVCP_basic_string_wchar_concatenate_cstr_bstr -@ stub -arch=win32 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WABV10@@Z -@ stub -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WAEBV10@@Z +@ cdecl -arch=win32 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WABV10@@Z(ptr long ptr) MSVCP_basic_string_wchar_concatenate_ch_bstr +@ cdecl -arch=win64 ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WAEBV10@@Z(ptr long ptr) MSVCP_basic_string_wchar_concatenate_ch_bstr @ stub -arch=win32 ??$?KM@std@@YA?AV?$complex@M@0@ABMABV10@@Z @ stub -arch=win64 ??$?KM@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z @ stub -arch=win32 ??$?KM@std@@YA?AV?$complex@M@0@ABV10@0@Z diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index c89b7931823..59bc27038cf 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -1078,6 +1078,30 @@ basic_string_char* __cdecl MSVCP_basic_string_char_concatenate(basic_string_char return ret; } +/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */ +/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */ +basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_ch(basic_string_char *ret, + const basic_string_char *left, char right) +{ + TRACE("%p %c\n", left, right); + + MSVCP_basic_string_char_copy_ctor(ret, left); + MSVCP_basic_string_char_append_ch(ret, right); + return ret; +} + +/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */ +/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */ +basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_ch_bstr(basic_string_char *ret, + char left, const basic_string_char *right) +{ + TRACE("%c %p\n", left, right); + + MSVCP_basic_string_char_ctor_cstr_len(ret, &left, 1); + MSVCP_basic_string_char_append(ret, right); + return ret; +} + /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */ /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr_len, 20) @@ -2147,6 +2171,34 @@ basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wc return ret; } +/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@_W@Z */ +/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@_W@Z */ +basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch( + const basic_string_wchar *left, wchar_t right) +{ + basic_string_wchar ret = { 0 }; + + TRACE("%p %c\n", left, right); + + MSVCP_basic_string_wchar_copy_ctor(&ret, left); + MSVCP_basic_string_wchar_append_ch(&ret, right); + return ret; +} + +/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WABV10@@Z */ +/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WAEBV10@@Z */ +basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr( + wchar_t left, const basic_string_wchar *right) +{ + basic_string_wchar ret = { 0 }; + + TRACE("%c %p\n", left, right); + + MSVCP_basic_string_wchar_ctor_cstr_len(&ret, &left, 1); + MSVCP_basic_string_wchar_append(&ret, right); + return ret; +} + /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_WI@Z */ /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W0@Z */ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr_len, 20) -- 2.11.4.GIT