Add additional toc helpers
This commit is contained in:
parent
6ad11c4af5
commit
1979d85f58
|
@ -46,3 +46,13 @@ fn get_offset(TableOfContents toc, str entry_name) {
|
|||
TOCEntry entry = get_toc_entry(toc, entry_name);
|
||||
return entry.offset;
|
||||
};
|
||||
|
||||
fn get_size(TableOfContents toc, str entry_name) {
|
||||
TOCEntry entry = get_toc_entry(toc, entry_name);
|
||||
return entry.size;
|
||||
};
|
||||
|
||||
fn get_end(TableOfContents toc, str entry_name) {
|
||||
TOCEntry entry = get_toc_entry(toc, entry_name);
|
||||
return entry.offset + entry.size + 24;
|
||||
};
|
Loading…
Reference in New Issue