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

Function fxGetArchiveCodeCount

xs/sources/xsAPI.c:2052–2068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2050}
2051
2052txInteger fxGetArchiveCodeCount(txMachine* the, void* archive)
2053{
2054 txInteger count = 0;
2055 txU4 size;
2056 txU1 *p = fxGetArchiveModules(the, archive, &size);
2057 if (p) {
2058 txU1 *q = p + size;
2059 while (p < q) {
2060 // PATH
2061 p += c_read32be(p);
2062 // CODE
2063 p += c_read32be(p);
2064 count += 1;
2065 }
2066 }
2067 return count;
2068}
2069
2070void* fxGetArchiveCodeName(txMachine* the, void* archive, txInteger index)
2071{

Callers

nothing calls this directly

Calls 1

fxGetArchiveModulesFunction · 0.85

Tested by

no test coverage detected