X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/e5cd393faa334825e69833ba2996cbcac9f2957d..bb9e7835935e7a2098f2ce27964342d4c4557e3f:/main.c diff --git a/main.c b/main.c index 18d644c..847aea8 100644 --- a/main.c +++ b/main.c @@ -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);