Commit cf7479ca authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

msvcrt: Add support for _flushall to clear all input buffer.

parent 58d6a9a3
......@@ -780,7 +780,7 @@ static int msvcrt_flush_all_buffers(int mask)
*/
int CDECL MSVCRT__flushall(void)
{
return msvcrt_flush_all_buffers(MSVCRT__IOWRT);
return msvcrt_flush_all_buffers(MSVCRT__IOWRT | MSVCRT__IOREAD);
}
/*********************************************************************
......@@ -789,7 +789,7 @@ int CDECL MSVCRT__flushall(void)
int CDECL MSVCRT_fflush(MSVCRT_FILE* file)
{
if(!file) {
MSVCRT__flushall();
msvcrt_flush_all_buffers(MSVCRT__IOWRT);
} else if(file->_flag & MSVCRT__IOWRT) {
int res;
......
......@@ -635,7 +635,7 @@ static void test_fflush( void )
ok(ret >= 0, "unexpected ret %d\n", ret);
memset(buf2, '?', sizeof(buf2));
fread(buf2, 1, sizeof(buf2), tempfh);
todo_wine ok(memcmp(buf1, buf2, sizeof(buf1)) == 0, "Got unexpected data (%c)\n", buf2[0]);
ok(memcmp(buf1, buf2, sizeof(buf1)) == 0, "Got unexpected data (%c)\n", buf2[0]);
fclose(tempfh);
......
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