| 2459 | } |
| 2460 | |
| 2461 | void fxListModules(txMachine* the) |
| 2462 | { |
| 2463 | txInspectorNameList aList = { C_NULL, C_NULL }; |
| 2464 | txSlot* realm = fxFindRealm(the); |
| 2465 | txSlot* moduleMap = mxModuleMap(realm); |
| 2466 | txSlot* instance = fxGetInstance(the, moduleMap); |
| 2467 | txSlot* instanceInspector = fxToInstanceInspector(the, instance); |
| 2468 | txSlot* modules = mxOwnModules(realm)->value.reference; |
| 2469 | txSlot* module; |
| 2470 | fxEcho(the, "<grammar>"); |
| 2471 | if (instance->next) { |
| 2472 | fxEcho(the, "<node"); |
| 2473 | if (instanceInspector) |
| 2474 | fxEchoFlags(the, "-", moduleMap->flag); |
| 2475 | else |
| 2476 | fxEchoFlags(the, "+", moduleMap->flag); |
| 2477 | fxEcho(the, " name=\"(map)\""); |
| 2478 | fxEchoAddress(the, instance); |
| 2479 | if (instanceInspector) { |
| 2480 | fxEcho(the, ">"); |
| 2481 | fxEchoInstance(the, instance, &aList); |
| 2482 | fxEcho(the, "</node>"); |
| 2483 | } |
| 2484 | else |
| 2485 | fxEcho(the, "/>"); |
| 2486 | } |
| 2487 | module = modules->next; |
| 2488 | while (module) { |
| 2489 | if (mxIsReference(module)) |
| 2490 | fxEchoModule(the, module, &aList); |
| 2491 | module = module->next; |
| 2492 | } |
| 2493 | modules = modules->value.instance.prototype; |
| 2494 | if (modules) { |
| 2495 | module = modules->next; |
| 2496 | while (module) { |
| 2497 | if (mxIsReference(module)) |
| 2498 | fxEchoModule(the, module, &aList); |
| 2499 | module = module->next; |
| 2500 | } |
| 2501 | } |
| 2502 | fxEcho(the, "</grammar>"); |
| 2503 | } |
| 2504 | |
| 2505 | void fxLogin(txMachine* the) |
| 2506 | { |
no test coverage detected