Add additional toc helpers
This commit is contained in:
parent
6ad11c4af5
commit
1979d85f58
|
@ -45,4 +45,14 @@ fn get_toc_entry(TableOfContents toc, str entry_name) {
|
|||
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