- struct rset_multior_rfd *mrfd = (struct rset_multior_rfd *) rfd;
- struct trunc_info *ti = mrfd->ti;
- int n = ti->indx[ti->ptr[1]];
-
- if (!ti->heapnum)
- return 0;
- *term_index = 0;
- memcpy (buf, ti->heap[ti->ptr[1]], ti->keysize);
- if (((struct rset_multior_rfd *) rfd)->position)
- {
- if (isc_pp_read (((struct rset_multior_rfd *) rfd)->ispt[n], ti->tmpbuf))
- {
- heap_delete (ti);
- if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > 1)
- ((struct rset_multior_rfd *) rfd)->position--;
- heap_insert (ti, ti->tmpbuf, n);
- }
- else
- heap_delete (ti);
- if (mrfd->countp && (
- *mrfd->countp == 0 || (*ti->cmp)(buf, mrfd->pbuf) > 1))
- {
- memcpy (mrfd->pbuf, buf, ti->keysize);
- (*mrfd->countp)++;
- }
- return 1;
- }
- while (1)
- {
- if (!isc_pp_read (((struct rset_multior_rfd *) rfd)->ispt[n], ti->tmpbuf))
- {
- heap_delete (ti);
- break;
- }
- if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > 1)
- {
- heap_delete (ti);
- heap_insert (ti, ti->tmpbuf, n);
- break;
- }
+ struct rset_multior_info *info=(struct rset_multior_info *)(rfd->rset->priv);
+ struct rset_multior_rfd *mrfd=(struct rset_multior_rfd *)(rfd->priv);
+ double cur, tot;
+ double scur=0.0, stot=0.0;
+ int i;
+ for (i=0; i<info->no_rsets; i++){
+ rset_pos(mrfd->items[i].fd, &cur, &tot);
+ logf(LOG_LOG, "r_pos: %d %0.1f %0.1f", i, cur,tot);
+ scur += cur;
+ stot += tot;