- case 1: /* < */
- if (diff < info->distance && diff >= 0)
- excl = !excl;
- break;
- case 2: /* <= */
- if (diff <= info->distance && diff >= 0)
- excl = !excl;
- break;
- case 3: /* == */
- if (diff == info->distance && diff >= 0)
- excl = !excl;
- break;
- case 4: /* >= */
- if (diff >= info->distance && diff >= 0)
- excl = !excl;
- break;
- case 5: /* > */
- if (diff > info->distance && diff >= 0)
- excl = !excl;
+ zint diff = (*kctrl->getseq)(p->buf[1]) - seqno[i];
+ int excl = info->exclusion;
+ if (!info->ordered && diff < 0)
+ diff = -diff;
+ switch (info->relation)
+ {
+ case 1: /* < */
+ if (diff < info->distance && diff >= 0)
+ excl = !excl;
+ break;
+ case 2: /* <= */
+ if (diff <= info->distance && diff >= 0)
+ excl = !excl;
+ break;
+ case 3: /* == */
+ if (diff == info->distance && diff >= 0)
+ excl = !excl;
+ break;
+ case 4: /* >= */
+ if (diff >= info->distance && diff >= 0)
+ excl = !excl;
+ break;
+ case 5: /* > */
+ if (diff > info->distance && diff >= 0)
+ excl = !excl;
+ break;
+ case 6: /* != */
+ if (diff != info->distance && diff >= 0)
+ excl = !excl;
+ break;
+ }
+ if (excl)
+ {
+ p->more[1] = rset_read( p->rfd[1], p->buf[1],
+ &p->terms[1]);
+ p->hits++;
+ return 1;
+ }
+ }
+ p->more[1] = rset_read(p->rfd[1], p->buf[1], &p->terms[1]);
+ if (!p->more[1])