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
deb98a4e
Commit
deb98a4e
authored
Aug 06, 2008
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Load internal file containing pagenum->topicoffset mapping.
parent
a591c64f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
hlpfile.c
programs/winhlp32/hlpfile.c
+23
-0
hlpfile.h
programs/winhlp32/hlpfile.h
+2
-0
No files found.
programs/winhlp32/hlpfile.c
View file @
deb98a4e
...
...
@@ -63,6 +63,7 @@ static BOOL HLPFILE_Uncompress_Topic(HLPFILE*);
static
BOOL
HLPFILE_GetContext
(
HLPFILE
*
);
static
BOOL
HLPFILE_GetKeywords
(
HLPFILE
*
);
static
BOOL
HLPFILE_GetMap
(
HLPFILE
*
);
static
BOOL
HLPFILE_GetTOMap
(
HLPFILE
*
);
static
BOOL
HLPFILE_AddPage
(
HLPFILE
*
,
const
BYTE
*
,
const
BYTE
*
,
unsigned
,
unsigned
);
static
BOOL
HLPFILE_SkipParagraph
(
HLPFILE
*
,
const
BYTE
*
,
const
BYTE
*
,
unsigned
*
);
static
void
HLPFILE_Uncompress2
(
HLPFILE
*
,
const
BYTE
*
,
const
BYTE
*
,
BYTE
*
,
const
BYTE
*
);
...
...
@@ -293,6 +294,8 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
if
(
!
HLPFILE_SystemCommands
(
hlpfile
))
return
FALSE
;
if
(
hlpfile
->
version
<=
16
&&
!
HLPFILE_GetTOMap
(
hlpfile
))
return
FALSE
;
/* load phrases support */
if
(
!
HLPFILE_UncompressLZ77_Phrases
(
hlpfile
))
HLPFILE_Uncompress_Phrases40
(
hlpfile
);
...
...
@@ -2577,6 +2580,26 @@ static BOOL HLPFILE_GetMap(HLPFILE *hlpfile)
/***********************************************************************
*
* HLPFILE_GetTOMap
*/
static
BOOL
HLPFILE_GetTOMap
(
HLPFILE
*
hlpfile
)
{
BYTE
*
cbuf
,
*
cend
;
unsigned
clen
;
if
(
!
HLPFILE_FindSubFile
(
hlpfile
,
"|TOMAP"
,
&
cbuf
,
&
cend
))
{
WINE_WARN
(
"no tomap section
\n
"
);
return
FALSE
;}
clen
=
cend
-
cbuf
-
9
;
hlpfile
->
TOMap
=
HeapAlloc
(
GetProcessHeap
(),
0
,
clen
);
if
(
!
hlpfile
->
TOMap
)
return
FALSE
;
memcpy
(
hlpfile
->
TOMap
,
cbuf
+
9
,
clen
);
hlpfile
->
wTOMapLen
=
clen
/
4
;
return
TRUE
;
}
/***********************************************************************
*
* DeleteMacro
*/
static
void
HLPFILE_DeleteMacro
(
HLPFILE_MACRO
*
macro
)
...
...
programs/winhlp32/hlpfile.h
View file @
deb98a4e
...
...
@@ -100,6 +100,8 @@ typedef struct tagHlpFileFile
BYTE
*
kwdata
;
unsigned
wMapLen
;
HLPFILE_MAP
*
Map
;
unsigned
wTOMapLen
;
unsigned
*
TOMap
;
unsigned
long
contents_start
;
struct
tagHlpFileFile
*
prev
;
...
...
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