| 216 | */ |
| 217 | |
| 218 | static txBoolean fxFindScript(txMachine* the, txSlot* realm, txString path, txID* id) |
| 219 | { |
| 220 | txPreparation* preparation = the->preparation; |
| 221 | txInteger c = preparation->scriptCount; |
| 222 | txScript* script = preparation->scripts; |
| 223 | #if MODDEF_XS_MODS |
| 224 | uint8_t *mod; |
| 225 | int modSize; |
| 226 | |
| 227 | mod = findMod(the, path, &modSize); |
| 228 | if (mod) { |
| 229 | *id = fxNewNameC(the, path); |
| 230 | return 1; |
| 231 | } |
| 232 | #endif |
| 233 | while (c > 0) { |
| 234 | if (!c_strcmp(path, script->path)) { |
| 235 | *id = fxNewNameC(the, path); |
| 236 | return 1; |
| 237 | } |
| 238 | c--; |
| 239 | script++; |
| 240 | } |
| 241 | return 0; |
| 242 | } |
| 243 | |
| 244 | #ifndef mxSeparator |
| 245 | #define mxSeparator ('/') |
no test coverage detected