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

Function fxGetArchiveDataCount

xs/sources/xsAPI.c:2136–2152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2134}
2135
2136txInteger fxGetArchiveDataCount(txMachine* the, void* archive)
2137{
2138 txInteger count = 0;
2139 txU4 size;
2140 txU1 *p = fxGetArchiveResources(the, archive, &size);
2141 if (p) {
2142 txU1 *q = p + size;
2143 while (p < q) {
2144 // PATH
2145 p += c_read32be(p);
2146 // DATA
2147 p += c_read32be(p);
2148 count += 1;
2149 }
2150 }
2151 return count;
2152}
2153
2154void* fxGetArchiveDataName(txMachine* the, void* archive, txInteger index)
2155{

Callers 1

Resource_indexFunction · 0.85

Calls 1

fxGetArchiveResourcesFunction · 0.85

Tested by

no test coverage detected