2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.8 1995-09-06 16:11:56 adam
8 * More work on boolean sets.
10 * Revision 1.7 1995/09/06 10:35:44 adam
11 * Null set implemented.
13 * Revision 1.6 1995/09/05 11:43:24 adam
14 * Complete version of temporary sets. Not tested yet though.
16 * Revision 1.5 1995/09/04 12:33:56 adam
17 * Various cleanup. YAZ util used instead.
19 * Revision 1.4 1995/09/04 09:10:55 adam
22 * Revision 1.3 1994/11/22 13:15:37 quinn
25 * Revision 1.2 1994/11/04 14:53:12 quinn
34 static rset_control *r_create(const struct rset_control *sel, void *parms);
35 static int r_open (rset_control *ct, int wflag);
36 static void r_close (rset_control *ct);
37 static void r_delete (rset_control *ct);
38 static void r_rewind (rset_control *ct);
39 static int r_count (rset_control *ct);
40 static int r_read (rset_control *ct, void *buf);
41 static int r_write (rset_control *ct, const void *buf);
43 static const rset_control control =
57 const rset_control *rset_kind_isam = &control;
59 static rset_control *r_create(const struct rset_control *sel, void *parms)
62 rset_isam_parms *pt = parms;
64 logf (LOG_DEBUG, "rsisam_create(%s)", sel->desc);
65 newct = xmalloc(sizeof(*newct));
66 memcpy(newct, sel, sizeof(*sel));
67 if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
72 static int r_open(rset_control *ct, int wflag)
74 logf (LOG_DEBUG, "risam_open");
77 logf (LOG_FATAL, "ISAM set type is read-only");
84 static void r_close(rset_control *ct)
89 static void r_delete(rset_control *ct)
91 logf (LOG_DEBUG, "rsisam_delete");
92 is_pt_free((ISPT) ct->buf);
96 static void r_rewind(rset_control *ct)
98 logf (LOG_DEBUG, "rsisam_rewind");
99 is_rewind((ISPT) ct->buf);
102 static int r_count (rset_control *ct)
107 static int r_read (rset_control *ct, void *buf)
109 return is_readkey((ISPT) ct->buf, buf);
112 static int r_write (rset_control *ct, const void *buf)
114 logf (LOG_FATAL, "ISAM set type is read-only");