Add in_lua flag

In preparation of making config errors available to lua scripts,
instead outputting them via pline.
This commit is contained in:
Pasi Kallinen
2021-02-10 17:06:08 +02:00
parent 33ee596d68
commit 9576154690
6 changed files with 16 additions and 6 deletions

View File

@@ -1646,6 +1646,7 @@ extern int l_obj_register(lua_State *);
#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET)
extern lua_State * nhl_init(void);
extern void nhl_done(lua_State *);
extern boolean nhl_loadlua(lua_State *, const char *);
extern boolean load_lua(const char *);
extern void nhl_error(lua_State *, const char *) NORETURN;

View File

@@ -174,6 +174,7 @@ struct instance_flags {
* a structure of their own elsewhere some day.
*/
boolean debug_fuzzer; /* fuzz testing */
boolean in_lua; /* executing a lua script */
boolean defer_plname; /* X11 hack: askname() might not set g.plname */
boolean herecmd_menu; /* use menu when mouseclick on yourself */
boolean invis_goldsym; /* gold symbol is ' '? */