2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-09-04 15:20:13 adam
8 * More work on temp sets. is_open member removed.
10 * Revision 1.4 1995/09/04 09:09:52 adam
11 * String arg in dict lookup is const.
14 * Revision 1.3 1994/11/22 13:15:27 quinn
17 * Revision 1.2 1994/11/04 13:21:21 quinn
20 * Revision 1.1 1994/11/03 14:13:22 quinn
21 * Result set manipulation
30 typedef struct rset_control
32 char *desc; /* text description of set type (for debugging) */
33 void *buf; /* state data stored by subsystem */
34 struct rset_control *(*f_create)(const struct rset_control *sel, void *parms);
35 int (*f_open)(struct rset_control *ct, int wflag);
36 void (*f_close)(struct rset_control *ct);
37 void (*f_delete)(struct rset_control *ct);
38 void (*f_rewind)(struct rset_control *ct);
39 int (*f_count)(struct rset_control *ct);
40 int (*f_read)(struct rset_control *ct, void *buf);
41 int (*f_write)(struct rset_control *ct, const void *buf);
46 rset_control *control;
49 RSET rset_create(const rset_control *sel, void *parms); /* parameters? */
51 /* int rset_open(RSET rs, int wflag); */
52 #define rset_open(rs, wflag) ((*(rs)->control->f_open)((rs)->control, (wflag)))
54 /* void rset_close(RSET rs); */
55 #define rset_close(rs) ((*(rs)->control->f_close)((rs)->control))
57 void rset_delete(RSET rs);
59 /* void rset_rewind(RSET rs); */
60 #define rset_rewind(rs, wflag) ((*(rs)->control->f_rewind)((rs)->control))
62 /* int rset_count(RSET rs); */
63 #define rset_count(rs, wflag) ((*(rs)->control->f_count)((rs)->control))
65 /* int rset_read(RSET rs, void *buf); */
66 #define rset_read(rs, buf) ((*(rs)->control->f_read)((rs)->control, (buf)))
68 /* int rset_write(RSET rs, const void *buf); */
69 #define rset_write(rs, buf) ((*(rs)->control->f_write)((rs)->control, (buf)))