Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1a01893c
Commit
1a01893c
authored
Mar 12, 2012
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Mar 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add support for fflush to clear an input buffer.
parent
09a7f8c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
file.c
dlls/msvcrt/file.c
+7
-0
file.c
dlls/msvcrt/tests/file.c
+1
-1
No files found.
dlls/msvcrt/file.c
View file @
1a01893c
...
...
@@ -792,6 +792,13 @@ int CDECL MSVCRT_fflush(MSVCRT_FILE* file)
MSVCRT__unlock_file
(
file
);
return
res
;
}
else
if
(
file
->
_flag
&
MSVCRT__IOREAD
)
{
MSVCRT__lock_file
(
file
);
file
->
_cnt
=
0
;
file
->
_ptr
=
file
->
_base
;
MSVCRT__unlock_file
(
file
);
return
0
;
}
return
0
;
}
...
...
dlls/msvcrt/tests/file.c
View file @
1a01893c
...
...
@@ -619,7 +619,7 @@ static void test_fflush( void )
ok
(
ret
==
0
,
"expected 0, got %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
]);
/* fflush(NULL) doesn't clear input buffer. */
_lseek
(
_fileno
(
tempfh
),
0
,
SEEK_SET
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment