Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- wrd->term_buf += start;
- wrd->term_len -= start;
- if (wrd->term_len > len)
- wrd->term_len = len;
+ if (start >= wrd->term_len)
+ wrd->term_len = 0;
+ else
+ {
+ wrd->term_len -= start;
+ wrd->term_buf += start;
+
+ if (wrd->term_len > len)
+ wrd->term_len = len;
+ }
memcpy(&wrd_tl, wrd, sizeof(*wrd));
if (tl->source)
sp_parse(sp, n, &wrd_tl, tl->source);
memcpy(&wrd_tl, wrd, sizeof(*wrd));
if (tl->source)
sp_parse(sp, n, &wrd_tl, tl->source);
struct recExtractCtrl *p, int level, RecWord *wrd)
{
data1_termlist *tlist = 0;
struct recExtractCtrl *p, int level, RecWord *wrd)
{
data1_termlist *tlist = 0;
/*
* cycle up towards the root until we find a tag with an att..
* this has the effect of indexing locally defined tags with
/*
* cycle up towards the root until we find a tag with an att..
* this has the effect of indexing locally defined tags with