81 TRACE(
"Entering process_index_v1(%p)", ctx);
83 UT_array *index_entries = NULL;
86 if(ctx == NULL || ctx->
imageStream == NULL)
return NULL;
89 const UT_icd index_entry_icd = {
sizeof(
IndexEntry), NULL, NULL, NULL};
91 utarray_new(index_entries, &index_entry_icd);
93 if(index_entries == NULL)
95 FATAL(
"Could not allocate memory for index entries array.");
96 TRACE(
"Exiting process_index_v1() = NULL");
105 utarray_free(index_entries);
107 TRACE(
"Exiting process_index_v1() = NULL");
115 utarray_free(index_entries);
117 TRACE(
"Exiting process_index_v1() = NULL");
124 FATAL(
"Incorrect index identifier.");
125 utarray_free(index_entries);
127 TRACE(
"Exiting process_index_v1() = NULL");
131 for(
int i = 0; i < idx_header.
entries; i++)
136 utarray_free(index_entries);
138 TRACE(
"Exiting process_index_v1() = NULL");
142 utarray_push_back(index_entries, &entry);
146 return index_entries;
Single index entry describing a block's type, (optional) data classification, and file offset.