+{ /* while heap head behind untilbuf, forward it and rebalance heap */
+ struct rset_multiandor_rfd *p=rfd->priv;
+ const struct key_control *kctrl=rfd->rset->keycontrol;
+ if (heap_empty(p->h))
+ return 0;
+ while ( (*kctrl->cmp)(p->h->heap[1]->buf,untilbuf) < -rfd->rset->scope )
+ {
+ if ( rset_forward(p->h->heap[1]->fd, p->h->heap[1]->buf, untilbuf) )
+ heap_balance(p->h);
+ else
+ {
+ heap_delete(p->h);
+ if (heap_empty(p->h))
+ return 0;
+ }
+
+ }
+ return r_read_or(rfd,buf);
+}
+
+
+static int r_read_or (RSFD rfd, void *buf)