-/* $Id: rectext.c,v 1.1 2006-07-03 14:27:09 adam Exp $
- Copyright (C) 1995-2005
+/* $Id: rectext.c,v 1.4 2007-01-15 15:10:17 adam Exp $
+ Copyright (C) 1995-2007
Index Data ApS
This file is part of the Zebra server.
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
+
*/
{
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;
*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;
}
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;