| 151 | |
| 152 | |
| 153 | static const char *get_prompt (lua_State *L, int firstline) { |
| 154 | const char *p; |
| 155 | lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2"); |
| 156 | p = lua_tostring(L, -1); |
| 157 | if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); |
| 158 | lua_pop(L, 1); /* remove global */ |
| 159 | return p; |
| 160 | } |
| 161 | |
| 162 | |
| 163 | static int incomplete (lua_State *L, int status) { |
no test coverage detected