static void add_search_text(struct body *bp, int msgnum) { char *ptr = bp->line; int bigram_index = 0; char token[MAXLINE]; if (!start_time) start_time = time(NULL); while ((bp = tokenize_body(bp, token, &ptr, &bigram_index, TRUE)) != NULL) { addb(token, bp); ++bigram_count; } if (0) printf("avg b %d avg bi %d (%d) msgnum %d %d allocated %d elapsed %ld\n", b_loops_done / b_times_entered, 0, bi_times_entered, msgnum, tree_alloc / 1024, time(NULL) - start_time, next_itoken); }
void add(struct hashtable *h, const char *k, const char *x, int exp) { addb(h, k, str_len(k), x, str_len(x), exp); }
/* as in addb, but specialized for blocks that store pointers, not copies */ int addpb( Block *b, const void *elem ) { MX_ASSERT( b->size_each == sizeof( void * ) ); return addb( b, &elem ); }