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
73e9173e
Commit
73e9173e
authored
Dec 01, 2007
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
Dec 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Add support for winhelp 3.0 phrases.
parent
1fdd0196
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
hlpfile.c
programs/winhelp/hlpfile.c
+15
-4
No files found.
programs/winhelp/hlpfile.c
View file @
73e9173e
...
...
@@ -1575,24 +1575,35 @@ static BYTE *HLPFILE_UncompressLZ77(BYTE *ptr, BYTE *end, BYTE *newptr)
*/
static
BOOL
HLPFILE_UncompressLZ77_Phrases
(
HLPFILE
*
hlpfile
)
{
UINT
i
,
num
,
dec_size
;
UINT
i
,
num
,
dec_size
,
head_size
;
BYTE
*
buf
,
*
end
;
if
(
!
HLPFILE_FindSubFile
(
"|Phrases"
,
&
buf
,
&
end
))
return
FALSE
;
if
(
hlpfile
->
version
<=
16
)
head_size
=
13
;
else
head_size
=
17
;
num
=
phrases
.
num
=
GET_USHORT
(
buf
,
9
);
if
(
buf
+
2
*
num
+
0x13
>=
end
)
{
WINE_WARN
(
"1a
\n
"
);
return
FALSE
;};
dec_size
=
HLPFILE_UncompressedLZ77_Size
(
buf
+
0x13
+
2
*
num
,
end
);
if
(
hlpfile
->
version
<=
16
)
dec_size
=
end
-
buf
-
15
-
2
*
num
;
else
dec_size
=
HLPFILE_UncompressedLZ77_Size
(
buf
+
0x13
+
2
*
num
,
end
);
phrases
.
offsets
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
unsigned
)
*
(
num
+
1
));
phrases
.
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dec_size
);
if
(
!
phrases
.
offsets
||
!
phrases
.
buffer
)
return
FALSE
;
for
(
i
=
0
;
i
<=
num
;
i
++
)
phrases
.
offsets
[
i
]
=
GET_USHORT
(
buf
,
0x11
+
2
*
i
)
-
2
*
num
-
2
;
phrases
.
offsets
[
i
]
=
GET_USHORT
(
buf
,
head_size
+
2
*
i
)
-
2
*
num
-
2
;
HLPFILE_UncompressLZ77
(
buf
+
0x13
+
2
*
num
,
end
,
(
BYTE
*
)
phrases
.
buffer
);
if
(
hlpfile
->
version
<=
16
)
memcpy
(
phrases
.
buffer
,
buf
+
15
+
2
*
num
,
dec_size
);
else
HLPFILE_UncompressLZ77
(
buf
+
0x13
+
2
*
num
,
end
,
(
BYTE
*
)
phrases
.
buffer
);
hlpfile
->
hasPhrases
=
TRUE
;
return
TRUE
;
...
...
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