2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.3 1994-11-22 13:15:37 quinn
10 * Revision 1.2 1994/11/04 14:53:12 quinn
15 /* TODO: Memory management
16 LINK DELETE TO CLOSE! */
21 rset_control *r_create(const struct rset_control *sel, void *parms);
22 static int r_open(rset_control *ct, int wflag);
23 static void r_close(rset_control *ct);
24 static void r_delete(rset_control *ct);
25 static void r_rewind(rset_control *ct);
26 static int r_count(rset_control *ct);
30 static const rset_control control =
44 const rset_control *rset_kind_isam = &control;
46 rset_control *r_create(const struct rset_control *sel, void *parms)
49 rset_isam_parms *pt = parms;
51 log(LOG_DEBUG, "risam_create(%s)", sel->desc);
52 newct = xmalloc(sizeof(*newct));
53 memcpy(newct, sel, sizeof(*sel));
54 if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
59 static int r_open(rset_control *ct, int wflag)
61 log(LOG_DEBUG, "risam_open");
64 log(LOG_FATAL, "ISAM set type is read-only");
71 static void r_close(rset_control *ct)
76 static void r_delete(rset_control *ct)
78 log(LOG_DEBUG, "risam_delete");
79 is_pt_free((ISPT) ct->buf);
83 static void r_rewind(rset_control *ct)
85 log(LOG_DEBUG, "risam_rewind");
86 is_rewind((ISPT) ct->buf);
89 static int r_count(rset_control *ct)
92 static int r_read(rset_control *ct, void *buf)
94 return is_readkey((ISPT) ct->buf, buf);
99 log(LOG_FATAL, "ISAM set type is read-only");