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

Function fxGetArchiveDataName

xs/sources/xsAPI.c:2154–2170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2152}
2153
2154void* fxGetArchiveDataName(txMachine* the, void* archive, txInteger index)
2155{
2156 txU4 atomSize;
2157 txU1 *p = fxGetArchiveResources(the, archive, &atomSize), *q;
2158 if (!p)
2159 return NULL;
2160 q = p + atomSize;
2161 while (p < q) {
2162 // PATH
2163 if (!index--)
2164 return (txString)(p + sizeof(Atom));
2165 p += c_read32be(p);
2166 // DATA
2167 p += c_read32be(p);
2168 }
2169 return C_NULL;
2170}
2171
2172void* fxGetArchiveName(txMachine* the, void* archive)
2173{

Callers 1

Resource_indexFunction · 0.85

Calls 1

fxGetArchiveResourcesFunction · 0.85

Tested by

no test coverage detected