msvcp90: Added num_get<wchar>::get functions implementation.

This commit is contained in:
Piotr Caban 2012-06-25 15:49:35 +02:00 committed by Alexandre Julliard
parent 0dd32496b4
commit d7bb597c0a
1 changed files with 298 additions and 37 deletions
dlls/msvcp90

View File

@ -4592,6 +4592,33 @@ int __thiscall MSVCP_num_get_wchar__Hexdig(num_get *this, wchar_t dig, wchar_t e
return -1;
}
static istreambuf_iterator_wchar* num_get_do_get_void(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
void **pval, numpunct_wchar *numpunct)
{
unsigned __int64 v;
char tmp[25], *end;
int err;
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);
if(v!=(unsigned __int64)((INT_PTR)v))
*state |= IOSTATE_failbit;
else if(end!=tmp && !err)
*pval = (void*)((INT_PTR)v);
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
#define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
@ -4601,8 +4628,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_void(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4611,8 +4638,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_void(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4627,6 +4654,30 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get *this
return call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_double(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
double *pval, numpunct_wchar *numpunct)
{
double v;
char tmp[32], *end;
int err;
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);
if(end!=tmp && !err)
*pval = v;
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
@ -4641,8 +4692,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_double(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4653,8 +4704,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_double(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4681,6 +4732,31 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get *th
return call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_float(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
float *pval, numpunct_wchar *numpunct)
{
float v;
char tmp[32], *end;
int err;
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);
if(end!=tmp && !err)
*pval = v;
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
#define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
@ -4690,8 +4766,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_float(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4700,8 +4776,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_float(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4716,6 +4792,31 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_float(const num_get *thi
return call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_uint64(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
ULONGLONG *pval, numpunct_wchar *numpunct)
{
unsigned __int64 v;
char tmp[25], *end;
int err;
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);
if(end!=tmp && !err)
*pval = v;
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
#define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
@ -4725,8 +4826,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_uint64(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4735,8 +4836,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_uint64(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4751,6 +4852,31 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get *th
return call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_int64(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
LONGLONG *pval, numpunct_wchar *numpunct)
{
__int64 v;
char tmp[25], *end;
int err;
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);
if(end!=tmp && !err)
*pval = v;
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
#define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
@ -4760,8 +4886,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_int64(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4770,8 +4896,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_int64(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4786,6 +4912,31 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get *thi
return call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_ulong(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
ULONG *pval, numpunct_wchar *numpunct)
{
ULONG v;
char tmp[25], *end;
int err;
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);
if(end!=tmp && !err)
*pval = v;
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
#define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
@ -4795,8 +4946,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_ulong(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4805,8 +4956,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_ulong(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4821,6 +4972,31 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ulong(const num_get *thi
return call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_long(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
LONG *pval, numpunct_wchar *numpunct)
{
LONG v;
char tmp[25], *end;
int err;
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);
if(end!=tmp && !err)
*pval = v;
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
#define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
@ -4830,8 +5006,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_long(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4840,8 +5016,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_long(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */
@ -4865,8 +5041,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
return num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval);
}
/* ?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@AAHAAI@Z */
@ -4875,8 +5051,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
return num_get_short_do_get_ulong(this, ret, first, last, base, state, pval);
}
/* ?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@AAHAAI@Z */
@ -4900,7 +5076,28 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned short *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
ULONG v;
char tmp[25], *beg, *end;
int err, b;
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);
beg = tmp + (tmp[0]=='-' ? 1 : 0);
v = _Stoulx(beg, &end, b, &err);
if(v != (ULONG)((unsigned short)v))
*state |= IOSTATE_failbit;
else if(end!=beg && !err)
*pval = (tmp[0]=='-' ? -((unsigned short)v) : v);
else
*state |= IOSTATE_failbit;
if(!first.strbuf)
*state |= IOSTATE_eofbit;
*ret = first;
return ret;
}
@ -4926,6 +5123,70 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ushort(const num_get *th
return call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval);
}
static istreambuf_iterator_wchar* num_get_do_get_bool(const num_get *this,
istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first,
istreambuf_iterator_wchar last, ios_base *base, int *state,
MSVCP_bool *pval, numpunct_wchar *numpunct)
{
TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
if(base->fmtfl & FMTFLAG_boolalpha) {
basic_string_wchar false_bstr, true_bstr;
const wchar_t *pfalse, *ptrue;
numpunct_wchar_falsename(numpunct, &false_bstr);
numpunct_wchar_truename(numpunct, &true_bstr);
pfalse = MSVCP_basic_string_wchar_c_str(&false_bstr);
ptrue = MSVCP_basic_string_wchar_c_str(&true_bstr);
for(istreambuf_iterator_wchar_val(&first); first.strbuf;
istreambuf_iterator_wchar_inc(&first)) {
if(pfalse && *pfalse && first.val!=*pfalse)
pfalse = NULL;
if(ptrue && *ptrue && first.val!=*ptrue)
ptrue = NULL;
if(pfalse && *pfalse && ptrue && !*ptrue)
ptrue = NULL;
if(ptrue && *ptrue && pfalse && !*pfalse)
pfalse = NULL;
if(pfalse)
pfalse++;
if(ptrue)
ptrue++;
if((!pfalse || !*pfalse) && (!ptrue || !*ptrue))
break;
}
if(ptrue)
*pval = TRUE;
else if(pfalse)
*pval = FALSE;
else
*state |= IOSTATE_failbit;
MSVCP_basic_string_wchar_dtor(&false_bstr);
MSVCP_basic_string_wchar_dtor(&true_bstr);
}else {
char tmp[25], *end;
int err;
LONG v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first,
&last, base->fmtfl, base->loc, numpunct), &err);
if(end!=tmp && err==0 && (v==0 || v==1))
*pval = v;
else
*state |= IOSTATE_failbit;
}
if(!first.strbuf)
*state |= IOSTATE_eofbit;
memcpy(ret, &first, sizeof(first));
return ret;
}
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
/* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
#define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
@ -4935,8 +5196,8 @@ DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool,36)
istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_bool(this, ret, first, last, base,
state, pval, numpunct_wchar_use_facet(base->loc));
}
/* ?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 */
@ -4945,8 +5206,8 @@ DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool,36)
istreambuf_iterator_wchar *__thiscall num_get_short_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
{
FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
return ret;
return num_get_do_get_bool(this, ret, first, last, base,
state, pval, numpunct_short_use_facet(base->loc));
}
/* ?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 */