-/* $Id: recgrs.c,v 1.6 2006-09-28 18:38:47 adam Exp $
+/* $Id: recgrs.c,v 1.9 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
return 1;
}
-static struct source_parser *source_parser_create()
+static struct source_parser *source_parser_create(void)
{
struct source_parser *sp = xmalloc(sizeof(*sp));
#if OPTIMIZE_MELM
/* mark this and following ones with same regexp */
- for (xpe1 = xpe; xpe1; xpe1 = xpe1->next)
- {
- if (!strcmp(xpe1->regexp, xpe->regexp))
- xpe1->match_state = ok;
- }
+ for (xpe1 = xpe; xpe1; xpe1 = xpe1->match_next)
+ xpe1->match_state = ok;
#endif
}
assert (ok == 0 || ok == 1);
if (n->root->u.root.absyn &&
(tl = xpath_termlist_by_tagpath(tag_path_full, n)))
{
+ zint max_seqno = 0;
for (; tl; tl = tl->next)
{
/* need to copy recword because it may be changed */
else
(*p->tokenAdd)(&wrd_tl);
}
+ if (wrd_tl.seqno > max_seqno)
+ max_seqno = wrd_tl.seqno;
}
+ if (max_seqno)
+ wrd->seqno = max_seqno;
+
}
/* xpath indexing is done, if there was no termlist given,
or no ! in the termlist, and default indexing is enabled... */