hhctrl.ocx: Don't use strncasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
95510d5b1b
commit
96c6d45759
|
@ -595,7 +595,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document)
|
|||
|
||||
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)
|
||||
{
|
||||
document_title = strdupnAtoW(&content.buf[1], content.len-1);
|
||||
|
|
|
@ -62,11 +62,11 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const
|
|||
return;
|
||||
}
|
||||
|
||||
if(!strncasecmp("name", ptr, len)) {
|
||||
if(!_strnicmp("name", ptr, len)) {
|
||||
param = &item->name;
|
||||
}else if(!strncasecmp("merge", ptr, len)) {
|
||||
}else if(!_strnicmp("merge", ptr, len)) {
|
||||
param = &merge;
|
||||
}else if(!strncasecmp("local", ptr, len)) {
|
||||
}else if(!_strnicmp("local", ptr, len)) {
|
||||
param = &item->local;
|
||||
}else {
|
||||
WARN("unhandled param %s\n", debugstr_an(ptr, len));
|
||||
|
@ -148,9 +148,9 @@ static ContentItem *parse_sitemap_object(HHInfo *info, stream_t *stream, Content
|
|||
|
||||
TRACE("%s\n", node.buf);
|
||||
|
||||
if(!strcasecmp(node_name.buf, "/object"))
|
||||
if(!_strnicmp(node_name.buf, "/object", -1))
|
||||
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);
|
||||
|
||||
strbuf_zero(&node);
|
||||
|
@ -195,7 +195,7 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro
|
|||
|
||||
TRACE("%s\n", node.buf);
|
||||
|
||||
if(!strcasecmp(node_name.buf, "object")) {
|
||||
if(!_strnicmp(node_name.buf, "object", -1)) {
|
||||
const char *ptr;
|
||||
int len;
|
||||
|
||||
|
@ -210,10 +210,10 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro
|
|||
if(!ret)
|
||||
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);
|
||||
insert_item(prev, new_item, INSERT_CHILD);
|
||||
}else if(!strcasecmp(node_name.buf, "/ul")) {
|
||||
}else if(!_strnicmp(node_name.buf, "/ul", -1)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ static ContentItem *parse_hhc(HHInfo *info, IStream *str, ContentItem *hhc_root,
|
|||
|
||||
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);
|
||||
prev = insert_item(prev, item, INSERT_CHILD);
|
||||
if(!ret)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winternl.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "htmlhelp.h"
|
||||
|
|
|
@ -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
|
||||
* sub-topic has filled out both the "name" and "local" params.
|
||||
*/
|
||||
if(item->itemFlags == 0x11 && (!strncasecmp("name", ptr, len) || !strncasecmp("local", ptr, len)))
|
||||
if(item->itemFlags == 0x11 && (!_strnicmp("name", ptr, len) || !_strnicmp("local", ptr, len)))
|
||||
item_realloc(item, item->nItems+1);
|
||||
if(!strncasecmp("keyword", ptr, len)) {
|
||||
if(!_strnicmp("keyword", ptr, len)) {
|
||||
param = &item->keyword;
|
||||
}else if(!item->keyword && !strncasecmp("name", ptr, len)) {
|
||||
}else if(!item->keyword && !_strnicmp("name", ptr, len)) {
|
||||
/* Some HTML Help index files use an additional "name" parameter
|
||||
* rather than the "keyword" parameter. In this case, the first
|
||||
* occurrence of the "name" parameter is the keyword.
|
||||
*/
|
||||
param = &item->keyword;
|
||||
}else if(!strncasecmp("name", ptr, len)) {
|
||||
}else if(!_strnicmp("name", ptr, len)) {
|
||||
item->itemFlags |= 0x01;
|
||||
param = &item->items[item->nItems-1].name;
|
||||
}else if(!strncasecmp("local", ptr, len)) {
|
||||
}else if(!_strnicmp("local", ptr, len)) {
|
||||
item->itemFlags |= 0x10;
|
||||
param = &item->items[item->nItems-1].local;
|
||||
}else {
|
||||
|
@ -137,9 +137,9 @@ static IndexItem *parse_index_sitemap_object(HHInfo *info, stream_t *stream)
|
|||
|
||||
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);
|
||||
}else if(!strcasecmp(node_name.buf, "/object")) {
|
||||
}else if(!_strnicmp(node_name.buf, "/object", -1)) {
|
||||
break;
|
||||
}else {
|
||||
WARN("Unhandled tag! %s\n", node_name.buf);
|
||||
|
@ -173,7 +173,7 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream)
|
|||
|
||||
TRACE("%s\n", node.buf);
|
||||
|
||||
if(!strcasecmp(node_name.buf, "object")) {
|
||||
if(!_strnicmp(node_name.buf, "object", -1)) {
|
||||
const char *ptr;
|
||||
int len;
|
||||
|
||||
|
@ -228,7 +228,7 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
|
|||
|
||||
TRACE("%s\n", node.buf);
|
||||
|
||||
if(!strcasecmp(node_name.buf, "li")) {
|
||||
if(!_strnicmp(node_name.buf, "li", -1)) {
|
||||
IndexItem *new_item;
|
||||
|
||||
new_item = parse_li(info, &stream);
|
||||
|
@ -246,9 +246,9 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
|
|||
item = item->next;
|
||||
item->indentLevel = indent_level;
|
||||
}
|
||||
}else if(!strcasecmp(node_name.buf, "ul")) {
|
||||
}else if(!_strnicmp(node_name.buf, "ul", -1)) {
|
||||
indent_level++;
|
||||
}else if(!strcasecmp(node_name.buf, "/ul")) {
|
||||
}else if(!_strnicmp(node_name.buf, "/ul", -1)) {
|
||||
indent_level--;
|
||||
}else {
|
||||
WARN("Unhandled tag! %s\n", node_name.buf);
|
||||
|
|
|
@ -102,7 +102,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char *
|
|||
char *text = &content.buf[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);
|
||||
title = heap_alloc((wlen+1)*sizeof(WCHAR));
|
||||
|
|
Loading…
Reference in New Issue