diff options
| author | Simon Tatham <anakin@pobox.com> | 2001-12-04 21:33:03 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2001-12-04 21:33:03 +0000 |
| commit | 38181905971fab7106f1f4b90db8da26497158b9 (patch) | |
| tree | 26e8e64f06ab2f07fb2999acbd5726767a8de64e /index.c | |
| parent | 5e3a21913b6a47e78d3e4edd4238d028b90827b7 (diff) | |
| download | halibut-38181905971fab7106f1f4b90db8da26497158b9.zip halibut-38181905971fab7106f1f4b90db8da26497158b9.tar.gz halibut-38181905971fab7106f1f4b90db8da26497158b9.tar.bz2 halibut-38181905971fab7106f1f4b90db8da26497158b9.tar.xz | |
Indexing in the Help backend now seems to work! Woo!
[originally from svn r1450]
Diffstat (limited to 'index.c')
| -rw-r--r-- | index.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -31,12 +31,25 @@ static int compare_tags(void *av, void *bv) { return ustricmp(a->name, b->name); } +static int compare_to_find_tag(void *av, void *bv) { + wchar_t *a = (wchar_t *)av; + indextag *b = (indextag *)bv; + return ustricmp(a, b->name); +} + static int compare_entries(void *av, void *bv) { indexentry *a = (indexentry *)av, *b = (indexentry *)bv; return compare_wordlists(a->text, b->text); } /* + * Back-end utility: find the indextag with a given name. + */ +indextag *index_findtag(indexdata *idx, wchar_t *name) { + return find234(idx->tags, name, compare_to_find_tag); +} + +/* * Add a \IM. `tags' points to a zero-terminated chain of * zero-terminated strings ("first\0second\0thirdandlast\0\0"). * `text' points to a word list. |