Commit d6e86edb authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msvcp90: Set failbit at end of istream<>::sentry::_Ipfx.

parent a26119d2
......@@ -5489,31 +5489,33 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
if(ios_base_good(&base->base)) {
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
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);
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
return FALSE;
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);
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
break;
}
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......@@ -6588,31 +6590,32 @@ MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
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);
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return FALSE;
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);
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
break;
}
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......
......@@ -6880,31 +6880,33 @@ static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
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);
int ch;
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);
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
break;
}
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
return FALSE;
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......@@ -8106,31 +8108,32 @@ static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_boo
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
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);
int ch;
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);
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
break;
}
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return FALSE;
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......
......@@ -7212,31 +7212,33 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
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);
int ch;
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);
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
break;
}
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
return FALSE;
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......@@ -8441,31 +8443,32 @@ MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
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);
int ch;
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);
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
break;
}
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return FALSE;
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......
......@@ -7243,31 +7243,33 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
if(basic_ios_char_tie_get(base))
basic_ostream_char_flush(basic_ios_char_tie_get(base));
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);
int ch;
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);
int ch;
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
break;
}
for(ch = basic_streambuf_char_sgetc(strbuf); ;
ch = basic_streambuf_char_snextc(strbuf)) {
if(ch == EOF) {
basic_ios_char_setstate(base, IOSTATE_eofbit);
return FALSE;
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_char_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......@@ -8476,31 +8478,32 @@ MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP
TRACE("(%p %d)\n", this, noskip);
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
if(ios_base_good(&base->base)) {
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
if(basic_ios_wchar_tie_get(base))
basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
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);
int ch;
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);
int ch;
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
break;
}
for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
ch = basic_streambuf_wchar_snextc(strbuf)) {
if(ch == WEOF) {
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return FALSE;
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
break;
}
}
if(!ios_base_good(&base->base)) {
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return FALSE;
}
return TRUE;
}
......
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