| 341 | } |
| 342 | |
| 343 | txString 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 | |
| 378 | txString fxGetCallbackName(txMachine* the, txCallback which) |
| 379 | { |