diff options
author | Not Zed <NotZed@Ximian.com> | 2002-11-20 15:09:53 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-11-20 15:09:53 +0800 |
commit | f299a6984a5103269108e2873803d323958d62eb (patch) | |
tree | da41aa73b4565d6506a7aa3e0dbc0606923fe1d2 /libibex/dumpindex.c | |
parent | a4b66d598ea37ef110239d075e695bd725c086d3 (diff) | |
download | gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.tar gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.tar.gz gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.tar.bz2 gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.tar.lz gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.tar.xz gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.tar.zst gsoc2013-evolution-f299a6984a5103269108e2873803d323958d62eb.zip |
cvs removed it all. Not much use having it around anymore.
2002-11-20 Not Zed <NotZed@Ximian.com>
* libibex/*: cvs removed it all. Not much use having it around
anymore.
svn path=/trunk/; revision=18854
Diffstat (limited to 'libibex/dumpindex.c')
-rw-r--r-- | libibex/dumpindex.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/libibex/dumpindex.c b/libibex/dumpindex.c deleted file mode 100644 index 5f8cacd603..0000000000 --- a/libibex/dumpindex.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - Dump the hash tables from an ibex file. - */ - -#include <stdio.h> -#include <stdlib.h> - -#include "ibex_internal.h" - -extern void ibex_hash_dump(struct _IBEXIndex *index); - -static void -index_iterate(struct _IBEXIndex *index) -{ - struct _IBEXCursor *idc; - int len; - char *key; - int total = 0, totallen = 0; - - idc = index->klass->get_cursor(index); - key = idc->klass->next_key(idc, &len); - while (len) { - total++; - totallen += len; - printf("%s\n", key); - g_free(key); - key = idc->klass->next_key(idc, &len); - } - g_free(key); - - idc->klass->close(idc); - - printf("Iterate Totals: %d items, total bytes %d\n", total, totallen); -} - -int main(int argc, char **argv) -{ - ibex *ib; - -#ifdef ENABLE_THREADS - g_thread_init(0); -#endif - - if (argc != 2) { - printf("Usage: %s ibexfile\n", argv[0]); - return 1; - } - ib = ibex_open(argv[1], O_RDONLY, 0); - if (ib == NULL) { - perror("Opening ibex file\n"); - return 1; - } - - /* force real-open of the ibex internals */ - ibex_contains_name(ib, "dummy"); - - ibex_hash_dump(ib->words->wordindex); - ibex_hash_dump(ib->words->nameindex); - - index_iterate(ib->words->wordindex); - index_iterate(ib->words->nameindex); - - ibex_close(ib); - - return 0; -} |