Lines Matching full:chain_index
145 struct chain_head **chain_index; /* array for fast chain list access*/
150 * possible to bsearch offsets using chain_index.
361 if (!handle->chain_index[pos]) {
362 fprintf(stderr, "ERROR: NULL pointer chain_index[%d]\n", pos);
367 pos, handle->chain_index[pos]->name);
372 res = strcmp(name, handle->chain_index[pos]->name);
376 handle->chain_index[pos]->head_offset,
377 handle->chain_index[pos]->foot_offset);
378 res = offset - handle->chain_index[pos]->head_offset;
389 list_pos = &handle->chain_index[pos]->list;
417 res = strcmp(name, handle->chain_index[pos+1]->name);
420 res = offset - handle->chain_index[pos+1]->head_offset;
478 list_pos = &handle->chain_index[0]->list;
483 if (handle->chain_index[i]) {
484 res = strcmp(handle->chain_index[i]->name, name);
487 list_pos = &handle->chain_index[i]->list;
506 array_mem = sizeof(h->chain_index) * array_elems;
511 h->chain_index = malloc(array_mem);
512 if (h->chain_index == NULL && array_mem > 0) {
516 memset(h->chain_index, 0, array_mem);
525 free(h->chain_index);
536 if (h->chain_index[i]) {
538 i, h->chain_index[i]->name);
576 h->chain_index[cindex] = c;
639 h->chain_index[idx]=c2;
755 debug("BUG in chain_index search\n");
862 if (i==0 && strcmp(c->name, h->chain_index[0]->name) <= 0) {
863 h->chain_index[0] = c; /* Update chain index head */
865 debug("Update chain_index[0] with %s\n", c->name);