| 2026 | } |
| 2027 | |
| 2028 | void* fxGetArchiveCode(txMachine* the, void* archive, txString path, size_t* size) |
| 2029 | { |
| 2030 | txU4 atomSize; |
| 2031 | txU1 *p = fxGetArchiveModules(the, archive, &atomSize), *q; |
| 2032 | if (!p) |
| 2033 | return NULL; |
| 2034 | q = p + atomSize; |
| 2035 | while (p < q) { |
| 2036 | // PATH |
| 2037 | atomSize = c_read32be(p); |
| 2038 | if (!c_strcmp(path, (txString)(p + sizeof(Atom)))) { |
| 2039 | p += atomSize; |
| 2040 | atomSize = c_read32be(p); |
| 2041 | *size = atomSize - sizeof(Atom); |
| 2042 | return p + sizeof(Atom); |
| 2043 | } |
| 2044 | p += atomSize; |
| 2045 | // CODE |
| 2046 | atomSize = c_read32be(p); |
| 2047 | p += atomSize; |
| 2048 | } |
| 2049 | return C_NULL; |
| 2050 | } |
| 2051 | |
| 2052 | txInteger fxGetArchiveCodeCount(txMachine* the, void* archive) |
| 2053 | { |
no test coverage detected