From ce4905721c40da7acbdb02caa5d2e24476590e4b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 28 Nov 2000 13:05:01 +0000 Subject: Turn off index stats by default. 2000-11-28 Not Zed * 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 --- libibex/wordindexmem.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'libibex/wordindexmem.c') 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; -- cgit v1.2.3