- void *buf; /* state data stored by subsystem */
- struct rset_control *(*f_create)(const struct rset_control *sel, void *parms);
- int (*f_open)(struct rset_control *ct, int wflag);
- void (*f_close)(struct rset_control *ct);
- void (*f_delete)(struct rset_control *ct);
- void (*f_rewind)(struct rset_control *ct);
- int (*f_count)(struct rset_control *ct);
- int (*f_read)(struct rset_control *ct, void *buf);
- int (*f_write)(struct rset_control *ct, const void *buf);
-} rset_control;
+ void *(*f_create)(RSET ct, const struct rset_control *sel, void *parms);
+ RSFD (*f_open)(RSET ct, int wflag);
+ void (*f_close)(RSFD rfd);
+ void (*f_delete)(RSET ct);
+ void (*f_rewind)(RSFD rfd);
+ int (*f_forward)(RSET ct, RSFD rfd, void *buf,
+ int (*cmpfunc)(const void *p1, const void *p2),
+ const void *untilbuf);
+ void (*f_pos)(RSFD rfd, double *current, double *total);
+ /* returns -1,-1 if pos function not implemented for this type */
+ int (*f_read)(RSFD rfd, void *buf);
+ int (*f_write)(RSFD rfd, const void *buf);
+};
+
+int rset_default_forward(RSET ct, RSFD rfd, void *buf,
+ int (*cmpfunc)(const void *p1, const void *p2),
+ const void *untilbuf);
+void rset_default_pos(RSFD rfd, double *current, double *total);
+
+/*
+struct rset_term {
+ char *name;
+ zint nn;
+ char *flags;
+ zint count;
+ int type;
+};
+*/