2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1995-09-06 13:27:15 adam
8 * New set type: bool. Not finished yet.
16 static rset_control *r_create(const struct rset_control *sel, void *parms);
17 static int r_open (rset_control *ct, int wflag);
18 static void r_close (rset_control *ct);
19 static void r_delete (rset_control *ct);
20 static void r_rewind (rset_control *ct);
21 static int r_count (rset_control *ct);
22 static int r_read (rset_control *ct, void *buf);
23 static int r_write (rset_control *ct, const void *buf);
25 static const rset_control control =
39 const rset_control *rset_kind_bool = &control;
41 struct rset_bool_info {
46 static rset_control *r_create(const struct rset_control *sel, void *parms)
49 rset_bool_parms *bool_parms = parms;
50 struct rset_bool_info *info;
52 logf (LOG_DEBUG, "rsbool_create(%s)", sel->desc);
53 newct = xmalloc(sizeof(*newct));
54 memcpy(newct, sel, sizeof(*sel));
55 newct->buf = xmalloc (sizeof(struct rset_bool_info));
56 info = (struct rset_bool_info*) newct->buf;
57 info->key_size = bool_parms->key_size;
58 info->op = bool_parms->op;
62 static int r_open(rset_control *ct, int wflag)
66 logf (LOG_FATAL, "bool set type is read-only");
72 static void r_close(rset_control *ct)
77 static void r_delete(rset_control *ct)
82 static void r_rewind(rset_control *ct)
84 logf (LOG_DEBUG, "rsbool_rewind");
87 static int r_count (rset_control *ct)
92 static int r_read (rset_control *ct, void *buf)
97 static int r_write (rset_control *ct, const void *buf)
99 logf (LOG_FATAL, "bool set type is read-only");