From da7138767f46dfd4090fec71c1f7e712f0811787 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 26 Jul 2012 13:55:45 +0200 Subject: [PATCH] msvcp71: Added iterator based basic_string::replace implementation. --- dlls/msvcp71/msvcp71.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp71/msvcp71.spec | 36 ++++++------ dlls/msvcp90/msvcp90.spec | 2 + dlls/msvcp90/string.c | 14 +++++ 4 files changed, 181 insertions(+), 18 deletions(-) diff --git a/dlls/msvcp71/msvcp71.c b/dlls/msvcp71/msvcp71.c index b0be17edf36..2a6846a4a5c 100644 --- a/dlls/msvcp71/msvcp71.c +++ b/dlls/msvcp71/msvcp71.c @@ -24,6 +24,7 @@ #include "windef.h" #include "winbase.h" +#include "wine/unicode.h" /* Copied from dlls/msvcrt/cpp.c */ #ifdef __i386__ /* thiscall functions are i386-specific */ @@ -75,6 +76,11 @@ typedef struct MSVCP_size_t res; } basic_string_wchar; +basic_string_char* (__stdcall *pbasic_string_char_replace)(basic_string_char*, + MSVCP_size_t, MSVCP_size_t, const char*, MSVCP_size_t); +basic_string_wchar* (__stdcall *pbasic_string_wchar_replace)(basic_string_wchar*, + MSVCP_size_t, MSVCP_size_t, const MSVCP_wchar_t*, MSVCP_size_t); + typedef struct { const char *pos; } basic_string_char_iterator; @@ -121,6 +127,65 @@ basic_string_char_iterator* __thiscall basic_string_char_end( return ret; } +/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16) +basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this, + basic_string_char_iterator beg, basic_string_char_iterator end, basic_string_char *str) +{ + return pbasic_string_char_replace(this, beg.pos-basic_string_char_ptr(this), + end.pos-beg.pos, basic_string_char_ptr(str), str->size); +} + +/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0ID@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_ch, 20) +basic_string_char* __thiscall basic_string_char_replace_iter_ch(basic_string_char *this, + basic_string_char_iterator beg, basic_string_char_iterator end, MSVCP_size_t count, char ch) +{ + /* TODO: add more efficient implementation */ + MSVCP_size_t off = beg.pos-basic_string_char_ptr(this); + + pbasic_string_char_replace(this, off, end.pos-beg.pos, NULL, 0); + while(count--) + pbasic_string_char_replace(this, off, 0, &ch, 1); + return this; +} + +/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBD1@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_beg_end, 20) +basic_string_char* __thiscall basic_string_char_replace_iter_beg_end(basic_string_char *this, + basic_string_char_iterator beg, basic_string_char_iterator end, const char *rbeg, const char *rend) +{ + return pbasic_string_char_replace(this, beg.pos-basic_string_char_ptr(this), + end.pos-beg.pos, rbeg, rend-rbeg); +} + +/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBD@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16) +basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this, + basic_string_char_iterator beg, basic_string_char_iterator end, const char *str) +{ + return pbasic_string_char_replace(this, beg.pos-basic_string_char_ptr(this), + end.pos-beg.pos, str, strlen(str)); +} + +/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBDI@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20) +basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this, + basic_string_char_iterator beg, basic_string_char_iterator end, const char *str, MSVCP_size_t len) +{ + return pbasic_string_char_replace(this, beg.pos-basic_string_char_ptr(this), + end.pos-beg.pos, str, len); +} + +/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20) +basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this, + basic_string_char_iterator beg, basic_string_char_iterator end, + basic_string_char_iterator rbeg, basic_string_char_iterator rend) +{ + return pbasic_string_char_replace(this, beg.pos-basic_string_char_ptr(this), + end.pos-beg.pos, rbeg.pos, rend.pos-rbeg.pos); +} /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AViterator@12@XZ */ /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AVconst_iterator@12@XZ */ @@ -154,6 +219,86 @@ basic_string_wchar_iterator* __thiscall basic_string_wchar_end( return ret; } +/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z */ +/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16) +basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this, + basic_string_wchar_iterator beg, basic_string_wchar_iterator end, basic_string_wchar *str) +{ + return pbasic_string_wchar_replace(this, beg.pos-basic_string_wchar_ptr(this), + end.pos-beg.pos, basic_string_wchar_ptr(str), str->size); +} + +/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0IG@Z */ +/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0I_W@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_ch, 20) +basic_string_wchar* __thiscall basic_string_wchar_replace_iter_ch(basic_string_wchar *this, + basic_string_wchar_iterator beg, basic_string_wchar_iterator end, MSVCP_size_t count, MSVCP_wchar_t ch) +{ + /* TODO: add more efficient implementation */ + MSVCP_size_t off = beg.pos-basic_string_wchar_ptr(this); + + pbasic_string_wchar_replace(this, off, end.pos-beg.pos, NULL, 0); + while(count--) + pbasic_string_wchar_replace(this, off, 0, &ch, 1); + return this; +} + +/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBG1@Z */ +/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_W1@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_beg_end, 20) +basic_string_wchar* __thiscall basic_string_wchar_replace_iter_beg_end(basic_string_wchar *this, + basic_string_wchar_iterator beg, basic_string_wchar_iterator end, + const MSVCP_wchar_t *rbeg, const MSVCP_wchar_t *rend) +{ + return pbasic_string_wchar_replace(this, beg.pos-basic_string_wchar_ptr(this), + end.pos-beg.pos, rbeg, rend-rbeg); +} + +/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBG@Z */ +/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_W@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16) +basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this, + basic_string_wchar_iterator beg, basic_string_wchar_iterator end, const MSVCP_wchar_t *str) +{ + return pbasic_string_wchar_replace(this, beg.pos-basic_string_wchar_ptr(this), + end.pos-beg.pos, str, strlenW(str)); +} + +/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBGI@Z */ +/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_WI@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20) +basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this, + basic_string_wchar_iterator beg, basic_string_wchar_iterator end, + const MSVCP_wchar_t *str, MSVCP_size_t len) +{ + return pbasic_string_wchar_replace(this, beg.pos-basic_string_wchar_ptr(this), + end.pos-beg.pos, str, len); +} + +/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z */ +/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z */ +DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20) +basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this, + basic_string_wchar_iterator beg, basic_string_wchar_iterator end, + basic_string_wchar_iterator rbeg, basic_string_wchar_iterator rend) +{ + return pbasic_string_wchar_replace(this, beg.pos-basic_string_wchar_ptr(this), + end.pos-beg.pos, rbeg.pos, rend.pos-rbeg.pos); +} + +static BOOL init_funcs(void) +{ + HMODULE hmod = GetModuleHandleA("msvcp90.dll"); + if(!hmod) + return FALSE; + + pbasic_string_char_replace = (void*)GetProcAddress(hmod, "basic_string_char_replace_helper"); + pbasic_string_wchar_replace = (void*)GetProcAddress(hmod, "basic_string_wchar_replace_helper"); + + return pbasic_string_char_replace && pbasic_string_wchar_replace; +} + BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) { switch (reason) @@ -163,6 +308,8 @@ BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hdll); + if(!init_funcs()) + return FALSE; } return TRUE; } diff --git a/dlls/msvcp71/msvcp71.spec b/dlls/msvcp71/msvcp71.spec index 852c0ab31dc..325b69ef057 100644 --- a/dlls/msvcp71/msvcp71.spec +++ b/dlls/msvcp71/msvcp71.spec @@ -4495,12 +4495,12 @@ @ cdecl -arch=win64 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z(ptr long long ptr long) msvcp90.?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z @ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z(ptr long long ptr long) msvcp90.?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z @ cdecl -arch=win64 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z(ptr long long ptr) msvcp90.?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z -@ stub -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z -@ stub -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0ID@Z -@ stub -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBD1@Z -@ stub -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBD@Z -@ stub -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBDI@Z -@ stub -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z +@ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z(ptr ptr ptr ptr) basic_string_char_replace_iter_bstr +@ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0ID@Z(ptr ptr ptr long long) basic_string_char_replace_iter_ch +@ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBD1@Z(ptr ptr ptr ptr ptr) basic_string_char_replace_iter_beg_end +@ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBD@Z(ptr ptr ptr str) basic_string_char_replace_iter_cstr +@ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0PBDI@Z(ptr ptr ptr str long) basic_string_char_replace_iter_cstr_len +@ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z(ptr ptr ptr ptr ptr) basic_string_char_replace_iter_iter @ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z(ptr long long ptr) msvcp90.?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z @ cdecl -arch=win64 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z(ptr long long long long) msvcp90.?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z @ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z(ptr long long ptr long long) msvcp90.?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z @@ -4511,12 +4511,12 @@ @ cdecl -arch=win64 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z(ptr long long ptr long) msvcp90.?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z @ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z(ptr long long ptr long) msvcp90.?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z @ cdecl -arch=win64 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z(ptr long long ptr) msvcp90.?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z -@ stub -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z -@ stub -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0IG@Z -@ stub -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBG1@Z -@ stub -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBG@Z -@ stub -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBGI@Z -@ stub -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z +@ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z(ptr ptr ptr ptr) basic_string_wchar_replace_iter_bstr +@ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0IG@Z(ptr ptr ptr long long) basic_string_wchar_replace_iter_ch +@ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBG1@Z(ptr ptr ptr ptr ptr) basic_string_wchar_replace_iter_beg_end +@ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBG@Z(ptr ptr ptr wstr) basic_string_wchar_replace_iter_cstr +@ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0PBGI@Z(ptr ptr ptr wstr long) basic_string_wchar_replace_iter_cstr_len +@ thiscall -arch=win32 ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z(ptr ptr ptr ptr ptr) basic_string_wchar_replace_iter_iter @ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@@Z(ptr long long ptr) msvcp90.?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@@Z @ cdecl -arch=win64 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K00_W@Z(ptr long long long long) msvcp90.?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K00_W@Z @ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@II@Z(ptr long long ptr long long) msvcp90.?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@II@Z @@ -4527,12 +4527,12 @@ @ cdecl -arch=win64 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W0@Z(ptr long long ptr long) msvcp90.?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W0@Z @ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_WI@Z(ptr long long ptr long) msvcp90.?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_WI@Z @ cdecl -arch=win64 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W@Z(ptr long long ptr) msvcp90.?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W@Z -@ stub -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z -@ stub -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0I_W@Z -@ stub -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_W1@Z -@ stub -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_W@Z -@ stub -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_WI@Z -@ stub -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z +@ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0ABV12@@Z(ptr ptr ptr ptr) basic_string_wchar_replace_iter_bstr +@ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0I_W@Z(ptr ptr ptr long long) basic_string_wchar_replace_iter_ch +@ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_W1@Z(ptr ptr ptr ptr ptr) basic_string_wchar_replace_iter_beg_end +@ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_W@Z(ptr ptr ptr wstr) basic_string_wchar_replace_iter_cstr +@ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0PB_WI@Z(ptr ptr ptr wstr long) basic_string_wchar_replace_iter_cstr_len +@ thiscall -arch=win32 ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@Viterator@12@0Vconst_iterator@12@1@Z(ptr ptr ptr ptr ptr) basic_string_wchar_replace_iter_iter @ thiscall -arch=win32 ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z(ptr long) msvcp90.?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z @ cdecl -arch=win64 ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z(ptr long) msvcp90.?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z @ thiscall -arch=win32 ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z(ptr long) msvcp90.?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 9ad8f1f7ca1..191a750146d 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5819,3 +5819,5 @@ @ cdecl -arch=win64 ?facet_Register@facet@locale@std@@CAXPEAV123@@Z(ptr) locale_facet_register @ thiscall -arch=win32 ?_Register@facet@locale@std@@QAEXXZ(ptr) locale_facet__Register @ cdecl -arch=win64 ?_Register@facet@locale@std@@QEAAXXZ(ptr) locale_facet__Register +@ stdcall basic_string_char_replace_helper(ptr long long ptr long) +@ stdcall basic_string_wchar_replace_helper(ptr long long ptr long) diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index 8a72291fe9b..d9afe3d88ea 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -1991,6 +1991,13 @@ basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_ch return this; } +/* Not exported from msvcp90 */ +basic_string_char* basic_string_char_replace_helper(basic_string_char *this, + MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len) +{ + return basic_string_char_replace_cstr_len(this, off, len, str, str_len); +} + /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */ /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */ DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16) @@ -3943,6 +3950,13 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_ return this; } +/* Not exported from msvcp90 */ +basic_string_wchar* basic_string_wchar_replace_helper(basic_string_wchar *this, + MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len) +{ + return basic_string_wchar_replace_cstr_len(this, off, len ,str, str_len); +} + /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_W@Z */ /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W@Z */ /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */ -- 2.11.4.GIT