2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.7 1995-09-06 10:35:44 adam
8 * Null set implemented.
10 * Revision 1.6 1995/09/05 11:43:24 adam
11 * Complete version of temporary sets. Not tested yet though.
13 * Revision 1.5 1995/09/04 12:33:56 adam
14 * Various cleanup. YAZ util used instead.
16 * Revision 1.4 1995/09/04 09:10:55 adam
19 * Revision 1.3 1994/11/22 13:15:37 quinn
22 * Revision 1.2 1994/11/04 14:53:12 quinn
31 static rset_control *r_create(const struct rset_control *sel, void *parms);
32 static int r_open (rset_control *ct, int wflag);
33 static void r_close (rset_control *ct);
34 static void r_delete (rset_control *ct);
35 static void r_rewind (rset_control *ct);
36 static int r_count (rset_control *ct);
37 static int r_read (rset_control *ct, void *buf);
38 static int r_write (rset_control *ct, const void *buf);
40 static const rset_control control =
54 const rset_control *rset_kind_isam = &control;
56 static rset_control *r_create(const struct rset_control *sel, void *parms)
59 rset_isam_parms *pt = parms;
61 logf (LOG_DEBUG, "rsisam_create(%s)", sel->desc);
62 newct = xmalloc(sizeof(*newct));
63 memcpy(newct, sel, sizeof(*sel));
64 if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
69 static int r_open(rset_control *ct, int wflag)
71 logf (LOG_DEBUG, "risam_open");
74 logf (LOG_FATAL, "ISAM set type is read-only");
81 static void r_close(rset_control *ct)
86 static void r_delete(rset_control *ct)
88 logf (LOG_DEBUG, "rsisam_delete");
89 is_pt_free((ISPT) ct->buf);
93 static void r_rewind(rset_control *ct)
95 logf (LOG_DEBUG, "rsisam_rewind");
96 is_rewind((ISPT) ct->buf);
99 static int r_count (rset_control *ct)
104 static int r_read (rset_control *ct, void *buf)
106 return is_readkey((ISPT) ct->buf, buf);
109 static int r_write (rset_control *ct, const void *buf)
111 logf (LOG_FATAL, "ISAM set type is read-only");