Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
daf347ac
Commit
daf347ac
authored
Nov 08, 2001
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 08, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find out how much data is available when calling ReadFileEx.
parent
6c58cdce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
comm16.c
dlls/user/comm16.c
+14
-2
No files found.
dlls/user/comm16.c
View file @
daf347ac
...
...
@@ -362,13 +362,25 @@ static VOID WINAPI COMM16_WriteComplete(DWORD status, DWORD len, LPOVERLAPPED ov
static
void
comm_waitread
(
struct
DosDeviceStruct
*
ptr
)
{
int
bleft
;
COMSTAT
stat
;
/* FIXME: get timeouts working properly so we can read bleft bytes */
bleft
=
((
ptr
->
ibuf_tail
>
ptr
->
ibuf_head
)
?
(
ptr
->
ibuf_tail
-
1
)
:
ptr
->
ibuf_size
)
-
ptr
->
ibuf_head
;
/* FIXME: get timeouts working properly so we can read bleft bytes */
/* find out how many bytes are left in the buffer */
if
(
ClearCommError
(
ptr
->
handle
,
NULL
,
&
stat
))
bleft
=
(
bleft
<
stat
.
cbInQue
)
?
bleft
:
stat
.
cbInQue
;
else
bleft
=
1
;
/* always read at least one byte */
if
(
bleft
==
0
)
bleft
++
;
ReadFileEx
(
ptr
->
handle
,
ptr
->
inbuf
+
ptr
->
ibuf_head
,
1
,
bleft
,
&
ptr
->
read_ov
,
COMM16_ReadComplete
);
}
...
...
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