2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-09-04 12:33:56 adam
8 * Various cleanup. YAZ util used instead.
10 * Revision 1.4 1995/09/04 09:10:55 adam
13 * Revision 1.3 1994/11/22 13:15:37 quinn
16 * Revision 1.2 1994/11/04 14:53:12 quinn
21 /* TODO: Memory management
22 LINK DELETE TO CLOSE! */
28 static rset_control *r_create(const struct rset_control *sel, void *parms);
29 static int r_open(rset_control *ct, int wflag);
30 static void r_close(rset_control *ct);
31 static void r_delete(rset_control *ct);
32 static void r_rewind(rset_control *ct);
33 static int r_count(rset_control *ct);
37 static const rset_control control =
51 const rset_control *rset_kind_isam = &control;
53 static rset_control *r_create(const struct rset_control *sel, void *parms)
56 rset_isam_parms *pt = parms;
58 logf (LOG_DEBUG, "risam_create(%s)", sel->desc);
59 newct = xmalloc(sizeof(*newct));
60 memcpy(newct, sel, sizeof(*sel));
61 if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
66 static int r_open(rset_control *ct, int wflag)
68 logf (LOG_DEBUG, "risam_open");
71 logf (LOG_FATAL, "ISAM set type is read-only");
78 static void r_close(rset_control *ct)
83 static void r_delete(rset_control *ct)
85 logf (LOG_DEBUG, "risam_delete");
86 is_pt_free((ISPT) ct->buf);
90 static void r_rewind(rset_control *ct)
92 logf (LOG_DEBUG, "risam_rewind");
93 is_rewind((ISPT) ct->buf);
96 static int r_count(rset_control *ct)
99 static int r_read(rset_control *ct, void *buf)
101 return is_readkey((ISPT) ct->buf, buf);
106 logf (LOG_FATAL, "ISAM set type is read-only");