Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Li Wenzhe
wine
Commits
a88444e1
Commit
a88444e1
authored
25 years ago
by
Ove Kåven
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implementation of EV_RXFLAG.
parent
b38e1dec
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/comm.h
+1
-0
1 addition, 0 deletions
include/comm.h
misc/comm.c
+15
-5
15 additions, 5 deletions
misc/comm.c
with
16 additions
and
5 deletions
include/comm.h
+
1
−
0
View file @
a88444e1
...
...
@@ -9,6 +9,7 @@ struct DosDeviceStruct {
int
suspended
;
int
unget
,
xmit
;
int
baudrate
;
int
evtchar
;
/* events */
int
commerror
,
eventmask
;
/* buffers */
...
...
This diff is collapsed.
Click to expand it.
misc/comm.c
+
15
−
5
View file @
a88444e1
...
...
@@ -246,15 +246,20 @@ static void comm_notification(int fd,void*private)
if
(
!
bleft
)
{
ptr
->
commerror
=
CE_RXOVER
;
}
else
{
ptr
->
ibuf_head
+=
len
;
if
(
ptr
->
ibuf_head
>=
ptr
->
ibuf_size
)
ptr
->
ibuf_head
=
0
;
/* flag event */
/* check for events */
if
((
ptr
->
eventmask
&
EV_RXFLAG
)
&&
memchr
(
ptr
->
inbuf
+
ptr
->
ibuf_head
,
ptr
->
evtchar
,
bleft
))
{
*
(
WORD
*
)(
unknown
[
cid
])
|=
EV_RXFLAG
;
mask
|=
CN_EVENT
;
}
if
(
ptr
->
eventmask
&
EV_RXCHAR
)
{
*
(
WORD
*
)(
unknown
[
cid
])
|=
EV_RXCHAR
;
mask
|=
CN_EVENT
;
}
/* FIXME: check for event character (EV_RXFLAG) */
/* advance buffer position */
ptr
->
ibuf_head
+=
len
;
if
(
ptr
->
ibuf_head
>=
ptr
->
ibuf_size
)
ptr
->
ibuf_head
=
0
;
}
}
}
while
(
len
>
0
);
...
...
@@ -426,6 +431,7 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue)
COM
[
port
].
fd
=
fd
;
COM
[
port
].
commerror
=
0
;
COM
[
port
].
eventmask
=
0
;
COM
[
port
].
evtchar
=
0
;
/* FIXME: default? */
/* save terminal state */
tcgetattr
(
fd
,
&
m_stat
[
port
]);
/* set default parameters */
...
...
@@ -974,6 +980,8 @@ INT16 WINAPI SetCommState16(LPDCB16 lpdcb)
else
port
.
c_iflag
&=
~
IXOFF
;
ptr
->
evtchar
=
lpdcb
->
EvtChar
;
if
(
tcsetattr
(
ptr
->
fd
,
TCSADRAIN
,
&
port
)
==
-
1
)
{
ptr
->
commerror
=
WinError
();
return
FALSE
;
...
...
@@ -1116,6 +1124,8 @@ INT16 WINAPI GetCommState16(INT16 cid, LPDCB16 lpdcb)
lpdcb
->
XonLim
=
10
;
lpdcb
->
XoffLim
=
10
;
lpdcb
->
EvtChar
=
ptr
->
evtchar
;
ptr
->
commerror
=
0
;
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment