Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
98f0be8d
Commit
98f0be8d
authored
13 years ago
by
Erich Hoover
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hhctrl.ocx: Fix parsing of some TOC topics that reference other files.
parent
0872572a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/hhctrl.ocx/content.c
+26
-5
26 additions, 5 deletions
dlls/hhctrl.ocx/content.c
with
26 additions
and
5 deletions
dlls/hhctrl.ocx/content.c
+
26
−
5
View file @
98f0be8d
...
...
@@ -50,11 +50,21 @@ static void free_content_item(ContentItem *item)
}
}
static
void
store_param
(
LPWSTR
*
param
,
const
char
*
value
,
int
len
)
{
int
wlen
;
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
value
,
len
,
NULL
,
0
);
*
param
=
heap_alloc
((
wlen
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
value
,
len
,
*
param
,
wlen
);
(
*
param
)[
wlen
]
=
0
;
}
static
void
parse_obj_node_param
(
ContentItem
*
item
,
ContentItem
*
hhc_root
,
const
char
*
text
)
{
const
char
*
ptr
;
LPWSTR
*
param
,
merge
;
int
len
,
wlen
;
int
len
;
ptr
=
get_attr
(
text
,
"name"
,
&
len
);
if
(
!
ptr
)
{
...
...
@@ -79,10 +89,21 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const
return
;
}
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr
,
len
,
NULL
,
0
);
*
param
=
heap_alloc
((
wlen
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr
,
len
,
*
param
,
wlen
);
(
*
param
)[
wlen
]
=
0
;
/*
* "merge" parameter data (referencing another CHM file) can be incorporated into the "local" parameter
* by specifying the filename in the format:
* MS-ITS:file.chm::/local_path.htm
*/
if
(
param
==
&
item
->
local
&&
strstr
(
ptr
,
"::"
))
{
const
char
*
local
=
strstr
(
ptr
,
"::"
)
+
2
;
int
local_len
=
len
-
(
local
-
ptr
);
store_param
(
&
item
->
local
,
local
,
local_len
);
param
=
&
merge
;
}
store_param
(
param
,
ptr
,
len
);
if
(
param
==
&
merge
)
{
SetChmPath
(
&
item
->
merge
,
hhc_root
->
merge
.
chm_file
,
merge
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment