/*
- * Sherlock Library -- SDBM emulator at top of GDBM
+ * UCW Library -- SDBM emulator at top of GDBM
*
- * (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ * (c) 1999 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
*/
+#include "lib/lib.h"
+#include "lib/db.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "lib.h"
-#include "db.h"
-
#include <gdbm.h>
struct sdbm {
{
sdbm_rewind(d);
gdbm_close(d->db);
- free(d);
+ xfree(d);
}
static int
if (!V.dptr)
return 0;
rc = sdbm_put_user(V.dptr, V.dsize, val, vallen);
- free(V.dptr);
+ xfree(V.dptr);
return rc ? SDBM_ERROR_TOO_LARGE : 1;
}
{
if (d->prevkey.dptr)
{
- free(d->prevkey.dptr);
+ xfree(d->prevkey.dptr);
d->prevkey.dptr = NULL;
}
}
if (d->prevkey.dptr)
{
K = gdbm_nextkey(d->db, d->prevkey);
- free(d->prevkey.dptr);
+ xfree(d->prevkey.dptr);
}
else
K = gdbm_firstkey(d->db);