X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Frecgrs.c;h=da1ad6058b0dc5f62445025fc24da13982447939;hb=6dfee19bc1cec29ff5ec5e9cd8021d1354a6126e;hp=5cf015b1a7a6450a1421413e90cd900ac804cf52;hpb=852c2d471176b3f597b6b2a328a3c6eba0965ad3;p=idzebra-moved-to-github.git diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index 5cf015b..da1ad60 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.105 2005-08-22 08:19:51 adam Exp $ +/* $Id: recgrs.c,v 1.108 2006-02-07 00:17:44 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -350,6 +350,7 @@ static int dfa_match_first(struct DFA_state **dfaar, const char *text) unsigned char c; for (c = *p++, t = s->trans, i = s->tran_no; --i >= 0; t++) + { if (c >= t->ch[0] && c <= t->ch[1]) { while (i >= 0) @@ -359,12 +360,15 @@ static int dfa_match_first(struct DFA_state **dfaar, const char *text) if (s->rule_no) return 1; /* next char */ + if (!c) + return 0; c = *p++; for (t = s->trans, i = s->tran_no; --i >= 0; t++) if (c >= t->ch[0] && c <= t->ch[1]) break; } } + } return 0; } @@ -813,7 +817,7 @@ static void index_xpath(struct source_parser *sp, data1_node *n, p, wrd); xpdone = 1; } else { - /* add attribute based index for the attribute */ + /* index attribute value (only path/@attr) */ if (xp->value) { #if NATTR