- char buf_l[32];
- char buf_m[32];
- char buf_r[32];
- logf(LOG_DEBUG,"btw: %s l=%s(%d/%d) m=%s(%d) r=%s(%d/%d), lev=%d",
- msg,
- (*p->info->printer)(p->buf_l, buf_l), p->more_l, cmp_l,
- (*p->info->printer)(p->buf_m, buf_m), p->more_m,
- (*p->info->printer)(p->buf_r, buf_r), p->more_r, cmp_r,
- p->level);
+ struct rset_between_info *info = ((struct rset_between_rfd*)rfd)->info;
+ struct rset_between_rfd *p = (struct rset_between_rfd *) rfd;
+ int rc;
+#if RSBETWEEN_DEBUG
+ log2( p, "fwd: before forward", 0,0);
+#endif
+ /* 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);
+#if RSBETWEEN_DEBUG
+ log2( p, "fwd: after forward M", 0,0);
+#endif
+ rc = r_read_between(rfd, buf, term_index);
+#if RSBETWEEN_DEBUG
+ log2( p, "fwd: after forward", 0,0);
+#endif
+ return rc;