-int zebra_record_ext_read (void *fh, char *buf, size_t count)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- return read (fc->fd, buf, count);
-}
-
-off_t zebra_record_ext_seek (void *fh, off_t offset)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- return lseek (fc->fd, offset + fc->record_offset, SEEK_SET);
-}
-
-off_t zebra_record_ext_tell (void *fh)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- return lseek (fc->fd, 0, SEEK_CUR) - fc->record_offset;
-}
-
-off_t zebra_record_int_seek (void *fh, off_t offset)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- return (off_t) (fc->record_int_pos = offset);
-}
-
-off_t zebra_record_int_tell (void *fh)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- return (off_t) fc->record_int_pos;
-}
-
-int zebra_record_int_read (void *fh, char *buf, size_t count)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- int l = fc->record_int_len - fc->record_int_pos;
- if (l <= 0)
- return 0;
- l = (l < (int) count) ? l : (int) count;
- memcpy (buf, fc->record_int_buf + fc->record_int_pos, l);
- fc->record_int_pos += l;
- return l;
-}
-
-void zebra_record_int_end (void *fh, off_t off)
-{
- struct zebra_fetch_control *fc = (struct zebra_fetch_control *) fh;
- fc->offset_end = off;
-}
-