From c654b7be68fc978e532cf6f2a8881b5d0669b5c1 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 30 Jul 2014 15:55:50 -0500 Subject: [PATCH] msvcp100: Add basic_streambuf::swap implementation. --- dlls/msvcp100/msvcp100.spec | 12 ++++++------ dlls/msvcp110/msvcp110.spec | 18 +++++++++--------- dlls/msvcp90/ios.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 15 deletions(-) diff --git a/dlls/msvcp100/msvcp100.spec b/dlls/msvcp100/msvcp100.spec index 538f37ff34d..6cb9b77b5f9 100644 --- a/dlls/msvcp100/msvcp100.spec +++ b/dlls/msvcp100/msvcp100.spec @@ -2710,12 +2710,12 @@ @ cdecl -arch=win64 ?swap@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXAEAV12@@Z(ptr ptr) basic_ostream_wchar_swap @ thiscall -arch=win32 ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXAAV12@@Z(ptr ptr) basic_ostream_wchar_swap @ cdecl -arch=win64 ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXAEAV12@@Z(ptr ptr) basic_ostream_wchar_swap -@ stub -arch=win32 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z -@ stub -arch=win64 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z -@ stub -arch=win32 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z -@ stub -arch=win64 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z -@ stub -arch=win32 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z -@ stub -arch=win64 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXAEAV12@@Z +@ thiscall -arch=win32 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_streambuf_char_swap +@ cdecl -arch=win64 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_streambuf_char_swap +@ thiscall -arch=win32 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ cdecl -arch=win64 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ thiscall -arch=win32 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ cdecl -arch=win64 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_streambuf_wchar_swap @ thiscall -arch=win32 ?swap@ios_base@std@@QAEXAAV12@@Z(ptr ptr) ios_base_swap @ cdecl -arch=win64 ?swap@ios_base@std@@QEAAXAEAV12@@Z(ptr ptr) ios_base_swap @ thiscall -arch=win32 ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ(ptr) basic_istream_char_sync diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 8e01521004c..54d2ae4c726 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -3497,15 +3497,15 @@ @ cdecl -arch=arm ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@IAAXAAV12@@Z(ptr ptr) basic_ostream_wchar_swap @ thiscall -arch=i386 ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_ostream_wchar_swap @ cdecl -arch=win64 ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_ostream_wchar_swap -@ stub -arch=arm ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAAXAAV12@@Z -@ stub -arch=i386 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z -@ stub -arch=win64 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z -@ stub -arch=arm ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAAXAAV12@@Z -@ stub -arch=i386 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z -@ stub -arch=win64 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z -@ stub -arch=arm ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAAXAAV12@@Z -@ stub -arch=i386 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z -@ stub -arch=win64 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXAEAV12@@Z +@ cdecl -arch=arm ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAAXAAV12@@Z(ptr ptr) basic_streambuf_char_swap +@ thiscall -arch=i386 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_streambuf_char_swap +@ cdecl -arch=win64 ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_streambuf_char_swap +@ cdecl -arch=arm ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAAXAAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ thiscall -arch=i386 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ cdecl -arch=win64 ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ cdecl -arch=arm ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAAXAAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ thiscall -arch=i386 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z(ptr ptr) basic_streambuf_wchar_swap +@ cdecl -arch=win64 ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXAEAV12@@Z(ptr ptr) basic_streambuf_wchar_swap @ cdecl -arch=arm ?swap@ios_base@std@@QAAXAAV12@@Z(ptr ptr) ios_base_swap @ thiscall -arch=i386 ?swap@ios_base@std@@QAEXAAV12@@Z(ptr ptr) ios_base_swap @ cdecl -arch=win64 ?swap@ios_base@std@@QEAAXAEAV12@@Z(ptr ptr) ios_base_swap diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index f730898c20b..fbba9579a1b 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -1746,6 +1746,25 @@ streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, con return call_basic_streambuf_char_xsputn(this, ptr, count); } +/* ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z */ +/* ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z */ +DEFINE_THISCALL_WRAPPER(basic_streambuf_char_swap, 8) +void __thiscall basic_streambuf_char_swap(basic_streambuf_char *this, basic_streambuf_char *r) +{ + basic_streambuf_char tmp; + + TRACE("(%p %p)\n", this, r); + + if(this == r) + return; + + tmp = *this; + *this = *r; + this->vtable = tmp.vtable; + tmp.vtable = r->vtable; + *r = tmp; +} + /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */ /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */ /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */ @@ -2666,6 +2685,27 @@ streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, c return call_basic_streambuf_wchar_xsputn(this, ptr, count); } +/* ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z */ +/* ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z */ +/* ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z */ +/* ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z */ +DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_swap, 8) +void __thiscall basic_streambuf_wchar_swap(basic_streambuf_wchar *this, basic_streambuf_wchar *r) +{ + basic_streambuf_wchar tmp; + + TRACE("(%p %p)\n", this, r); + + if(this == r) + return; + + tmp = *this; + *this = *r; + this->vtable = tmp.vtable; + tmp.vtable = r->vtable; + *r = tmp; +} + /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */ /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */ int basic_filebuf_char__Init__Stinit = 0; -- 2.11.4.GIT