X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=rset%2Frsprox.c;h=896854e8f48fa3dbd5253ebf362d8db87f3306cc;hb=38b8c213f9be6890ddba9d5564dc978c2ae2bc3d;hp=ec91aa93fef0815b78deeab9d7e907043c8e8649;hpb=89d3a004b7c651fd5673abfc192e1472dc4d4197;p=idzebra-moved-to-github.git diff --git a/rset/rsprox.c b/rset/rsprox.c index ec91aa9..896854e 100644 --- a/rset/rsprox.c +++ b/rset/rsprox.c @@ -1,8 +1,5 @@ -/* $Id: rsprox.c,v 1.33 2007-01-15 15:10:19 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1994-2009 Index Data 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 @@ -224,11 +221,14 @@ static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) seqno[n++] = (*kctrl->getseq)(p->buf[0]); while ((p->more[0] = rset_read (p->rfd[0], - p->buf[0], &p->terms[0])) >= -1 && - p->more[0] <= -1) + p->buf[0], &p->terms[0]))) + { + cmp = (*kctrl->cmp)(p->buf[0], p->buf[1]); + if (cmp <= - rfd->rset->scope || cmp >= rfd->rset->scope) + break; if (n < 500) seqno[n++] = (*kctrl->getseq)(p->buf[0]); - + } for (i = 0; igetseq)(p->buf[1]) - seqno[i]; @@ -336,6 +336,7 @@ static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab