X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Frectext.c;h=3a06fc39cb7234ce4177ebf23cd3274fdf787cc7;hp=e07aa2eb5ae046760f6660687eb2642b6e12cfce;hb=c33ea56e3771c3b80ba66ef8fda3a09cad171ebb;hpb=7415d28c149c1bab51fe93aeaccdd14085b69bd9 diff --git a/index/rectext.c b/index/rectext.c index e07aa2e..3a06fc3 100644 --- a/index/rectext.c +++ b/index/rectext.c @@ -1,5 +1,5 @@ -/* $Id: rectext.c,v 1.1 2006-07-03 14:27:09 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: rectext.c,v 1.3 2006-08-22 13:39:27 adam Exp $ + Copyright (C) 1995-2006 Index Data ApS This file is part of the Zebra server. @@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ @@ -80,7 +80,7 @@ static int buf_getchar (struct filter_info *tinfo, struct buf_info *fi, char *ds { if (fi->max <= 0) return 0; - fi->max = (*fi->p->readf)(fi->p->fh, fi->buf, 4096); + fi->max = fi->p->stream->readf(fi->p->stream, fi->buf, 4096); fi->offset = 0; if (fi->max <= 0) return 0; @@ -88,8 +88,9 @@ static int buf_getchar (struct filter_info *tinfo, struct buf_info *fi, char *ds *dst = fi->buf[(fi->offset)++]; if (tinfo->sep && *dst == *tinfo->sep) { - off_t off = (*fi->p->tellf)(fi->p->fh); - (*fi->p->endf)(fi->p->fh, off - (fi->max - fi->offset)); + off_t off = fi->p->stream->tellf(fi->p->stream); + off_t end_offset = off - (fi->max - fi->offset); + fi->p->stream->endf(fi->p->stream, &end_offset); return 0; } return 1; @@ -202,7 +203,7 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) } if (!make_body) break; - r = (*p->readf)(p->fh, filter_buf + filter_ptr, 4096); + r = p->stream->readf(p->stream, filter_buf + filter_ptr, 4096); if (r <= 0) break; filter_ptr += r;