aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/dumpindex.c
diff options
context:
space:
mode:
authornobody <nobody@localhost>2002-02-11 05:10:16 +0800
committernobody <nobody@localhost>2002-02-11 05:10:16 +0800
commitebc060675ed62aab2a7c94ce59875d42a6146ed0 (patch)
tree2c681b46c6ec4a4ab7326e55b588d9758e0dd363 /libibex/dumpindex.c
parentcfc4826ef837954667ec18d9df72786e73ff1e25 (diff)
downloadgsoc2013-evolution-ebc060675ed62aab2a7c94ce59875d42a6146ed0.tar.gz
gsoc2013-evolution-ebc060675ed62aab2a7c94ce59875d42a6146ed0.tar.zst
gsoc2013-evolution-ebc060675ed62aab2a7c94ce59875d42a6146ed0.zip
This commit was manufactured by cvs2svn to create tagGNOME_APPLETS_1_93_0
'GNOME_APPLETS_1_93_0'. svn path=/tags/GNOME_APPLETS_1_93_0/; revision=15655
Diffstat (limited to 'libibex/dumpindex.c')
-rw-r--r--libibex/dumpindex.c66
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;
-}
leted in last updatelwhsu2011-10-181-0/+14 * - Update to 1.3.6lwhsu2011-10-164-38/+20 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-1/+0 * Reset maintainerbapt2011-06-121-2/+1 * - Get Rid MD5 supportmiwi2011-03-191-1/+0 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-2/+2 * - Remove duplicates from MAKE_ENV after inclusion of CC and CXX in default MA...pav2008-07-251-2/+1 * - Remove USE_GETOPT_LONG which is a no-op since March 2007pav2008-03-201-1/+0 * Migration from bison 1.x to 2.xade2007-10-171-1/+2 * Remove USE_REINPLACE from categories starting with Wedwin2006-05-131-1/+0 * SHA256ify[1]edwin2006-02-021-1/+2 * - Update to 1.1pav2004-11-054-42/+19 * Update maintainer's e-mail address.osa2004-07-071-1/+1 * Attempt to fix build for sparc64.osa2004-07-062-10/+23 * Fix MAINTAINER e-mail address.osa2004-07-051-2/+2 * Reset maintainer:kris2004-07-041-2/+8 * Fix build under 4.x by use USE_GETOPT_LONG.osa2004-07-011-2/+5