msvcp90: Added operator<<(basic_ostream<char>, basic_string<char>) implementation.
This commit is contained in:
parent
afe616b588
commit
e43f6ec638
|
@ -3940,6 +3940,50 @@ basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
|
|||
return ostr;
|
||||
}
|
||||
|
||||
/* $?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
|
||||
/* ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
|
||||
basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
|
||||
{
|
||||
basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
|
||||
IOSB_iostate state = IOSTATE_goodbit;
|
||||
|
||||
TRACE("(%p %p)\n", ostr, str);
|
||||
|
||||
if(basic_ostream_char_sentry_create(ostr)) {
|
||||
MSVCP_size_t len = MSVCP_basic_string_char_length(str);
|
||||
streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
|
||||
|
||||
if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
|
||||
for(; pad!=0; pad--) {
|
||||
if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
|
||||
state = IOSTATE_badbit;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(state == IOSTATE_goodbit) {
|
||||
if(basic_streambuf_char_sputn(base->strbuf, MSVCP_basic_string_char_c_str(str), len) != len)
|
||||
state = IOSTATE_badbit;
|
||||
}
|
||||
|
||||
for(; pad!=0; pad--) {
|
||||
if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
|
||||
state = IOSTATE_badbit;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
base->base.wide = 0;
|
||||
}else {
|
||||
state = IOSTATE_badbit;
|
||||
}
|
||||
basic_ostream_char_sentry_destroy(ostr);
|
||||
|
||||
basic_ios_char_setstate(base, state);
|
||||
return ostr;
|
||||
}
|
||||
|
||||
/* Caution: basic_istream uses virtual inheritance. */
|
||||
static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
|
||||
{
|
||||
|
|
|
@ -258,6 +258,7 @@ void __stdcall MSVCP_basic_string_char_dtor(basic_string_char*);
|
|||
const char* __stdcall MSVCP_basic_string_char_c_str(const basic_string_char*);
|
||||
void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
|
||||
basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
|
||||
MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
|
||||
|
||||
#define BUF_SIZE_WCHAR 8
|
||||
typedef struct _basic_string_wchar
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
@ stub -arch=win64 ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z
|
||||
@ stub -arch=win32 ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z
|
||||
@ stub -arch=win64 ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z
|
||||
@ stub -arch=win32 ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z
|
||||
@ stub -arch=win64 ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z
|
||||
@ cdecl -arch=win32 ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_ostream_char_print_bstr
|
||||
@ cdecl -arch=win64 ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z(ptr ptr) basic_ostream_char_print_bstr
|
||||
@ stub -arch=win32 ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z
|
||||
@ stub -arch=win64 ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z
|
||||
@ stub -arch=win32 ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z
|
||||
|
|
|
@ -1077,7 +1077,7 @@ void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
|
|||
/* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
|
||||
/* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
|
||||
DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_length, 4)
|
||||
MSVCP_size_t __thiscall MSVCP_basic_string_char_length(basic_string_char *this)
|
||||
MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char *this)
|
||||
{
|
||||
TRACE("%p\n", this);
|
||||
return this->size;
|
||||
|
|
Loading…
Reference in New Issue