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
2bca1c86
Commit
2bca1c86
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: Use TopicOffset mapping and get rid of unused function.
parent
4c387a95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
hlpfile.c
programs/winhlp32/hlpfile.c
+16
-20
No files found.
programs/winhlp32/hlpfile.c
View file @
2bca1c86
...
...
@@ -71,23 +71,6 @@ static BOOL HLPFILE_Uncompress3(HLPFILE*, char*, const char*, const BYTE*, cons
static
void
HLPFILE_UncompressRLE
(
const
BYTE
*
src
,
const
BYTE
*
end
,
BYTE
*
dst
,
unsigned
dstsz
);
static
BOOL
HLPFILE_ReadFont
(
HLPFILE
*
hlpfile
);
/***********************************************************************
*
* HLPFILE_PageByNumber
*/
static
HLPFILE_PAGE
*
HLPFILE_PageByNumber
(
HLPFILE
*
hlpfile
,
UINT
wNum
)
{
HLPFILE_PAGE
*
page
;
UINT
temp
=
wNum
;
WINE_TRACE
(
"<%s>[%u]
\n
"
,
hlpfile
->
lpszPath
,
wNum
);
for
(
page
=
hlpfile
->
first_page
;
page
&&
temp
;
page
=
page
->
next
)
temp
--
;
if
(
!
page
)
WINE_ERR
(
"Page of number %u not found in file %s
\n
"
,
wNum
,
hlpfile
->
lpszPath
);
return
page
;
}
/******************************************************************
* HLPFILE_PageByOffset
*
...
...
@@ -154,8 +137,8 @@ HLPFILE_PAGE *HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash, ULONG* relative)
/* For win 3.0 files hash values are really page numbers */
if
(
hlpfile
->
version
<=
16
)
{
*
relative
=
0
;
return
HLPFILE_PageBy
Number
(
hlpfile
,
lHash
);
if
(
lHash
>=
hlpfile
->
wTOMapLen
)
return
NULL
;
return
HLPFILE_PageBy
Offset
(
hlpfile
,
hlpfile
->
TOMap
[
lHash
],
relative
);
}
ptr
=
HLPFILE_BPTreeSearch
(
hlpfile
->
Context
,
LongToPtr
(
lHash
),
comp_PageByHash
);
...
...
@@ -438,6 +421,19 @@ static BOOL HLPFILE_AddPage(HLPFILE *hlpfile, const BYTE *buf, const BYTE *end,
page
->
browse_bwd
=
GET_UINT
(
buf
,
0x19
);
page
->
browse_fwd
=
GET_UINT
(
buf
,
0x1D
);
if
(
hlpfile
->
version
<=
16
)
{
if
(
page
->
browse_bwd
==
0xFFFF
||
page
->
browse_bwd
==
0xFFFFFFFF
)
page
->
browse_bwd
=
0xFFFFFFFF
;
else
page
->
browse_bwd
=
hlpfile
->
TOMap
[
page
->
browse_bwd
];
if
(
page
->
browse_fwd
==
0xFFFF
||
page
->
browse_fwd
==
0xFFFFFFFF
)
page
->
browse_fwd
=
0xFFFFFFFF
;
else
page
->
browse_fwd
=
hlpfile
->
TOMap
[
page
->
browse_fwd
];
}
WINE_TRACE
(
"Added page[%d]: title='%s' %08x << %08x >> %08x
\n
"
,
page
->
wNumber
,
page
->
lpszTitle
,
page
->
browse_bwd
,
page
->
offset
,
page
->
browse_fwd
);
...
...
@@ -1439,7 +1435,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
case
0xE1
:
WINE_WARN
(
"jump topic 1 => %u
\n
"
,
GET_UINT
(
format
,
1
));
HLPFILE_AllocLink
(
rd
,
(
*
format
&
1
)
?
hlp_link_link
:
hlp_link_popup
,
page
->
file
->
lpszPath
,
-
1
,
GET_UINT
(
format
,
1
)
-
16
,
1
,
-
1
);
page
->
file
->
lpszPath
,
-
1
,
GET_UINT
(
format
,
1
),
1
,
-
1
);
format
+=
5
;
...
...
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