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
f0d99995
Commit
f0d99995
authored
Apr 14, 2022
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Use wide character string literals in hexedit.c.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5cc628e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
hexedit.c
programs/regedit/hexedit.c
+3
-8
No files found.
programs/regedit/hexedit.c
View file @
f0d99995
...
...
@@ -55,8 +55,6 @@ typedef struct tagHEXEDIT_INFO
INT
nScrollPos
;
/* first visible line */
}
HEXEDIT_INFO
;
const
WCHAR
szHexEditClass
[]
=
{
'H'
,
'e'
,
'x'
,
'E'
,
'd'
,
'i'
,
't'
,
0
};
static
inline
LRESULT
HexEdit_SetFont
(
HEXEDIT_INFO
*
infoPtr
,
HFONT
hFont
,
BOOL
redraw
);
static
inline
BYTE
hexchar_to_byte
(
WCHAR
ch
)
...
...
@@ -73,16 +71,13 @@ static inline BYTE hexchar_to_byte(WCHAR ch)
static
LPWSTR
HexEdit_GetLineText
(
int
offset
,
BYTE
*
pData
,
LONG
cbData
,
LONG
pad
)
{
static
const
WCHAR
percent_04xW
[]
=
{
'%'
,
'0'
,
'4'
,
'X'
,
' '
,
' '
,
0
};
static
const
WCHAR
percent_02xW
[]
=
{
'%'
,
'0'
,
'2'
,
'X'
,
' '
,
0
};
WCHAR
*
lpszLine
=
heap_xalloc
((
6
+
cbData
*
3
+
pad
*
3
+
DIV_SPACES
+
cbData
+
1
)
*
sizeof
(
WCHAR
));
LONG
i
;
wsprintfW
(
lpszLine
,
percent_04xW
,
offset
);
wsprintfW
(
lpszLine
,
L"%04X "
,
offset
);
for
(
i
=
0
;
i
<
cbData
;
i
++
)
wsprintfW
(
lpszLine
+
6
+
i
*
3
,
percent_02xW
,
pData
[
offset
+
i
]);
wsprintfW
(
lpszLine
+
6
+
i
*
3
,
L"%02X "
,
pData
[
offset
+
i
]);
for
(
i
=
0
;
i
<
pad
*
3
;
i
++
)
lpszLine
[
6
+
cbData
*
3
+
i
]
=
' '
;
...
...
@@ -645,7 +640,7 @@ void HexEdit_Register(void)
wndClass
.
cbWndExtra
=
sizeof
(
HEXEDIT_INFO
*
);
wndClass
.
hCursor
=
LoadCursorW
(
0
,
(
const
WCHAR
*
)
IDC_IBEAM
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wndClass
.
lpszClassName
=
szHexEditClass
;
wndClass
.
lpszClassName
=
L"HexEdit"
;
RegisterClassW
(
&
wndClass
);
}
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