msvcp: Sync istream<>::peek implementations.

This commit is contained in:
Daniel Lehman 2012-10-26 10:18:58 -07:00 committed by Alexandre Julliard
parent 32be163545
commit c868db7668
3 changed files with 24 additions and 0 deletions

View File

@ -5821,6 +5821,10 @@ int __thiscall basic_istream_char_peek(basic_istream_char *this)
if(basic_istream_char_sentry_create(this, TRUE))
ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
basic_istream_char_sentry_destroy(this);
if (ret == EOF)
basic_ios_char_setstate(base, IOSTATE_eofbit);
return ret;
}
@ -6949,6 +6953,10 @@ unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
if(basic_istream_wchar_sentry_create(this, TRUE))
ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
basic_istream_wchar_sentry_destroy(this);
if (ret == WEOF)
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return ret;
}

View File

@ -7212,6 +7212,10 @@ int __thiscall basic_istream_char_peek(basic_istream_char *this)
if(basic_istream_char_sentry_create(this, TRUE))
ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
basic_istream_char_sentry_destroy(this);
if (ret == EOF)
basic_ios_char_setstate(base, IOSTATE_eofbit);
return ret;
}
@ -8467,6 +8471,10 @@ unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
if(basic_istream_wchar_sentry_create(this, TRUE))
ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
basic_istream_wchar_sentry_destroy(this);
if (ret == WEOF)
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return ret;
}

View File

@ -7544,6 +7544,10 @@ int __thiscall basic_istream_char_peek(basic_istream_char *this)
if(basic_istream_char_sentry_create(this, TRUE))
ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
basic_istream_char_sentry_destroy(this);
if (ret == EOF)
basic_ios_char_setstate(base, IOSTATE_eofbit);
return ret;
}
@ -8802,6 +8806,10 @@ unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
if(basic_istream_wchar_sentry_create(this, TRUE))
ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
basic_istream_wchar_sentry_destroy(this);
if (ret == WEOF)
basic_ios_wchar_setstate(base, IOSTATE_eofbit);
return ret;
}