From cd80a154748ec052ec9d8bd0d596bbcd16641ad5 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 9 Jan 2013 20:49:43 +0100 Subject: [PATCH] Delete liblmdb/mfree. It has moved into mdb_stat. --- libraries/liblmdb/Makefile | 1 - libraries/liblmdb/mfree.c | 56 -------------------------------------- 2 files changed, 57 deletions(-) delete mode 100644 libraries/liblmdb/mfree.c diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile index 5019217..c33d4d4 100644 --- a/libraries/liblmdb/Makefile +++ b/libraries/liblmdb/Makefile @@ -38,7 +38,6 @@ mtest3: mtest3.o liblmdb.a mtest4: mtest4.o liblmdb.a mtest5: mtest5.o liblmdb.a mtest6: mtest6.o liblmdb.a -mfree: mfree.o liblmdb.a mdb.o: mdb.c lmdb.h midl.h $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c diff --git a/libraries/liblmdb/mfree.c b/libraries/liblmdb/mfree.c deleted file mode 100644 index 79cce66..0000000 --- a/libraries/liblmdb/mfree.c +++ /dev/null @@ -1,56 +0,0 @@ -/* mfree.c - memory-mapped database freelist scanner */ -/* - * Copyright 2011 Howard Chu, Symas Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted only as authorized by the OpenLDAP - * Public License. - * - * A copy of this license is available in the file LICENSE in the - * top-level directory of the distribution or, alternatively, at - * . - */ -#define _XOPEN_SOURCE 500 /* srandom(), random() */ -#include -#include -#include -#include "lmdb.h" -#include "midl.h" - -int main(int argc,char * argv[]) -{ - int rc; - MDB_env *env; - MDB_dbi dbi; - MDB_val key, data; - MDB_txn *txn; - MDB_stat mst; - MDB_cursor *cursor; - MDB_ID i, j, *iptr; - - if (argc != 2) { - fprintf(stderr, "usage: %s \n", argv[0]); - exit(1); - } - - rc = mdb_env_create(&env); - rc = mdb_env_open(env, argv[1], MDB_RDONLY, 0664); - rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); - dbi = 0; - rc = mdb_cursor_open(txn, dbi, &cursor); - while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) { - printf("key: %p %zu, data: %p\n", - key.mv_data, *(MDB_ID *) key.mv_data, - data.mv_data); - iptr = data.mv_data; - j = *iptr++; - for (i=0; i