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
68587234
Commit
68587234
authored
Apr 01, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Avoid using tolowerW/toupperW().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
30ad67dc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
comm.c
dlls/kernel32/comm.c
+9
-2
editline.c
dlls/kernel32/editline.c
+5
-11
No files found.
dlls/kernel32/comm.c
View file @
68587234
...
...
@@ -95,20 +95,25 @@ static LPCWSTR COMM_ParseParity(LPCWSTR ptr, LPBYTE lpparity)
member of DCB and not fParity even when parity is specified in the
device control string */
switch
(
toupperW
(
*
ptr
++
)
)
switch
(
*
ptr
++
)
{
case
'e'
:
case
'E'
:
*
lpparity
=
EVENPARITY
;
break
;
case
'm'
:
case
'M'
:
*
lpparity
=
MARKPARITY
;
break
;
case
'n'
:
case
'N'
:
*
lpparity
=
NOPARITY
;
break
;
case
'o'
:
case
'O'
:
*
lpparity
=
ODDPARITY
;
break
;
case
's'
:
case
'S'
:
*
lpparity
=
SPACEPARITY
;
break
;
...
...
@@ -239,7 +244,7 @@ static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb)
{
device
++
;
while
(
*
device
==
' '
)
device
++
;
if
(
*
device
)
last
=
toupperW
(
*
device
++
)
;
if
(
*
device
)
last
=
*
device
++
;
while
(
*
device
==
' '
)
device
++
;
}
...
...
@@ -255,6 +260,7 @@ static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb)
lpdcb
->
fDtrControl
=
DTR_CONTROL_ENABLE
;
lpdcb
->
fRtsControl
=
RTS_CONTROL_ENABLE
;
break
;
case
'x'
:
case
'X'
:
lpdcb
->
fInX
=
TRUE
;
lpdcb
->
fOutX
=
TRUE
;
...
...
@@ -263,6 +269,7 @@ static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb)
lpdcb
->
fDtrControl
=
DTR_CONTROL_ENABLE
;
lpdcb
->
fRtsControl
=
RTS_CONTROL_ENABLE
;
break
;
case
'p'
:
case
'P'
:
lpdcb
->
fInX
=
FALSE
;
lpdcb
->
fOutX
=
FALSE
;
...
...
dlls/kernel32/editline.c
View file @
68587234
...
...
@@ -27,6 +27,7 @@
#include "windef.h"
#include "winbase.h"
#include "wincon.h"
#include "winuser.h"
#include "wine/unicode.h"
#include "winnls.h"
#include "wine/debug.h"
...
...
@@ -598,9 +599,7 @@ static void WCEL_LowerCaseWord(WCEL_Context* ctx)
unsigned
int
new_ofs
=
WCEL_GetRightWordTransition
(
ctx
,
ctx
->
ofs
);
if
(
new_ofs
!=
ctx
->
ofs
)
{
unsigned
int
i
;
for
(
i
=
ctx
->
ofs
;
i
<=
new_ofs
;
i
++
)
ctx
->
line
[
i
]
=
tolowerW
(
ctx
->
line
[
i
]);
CharLowerBuffW
(
ctx
->
line
+
ctx
->
ofs
,
new_ofs
-
ctx
->
ofs
+
1
);
WCEL_Update
(
ctx
,
ctx
->
ofs
,
new_ofs
-
ctx
->
ofs
+
1
);
ctx
->
ofs
=
new_ofs
;
}
...
...
@@ -611,9 +610,7 @@ static void WCEL_UpperCaseWord(WCEL_Context* ctx)
unsigned
int
new_ofs
=
WCEL_GetRightWordTransition
(
ctx
,
ctx
->
ofs
);
if
(
new_ofs
!=
ctx
->
ofs
)
{
unsigned
int
i
;
for
(
i
=
ctx
->
ofs
;
i
<=
new_ofs
;
i
++
)
ctx
->
line
[
i
]
=
toupperW
(
ctx
->
line
[
i
]);
CharUpperBuffW
(
ctx
->
line
+
ctx
->
ofs
,
new_ofs
-
ctx
->
ofs
+
1
);
WCEL_Update
(
ctx
,
ctx
->
ofs
,
new_ofs
-
ctx
->
ofs
+
1
);
ctx
->
ofs
=
new_ofs
;
}
...
...
@@ -624,11 +621,8 @@ static void WCEL_CapitalizeWord(WCEL_Context* ctx)
unsigned
int
new_ofs
=
WCEL_GetRightWordTransition
(
ctx
,
ctx
->
ofs
);
if
(
new_ofs
!=
ctx
->
ofs
)
{
unsigned
int
i
;
ctx
->
line
[
ctx
->
ofs
]
=
toupperW
(
ctx
->
line
[
ctx
->
ofs
]);
for
(
i
=
ctx
->
ofs
+
1
;
i
<=
new_ofs
;
i
++
)
ctx
->
line
[
i
]
=
tolowerW
(
ctx
->
line
[
i
]);
CharUpperBuffW
(
ctx
->
line
+
ctx
->
ofs
,
1
);
CharLowerBuffW
(
ctx
->
line
+
ctx
->
ofs
+
1
,
new_ofs
-
ctx
->
ofs
);
WCEL_Update
(
ctx
,
ctx
->
ofs
,
new_ofs
-
ctx
->
ofs
+
1
);
ctx
->
ofs
=
new_ofs
;
}
...
...
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