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
a88444e1
Commit
a88444e1
authored
Jun 12, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
Jun 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of EV_RXFLAG.
parent
b38e1dec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
comm.h
include/comm.h
+1
-0
comm.c
misc/comm.c
+15
-5
No files found.
include/comm.h
View file @
a88444e1
...
...
@@ -9,6 +9,7 @@ struct DosDeviceStruct {
int
suspended
;
int
unget
,
xmit
;
int
baudrate
;
int
evtchar
;
/* events */
int
commerror
,
eventmask
;
/* buffers */
...
...
misc/comm.c
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
;
}
...
...
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