projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fix.
[idzebra-moved-to-github.git]
/
rset
/
rsisam.c
diff --git
a/rset/rsisam.c
b/rset/rsisam.c
index
56a432c
..
fe2acd9
100644
(file)
--- a/
rset/rsisam.c
+++ b/
rset/rsisam.c
@@
-4,12
+4,16
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: rsisam.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: rsisam.c,v $
- * Revision 1.1 1994-11-04 13:21:29 quinn
- * Working.
+ * Revision 1.3 1994-11-22 13:15:37 quinn
+ * Simple
+ *
+ * Revision 1.2 1994/11/04 14:53:12 quinn
+ * Work
*
*/
*
*/
-/* TODO: Memory management */
+/* TODO: Memory management
+ LINK DELETE TO CLOSE! */
#include <rsisam.h>
#include <util.h>
#include <rsisam.h>
#include <util.h>
@@
-44,7
+48,9
@@
rset_control *r_create(const struct rset_control *sel, void *parms)
rset_control *newct;
rset_isam_parms *pt = parms;
rset_control *newct;
rset_isam_parms *pt = parms;
+ log(LOG_DEBUG, "risam_create(%s)", sel->desc);
newct = xmalloc(sizeof(*newct));
newct = xmalloc(sizeof(*newct));
+ memcpy(newct, sel, sizeof(*sel));
if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
return 0;
return newct;
if (!(newct->buf = (char*) is_position(pt->is, pt->pos)))
return 0;
return newct;
@@
-52,6
+58,12
@@
rset_control *r_create(const struct rset_control *sel, void *parms)
static int r_open(rset_control *ct, int wflag)
{
static int r_open(rset_control *ct, int wflag)
{
+ log(LOG_DEBUG, "risam_open");
+ if (wflag)
+ {
+ log(LOG_FATAL, "ISAM set type is read-only");
+ return -1;
+ }
r_rewind(ct);
return 0;
}
r_rewind(ct);
return 0;
}
@@
-63,12
+75,14
@@
static void r_close(rset_control *ct)
static void r_delete(rset_control *ct)
{
static void r_delete(rset_control *ct)
{
+ log(LOG_DEBUG, "risam_delete");
is_pt_free((ISPT) ct->buf);
xfree(ct);
}
static void r_rewind(rset_control *ct)
{
is_pt_free((ISPT) ct->buf);
xfree(ct);
}
static void r_rewind(rset_control *ct)
{
+ log(LOG_DEBUG, "risam_rewind");
is_rewind((ISPT) ct->buf);
}
is_rewind((ISPT) ct->buf);
}
@@
-80,7
+94,7
@@
static int r_read(rset_control *ct, void *buf)
return is_readkey((ISPT) ct->buf, buf);
}
return is_readkey((ISPT) ct->buf, buf);
}
-static int r_write(rset_control *ct, const void *buf)
+static int r_write()
{
log(LOG_FATAL, "ISAM set type is read-only");
return -1;
{
log(LOG_FATAL, "ISAM set type is read-only");
return -1;