+
+
+static int r_forward_between(RSET ct, RSFD rfd, void *buf, int *term_index,
+ int (*cmpfunc)(const void *p1, const void *p2),
+ const void *untilbuf)
+{
+ struct rset_between_info *info = ((struct rset_between_rfd*)rfd)->info;
+ struct rset_between_rfd *p = (struct rset_between_rfd *) rfd;
+ int rc;
+ log2( p, "fwd: before forward", 0,0);
+ /* It is enough to forward the m pointer here, the read will */
+ /* naturally forward the l, m, and attr pointers */
+ if (p->more_m)
+ p->more_m=rset_forward(info->rset_m,p->rfd_m, p->buf_m,
+ &p->term_index_m, info->cmp,untilbuf);
+ log2( p, "fwd: after forward M", 0,0);
+ rc = r_read_between(rfd, buf, term_index);
+ log2( p, "fwd: after forward", 0,0);
+ return rc;
+}
+