MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxGetArchiveModules

Function fxGetArchiveModules

xs/sources/xsAPI.c:2006–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2004#define mxArchiveHeaderSize (sizeof(Atom) + sizeof(Atom) + XS_VERSION_SIZE + sizeof(Atom) + XS_DIGEST_SIZE)
2005
2006static txU1 *fxGetArchiveModules(txMachine *the, void* archive, txU4 *size)
2007{
2008 txPreparation* preparation = the->preparation;
2009 txU1* p = archive;
2010 if (!preparation || !p) {
2011 *size = 0;
2012 return NULL;
2013 }
2014 p += mxArchiveHeaderSize;
2015 // NAME
2016 p += c_read32be(p);
2017 // SYMB
2018 p += c_read32be(p);
2019 // IDEN
2020 p += c_read32be(p);
2021 // MAPS
2022 p += c_read32be(p);
2023 // MODS
2024 *size = c_read32be(p) - sizeof(Atom);
2025 return p + sizeof(Atom);
2026}
2027
2028void* fxGetArchiveCode(txMachine* the, void* archive, txString path, size_t* size)
2029{

Callers 3

fxGetArchiveCodeFunction · 0.85
fxGetArchiveCodeCountFunction · 0.85
fxGetArchiveCodeNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected