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
1c08ac60
Commit
1c08ac60
authored
Jul 31, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
Jul 31, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes and a fake GETBASEIRQ.
parent
43a2b6a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
comm.c
misc/comm.c
+23
-8
No files found.
misc/comm.c
View file @
1c08ac60
...
...
@@ -233,7 +233,7 @@ static void comm_notification(int fd,void*private)
}
else
{
/* check for events */
if
((
ptr
->
eventmask
&
EV_RXFLAG
)
&&
memchr
(
ptr
->
inbuf
+
ptr
->
ibuf_head
,
ptr
->
evtchar
,
bleft
))
{
memchr
(
ptr
->
inbuf
+
ptr
->
ibuf_head
,
ptr
->
evtchar
,
len
))
{
*
(
WORD
*
)(
unknown
[
cid
])
|=
EV_RXFLAG
;
mask
|=
CN_EVENT
;
}
...
...
@@ -564,13 +564,15 @@ LONG WINAPI EscapeCommFunction16(UINT16 cid,UINT16 nFunction)
struct
termios
port
;
TRACE
(
"cid=%d, function=%d
\n
"
,
cid
,
nFunction
);
if
((
ptr
=
GetDeviceStruct
(
cid
))
==
NULL
)
{
return
-
1
;
}
if
(
tcgetattr
(
ptr
->
fd
,
&
port
)
==
-
1
)
{
ptr
->
commerror
=
WinError
();
return
-
1
;
}
if
((
nFunction
!=
GETMAXCOM
)
&&
(
nFunction
!=
GETMAXLPT
))
{
if
((
ptr
=
GetDeviceStruct
(
cid
))
==
NULL
)
{
return
-
1
;
}
if
(
tcgetattr
(
ptr
->
fd
,
&
port
)
==
-
1
)
{
ptr
->
commerror
=
WinError
();
return
-
1
;
}
}
else
ptr
=
NULL
;
switch
(
nFunction
)
{
case
RESETDEV
:
...
...
@@ -588,6 +590,19 @@ LONG WINAPI EscapeCommFunction16(UINT16 cid,UINT16 nFunction)
return
FLAG_LPT
+
max
;
break
;
case
GETBASEIRQ
:
/* FIXME: use tables */
/* just fake something for now */
if
(
cid
&
FLAG_LPT
)
{
/* LPT1: irq 7, LPT2: irq 5 */
return
(
cid
&
0x7f
)
?
5
:
7
;
}
else
{
/* COM1: irq 4, COM2: irq 3,
COM3: irq 4, COM4: irq 3 */
return
4
-
(
cid
&
1
);
}
break
;
#ifdef TIOCM_DTR
case
CLRDTR
:
return
COMM_WhackModem
(
ptr
->
fd
,
~
TIOCM_DTR
,
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