diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-04-22 18:01:31 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-04-22 18:01:31 +0000 |
| commit | 696363c8dd1637fda63d45f98b4474803bba87b3 (patch) | |
| tree | df4134bb5cf60802f3ead1090109a78ad6915c43 /main.c | |
| parent | 3e7ac03ca71c9b93c73fa58fd1de9a2042ec13d7 (diff) | |
| download | halibut-696363c8dd1637fda63d45f98b4474803bba87b3.zip halibut-696363c8dd1637fda63d45f98b4474803bba87b3.tar.gz halibut-696363c8dd1637fda63d45f98b4474803bba87b3.tar.bz2 halibut-696363c8dd1637fda63d45f98b4474803bba87b3.tar.xz | |
Instead of traversing a list of paragraphs, mark_attr_ends() now
merely traverses a list of words, and main() takes responsibility
for applying it to each paragraph in the document. This is so that
it can _also_ be applied to the display form of each index entry,
which Jacob spotted wasn't previously being done.
[originally from svn r4117]
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -288,8 +288,6 @@ int main(int argc, char **argv) { sfree(in.pushback); - mark_attr_ends(sourceform); - sfree(infiles); keywords = get_keywords(sourceform); @@ -304,6 +302,20 @@ int main(int argc, char **argv) { build_index(idx); + /* + * Set up attr_First / attr_Last / attr_Always, in the main + * document and in the index entries. + */ + for (p = sourceform; p; p = p->next) + mark_attr_ends(p->words); + { + int i; + indexentry *entry; + + for (i = 0; (entry = index234(idx->entries, i)) != NULL; i++) + mark_attr_ends(entry->text); + } + if (debug) { index_debug(idx); dbg_prtkws(keywords); |