diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-11-28 21:05:01 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-11-28 21:05:01 +0800 |
commit | ce4905721c40da7acbdb02caa5d2e24476590e4b (patch) | |
tree | ccb1be553fffc570f6da2e8f89e12f293f9346d3 /libibex/wordindexmem.c | |
parent | 00890b71cf68d861e9ec72a459fa7e43464f4569 (diff) | |
download | gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.tar gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.tar.gz gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.tar.bz2 gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.tar.lz gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.tar.xz gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.tar.zst gsoc2013-evolution-ce4905721c40da7acbdb02caa5d2e24476590e4b.zip |
Turn off index stats by default.
2000-11-28 Not Zed <NotZed@HelixCode.com>
* index.h: Turn off index stats by default.
* ibex_block.c (ibex_save): And here.
(ibex_close): Debug out printfs.
* wordindexmem.c (ibex_create_word_index_mem): And here.
(num): Made buf static.
* block.c (ibex_block_cache_open): Debug out some printfs.
(ibex_block_read): And here.
svn path=/trunk/; revision=6691
Diffstat (limited to 'libibex/wordindexmem.c')
-rw-r--r-- | libibex/wordindexmem.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libibex/wordindexmem.c b/libibex/wordindexmem.c index 9d26bb3697..0959c2be21 100644 --- a/libibex/wordindexmem.c +++ b/libibex/wordindexmem.c @@ -146,20 +146,20 @@ ibex_create_word_index_mem(struct _memcache *bc, blockid_t *wordroot, blockid_t /* but not the same indexes! */ if (*wordroot) { - printf("opening wordindex root = %d\n", *wordroot); + d(printf("opening wordindex root = %d\n", *wordroot)); idx->wordindex = ibex_hash_class.open(bc, *wordroot); } else { idx->wordindex = ibex_hash_class.create(bc, 2048); *wordroot = idx->wordindex->root; - printf("creating wordindex root = %d\n", *wordroot); + d(printf("creating wordindex root = %d\n", *wordroot)); } if (*nameroot) { - printf("opening nameindex root = %d\n", *nameroot); + d(printf("opening nameindex root = %d\n", *nameroot)); idx->nameindex = ibex_hash_class.open(bc, *nameroot); } else { idx->nameindex = ibex_hash_class.create(bc, 2048); *nameroot = idx->nameindex->root; - printf("creating nameindex root = %d\n", *nameroot); + d(printf("creating nameindex root = %d\n", *nameroot)); } return idx; } @@ -198,7 +198,7 @@ static void word_index_pre(struct _IBEXWord *idx) return; /* want to load all words into the cache lookup table */ - printf("pre-loading all word info into memory\n"); + d(printf("pre-loading all word info into memory\n")); idc = idx->wordindex->klass->get_cursor(idx->wordindex); while ( (wordid = idc->klass->next(idc)) ) { key = idc->index->klass->get_key(idc->index, wordid, &len); @@ -220,7 +220,7 @@ static void word_index_pre(struct _IBEXWord *idx) idc->klass->close(idc); - printf("done\n"); + d(printf("done\n")); } static gboolean @@ -357,7 +357,7 @@ static gboolean contains_name(struct _IBEXWord *idx, const char *name) in the same list, not in buckets of keys for the same hash (among other reasons) */ if (!idx->nameinit) { - printf("pre-loading all name info into memory\n"); + d(printf("pre-loading all name info into memory\n")); idc = idx->nameindex->klass->get_cursor(idx->nameindex); while ( (wordid = idc->klass->next(idc)) ) { key = idc->index->klass->get_key(idc->index, wordid, &len); @@ -821,7 +821,8 @@ static char * num(int num) { int n; - char buf[256], *p = buf; + static char buf[256]; + char *p = buf; char type = 0; n = num; |