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

Function fxGetBuilderName

xs/tools/xslSlot.c:343–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343txString fxGetBuilderName(txMachine* the, const txHostFunctionBuilder* which)
344{
345 txLinker* linker = xsGetContext(the);
346 static char buffer[1024];
347 const txHostFunctionBuilder* builder;
348 {
349 txLinkerBuilder* linkerBuilder = linker->firstBuilder;
350 while (linkerBuilder) {
351 builder = &(linkerBuilder->host);
352 if (builder == which) {
353 sprintf(buffer, "&gxBuilders[%d]", linkerBuilder->builderIndex);
354 return buffer;
355 }
356 linkerBuilder = linkerBuilder->nextBuilder;
357 }
358 }
359 {
360 txLinkerScript* linkerScript = linker->firstScript;
361 while (linkerScript) {
362 txInteger count = linkerScript->hostsCount;
363 if (count) {
364 txInteger index;
365 for (builder = linkerScript->builders, index = 0; index < count; builder++, index++) {
366 if (builder == which) {
367 sprintf(buffer, "&gxBuilders%d[%d]", linkerScript->scriptIndex, index);
368 return buffer;
369 }
370 }
371 }
372 linkerScript = linkerScript->nextScript;
373 }
374 }
375 return "OOPS";
376}
377
378txString fxGetCallbackName(txMachine* the, txCallback which)
379{

Callers 1

fxPrintSlotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected