Lines Matching refs:fb
227 file_builder_allocate (FileBuilder *fb, in file_builder_allocate() argument
237 fb->offset += (guint64) (-fb->offset) & (alignment - 1); in file_builder_allocate()
239 chunk->offset = fb->offset; in file_builder_allocate()
243 pointer->start = guint32_to_le (fb->offset); in file_builder_allocate()
244 fb->offset += size; in file_builder_allocate()
245 pointer->end = guint32_to_le (fb->offset); in file_builder_allocate()
247 g_queue_push_tail (fb->chunks, chunk); in file_builder_allocate()
253 file_builder_add_value (FileBuilder *fb, in file_builder_add_value() argument
261 if (fb->byteswap) in file_builder_add_value()
274 data = file_builder_allocate (fb, 8, size, pointer); in file_builder_add_value()
280 file_builder_add_string (FileBuilder *fb, in file_builder_add_string() argument
291 chunk->offset = fb->offset; in file_builder_add_string()
297 *start = guint32_to_le (fb->offset); in file_builder_add_string()
299 fb->offset += length; in file_builder_add_string()
301 g_queue_push_tail (fb->chunks, chunk); in file_builder_add_string()
305 file_builder_allocate_for_hash (FileBuilder *fb, in file_builder_allocate_for_hash() argument
329 data = file_builder_allocate (fb, 4, size, pointer); in file_builder_allocate_for_hash()
354 file_builder_add_hash (FileBuilder *fb, in file_builder_add_hash() argument
373 file_builder_allocate_for_hash (fb, mytable->n_buckets, index, 5, 0, in file_builder_add_hash()
396 file_builder_add_string (fb, basename, in file_builder_add_hash()
404 file_builder_add_value (fb, item->value, &entry->value.pointer); in file_builder_add_hash()
419 offsets = file_builder_allocate (fb, 4, 4 * children, in file_builder_add_hash()
432 file_builder_add_hash (fb, item->table, &entry->value.pointer); in file_builder_add_hash()
456 file_builder_free (FileBuilder *fb) in file_builder_free() argument
458 g_queue_free (fb->chunks); in file_builder_free()
459 g_slice_free (FileBuilder, fb); in file_builder_free()
463 file_builder_serialise (FileBuilder *fb, in file_builder_serialise() argument
471 if (fb->byteswap) in file_builder_serialise()
487 while (!g_queue_is_empty (fb->chunks)) in file_builder_serialise()
489 FileChunk *chunk = g_queue_pop_head (fb->chunks); in file_builder_serialise()
519 FileBuilder *fb; in gvdb_table_write_contents() local
526 fb = file_builder_new (byteswap); in gvdb_table_write_contents()
527 file_builder_add_hash (fb, table, &root); in gvdb_table_write_contents()
528 str = file_builder_serialise (fb, root); in gvdb_table_write_contents()
529 file_builder_free (fb); in gvdb_table_write_contents()
591 FileBuilder *fb; in gvdb_table_write_contents_async() local
602 fb = file_builder_new (byteswap); in gvdb_table_write_contents_async()
603 file_builder_add_hash (fb, table, &root); in gvdb_table_write_contents_async()
604 str = file_builder_serialise (fb, root); in gvdb_table_write_contents_async()
606 file_builder_free (fb); in gvdb_table_write_contents_async()