From 609d7dbb68dd98debeb235e4c8fe1bffd8f34cc7 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Fri, 15 Jun 2012 11:08:47 +0200 Subject: [PATCH] msvcp90: Added setw implementation. --- dlls/msvcp90/ios.c | 16 ++++++++++++++++ dlls/msvcp90/msvcp90.spec | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 2c47137cb75..6a628dd29bc 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -5562,6 +5562,22 @@ manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec) return ret; } +static void __cdecl setw_func(ios_base *base, streamsize width) +{ + ios_base_width_set(base, width); +} + +/* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */ +/* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */ +manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width) +{ + TRACE("(%p %ld)\n", ret, width); + + ret->pfunc = setw_func; + ret->arg = width; + return ret; +} + static basic_filebuf_char filebuf_stdin; /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */ struct { diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index fccc07daf77..baa349ea092 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5368,8 +5368,8 @@ @ cdecl -arch=win64 ?setstate@ios_base@std@@QEAAXH_N@Z(ptr long long) ios_base_setstate_reraise @ thiscall -arch=win32 ?setstate@ios_base@std@@QAEXI@Z(ptr long) ios_base_setstate_unsigned @ cdecl -arch=win64 ?setstate@ios_base@std@@QEAAXI@Z(ptr long) ios_base_setstate_unsigned -@ stub -arch=win32 ?setw@std@@YA?AU?$_Smanip@H@1@H@Z -@ stub -arch=win64 ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z +@ cdecl -arch=win32 ?setw@std@@YA?AU?$_Smanip@H@1@H@Z(ptr long) setw +@ cdecl -arch=win64 ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z(ptr long) setw @ thiscall -arch=win32 ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ(ptr) basic_streambuf_char_sgetc @ cdecl -arch=win64 ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ(ptr) basic_streambuf_char_sgetc @ thiscall -arch=win32 ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ(ptr) basic_streambuf_wchar_sgetc