+RSET rset_dup (RSET rs);
+void rset_close(RSFD rfd);
+
+#define RSETF_READ 0
+#define RSETF_WRITE 1
+/* RSFD rset_open(RSET rs, int wflag); */
+#define rset_open(rs, wflag) (*(rs)->control->f_open)((rs), (wflag))
+
+/* int rset_forward(RSFD rfd, void *buf, TERMID term, void *untilbuf); */
+#define rset_forward(rfd, buf, term, untilbuf) \
+ rset_default_forward((rfd), (buf), (term), (untilbuf))
+
+/* void rset_getterms(RSET ct, TERMID *terms, int maxterms, int *curterm); */
+#define rset_getterms(ct, terms, maxterms, curterm) \
+ (*(ct)->control->f_getterms)((ct),(terms),(maxterms),(curterm))
+
+/* int rset_pos(RSFD fd, double *current, double *total); */
+#define rset_pos(rfd,cur,tot) \
+ (*(rfd)->rset->control->f_pos)((rfd),(cur),(tot))
+
+/* int rset_read(RSFD rfd, void *buf, TERMID term); */
+#define rset_read(rfd, buf, term) rset_default_read((rfd), (buf), (term))
+
+/* int rset_write(RSFD rfd, const void *buf); */
+#define rset_write(rfd, buf) (*(rfd)->rset->control->f_write)((rfd), (buf))
+
+/* int rset_type (RSET) */
+#define rset_type(rs) ((rs)->control->desc)
+
+/** rset_count counts or estimates the keys in it*/
+zint rset_count(RSET rs);
+
+RSET rset_create_temp(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, const char *temp_path, TERMID term);