Commit 90aad327 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcp: Add a macro to access the locale field of I/O streams.

parent 574350d8
......@@ -949,7 +949,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char
TRACE("(%p)\n", this);
this->vtable = &MSVCP_basic_streambuf_char_vtable;
locale_ctor(&this->loc);
locale_ctor(IOS_LOCALE(this));
basic_streambuf_char__Init_empty(this);
return this;
......@@ -962,7 +962,7 @@ void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
{
TRACE("(%p)\n", this);
locale_dtor(&this->loc);
locale_dtor(IOS_LOCALE(this));
}
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
......@@ -1302,9 +1302,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
{
TRACE("(%p %p)\n", this, loc);
memcpy(ret, &this->loc, sizeof(locale));
memcpy(ret, IOS_LOCALE(this), sizeof(locale));
call_basic_streambuf_char_imbue(this, loc);
locale_copy_ctor(&this->loc, loc);
locale_copy_ctor(IOS_LOCALE(this), loc);
return ret;
}
......@@ -1643,7 +1643,7 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
locale* __thiscall basic_streambuf_char_getloc(basic_streambuf_char *this, locale *ret)
{
TRACE("(%p %p)\n", this, ret);
return locale_copy_ctor(ret, &this->loc);
return locale_copy_ctor(ret, IOS_LOCALE(this));
}
/* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
......@@ -1733,7 +1733,7 @@ basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wch
TRACE("(%p)\n", this);
this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
locale_ctor(&this->loc);
locale_ctor(IOS_LOCALE(this));
basic_streambuf_wchar__Init_empty(this);
return this;
......@@ -1759,7 +1759,7 @@ void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
{
TRACE("(%p)\n", this);
locale_dtor(&this->loc);
locale_dtor(IOS_LOCALE(this));
}
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
......@@ -2139,9 +2139,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
{
TRACE("(%p %p)\n", this, loc);
memcpy(ret, &this->loc, sizeof(locale));
memcpy(ret, IOS_LOCALE(this), sizeof(locale));
call_basic_streambuf_wchar_imbue(this, loc);
locale_copy_ctor(&this->loc, loc);
locale_copy_ctor(IOS_LOCALE(this), loc);
return ret;
}
......@@ -2548,7 +2548,7 @@ void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this)
{
TRACE("(%p)\n", this);
this->cvt = codecvt_char_use_facet(&this->base.loc);
this->cvt = codecvt_char_use_facet(IOS_LOCALE(&this->base));
locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_char_id.id, LC_CTYPE);
if(codecvt_base_always_noconv(&this->cvt->base)) {
this->cvt = NULL;
......@@ -3074,7 +3074,7 @@ void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this)
{
TRACE("(%p)\n", this);
this->cvt = codecvt_short_use_facet(&this->base.loc);
this->cvt = codecvt_short_use_facet(IOS_LOCALE(&this->base));
locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_short_id.id, LC_CTYPE);
if(codecvt_base_always_noconv(&this->cvt->base)) {
this->cvt = NULL;
......@@ -4340,7 +4340,7 @@ ios_base* __thiscall ios_base_ctor(ios_base *this)
{
TRACE("(%p)\n", this);
this->vtable = &MSVCP_ios_base_vtable;
locale_ctor_uninitialized(&this->loc, 0);
locale_ctor_uninitialized(IOS_LOCALE(this), 0);
return this;
}
......@@ -4397,7 +4397,7 @@ void __cdecl ios_base_Tidy(ios_base *this)
void __cdecl ios_base_Ios_base_dtor(ios_base *obj)
{
TRACE("(%p)\n", obj);
locale_dtor(&obj->loc);
locale_dtor(IOS_LOCALE(obj));
ios_base_Tidy(obj);
}
......@@ -4598,7 +4598,7 @@ ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
this->fmtfl = rhs->fmtfl;
this->prec = rhs->prec;
this->wide = rhs->wide;
locale_operator_assign(&this->loc, &rhs->loc);
locale_operator_assign(IOS_LOCALE(this), IOS_LOCALE(rhs));
for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
......@@ -4681,7 +4681,7 @@ void __thiscall ios_base__Init(ios_base *this)
this->wide = 0;
this->arr = NULL;
this->calls = NULL;
locale_ctor(&this->loc);
locale_ctor(IOS_LOCALE(this));
}
/* ?bad@ios_base@std@@QBE_NXZ */
......@@ -4730,7 +4730,7 @@ DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
{
TRACE("(%p)\n", this);
return locale_copy_ctor(ret, &this->loc);
return locale_copy_ctor(ret, IOS_LOCALE(this));
}
/* ?good@ios_base@std@@QBE_NXZ */
......@@ -4748,8 +4748,8 @@ DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
{
TRACE("(%p %p)\n", this, loc);
*ret = this->loc;
locale_copy_ctor(&this->loc, loc);
*ret = *IOS_LOCALE(this);
locale_copy_ctor(IOS_LOCALE(this), loc);
return ret;
}
......@@ -5070,7 +5070,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
{
TRACE("(%p %c %c)\n", this, ch, def);
return ctype_char_narrow_ch(ctype_char_use_facet(&this->strbuf->loc), ch, def);
return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf)), ch, def);
}
/* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
......@@ -5143,7 +5143,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
{
TRACE("(%p %c)\n", this, ch);
return ctype_char_widen_ch(ctype_char_use_facet(&this->strbuf->loc), ch);
return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf)), ch);
}
......@@ -5331,7 +5331,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
{
TRACE("(%p %c %c)\n", this, ch, def);
return ctype_wchar_narrow_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch, def);
return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf)), ch, def);
}
/* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
......@@ -5418,7 +5418,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
{
TRACE("(%p %c)\n", this, ch);
return ctype_wchar_widen_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch);
return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf)), ch);
}
/* Caution: basic_ostream uses virtual inheritance.
......@@ -5710,7 +5710,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5737,7 +5737,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_cha
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5764,7 +5764,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5791,7 +5791,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5816,7 +5816,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5841,7 +5841,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_cha
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5866,7 +5866,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_ch
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5922,7 +5922,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5947,7 +5947,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5972,7 +5972,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_cha
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -5997,7 +5997,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(&strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6534,7 +6534,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
{
return basic_ostream_print_short(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput)
......@@ -6564,7 +6564,7 @@ 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));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
......@@ -6596,7 +6596,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
{
return basic_ostream_print_int(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
......@@ -6628,7 +6628,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
{
return basic_ostream_print_uint(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
......@@ -6658,7 +6658,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
{
return basic_ostream_print_float(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
......@@ -6688,7 +6688,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
{
return basic_ostream_print_double(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
......@@ -6718,7 +6718,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
{
return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
......@@ -6781,7 +6781,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
{
return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
......@@ -6811,7 +6811,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
{
return basic_ostream_print_int64(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
......@@ -6841,7 +6841,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
{
return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
......@@ -6871,7 +6871,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
{
return basic_ostream_print_bool(this, val, num_put_short_use_facet(
&basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
......@@ -7210,7 +7210,7 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(base->strbuf));
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
......@@ -7523,7 +7523,7 @@ basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
if(basic_istream_char_sentry_create(istream, TRUE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const ctype_char *ctype = ctype_char_use_facet(&strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(strbuf));
for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
ch = basic_streambuf_char_snextc(strbuf)) {
......@@ -7805,7 +7805,7 @@ basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
LONG tmp;
......@@ -7835,7 +7835,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -7859,7 +7859,7 @@ basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *t
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -7883,7 +7883,7 @@ basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -7907,7 +7907,7 @@ basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -7931,7 +7931,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -7955,7 +7955,7 @@ basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -7979,7 +7979,7 @@ basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8003,7 +8003,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_cha
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8027,7 +8027,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *t
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8051,7 +8051,7 @@ basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8075,7 +8075,7 @@ basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8099,7 +8099,7 @@ basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(&strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8160,7 +8160,7 @@ basic_istream_char* __cdecl basic_istream_char_read_bstr(
TRACE("(%p %p)\n", istream, str);
if(basic_istream_char_sentry_create(istream, FALSE)) {
const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(base->strbuf));
MSVCP_size_t count = ios_base_width_get(&base->base);
if(!count)
......@@ -8197,7 +8197,7 @@ basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istr
TRACE("(%p %p)\n", istream, str);
if(basic_istream_char_sentry_create(istream, FALSE)) {
const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(base->strbuf));
MSVCP_size_t count = ios_base_width_get(&base->base)-1;
for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
......@@ -8471,7 +8471,7 @@ MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP
if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
const ctype_wchar *ctype = ctype_wchar_use_facet(&base->strbuf->loc);
const ctype_wchar *ctype = ctype_wchar_use_facet(IOS_LOCALE(base->strbuf));
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
......@@ -8811,7 +8811,7 @@ basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream
if(basic_istream_wchar_sentry_create(istream, TRUE)) {
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
const ctype_wchar *ctype = ctype_wchar_use_facet(&strbuf->loc);
const ctype_wchar *ctype = ctype_wchar_use_facet(IOS_LOCALE(strbuf));
for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
ch = basic_streambuf_wchar_snextc(strbuf)) {
......@@ -9134,7 +9134,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
{
return basic_istream_read_short(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
......@@ -9163,7 +9163,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
{
return basic_istream_read_int(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
......@@ -9192,7 +9192,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
{
return basic_istream_read_uint(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
......@@ -9221,7 +9221,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
{
return basic_istream_read_long(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
......@@ -9250,7 +9250,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
{
return basic_istream_read_ulong(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
......@@ -9279,7 +9279,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
{
return basic_istream_read_float(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
......@@ -9308,7 +9308,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
{
return basic_istream_read_double(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
......@@ -9337,7 +9337,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
{
return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
......@@ -9366,7 +9366,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
{
return basic_istream_read_ptr(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
......@@ -9395,7 +9395,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
{
return basic_istream_read_int64(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
......@@ -9424,7 +9424,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
{
return basic_istream_read_uint64(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
......@@ -9453,7 +9453,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
{
return basic_istream_read_bool(this, v, num_get_short_use_facet(
&basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */
......@@ -9534,7 +9534,7 @@ basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
basic_istream_wchar *istream, basic_string_wchar *str)
{
return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
&basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
/* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
......@@ -9543,7 +9543,7 @@ basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
basic_istream_wchar *istream, basic_string_wchar *str)
{
return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
&basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
......@@ -9577,7 +9577,7 @@ static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream,
basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
{
return basic_istream_read_str(istream, str, ctype_short_use_facet(
&basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
/* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
......
......@@ -4396,7 +4396,7 @@ static istreambuf_iterator_wchar* num_get_do_get_void(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, FMTFLAG_hex, &base->loc, numpunct), &err);
&last, FMTFLAG_hex, IOS_LOCALE(base), numpunct), &err);
if(v!=(unsigned __int64)((INT_PTR)v))
*state |= IOSTATE_failbit;
else if(end!=tmp && !err)
......@@ -4421,7 +4421,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
{
return num_get_do_get_void(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
......@@ -4431,7 +4431,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_void(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
{
return num_get_do_get_void(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
......@@ -4457,7 +4457,7 @@ static istreambuf_iterator_wchar* num_get_do_get_double(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stodx(tmp, &end, num_get__Getffld(this, tmp, &first, &last, &base->loc, numpunct), &err);
v = _Stodx(tmp, &end, num_get__Getffld(this, tmp, &first, &last, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -4485,7 +4485,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
{
return num_get_do_get_double(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
......@@ -4497,7 +4497,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_double(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
{
return num_get_do_get_double(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
......@@ -4536,7 +4536,7 @@ static istreambuf_iterator_wchar* num_get_do_get_float(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stofx(tmp, &end, num_get__Getffld(this, tmp, &first,
&last, &base->loc, numpunct), &err);
&last, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -4559,7 +4559,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
{
return num_get_do_get_float(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
......@@ -4569,7 +4569,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_float(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
{
return num_get_do_get_float(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
......@@ -4596,7 +4596,7 @@ static istreambuf_iterator_wchar* num_get_do_get_uint64(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, &base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -4619,7 +4619,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
{
return num_get_do_get_uint64(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
......@@ -4629,7 +4629,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint64(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
{
return num_get_do_get_uint64(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
......@@ -4656,7 +4656,7 @@ static istreambuf_iterator_wchar* num_get_do_get_int64(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stollx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, &base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -4679,7 +4679,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
{
return num_get_do_get_int64(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
......@@ -4689,7 +4689,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_int64(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
{
return num_get_do_get_int64(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
......@@ -4716,7 +4716,7 @@ static istreambuf_iterator_wchar* num_get_do_get_ulong(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoulx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, &base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -4739,7 +4739,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
{
return num_get_do_get_ulong(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
......@@ -4749,7 +4749,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_ulong(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
{
return num_get_do_get_ulong(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
......@@ -4776,7 +4776,7 @@ static istreambuf_iterator_wchar* num_get_do_get_long(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, &base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -4799,7 +4799,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
{
return num_get_do_get_long(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
......@@ -4809,7 +4809,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_long(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
{
return num_get_do_get_long(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
......@@ -4875,7 +4875,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
b = num_get_wchar__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc);
&first, &last, base->fmtfl, IOS_LOCALE(base));
beg = tmp + (tmp[0]=='-' ? 1 : 0);
v = _Stoulx(beg, &end, b, &err);
......@@ -4967,7 +4967,7 @@ static istreambuf_iterator_wchar* num_get_do_get_bool(const num_get *this,
char tmp[25], *end;
int err;
LONG v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, &base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && err==0 && (v==0 || v==1))
*pval = v;
......@@ -4991,7 +4991,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
{
return num_get_do_get_bool(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(&base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
......@@ -5001,7 +5001,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_bool(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
{
return num_get_do_get_bool(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(&base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
......@@ -5355,7 +5355,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_void(const num_get *thi
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, FMTFLAG_hex, &base->loc), &err);
&first, &last, FMTFLAG_hex, IOS_LOCALE(base)), &err);
if(v!=(unsigned __int64)((INT_PTR)v))
*state |= IOSTATE_failbit;
else if(end!=tmp && !err)
......@@ -5400,7 +5400,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get *t
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stodx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, &base->loc), &err);
v = _Stodx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5448,7 +5448,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get *th
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stofx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, &base->loc), &err);
v = _Stofx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5487,7 +5487,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get *t
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5526,7 +5526,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get *th
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stollx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5565,7 +5565,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get *th
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoulx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5604,7 +5604,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get *thi
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5666,7 +5666,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get *t
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
b = num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc);
&first, &last, base->fmtfl, IOS_LOCALE(base));
beg = tmp + (tmp[0]=='-' ? 1 : 0);
v = _Stoulx(beg, &end, b, &err);
......@@ -5706,7 +5706,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *thi
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_char *numpunct = numpunct_char_use_facet(&base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char false_bstr, true_bstr;
const char *pfalse, *ptrue;
......@@ -5751,7 +5751,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *thi
char tmp[25], *end;
int err;
LONG v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, &base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && err==0 && (v==0 || v==1))
*pval = v;
......@@ -5974,7 +5974,7 @@ char* __cdecl num_put_char__Ffmt(const num_put *this, char *fmt, char spec, int
static ostreambuf_iterator_char* num_put_char_fput(const num_put *this, ostreambuf_iterator_char *ret,
ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count)
{
numpunct_char *numpunct = numpunct_char_use_facet(&base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
char *p, sep = *localeconv()->decimal_point;
int adjustfield = base->fmtfl & FMTFLAG_adjustfield;
MSVCP_size_t pad;
......@@ -6044,7 +6044,7 @@ char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spe
ostreambuf_iterator_char* __cdecl num_put_char__Iput(const num_put *this, ostreambuf_iterator_char *ret,
ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count)
{
numpunct_char *numpunct = numpunct_char_use_facet(&base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char grouping_bstr;
const char *grouping;
char *p, sep;
......@@ -6309,7 +6309,7 @@ ostreambuf_iterator_char* __thiscall num_put_char_do_put_bool(const num_put *thi
TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_char *numpunct = numpunct_char_use_facet(&base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char str;
MSVCP_size_t pad, len;
......@@ -6786,7 +6786,7 @@ static ostreambuf_iterator_wchar* num_put__Iput(const num_put *this, ostreambuf_
ostreambuf_iterator_wchar* __cdecl num_put_wchar__Iput(const num_put *this, ostreambuf_iterator_wchar *ret,
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, MSVCP_size_t count)
{
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_wchar_use_facet(&base->loc));
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?_Iput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPADI@Z */
......@@ -6794,7 +6794,7 @@ ostreambuf_iterator_wchar* __cdecl num_put_wchar__Iput(const num_put *this, ostr
ostreambuf_iterator_wchar* __cdecl num_put_short__Iput(const num_put *this, ostreambuf_iterator_wchar *ret,
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, MSVCP_size_t count)
{
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_short_use_facet(&base->loc));
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WJ@Z */
......@@ -6918,8 +6918,8 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_double(const num_put
ERR("Out of memory\n");
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
}
num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, base->prec, v),
numpunct_wchar_use_facet(&base->loc));
num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v),
numpunct_wchar_use_facet(IOS_LOCALE(base)));
MSVCRT_operator_delete(tmp);
return ret;
}
......@@ -6950,7 +6950,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_double(const num_put
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
}
num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v),
numpunct_short_use_facet(&base->loc));
numpunct_short_use_facet(IOS_LOCALE(base)));
MSVCRT_operator_delete(tmp);
return ret;
}
......@@ -7122,7 +7122,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_bool(const num_put *t
TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_wchar *numpunct = numpunct_wchar_use_facet(&base->loc);
numpunct_wchar *numpunct = numpunct_wchar_use_facet(IOS_LOCALE(base));
basic_string_wchar str;
MSVCP_size_t pad, len;
......@@ -7156,7 +7156,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_bool(const num_put *t
TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_wchar *numpunct = numpunct_short_use_facet(&base->loc);
numpunct_wchar *numpunct = numpunct_short_use_facet(IOS_LOCALE(base));
basic_string_wchar str;
MSVCP_size_t pad, len;
......
......@@ -352,6 +352,8 @@ unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
#define IOS_LOCALE(ios) (&(ios)->loc)
/* class num_get<char> */
typedef struct {
locale_facet facet;
......
......@@ -1026,8 +1026,10 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char
#if _MSVCP_VER <= 100
mutex_ctor(&this->lock);
#endif
#if _MSVCP_VER >= 70
this->loc = MSVCRT_operator_new(sizeof(locale));
locale_ctor(this->loc);
#endif
locale_ctor(IOS_LOCALE(this));
basic_streambuf_char__Init_empty(this);
return this;
......@@ -1043,8 +1045,10 @@ void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
#if _MSVCP_VER <= 100
mutex_dtor(&this->lock);
#endif
locale_dtor(this->loc);
locale_dtor(IOS_LOCALE(this));
#if _MSVCP_VER >= 70
MSVCRT_operator_delete(this->loc);
#endif
}
DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
......@@ -1319,7 +1323,7 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret)
{
TRACE("(%p)\n", this);
return locale_copy_ctor(ret, this->loc);
return locale_copy_ctor(ret, IOS_LOCALE(this));
}
/* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
......@@ -1399,9 +1403,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
{
TRACE("(%p %p)\n", this, loc);
memcpy(ret, this->loc, sizeof(locale));
memcpy(ret, IOS_LOCALE(this), sizeof(locale));
call_basic_streambuf_char_imbue(this, loc);
locale_copy_ctor(this->loc, loc);
locale_copy_ctor(IOS_LOCALE(this), loc);
return ret;
}
......@@ -1870,8 +1874,10 @@ basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wch
#if _MSVCP_VER <= 100
mutex_ctor(&this->lock);
#endif
#if _MSVCP_VER >= 70
this->loc = MSVCRT_operator_new(sizeof(locale));
locale_ctor(this->loc);
#endif
locale_ctor(IOS_LOCALE(this));
basic_streambuf_wchar__Init_empty(this);
return this;
......@@ -1900,8 +1906,10 @@ void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
#if _MSVCP_VER <= 100
mutex_dtor(&this->lock);
#endif
locale_dtor(this->loc);
locale_dtor(IOS_LOCALE(this));
#if _MSVCP_VER >= 70
MSVCRT_operator_delete(this->loc);
#endif
}
DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
......@@ -2204,7 +2212,7 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret)
{
TRACE("(%p)\n", this);
return locale_copy_ctor(ret, this->loc);
return locale_copy_ctor(ret, IOS_LOCALE(this));
}
/* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
......@@ -2298,9 +2306,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
{
TRACE("(%p %p)\n", this, loc);
memcpy(ret, this->loc, sizeof(locale));
memcpy(ret, IOS_LOCALE(this), sizeof(locale));
call_basic_streambuf_wchar_imbue(this, loc);
locale_copy_ctor(this->loc, loc);
locale_copy_ctor(IOS_LOCALE(this), loc);
return ret;
}
......@@ -2992,7 +3000,7 @@ basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char
return NULL;
basic_filebuf_char__Init(this, f, INITFL_open);
basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(IOS_LOCALE(&this->base)));
return this;
}
......@@ -3542,7 +3550,7 @@ basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_wchar(basic_filebuf_wch
return NULL;
basic_filebuf_wchar__Init(this, f, INITFL_open);
basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(this->base.loc));
basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(IOS_LOCALE(&this->base)));
return this;
}
......@@ -3564,7 +3572,7 @@ basic_filebuf_wchar* __thiscall basic_filebuf_short_open_wchar(basic_filebuf_wch
return NULL;
basic_filebuf_short__Init(this, f, INITFL_open);
basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(this->base.loc));
basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(IOS_LOCALE(&this->base)));
return this;
}
......@@ -4814,10 +4822,10 @@ void __cdecl ios_base_Tidy(ios_base *this)
void __cdecl ios_base_Ios_base_dtor(ios_base *obj)
{
TRACE("(%p)\n", obj);
if(obj->loc) {
locale_dtor(obj->loc);
MSVCRT_operator_delete(obj->loc);
}
locale_dtor(IOS_LOCALE(obj));
#if _MSVCP_VER >= 70
MSVCRT_operator_delete(obj->loc);
#endif
ios_base_Tidy(obj);
}
......@@ -5018,7 +5026,7 @@ ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
this->fmtfl = rhs->fmtfl;
this->prec = rhs->prec;
this->wide = rhs->wide;
locale_operator_assign(this->loc, rhs->loc);
locale_operator_assign(IOS_LOCALE(this), IOS_LOCALE(rhs));
for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
......@@ -5111,8 +5119,10 @@ void __thiscall ios_base__Init(ios_base *this)
this->wide = 0;
this->arr = NULL;
this->calls = NULL;
#if _MSVCP_VER >= 70
this->loc = MSVCRT_operator_new(sizeof(locale));
locale_ctor(this->loc);
#endif
locale_ctor(IOS_LOCALE(this));
}
/* ?_Sync_func@ios_base@std@@CAAA_NXZ */
......@@ -5169,7 +5179,7 @@ DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
{
TRACE("(%p)\n", this);
return locale_copy_ctor(ret, this->loc);
return locale_copy_ctor(ret, IOS_LOCALE(this));
}
/* ?good@ios_base@std@@QBE_NXZ */
......@@ -5187,8 +5197,8 @@ DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
{
TRACE("(%p %p)\n", this, loc);
*ret = *this->loc;
locale_copy_ctor(this->loc, loc);
*ret = *IOS_LOCALE(this);
locale_copy_ctor(IOS_LOCALE(this), loc);
return ret;
}
......@@ -5509,7 +5519,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
{
TRACE("(%p %c %c)\n", this, ch, def);
return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf->loc), ch, def);
return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf)), ch, def);
}
/* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
......@@ -5582,7 +5592,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
{
TRACE("(%p %c)\n", this, ch);
return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf->loc), ch);
return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf)), ch);
}
/* ?swap@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXAAV12@@Z */
......@@ -5790,7 +5800,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
{
TRACE("(%p %c %c)\n", this, ch, def);
return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf->loc), ch, def);
return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf)), ch, def);
}
/* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
......@@ -5877,7 +5887,7 @@ DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
{
TRACE("(%p %c)\n", this, ch);
return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf->loc), ch);
return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf)), ch);
}
/* ?swap@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXAAV12@@Z */
......@@ -6216,7 +6226,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6243,7 +6253,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_cha
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6270,7 +6280,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6297,7 +6307,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6322,7 +6332,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6347,7 +6357,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_cha
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6372,7 +6382,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_ch
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6428,7 +6438,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6453,7 +6463,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6478,7 +6488,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_cha
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -6503,7 +6513,7 @@ basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char
if(basic_ostream_char_sentry_create(this)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_put *numput = num_put_char_use_facet(strbuf->loc);
const num_put *numput = num_put_char_use_facet(IOS_LOCALE(strbuf));
ostreambuf_iterator_char dest;
memset(&dest, 0, sizeof(dest));
......@@ -7102,7 +7112,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short, 8)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_short(basic_ostream_wchar *this, short val)
{
return basic_ostream_print_short(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
......@@ -7111,7 +7121,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
{
return basic_ostream_print_short(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput)
......@@ -7141,7 +7151,7 @@ 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));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */
......@@ -7150,7 +7160,7 @@ 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));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
......@@ -7158,7 +7168,7 @@ basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_w
basic_ostream_wchar* __cdecl basic_ostream_short_print_ushort_global(basic_ostream_wchar *ostr, unsigned short val)
{
return basic_ostream_print_ushort(ostr, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(ostr))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(ostr)))));
}
static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
......@@ -7190,7 +7200,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int, 8)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int(basic_ostream_wchar *this, int val)
{
return basic_ostream_print_int(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
......@@ -7201,7 +7211,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
{
return basic_ostream_print_int(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
......@@ -7233,7 +7243,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint, 8)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint(basic_ostream_wchar *this, unsigned int val)
{
return basic_ostream_print_uint(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
......@@ -7244,7 +7254,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
{
return basic_ostream_print_uint(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
......@@ -7274,7 +7284,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float, 8)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_float(basic_ostream_wchar *this, float val)
{
return basic_ostream_print_float(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
......@@ -7283,7 +7293,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
{
return basic_ostream_print_float(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
......@@ -7313,7 +7323,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double, 12)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_double(basic_ostream_wchar *this, double val)
{
return basic_ostream_print_double(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
......@@ -7322,7 +7332,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
{
return basic_ostream_print_double(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
......@@ -7352,7 +7362,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble, 12)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ldouble(basic_ostream_wchar *this, double val)
{
return basic_ostream_print_ldouble(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
......@@ -7361,7 +7371,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
{
return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
......@@ -7424,7 +7434,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr, 8)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ptr(basic_ostream_wchar *this, const void *val)
{
return basic_ostream_print_ptr(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
......@@ -7433,7 +7443,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
{
return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
......@@ -7463,7 +7473,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64, 12)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int64(basic_ostream_wchar *this, __int64 val)
{
return basic_ostream_print_int64(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
......@@ -7472,7 +7482,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
{
return basic_ostream_print_int64(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
......@@ -7502,7 +7512,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64, 12)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
{
return basic_ostream_print_uint64(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
......@@ -7511,7 +7521,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
{
return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
......@@ -7541,7 +7551,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool, 8)
basic_ostream_wchar* __thiscall basic_ostream_wchar_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
{
return basic_ostream_print_bool(this, val, num_put_wchar_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
......@@ -7550,7 +7560,7 @@ DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
{
return basic_ostream_print_bool(this, val, num_put_short_use_facet(
basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
}
/* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
......@@ -7905,7 +7915,7 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(base->strbuf));
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
......@@ -8223,7 +8233,7 @@ basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
if(basic_istream_char_sentry_create(istream, TRUE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const ctype_char *ctype = ctype_char_use_facet(strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(strbuf));
for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
ch = basic_streambuf_char_snextc(strbuf)) {
......@@ -8519,7 +8529,7 @@ basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
LONG tmp;
......@@ -8549,7 +8559,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8573,7 +8583,7 @@ basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *t
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8597,7 +8607,7 @@ basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8621,7 +8631,7 @@ basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8645,7 +8655,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8669,7 +8679,7 @@ basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8693,7 +8703,7 @@ basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8717,7 +8727,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_cha
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8741,7 +8751,7 @@ basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *t
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8765,7 +8775,7 @@ basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8789,7 +8799,7 @@ basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8813,7 +8823,7 @@ basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *
if(basic_istream_char_sentry_create(this, FALSE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
const num_get *numget = num_get_char_use_facet(strbuf->loc);
const num_get *numget = num_get_char_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf;
......@@ -8874,7 +8884,7 @@ basic_istream_char* __cdecl basic_istream_char_read_bstr(
TRACE("(%p %p)\n", istream, str);
if(basic_istream_char_sentry_create(istream, FALSE)) {
const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(base->strbuf));
MSVCP_size_t count = ios_base_width_get(&base->base);
if(!count)
......@@ -8911,7 +8921,7 @@ basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istr
TRACE("(%p %p)\n", istream, str);
if(basic_istream_char_sentry_create(istream, FALSE)) {
const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
const ctype_char *ctype = ctype_char_use_facet(IOS_LOCALE(base->strbuf));
MSVCP_size_t count = ios_base_width_get(&base->base)-1;
for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
......@@ -9202,7 +9212,7 @@ MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP
if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
const ctype_wchar *ctype = ctype_wchar_use_facet(base->strbuf->loc);
const ctype_wchar *ctype = ctype_wchar_use_facet(IOS_LOCALE(base->strbuf));
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
......@@ -9547,7 +9557,7 @@ basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream
if(basic_istream_wchar_sentry_create(istream, TRUE)) {
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
const ctype_wchar *ctype = ctype_wchar_use_facet(strbuf->loc);
const ctype_wchar *ctype = ctype_wchar_use_facet(IOS_LOCALE(strbuf));
for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
ch = basic_streambuf_wchar_snextc(strbuf)) {
......@@ -9884,7 +9894,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_short(basic_istream_wchar *this, short *v)
{
return basic_istream_read_short(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
......@@ -9893,7 +9903,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
{
return basic_istream_read_short(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
......@@ -9908,7 +9918,7 @@ basic_istream_wchar* __thiscall basic_istream_wchar_read_ushort(basic_istream_wc
if(basic_istream_wchar_sentry_create(this, FALSE)) {
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
const num_get *numget = num_get_wchar_use_facet(strbuf->loc);
const num_get *numget = num_get_wchar_use_facet(IOS_LOCALE(strbuf));
istreambuf_iterator_wchar first={0}, last={0};
first.strbuf = strbuf;
......@@ -9946,7 +9956,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_int(basic_istream_wchar *this, int *v)
{
return basic_istream_read_int(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
......@@ -9955,7 +9965,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
{
return basic_istream_read_int(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
......@@ -9984,7 +9994,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_uint(basic_istream_wchar *this, unsigned int *v)
{
return basic_istream_read_uint(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
......@@ -9993,7 +10003,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
{
return basic_istream_read_uint(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
......@@ -10022,7 +10032,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_long(basic_istream_wchar *this, LONG *v)
{
return basic_istream_read_long(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
......@@ -10031,7 +10041,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
{
return basic_istream_read_long(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
......@@ -10060,7 +10070,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_ulong(basic_istream_wchar *this, ULONG *v)
{
return basic_istream_read_ulong(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
......@@ -10069,7 +10079,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
{
return basic_istream_read_ulong(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
......@@ -10098,7 +10108,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_float(basic_istream_wchar *this, float *v)
{
return basic_istream_read_float(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
......@@ -10107,7 +10117,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
{
return basic_istream_read_float(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
......@@ -10136,7 +10146,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_double(basic_istream_wchar *this, double *v)
{
return basic_istream_read_double(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
......@@ -10145,7 +10155,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
{
return basic_istream_read_double(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
......@@ -10174,7 +10184,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_ldouble(basic_istream_wchar *this, double *v)
{
return basic_istream_read_ldouble(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
......@@ -10183,7 +10193,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
{
return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
......@@ -10212,7 +10222,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_ptr(basic_istream_wchar *this, void **v)
{
return basic_istream_read_ptr(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
......@@ -10221,7 +10231,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
{
return basic_istream_read_ptr(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
......@@ -10250,7 +10260,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_int64(basic_istream_wchar *this, __int64 *v)
{
return basic_istream_read_int64(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
......@@ -10259,7 +10269,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
{
return basic_istream_read_int64(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
......@@ -10288,7 +10298,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
{
return basic_istream_read_uint64(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
......@@ -10297,7 +10307,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
{
return basic_istream_read_uint64(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
......@@ -10326,7 +10336,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool, 8)
basic_istream_wchar* __thiscall basic_istream_wchar_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
{
return basic_istream_read_bool(this, v, num_get_wchar_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
......@@ -10335,7 +10345,7 @@ DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
{
return basic_istream_read_bool(this, v, num_get_short_use_facet(
basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf)));
}
/* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */
......@@ -10416,7 +10426,7 @@ basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
basic_istream_wchar *istream, basic_string_wchar *str)
{
return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
/* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
......@@ -10425,7 +10435,7 @@ basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
basic_istream_wchar *istream, basic_string_wchar *str)
{
return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
......@@ -10459,7 +10469,7 @@ static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream,
basic_istream_wchar* __cdecl basic_istream_wchar_read_str(basic_istream_wchar *istream, wchar_t *str)
{
return basic_istream_read_str(istream, str, ctype_wchar_use_facet(
basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
/* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
......@@ -10467,7 +10477,7 @@ basic_istream_wchar* __cdecl basic_istream_wchar_read_str(basic_istream_wchar *i
basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
{
return basic_istream_read_str(istream, str, ctype_short_use_facet(
basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream)->strbuf)));
}
/* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
......@@ -13867,7 +13877,7 @@ basic_ostream_char* __cdecl basic_ostream_char_print_complex_float(basic_ostream
ostream_ios_base = &basic_ostream_char_get_basic_ios(ostr)->base;
TRACE("(%p %p)\n", ostr, val);
ios_base_imbue(ostringstream_ios_base, &loc, ostream_ios_base->loc);
ios_base_imbue(ostringstream_ios_base, &loc, IOS_LOCALE(ostream_ios_base));
locale_dtor(&loc);
ios_base_precision_set(ostringstream_ios_base, ios_base_precision_get(ostream_ios_base));
ios_base_flags_set(ostringstream_ios_base, ios_base_flags_get(ostream_ios_base));
......@@ -13901,7 +13911,7 @@ basic_ostream_char* __cdecl basic_ostream_char_print_complex_double(basic_ostrea
ostream_ios_base = &basic_ostream_char_get_basic_ios(ostr)->base;
TRACE("(%p %p)\n", ostr, val);
ios_base_imbue(ostringstream_ios_base, &loc, ostream_ios_base->loc);
ios_base_imbue(ostringstream_ios_base, &loc, IOS_LOCALE(ostream_ios_base));
locale_dtor(&loc);
ios_base_precision_set(ostringstream_ios_base, ios_base_precision_get(ostream_ios_base));
ios_base_flags_set(ostringstream_ios_base, ios_base_flags_get(ostream_ios_base));
......@@ -13935,7 +13945,7 @@ basic_ostream_char* __cdecl basic_ostream_char_print_complex_ldouble(basic_ostre
ostream_ios_base = &basic_ostream_char_get_basic_ios(ostr)->base;
TRACE("(%p %p)\n", ostr, val);
ios_base_imbue(ostringstream_ios_base, &loc, ostream_ios_base->loc);
ios_base_imbue(ostringstream_ios_base, &loc, IOS_LOCALE(ostream_ios_base));
locale_dtor(&loc);
ios_base_precision_set(ostringstream_ios_base, ios_base_precision_get(ostream_ios_base));
ios_base_flags_set(ostringstream_ios_base, ios_base_flags_get(ostream_ios_base));
......
......@@ -5299,7 +5299,7 @@ static istreambuf_iterator_wchar* num_get_do_get_void(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, FMTFLAG_hex, base->loc, numpunct), &err);
&last, FMTFLAG_hex, IOS_LOCALE(base), numpunct), &err);
if(v!=(unsigned __int64)((INT_PTR)v))
*state |= IOSTATE_failbit;
else if(end!=tmp && !err)
......@@ -5330,7 +5330,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
{
return num_get_do_get_void(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
......@@ -5340,7 +5340,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_void(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
{
return num_get_do_get_void(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
......@@ -5366,7 +5366,7 @@ static istreambuf_iterator_wchar* num_get_do_get_double(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stodx(tmp, &end, num_get__Getffld(this, tmp, &first, &last, base->loc, numpunct), &err);
v = _Stodx(tmp, &end, num_get__Getffld(this, tmp, &first, &last, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5403,7 +5403,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
{
return num_get_do_get_double(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
......@@ -5415,7 +5415,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_double(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
{
return num_get_do_get_double(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
......@@ -5454,7 +5454,7 @@ static istreambuf_iterator_wchar* num_get_do_get_float(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stofx(tmp, &end, num_get__Getffld(this, tmp, &first,
&last, base->loc, numpunct), &err);
&last, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5483,7 +5483,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
{
return num_get_do_get_float(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
......@@ -5493,7 +5493,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_float(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
{
return num_get_do_get_float(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
......@@ -5520,7 +5520,7 @@ static istreambuf_iterator_wchar* num_get_do_get_uint64(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5549,7 +5549,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
{
return num_get_do_get_uint64(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
......@@ -5559,7 +5559,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint64(const num_get
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
{
return num_get_do_get_uint64(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
......@@ -5586,7 +5586,7 @@ static istreambuf_iterator_wchar* num_get_do_get_int64(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stollx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5615,7 +5615,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
{
return num_get_do_get_int64(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
......@@ -5625,7 +5625,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_int64(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
{
return num_get_do_get_int64(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
......@@ -5652,7 +5652,7 @@ static istreambuf_iterator_wchar* num_get_do_get_ulong(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoulx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5681,7 +5681,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
{
return num_get_do_get_ulong(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
......@@ -5691,7 +5691,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_ulong(const num_get *
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
{
return num_get_do_get_ulong(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
......@@ -5718,7 +5718,7 @@ static istreambuf_iterator_wchar* num_get_do_get_long(const num_get *this,
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -5747,7 +5747,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
{
return num_get_do_get_long(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
......@@ -5757,7 +5757,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_long(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
{
return num_get_do_get_long(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
......@@ -5835,7 +5835,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
b = num_get_wchar__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc);
&first, &last, base->fmtfl, IOS_LOCALE(base));
beg = tmp + (tmp[0]=='-' ? 1 : 0);
v = _Stoulx(beg, &end, b, &err);
......@@ -5927,7 +5927,7 @@ static istreambuf_iterator_wchar* num_get_do_get_bool(const num_get *this,
char tmp[25], *end;
int err;
LONG v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, base->loc, numpunct), &err);
&last, base->fmtfl, IOS_LOCALE(base), numpunct), &err);
if(end!=tmp && err==0 && (v==0 || v==1))
*pval = v;
......@@ -5957,7 +5957,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
{
return num_get_do_get_bool(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
state, pval, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
......@@ -5967,7 +5967,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_bool(const num_get *t
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
{
return num_get_do_get_bool(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
state, pval, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
......@@ -6449,7 +6449,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_void(const num_get *thi
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, FMTFLAG_hex, base->loc), &err);
&first, &last, FMTFLAG_hex, IOS_LOCALE(base)), &err);
if(v!=(unsigned __int64)((INT_PTR)v))
*state |= IOSTATE_failbit;
else if(end!=tmp && !err)
......@@ -6503,7 +6503,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get *t
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stodx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, base->loc), &err);
v = _Stodx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -6557,7 +6557,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get *th
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stofx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, base->loc), &err);
v = _Stofx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -6602,7 +6602,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get *t
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -6647,7 +6647,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get *th
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stollx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -6692,7 +6692,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get *th
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stoulx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -6737,7 +6737,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get *thi
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && !err)
*pval = v;
else
......@@ -6811,7 +6811,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get *t
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
b = num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc);
&first, &last, base->fmtfl, IOS_LOCALE(base));
beg = tmp + (tmp[0]=='-' ? 1 : 0);
v = _Stoulx(beg, &end, b, &err);
......@@ -6857,7 +6857,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *thi
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char false_bstr, true_bstr;
const char *pfalse, *ptrue;
......@@ -6902,7 +6902,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *thi
char tmp[25], *end;
int err;
LONG v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp,
&first, &last, base->fmtfl, base->loc), &err);
&first, &last, base->fmtfl, IOS_LOCALE(base)), &err);
if(end!=tmp && err==0 && (v==0 || v==1))
*pval = v;
......@@ -7164,7 +7164,7 @@ ostreambuf_iterator_char* __cdecl num_put_char__Fput(const num_put *this, ostrea
static ostreambuf_iterator_char* num_put_char_fput(const num_put *this, ostreambuf_iterator_char *ret,
ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count)
{
numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char grouping_bstr;
const char *grouping;
char *p, sep = *localeconv()->decimal_point;
......@@ -7256,7 +7256,7 @@ char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spe
ostreambuf_iterator_char* __cdecl num_put_char__Iput(const num_put *this, ostreambuf_iterator_char *ret,
ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count)
{
numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char grouping_bstr;
const char *grouping;
char *p, sep;
......@@ -7622,7 +7622,7 @@ ostreambuf_iterator_char* __thiscall num_put_char_do_put_bool(const num_put *thi
TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
numpunct_char *numpunct = numpunct_char_use_facet(IOS_LOCALE(base));
basic_string_char str;
MSVCP_size_t pad, len;
......@@ -8181,7 +8181,7 @@ static ostreambuf_iterator_wchar* num_put__Iput(const num_put *this, ostreambuf_
ostreambuf_iterator_wchar* __cdecl num_put_wchar__Iput(const num_put *this, ostreambuf_iterator_wchar *ret,
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, MSVCP_size_t count)
{
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_wchar_use_facet(base->loc));
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_wchar_use_facet(IOS_LOCALE(base)));
}
/* ?_Iput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPADI@Z */
......@@ -8189,7 +8189,7 @@ ostreambuf_iterator_wchar* __cdecl num_put_wchar__Iput(const num_put *this, ostr
ostreambuf_iterator_wchar* __cdecl num_put_short__Iput(const num_put *this, ostreambuf_iterator_wchar *ret,
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, MSVCP_size_t count)
{
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_short_use_facet(base->loc));
return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_short_use_facet(IOS_LOCALE(base)));
}
/* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WJ@Z */
......@@ -8363,7 +8363,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_double(const num_put
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
}
num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v),
numpunct_wchar_use_facet(base->loc));
numpunct_wchar_use_facet(IOS_LOCALE(base)));
MSVCRT_operator_delete(tmp);
return ret;
}
......@@ -8398,7 +8398,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_double(const num_put
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
}
num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v),
numpunct_short_use_facet(base->loc));
numpunct_short_use_facet(IOS_LOCALE(base)));
MSVCRT_operator_delete(tmp);
return ret;
}
......@@ -8642,7 +8642,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_bool(const num_put *t
TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_wchar *numpunct = numpunct_wchar_use_facet(base->loc);
numpunct_wchar *numpunct = numpunct_wchar_use_facet(IOS_LOCALE(base));
basic_string_wchar str;
MSVCP_size_t pad, len;
......@@ -8680,7 +8680,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_bool(const num_put *t
TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
if(base->fmtfl & FMTFLAG_boolalpha) {
numpunct_wchar *numpunct = numpunct_short_use_facet(base->loc);
numpunct_wchar *numpunct = numpunct_short_use_facet(IOS_LOCALE(base));
basic_string_wchar str;
MSVCP_size_t pad, len;
......
......@@ -466,6 +466,12 @@ unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
#if _MSVCP_VER < 70
#define IOS_LOCALE(ios) (&(ios)->loc)
#else
#define IOS_LOCALE(ios) ((ios)->loc)
#endif
/* class num_get<char> */
typedef struct {
locale_facet facet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment