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
92285494
Commit
92285494
authored
Feb 23, 2001
by
Andreas Mohr
Committed by
Alexandre Julliard
Feb 23, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BuildCommDCB16 had a rather broken baud rate handling.
parent
a3a02515
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
comm.c
dlls/kernel/comm.c
+36
-2
No files found.
dlls/kernel/comm.c
View file @
92285494
...
...
@@ -380,7 +380,7 @@ static void comm_waitwrite(struct DosDeviceStruct *ptr)
*/
BOOL16
WINAPI
BuildCommDCB16
(
LPCSTR
device
,
LPDCB16
lpdcb
)
{
/* "COM1:96
00
,n,8,1" */
/* "COM1:96,n,8,1" */
/* 012345 */
int
port
;
char
*
ptr
,
temp
[
256
];
...
...
@@ -417,7 +417,41 @@ BOOL16 WINAPI BuildCommDCB16(LPCSTR device, LPDCB16 lpdcb)
if
(
COM
[
port
].
baudrate
>
0
)
lpdcb
->
BaudRate
=
COM
[
port
].
baudrate
;
else
lpdcb
->
BaudRate
=
atoi
(
ptr
);
{
int
rate
;
/* DOS/Windows only compares the first two numbers
* and assigns an appropriate baud rate.
* You can supply 961324245, it still returns 9600 ! */
if
(
strlen
(
ptr
)
<
2
)
{
WARN
(
"Unknown baudrate string '%s' !
\n
"
,
ptr
);
return
-
1
;
/* error: less than 2 chars */
}
ptr
[
2
]
=
'\0'
;
rate
=
atoi
(
ptr
);
switch
(
rate
)
{
case
11
:
case
30
:
case
60
:
rate
*=
10
;
break
;
case
12
:
case
24
:
case
48
:
case
96
:
rate
*=
100
;
break
;
case
19
:
rate
=
19200
;
break
;
default:
WARN
(
"Unknown baudrate indicator %d !
\n
"
,
rate
);
return
-
1
;
}
lpdcb
->
BaudRate
=
rate
;
}
TRACE
(
"baudrate (%d)
\n
"
,
lpdcb
->
BaudRate
);
ptr
=
strtok
(
NULL
,
", "
);
...
...
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