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
96c6d457
Commit
96c6d457
authored
Apr 03, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Don't use strncasecmp.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
95510d5b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
22 deletions
+23
-22
chm.c
dlls/hhctrl.ocx/chm.c
+1
-1
content.c
dlls/hhctrl.ocx/content.c
+9
-9
hhctrl.h
dlls/hhctrl.ocx/hhctrl.h
+1
-0
index.c
dlls/hhctrl.ocx/index.c
+11
-11
search.c
dlls/hhctrl.ocx/search.c
+1
-1
No files found.
dlls/hhctrl.ocx/chm.c
View file @
96c6d457
...
@@ -595,7 +595,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document)
...
@@ -595,7 +595,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document)
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"title"
))
{
if
(
!
_strnicmp
(
node_name
.
buf
,
"title"
,
-
1
))
{
if
(
next_content
(
&
stream
,
&
content
)
&&
content
.
len
>
1
)
if
(
next_content
(
&
stream
,
&
content
)
&&
content
.
len
>
1
)
{
{
document_title
=
strdupnAtoW
(
&
content
.
buf
[
1
],
content
.
len
-
1
);
document_title
=
strdupnAtoW
(
&
content
.
buf
[
1
],
content
.
len
-
1
);
...
...
dlls/hhctrl.ocx/content.c
View file @
96c6d457
...
@@ -62,11 +62,11 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const
...
@@ -62,11 +62,11 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const
return
;
return
;
}
}
if
(
!
strncase
cmp
(
"name"
,
ptr
,
len
))
{
if
(
!
_strni
cmp
(
"name"
,
ptr
,
len
))
{
param
=
&
item
->
name
;
param
=
&
item
->
name
;
}
else
if
(
!
strncase
cmp
(
"merge"
,
ptr
,
len
))
{
}
else
if
(
!
_strni
cmp
(
"merge"
,
ptr
,
len
))
{
param
=
&
merge
;
param
=
&
merge
;
}
else
if
(
!
strncase
cmp
(
"local"
,
ptr
,
len
))
{
}
else
if
(
!
_strni
cmp
(
"local"
,
ptr
,
len
))
{
param
=
&
item
->
local
;
param
=
&
item
->
local
;
}
else
{
}
else
{
WARN
(
"unhandled param %s
\n
"
,
debugstr_an
(
ptr
,
len
));
WARN
(
"unhandled param %s
\n
"
,
debugstr_an
(
ptr
,
len
));
...
@@ -148,9 +148,9 @@ static ContentItem *parse_sitemap_object(HHInfo *info, stream_t *stream, Content
...
@@ -148,9 +148,9 @@ static ContentItem *parse_sitemap_object(HHInfo *info, stream_t *stream, Content
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"/object"
))
if
(
!
_strnicmp
(
node_name
.
buf
,
"/object"
,
-
1
))
break
;
break
;
if
(
!
strcasecmp
(
node_name
.
buf
,
"param"
))
if
(
!
_strnicmp
(
node_name
.
buf
,
"param"
,
-
1
))
parse_obj_node_param
(
item
,
hhc_root
,
node
.
buf
,
info
->
pCHMInfo
->
codePage
);
parse_obj_node_param
(
item
,
hhc_root
,
node
.
buf
,
info
->
pCHMInfo
->
codePage
);
strbuf_zero
(
&
node
);
strbuf_zero
(
&
node
);
...
@@ -195,7 +195,7 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro
...
@@ -195,7 +195,7 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"object"
))
{
if
(
!
_strnicmp
(
node_name
.
buf
,
"object"
,
-
1
))
{
const
char
*
ptr
;
const
char
*
ptr
;
int
len
;
int
len
;
...
@@ -210,10 +210,10 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro
...
@@ -210,10 +210,10 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro
if
(
!
ret
)
if
(
!
ret
)
ret
=
prev
;
ret
=
prev
;
}
}
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"ul"
))
{
}
else
if
(
!
_strnicmp
(
node_name
.
buf
,
"ul"
,
-
1
))
{
new_item
=
parse_ul
(
info
,
stream
,
hhc_root
);
new_item
=
parse_ul
(
info
,
stream
,
hhc_root
);
insert_item
(
prev
,
new_item
,
INSERT_CHILD
);
insert_item
(
prev
,
new_item
,
INSERT_CHILD
);
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"/ul"
))
{
}
else
if
(
!
_strnicmp
(
node_name
.
buf
,
"/ul"
,
-
1
))
{
break
;
break
;
}
}
...
@@ -245,7 +245,7 @@ static ContentItem *parse_hhc(HHInfo *info, IStream *str, ContentItem *hhc_root,
...
@@ -245,7 +245,7 @@ static ContentItem *parse_hhc(HHInfo *info, IStream *str, ContentItem *hhc_root,
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"ul"
))
{
if
(
!
_strnicmp
(
node_name
.
buf
,
"ul"
,
-
1
))
{
ContentItem
*
item
=
parse_ul
(
info
,
&
stream
,
hhc_root
);
ContentItem
*
item
=
parse_ul
(
info
,
&
stream
,
hhc_root
);
prev
=
insert_item
(
prev
,
item
,
INSERT_CHILD
);
prev
=
insert_item
(
prev
,
item
,
INSERT_CHILD
);
if
(
!
ret
)
if
(
!
ret
)
...
...
dlls/hhctrl.ocx/hhctrl.h
View file @
96c6d457
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winternl.h"
#include "winuser.h"
#include "winuser.h"
#include "winnls.h"
#include "winnls.h"
#include "htmlhelp.h"
#include "htmlhelp.h"
...
...
dlls/hhctrl.ocx/index.c
View file @
96c6d457
...
@@ -83,20 +83,20 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text, UINT c
...
@@ -83,20 +83,20 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text, UINT c
/* Allocate a new sub-item, either on the first run or whenever a
/* Allocate a new sub-item, either on the first run or whenever a
* sub-topic has filled out both the "name" and "local" params.
* sub-topic has filled out both the "name" and "local" params.
*/
*/
if
(
item
->
itemFlags
==
0x11
&&
(
!
strncasecmp
(
"name"
,
ptr
,
len
)
||
!
strncase
cmp
(
"local"
,
ptr
,
len
)))
if
(
item
->
itemFlags
==
0x11
&&
(
!
_strnicmp
(
"name"
,
ptr
,
len
)
||
!
_strni
cmp
(
"local"
,
ptr
,
len
)))
item_realloc
(
item
,
item
->
nItems
+
1
);
item_realloc
(
item
,
item
->
nItems
+
1
);
if
(
!
strncase
cmp
(
"keyword"
,
ptr
,
len
))
{
if
(
!
_strni
cmp
(
"keyword"
,
ptr
,
len
))
{
param
=
&
item
->
keyword
;
param
=
&
item
->
keyword
;
}
else
if
(
!
item
->
keyword
&&
!
strncase
cmp
(
"name"
,
ptr
,
len
))
{
}
else
if
(
!
item
->
keyword
&&
!
_strni
cmp
(
"name"
,
ptr
,
len
))
{
/* Some HTML Help index files use an additional "name" parameter
/* Some HTML Help index files use an additional "name" parameter
* rather than the "keyword" parameter. In this case, the first
* rather than the "keyword" parameter. In this case, the first
* occurrence of the "name" parameter is the keyword.
* occurrence of the "name" parameter is the keyword.
*/
*/
param
=
&
item
->
keyword
;
param
=
&
item
->
keyword
;
}
else
if
(
!
strncase
cmp
(
"name"
,
ptr
,
len
))
{
}
else
if
(
!
_strni
cmp
(
"name"
,
ptr
,
len
))
{
item
->
itemFlags
|=
0x01
;
item
->
itemFlags
|=
0x01
;
param
=
&
item
->
items
[
item
->
nItems
-
1
].
name
;
param
=
&
item
->
items
[
item
->
nItems
-
1
].
name
;
}
else
if
(
!
strncase
cmp
(
"local"
,
ptr
,
len
))
{
}
else
if
(
!
_strni
cmp
(
"local"
,
ptr
,
len
))
{
item
->
itemFlags
|=
0x10
;
item
->
itemFlags
|=
0x10
;
param
=
&
item
->
items
[
item
->
nItems
-
1
].
local
;
param
=
&
item
->
items
[
item
->
nItems
-
1
].
local
;
}
else
{
}
else
{
...
@@ -137,9 +137,9 @@ static IndexItem *parse_index_sitemap_object(HHInfo *info, stream_t *stream)
...
@@ -137,9 +137,9 @@ static IndexItem *parse_index_sitemap_object(HHInfo *info, stream_t *stream)
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"param"
))
{
if
(
!
_strnicmp
(
node_name
.
buf
,
"param"
,
-
1
))
{
parse_index_obj_node_param
(
item
,
node
.
buf
,
info
->
pCHMInfo
->
codePage
);
parse_index_obj_node_param
(
item
,
node
.
buf
,
info
->
pCHMInfo
->
codePage
);
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"/object"
))
{
}
else
if
(
!
_strnicmp
(
node_name
.
buf
,
"/object"
,
-
1
))
{
break
;
break
;
}
else
{
}
else
{
WARN
(
"Unhandled tag! %s
\n
"
,
node_name
.
buf
);
WARN
(
"Unhandled tag! %s
\n
"
,
node_name
.
buf
);
...
@@ -173,7 +173,7 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream)
...
@@ -173,7 +173,7 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream)
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"object"
))
{
if
(
!
_strnicmp
(
node_name
.
buf
,
"object"
,
-
1
))
{
const
char
*
ptr
;
const
char
*
ptr
;
int
len
;
int
len
;
...
@@ -228,7 +228,7 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
...
@@ -228,7 +228,7 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
TRACE
(
"%s
\n
"
,
node
.
buf
);
TRACE
(
"%s
\n
"
,
node
.
buf
);
if
(
!
strcasecmp
(
node_name
.
buf
,
"li"
))
{
if
(
!
_strnicmp
(
node_name
.
buf
,
"li"
,
-
1
))
{
IndexItem
*
new_item
;
IndexItem
*
new_item
;
new_item
=
parse_li
(
info
,
&
stream
);
new_item
=
parse_li
(
info
,
&
stream
);
...
@@ -246,9 +246,9 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
...
@@ -246,9 +246,9 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
item
=
item
->
next
;
item
=
item
->
next
;
item
->
indentLevel
=
indent_level
;
item
->
indentLevel
=
indent_level
;
}
}
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"ul"
))
{
}
else
if
(
!
_strnicmp
(
node_name
.
buf
,
"ul"
,
-
1
))
{
indent_level
++
;
indent_level
++
;
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"/ul"
))
{
}
else
if
(
!
_strnicmp
(
node_name
.
buf
,
"/ul"
,
-
1
))
{
indent_level
--
;
indent_level
--
;
}
else
{
}
else
{
WARN
(
"Unhandled tag! %s
\n
"
,
node_name
.
buf
);
WARN
(
"Unhandled tag! %s
\n
"
,
node_name
.
buf
);
...
...
dlls/hhctrl.ocx/search.c
View file @
96c6d457
...
@@ -102,7 +102,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char *
...
@@ -102,7 +102,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char *
char
*
text
=
&
content
.
buf
[
1
];
char
*
text
=
&
content
.
buf
[
1
];
int
textlen
=
content
.
len
-
1
;
int
textlen
=
content
.
len
-
1
;
if
(
!
strcasecmp
(
node_name
.
buf
,
"title"
))
if
(
!
_strnicmp
(
node_name
.
buf
,
"title"
,
-
1
))
{
{
int
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
text
,
textlen
,
NULL
,
0
);
int
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
text
,
textlen
,
NULL
,
0
);
title
=
heap_alloc
((
wlen
+
1
)
*
sizeof
(
WCHAR
));
title
=
heap_alloc
((
wlen
+
1
)
*
sizeof
(
WCHAR
));
...
...
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