- heap_delete (ti);
- if (isc_pp_read (((struct rset_mor_rfd *) rfd)->ispt[n], ti->tmpbuf))
- heap_insert (ti, ti->tmpbuf, n);
- else
+ if (((struct rset_mor_rfd *) rfd)->position)
+ {
+ if (isc_pp_read (((struct rset_mor_rfd *) rfd)->ispt[n], ti->tmpbuf))
+ {
+ heap_delete (ti);
+ if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > 1)
+ ((struct rset_mor_rfd *) rfd)->position--;
+ heap_insert (ti, ti->tmpbuf, n);
+ }
+ else
+ heap_delete (ti);
+ return 1;
+ }
+ while (1)