Module: wine Branch: master Commit: 687a2aeae4f292f7fe64bcad711e6814272dad8d URL: http://source.winehq.org/git/wine.git/?a=commit;h=687a2aeae4f292f7fe64bcad71...
Author: Erich Hoover ehoover@mines.edu Date: Sun Feb 7 10:07:56 2010 -0700
hhctrl.ocx: Fix HTML Help Index tab with alternative 'keyword' style.
---
dlls/hhctrl.ocx/index.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c index dd61fe3..52a414e 100644 --- a/dlls/hhctrl.ocx/index.c +++ b/dlls/hhctrl.ocx/index.c @@ -36,6 +36,12 @@ static void fill_index_tree(HWND hwnd, IndexItem *item) while(item) { TRACE("tree debug: %s\n", debugstr_w(item->keyword));
+ if(!item->keyword) + { + FIXME("HTML Help index item has no keyword.\n"); + item = item->next; + continue; + } memset(&lvi, 0, sizeof(lvi)); lvi.iItem = index++; lvi.mask = LVIF_TEXT|LVIF_PARAM; @@ -79,6 +85,12 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text) } if(!strncasecmp("keyword", ptr, len)) { param = &item->keyword; + }else if(!item->keyword && !strncasecmp("name", ptr, len)) { + /* Some HTML Help index files use an additional "name" parameter + * rather than the "keyword" parameter. In this case, the first + * occurance of the "name" parameter is the keyword. + */ + param = &item->keyword; }else if(!strncasecmp("name", ptr, len)) { item->itemFlags |= 0x01; param = &item->items[item->nItems-1].name;