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
98f0be8d
Commit
98f0be8d
authored
Feb 13, 2012
by
Erich Hoover
Committed by
Alexandre Julliard
Feb 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Fix parsing of some TOC topics that reference other files.
parent
0872572a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
content.c
dlls/hhctrl.ocx/content.c
+26
-5
No files found.
dlls/hhctrl.ocx/content.c
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
);
...
...
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