MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / debugger_request

Function debugger_request

Source/ScriptingEngine.cpp:90–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90static duk_idx_t debugger_request(duk_context *ctx, void *udata, duk_idx_t nvalues) {
91 const char *cmd;
92 //int i;
93
94 (void)udata;
95
96 if (nvalues < 1) {
97 duk_push_string(ctx, "missing AppRequest argument(s)");
98 return -1;
99 }
100
101 cmd = duk_get_string(ctx, -nvalues + 0);
102 /*
103 if (cmd && strcmp(cmd, "CommandLine") == 0) {
104 if (!duk_check_stack(ctx, main_argc)) {
105 /* Callback should avoid errors for now, so use
106 * duk_check_stack() rather than duk_require_stack().
107 *
108 duk_push_string(ctx, "failed to extend stack");
109 return -1;
110 }
111 for (i = 0; i < main_argc; i++) {
112 duk_push_string(ctx, main_argv[i]);
113 }
114 return main_argc;
115 }*/
116 duk_push_sprintf(ctx, "command not supported");
117 return -1;
118}
119
120static void debugger_detached(duk_context *ctx, void *udata) {
121#ifdef OF_JS_DEBUG

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected