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

Function fxFindScript

xs/platforms/gecko/xsHost.c:350–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350static txBoolean fxFindScript(txMachine* the, txString path, txID* id)
351{
352 txPreparation* preparation = the->preparation;
353 txInteger c = preparation->scriptCount;
354 txScript* script = preparation->scripts;
355 path += preparation->baseLength;
356 c_strcat(path, ".xsb");
357 while (c > 0) {
358 if (!c_strcmp(path, script->path)) {
359 path -= preparation->baseLength;
360 *id = fxNewNameC(the, path);
361 return 1;
362 }
363 c--;
364 script++;
365 }
366 *id = XS_NO_ID;
367 return 0;
368}
369
370#if MODDEF_XS_MODS
371#define FOURCC(c1, c2, c3, c4) (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4))

Callers 1

fxFindModuleFunction · 0.70

Calls 1

fxNewNameCFunction · 0.85

Tested by

no test coverage detected