MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / get_prompt

Function get_prompt

libraries/AP_Scripting/lua/src/lua.c:274–280  ·  view source on GitHub ↗

** Returns the string to be used as a prompt by the interpreter. */

Source from the content-addressed store, hash-verified

272** Returns the string to be used as a prompt by the interpreter.
273*/
274static const char *get_prompt (lua_State *L, int firstline) {
275 const char *p;
276 lua_getglobal(L, firstline ? "_PROMPT" : "_PROMPT2");
277 p = lua_tostring(L, -1);
278 if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
279 return p;
280}
281
282/* mark in error messages for incomplete statements */
283#define EOFMARK "<eof>"

Callers 1

pushlineFunction · 0.85

Calls 1

lua_getglobalFunction · 0.85

Tested by

no test coverage detected