Lines Matching refs:table

304     Table *table = lv_mem_alloc(sizeof(*table) + sizeof(Entry) * init_bulk);  in new_table()  local
305 if (table) { in new_table()
306 table->bulk = init_bulk; in new_table()
307 table->nentries = (1 << key_size) + 2; in new_table()
308 table->entries = (Entry *) &table[1]; in new_table()
310 table->entries[key] = (Entry) {1, 0xFFF, key}; in new_table()
312 return table; in new_table()
322 Table *table = *tablep; in add_entry() local
323 if (table->nentries == table->bulk) { in add_entry()
324 table->bulk *= 2; in add_entry()
325 table = lv_mem_realloc(table, sizeof(*table) + sizeof(Entry) * table->bulk); in add_entry()
326 if (!table) return -1; in add_entry()
327 table->entries = (Entry *) &table[1]; in add_entry()
328 *tablep = table; in add_entry()
330 table->entries[table->nentries] = (Entry) {length, prefix, suffix}; in add_entry()
331 table->nentries++; in add_entry()
332 if ((table->nentries & (table->nentries - 1)) == 0) in add_entry()
398 Table *table; in read_image_data() local
410 table = new_table(key_size); in read_image_data()
421 table->nentries = (1 << (key_size - 1)) + 2; in read_image_data()
424 ret = add_entry(&table, str_len + 1, key, entry.suffix); in read_image_data()
426 lv_mem_free(table); in read_image_data()
429 if (table->nentries == 0x1000) { in read_image_data()
438 entry = table->entries[key]; in read_image_data()
450 entry = table->entries[entry.prefix]; in read_image_data()
453 if (key < table->nentries - 1 && !table_is_full) in read_image_data()
454 table->entries[table->nentries - 1].suffix = entry.suffix; in read_image_data()
456 lv_mem_free(table); in read_image_data()