diff --git a/dlls/msvcp100/ios.c b/dlls/msvcp100/ios.c index 16677f23339..c5cc200c75d 100644 --- a/dlls/msvcp100/ios.c +++ b/dlls/msvcp100/ios.c @@ -4937,19 +4937,15 @@ basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wc basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); } -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) +static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); int state = IOSTATE_goodbit; - TRACE("(%p %u)\n", this, val); + TRACE("(%p %d)\n", this, val); if(basic_ostream_wchar_sentry_create(this)) { basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - const num_put *numput = num_put_wchar_use_facet(strbuf->loc); ostreambuf_iterator_wchar dest = {0, strbuf}; num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); @@ -4960,6 +4956,24 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_w return this; } +/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_wchar_use_facet( + basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_short_use_facet( + basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); diff --git a/dlls/msvcp100/msvcp100.spec b/dlls/msvcp100/msvcp100.spec index ed12e843145..92c99d72ab9 100644 --- a/dlls/msvcp100/msvcp100.spec +++ b/dlls/msvcp100/msvcp100.spec @@ -569,8 +569,8 @@ @ cdecl -arch=win64 ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z(ptr long) basic_ostream_char_print_bool @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z(ptr long) basic_ostream_short_print_short @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z(ptr long) basic_ostream_short_print_short -@ stub -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z -@ stub -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z +@ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z(ptr long) basic_ostream_short_print_ushort +@ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z(ptr long) basic_ostream_short_print_ushort @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z(ptr long) basic_ostream_short_print_int @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z(ptr long) basic_ostream_short_print_int @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z(ptr long) basic_ostream_short_print_uint diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 45021cb6280..3d9871c4611 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -808,9 +808,9 @@ @ cdecl -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@F@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@F@Z @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z -@ stub -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@G@Z -@ stub -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z -@ stub -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z +@ cdecl -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@G@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@G@Z +@ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z +@ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z @ cdecl -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@H@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@H@Z @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c index d51f6d0d3dc..aa024bf03ee 100644 --- a/dlls/msvcp60/ios.c +++ b/dlls/msvcp60/ios.c @@ -6148,6 +6148,34 @@ basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wc &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); } +static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput) +{ + basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); + int state = IOSTATE_goodbit; + + TRACE("(%p %d)\n", this, val); + + if(basic_ostream_wchar_sentry_create(this)) { + basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); + ostreambuf_iterator_wchar dest = {0, strbuf}; + + num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); + } + basic_ostream_wchar_sentry_destroy(this); + + basic_ios_wchar_setstate(base, state); + return this; +} + +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_short_use_facet( + &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); diff --git a/dlls/msvcp60/msvcp60.spec b/dlls/msvcp60/msvcp60.spec index 9daa7f86a05..40b959ea3c4 100644 --- a/dlls/msvcp60/msvcp60.spec +++ b/dlls/msvcp60/msvcp60.spec @@ -1401,8 +1401,8 @@ @ cdecl -arch=win64 ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z(ptr long) basic_ostream_char_print_bool @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z(ptr long) basic_ostream_short_print_short @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z(ptr long) basic_ostream_short_print_short -@ stub -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z -@ stub -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z +@ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z(ptr long) basic_ostream_short_print_ushort +@ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z(ptr long) basic_ostream_short_print_ushort @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z(ptr long) basic_ostream_short_print_int @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z(ptr long) basic_ostream_short_print_int @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z(ptr long) basic_ostream_short_print_uint diff --git a/dlls/msvcp60/tests/ios.c b/dlls/msvcp60/tests/ios.c index 17a18a38287..2a8b966c056 100644 --- a/dlls/msvcp60/tests/ios.c +++ b/dlls/msvcp60/tests/ios.c @@ -454,6 +454,8 @@ static basic_ostream_char* (*__thiscall p_basic_ostream_char_print_double)(basic static basic_ostream_wchar* (*__thiscall p_basic_ostream_wchar_print_double)(basic_ostream_wchar*, double); +static basic_ostream_wchar* (*__thiscall p_basic_ostream_short_print_ushort)(basic_ostream_wchar*, unsigned short); + /* basic_ios */ static locale* (*__thiscall p_basic_ios_char_imbue)(basic_ios_char*, locale*, const locale*); @@ -646,6 +648,9 @@ static BOOL init(void) SET(p_basic_ostream_wchar_print_double, "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z"); + SET(p_basic_ostream_short_print_ushort, + "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z"); + SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QEBAHXZ"); SET(p_ios_base_setf_mask, @@ -752,6 +757,9 @@ static BOOL init(void) SET(p_basic_ostream_wchar_print_double, "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z"); + SET(p_basic_ostream_short_print_ushort, + "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z"); + SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QBEHXZ"); SET(p_ios_base_setf_mask, @@ -1608,6 +1616,25 @@ static void test_istream_getline(void) } } +static void test_ostream_print_ushort(void) +{ + static const wchar_t str65[] = { '6','5',0 }; + + basic_stringstream_wchar wss; + basic_string_wchar pwstr; + const wchar_t *wstr; + + call_func3(p_basic_stringstream_wchar_ctor_mode, &wss, OPENMODE_in|OPENMODE_out, TRUE); + call_func2(p_basic_ostream_short_print_ushort, &wss.base.base2, 65); + + call_func2(p_basic_stringstream_wchar_str_get, &wss, &pwstr); + wstr = call_func1(p_basic_string_wchar_cstr, &pwstr); + ok(!lstrcmpW(str65, wstr), "wstr = %s\n", wine_dbgstr_w(wstr)); + + call_func1(p_basic_string_wchar_dtor, &pwstr); + call_func1(p_basic_stringstream_wchar_vbase_dtor, &wss); +} + START_TEST(ios) { @@ -1623,4 +1650,5 @@ START_TEST(ios) test_istream_peek(); test_istream_tellg(); test_istream_getline(); + test_ostream_print_ushort(); } diff --git a/dlls/msvcp70/msvcp70.spec b/dlls/msvcp70/msvcp70.spec index 23198d7b10f..af1b1a008c1 100644 --- a/dlls/msvcp70/msvcp70.spec +++ b/dlls/msvcp70/msvcp70.spec @@ -997,8 +997,8 @@ @ cdecl -arch=win64 ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z(ptr long) msvcp90.??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z -@ stub -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z -@ stub -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z +@ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z +@ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z(ptr long) msvcp90.??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z diff --git a/dlls/msvcp71/ios.c b/dlls/msvcp71/ios.c index 956e6573b7b..9bf86af7793 100644 --- a/dlls/msvcp71/ios.c +++ b/dlls/msvcp71/ios.c @@ -6506,19 +6506,15 @@ basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wc basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); } -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) +static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); int state = IOSTATE_goodbit; - TRACE("(%p %u)\n", this, val); + TRACE("(%p %d)\n", this, val); if(basic_ostream_wchar_sentry_create(this)) { basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - const num_put *numput = num_put_wchar_use_facet(strbuf->loc); ostreambuf_iterator_wchar dest = {0, strbuf}; num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); @@ -6529,6 +6525,24 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_w return this; } +/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_wchar_use_facet( + basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_short_use_facet( + basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); diff --git a/dlls/msvcp71/msvcp71.spec b/dlls/msvcp71/msvcp71.spec index ee05486abe0..e2247113a7d 100644 --- a/dlls/msvcp71/msvcp71.spec +++ b/dlls/msvcp71/msvcp71.spec @@ -1463,8 +1463,8 @@ @ cdecl -arch=win64 ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z(ptr long) basic_ostream_char_print_bool @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z(ptr long) basic_ostream_short_print_short @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z(ptr long) basic_ostream_short_print_short -@ stub -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z -@ stub -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z +@ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z(ptr long) basic_ostream_short_print_ushort +@ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z(ptr long) basic_ostream_short_print_ushort @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z(ptr long) basic_ostream_short_print_int @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z(ptr long) basic_ostream_short_print_int @ thiscall -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z(ptr long) basic_ostream_short_print_uint diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index f5b083e5f21..71e92f39bc0 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -6540,19 +6540,15 @@ basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wc basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); } -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) +static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); int state = IOSTATE_goodbit; - TRACE("(%p %u)\n", this, val); + TRACE("(%p %d)\n", this, val); if(basic_ostream_wchar_sentry_create(this)) { basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - const num_put *numput = num_put_wchar_use_facet(strbuf->loc); ostreambuf_iterator_wchar dest = {0, strbuf}; num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); @@ -6563,6 +6559,24 @@ basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_w return this; } +/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_wchar_use_facet( + basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */ +/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */ +DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort, 8) +basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_wchar *this, unsigned short val) +{ + return basic_ostream_print_ushort(this, val, num_put_short_use_facet( + basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); +} + static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput) { basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index e9c1b91df72..2758b80c654 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -1797,8 +1797,9 @@ @ cdecl -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@F@Z(ptr long) basic_ostream_short_print_short @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z(ptr long) basic_ostream_short_print_short @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z(ptr long) basic_ostream_short_print_short -@ stub -arch=win32 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z -@ stub -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z +@ cdecl -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@G@Z(ptr long) basic_ostream_short_print_ushort +@ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z(ptr long) basic_ostream_short_print_ushort +@ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z(ptr long) basic_ostream_short_print_ushort @ cdecl -arch=arm ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@H@Z(ptr long) basic_ostream_short_print_int @ thiscall -arch=i386 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z(ptr long) basic_ostream_short_print_int @ cdecl -arch=win64 ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z(ptr long) basic_ostream_short_print_int diff --git a/dlls/msvcp90/tests/ios.c b/dlls/msvcp90/tests/ios.c index 1baf7b60178..dc70c3f2829 100644 --- a/dlls/msvcp90/tests/ios.c +++ b/dlls/msvcp90/tests/ios.c @@ -468,6 +468,8 @@ static basic_ostream_char* (*__thiscall p_basic_ostream_char_print_double)(basic static basic_ostream_wchar* (*__thiscall p_basic_ostream_wchar_print_double)(basic_ostream_wchar*, double); +static basic_ostream_wchar* (*__thiscall p_basic_ostream_short_print_ushort)(basic_ostream_wchar*, unsigned short); + /* basic_ios */ static locale* (*__thiscall p_basic_ios_char_imbue)(basic_ios_char*, locale*, const locale*); @@ -685,6 +687,9 @@ static BOOL init(void) SET(p_basic_ostream_wchar_print_double, "??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z"); + SET(p_basic_ostream_short_print_ushort, + "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z"); + SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QEBAHXZ"); SET(p_ios_base_setf_mask, @@ -796,6 +801,9 @@ static BOOL init(void) SET(p_basic_ostream_wchar_print_double, "??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAAAAV01@N@Z"); + SET(p_basic_ostream_short_print_ushort, + "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAAAAV01@G@Z"); + SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QBAHXZ"); SET(p_ios_base_setf_mask, @@ -906,6 +914,9 @@ static BOOL init(void) SET(p_basic_ostream_wchar_print_double, "??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z"); + SET(p_basic_ostream_short_print_ushort, + "??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z"); + SET(p_ios_base_rdstate, "?rdstate@ios_base@std@@QBEHXZ"); SET(p_ios_base_setf_mask, @@ -1920,6 +1931,26 @@ static void test_istream_getline(void) } } +static void test_ostream_print_ushort(void) +{ + static const wchar_t str65[] = { '6','5',0 }; + + basic_stringstream_wchar wss; + basic_string_wchar pwstr; + const wchar_t *wstr; + + call_func1(p_basic_stringstream_wchar_ctor, &wss); + call_func2(p_basic_ostream_short_print_ushort, &wss.base.base2, 65); + + call_func2(p_basic_stringstream_wchar_str_get, &wss, &pwstr); + wstr = call_func1(p_basic_string_wchar_cstr, &pwstr); + ok(!lstrcmpW(str65, wstr), "wstr = %s\n", wine_dbgstr_w(wstr)); + + call_func1(p_basic_string_wchar_dtor, &pwstr); + call_func1(p_basic_stringstream_wchar_vbase_dtor, &wss); +} + + START_TEST(ios) { if(!init()) @@ -1935,6 +1966,7 @@ START_TEST(ios) test_istream_peek(); test_istream_tellg(); test_istream_getline(); + test_ostream_print_ushort(); ok(!invalid_parameter, "invalid_parameter_handler was invoked too many times\n"); }