+ (rs->count)++;
+ return rs;
+}
+
+void rset_default_pos (RSFD rfd, double *current, double *total)
+{ /* This should never really be needed, but it is still used in */
+ /* those rsets that we don't really plan to use, like isam-s */
+ assert(rfd);
+ assert(current);
+ assert(total);
+ *current=-1; /* signal that pos is not implemented */
+ *total=-1;
+} /* rset_default_pos */
+
+int rset_default_forward(RSET ct, RSFD rfd, void *buf, int *term_index,
+ int (*cmpfunc)(const void *p1, const void *p2),
+ const void *untilbuf)
+{
+ int more=1;
+ int cmp=2;
+ logf (LOG_DEBUG, "rset_default_forward starting '%s' (ct=%p rfd=%p)",
+ ct->control->desc, ct,rfd);
+ key_logdump(LOG_DEBUG, untilbuf);
+ while ( (cmp==2) && (more))
+ {
+ logf (LOG_DEBUG, "rset_default_forward looping m=%d c=%d",more,cmp);
+ more=rset_read(ct, rfd, buf, term_index);
+ if (more)
+ cmp=(*cmpfunc)(untilbuf,buf);
+ if (more)
+ key_logdump(LOG_DEBUG,buf);
+ }
+ logf (LOG_DEBUG, "rset_default_forward exiting m=%d c=%d",more,cmp);