+/* 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 rstemp_create(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, const char *temp_path, TERMID term);
+
+RSET rsnull_create(NMEM nmem, struct rset_key_control *kcontrol, TERMID term);
+
+RSET rsbool_create_and(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, RSET rset_l, RSET rset_r);
+
+RSET rsbool_create_or(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, RSET rset_l, RSET rset_r);
+
+RSET rsbool_create_not(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, RSET rset_l, RSET rset_r);
+
+RSET rsbetween_create(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, RSET rset_l, RSET rset_m, RSET rset_r,
+ RSET rset_attr);
+
+RSET rsmulti_or_create(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, TERMID termid, int no_rsets, RSET* rsets);
+
+RSET rsmulti_and_create(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, int no_rsets, RSET* rsets);
+
+RSET rsprox_create(NMEM nmem, struct rset_key_control *kcontrol,
+ int scope, int rset_no, RSET *rset,
+ int ordered, int exclusion, int relation, int distance);