mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Initialize index entries array and update index management for DDT entries
This commit is contained in:
10
src/write.c
10
src/write.c
@@ -153,7 +153,15 @@ int32_t aaruf_close_current_block(aaruformatContext *ctx)
|
||||
ctx->currentBlockHeader.cmpLength = ctx->currentBlockHeader.length;
|
||||
}
|
||||
|
||||
// TODO: Add to index
|
||||
// Add to index
|
||||
TRACE("Adding block to index");
|
||||
IndexEntry indexEntry;
|
||||
indexEntry.blockType = DataBlock;
|
||||
indexEntry.dataType = UserData;
|
||||
indexEntry.offset = ctx->nextBlockPosition;
|
||||
|
||||
utarray_push_back(ctx->indexEntries, &indexEntry);
|
||||
TRACE("Block added to index at offset %" PRIu64, indexEntry.offset);
|
||||
|
||||
// Write block header to file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user