Lines Matching refs:table

487     Table * table = lv_malloc(sizeof(*table) + sizeof(Entry) * init_bulk);  in new_table()  local
488 if(table) { in new_table()
489 table->bulk = init_bulk; in new_table()
490 table->nentries = (1 << key_size) + 2; in new_table()
491 table->entries = (Entry *) &table[1]; in new_table()
493 table->entries[key] = (Entry) { in new_table()
497 return table; in new_table()
507 Table * table = *tablep; in add_entry() local
508 if(table->nentries == table->bulk) { in add_entry()
509 table->bulk *= 2; in add_entry()
510 table = lv_realloc(table, sizeof(*table) + sizeof(Entry) * table->bulk); in add_entry()
511 if(!table) return -1; in add_entry()
512 table->entries = (Entry *) &table[1]; in add_entry()
513 *tablep = table; in add_entry()
515 table->entries[table->nentries] = (Entry) { in add_entry()
518 table->nentries++; in add_entry()
519 if((table->nentries & (table->nentries - 1)) == 0) in add_entry()
556 Table * table; in read_image_data() local
568 table = new_table(key_size); in read_image_data()
579 table->nentries = (1 << (key_size - 1)) + 2; in read_image_data()
583 ret = add_entry(&table, str_len + 1, key, entry.suffix); in read_image_data()
585 lv_free(table); in read_image_data()
588 if(table->nentries == 0x1000) { in read_image_data()
597 entry = table->entries[key]; in read_image_data()
613 entry = table->entries[entry.prefix]; in read_image_data()
616 if(key < table->nentries - 1 && !table_is_full) in read_image_data()
617 table->entries[table->nentries - 1].suffix = entry.suffix; in read_image_data()
619 lv_free(table); in read_image_data()