2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.4 1995-09-04 09:10:55 adam
10 * Revision 1.3 1994/11/22 13:15:37 quinn
13 * Revision 1.2 1994/11/04 14:53:12 quinn
18 /* TODO: Memory management
19 LINK DELETE TO CLOSE! */
24 static rset_control *r_create(const struct rset_control *sel, void *parms);
25 static int r_open(rset_control *ct, int wflag);
26 static void r_close(rset_control *ct);
27 static void r_delete(rset_control *ct);
28 static void r_rewind(rset_control *ct);
29 static int r_count(rset_control *ct);
33 static const rset_control control =
47 const rset_control *rset_kind_isam = &control;
49 static rset_control *r_create(const struct rset_control *sel, void *parms)
52 rset_isam_parms *pt = parms;
54 log(LOG_DEBUG, "risam_create(%s)", sel->desc);
55 newct = xmalloc(sizeof(*newct));
56 memcpy(newct, sel, sizeof(*sel));
57 if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
62 static int r_open(rset_control *ct, int wflag)
64 log(LOG_DEBUG, "risam_open");
67 log(LOG_FATAL, "ISAM set type is read-only");
74 static void r_close(rset_control *ct)
79 static void r_delete(rset_control *ct)
81 log(LOG_DEBUG, "risam_delete");
82 is_pt_free((ISPT) ct->buf);
86 static void r_rewind(rset_control *ct)
88 log(LOG_DEBUG, "risam_rewind");
89 is_rewind((ISPT) ct->buf);
92 static int r_count(rset_control *ct)
95 static int r_read(rset_control *ct, void *buf)
97 return is_readkey((ISPT) ct->buf, buf);
102 log(LOG_FATAL, "ISAM set type is read-only");