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
6a2ad1b4
Commit
6a2ad1b4
authored
Dec 13, 2007
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
Dec 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Read keywords.
parent
af21361d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
hlpfile.c
programs/winhelp/hlpfile.c
+35
-0
hlpfile.h
programs/winhelp/hlpfile.h
+2
-0
No files found.
programs/winhelp/hlpfile.c
View file @
6a2ad1b4
...
...
@@ -86,6 +86,7 @@ static BOOL HLPFILE_UncompressLZ77_Phrases(HLPFILE*);
static
BOOL
HLPFILE_Uncompress_Phrases40
(
HLPFILE
*
);
static
BOOL
HLPFILE_Uncompress_Topic
(
HLPFILE
*
);
static
BOOL
HLPFILE_GetContext
(
HLPFILE
*
);
static
BOOL
HLPFILE_GetKeywords
(
HLPFILE
*
);
static
BOOL
HLPFILE_GetMap
(
HLPFILE
*
);
static
BOOL
HLPFILE_AddPage
(
HLPFILE
*
,
BYTE
*
,
BYTE
*
,
unsigned
);
static
BOOL
HLPFILE_AddParagraph
(
HLPFILE
*
,
BYTE
*
,
BYTE
*
,
unsigned
*
);
...
...
@@ -393,6 +394,7 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
ref
=
GET_UINT
(
buf
,
0xc
);
}
while
(
ref
!=
0xffffffff
);
HLPFILE_GetKeywords
(
hlpfile
);
HLPFILE_GetMap
(
hlpfile
);
if
(
hlpfile
->
version
<=
16
)
return
TRUE
;
return
HLPFILE_GetContext
(
hlpfile
);
...
...
@@ -2026,6 +2028,39 @@ static BOOL HLPFILE_GetContext(HLPFILE *hlpfile)
/***********************************************************************
*
* HLPFILE_GetKeywords
*/
static
BOOL
HLPFILE_GetKeywords
(
HLPFILE
*
hlpfile
)
{
BYTE
*
cbuf
,
*
cend
;
unsigned
clen
;
if
(
!
HLPFILE_FindSubFile
(
"|KWBTREE"
,
&
cbuf
,
&
cend
))
return
FALSE
;
clen
=
cend
-
cbuf
;
hlpfile
->
kwbtree
=
HeapAlloc
(
GetProcessHeap
(),
0
,
clen
);
if
(
!
hlpfile
->
kwbtree
)
return
FALSE
;
memcpy
(
hlpfile
->
kwbtree
,
cbuf
,
clen
);
if
(
!
HLPFILE_FindSubFile
(
"|KWDATA"
,
&
cbuf
,
&
cend
))
{
WINE_ERR
(
"corrupted help file: kwbtree present but kwdata absent
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
hlpfile
->
kwbtree
);
return
FALSE
;
}
clen
=
cend
-
cbuf
;
hlpfile
->
kwdata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
clen
);
if
(
!
hlpfile
->
kwdata
)
{
HeapFree
(
GetProcessHeap
(),
0
,
hlpfile
->
kwdata
);
return
FALSE
;
}
memcpy
(
hlpfile
->
kwdata
,
cbuf
,
clen
);
return
TRUE
;
}
/***********************************************************************
*
* HLPFILE_GetMap
*/
static
BOOL
HLPFILE_GetMap
(
HLPFILE
*
hlpfile
)
...
...
programs/winhelp/hlpfile.h
View file @
6a2ad1b4
...
...
@@ -124,6 +124,8 @@ typedef struct tagHlpFileFile
HLPFILE_PAGE
*
first_page
;
HLPFILE_MACRO
*
first_macro
;
BYTE
*
Context
;
BYTE
*
kwbtree
;
BYTE
*
kwdata
;
unsigned
wMapLen
;
HLPFILE_MAP
*
Map
;
unsigned
long
contents_start
;
...
...
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