Merge branch 'keni-luabits2' into NetHack-3.7
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 config.h $NHDT-Date: 1702948586 2023/12/19 01:16:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.179 $ */
|
||||
/* NetHack 3.7 config.h $NHDT-Date: 1704043695 2023/12/31 17:28:15 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.181 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2016. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -669,6 +669,13 @@ typedef unsigned char uchar;
|
||||
/* undef this to check if sandbox breaks something */
|
||||
#define NHL_SANDBOX
|
||||
|
||||
#ifdef NHL_SANDBOX
|
||||
#ifdef CHRONICLE
|
||||
/* LIVELOG (and therefore CHRONICLE) is needed for --loglua */
|
||||
#define LIVELOG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 decl.h $NHDT-Date: 1698264758 2023/10/25 20:12:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.339 $ */
|
||||
/* NetHack 3.7 decl.h $NHDT-Date: 1704043695 2023/12/31 17:28:15 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.351 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2007. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -541,6 +541,8 @@ struct instance_globals_l {
|
||||
/* nhlua.c */
|
||||
genericptr_t luacore; /* lua_State * */
|
||||
char lua_warnbuf[BUFSZ];
|
||||
int loglua;
|
||||
int lua_sid;
|
||||
|
||||
/* options.c */
|
||||
boolean loot_reset_justpicked;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 extern.h $NHDT-Date: 1704316439 2024/01/03 21:13:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1359 $ */
|
||||
/* NetHack 3.7 extern.h $NHDT-Date: 1704225560 2024/01/02 19:59:20 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.1358 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1998,7 +1998,8 @@ extern boolean nhl_loadlua(lua_State *, const char *) NONNULLARG12;
|
||||
extern char *get_nh_lua_variables(void);
|
||||
extern void save_luadata(NHFILE *) NONNULLARG1;
|
||||
extern void restore_luadata(NHFILE *) NONNULLARG1;
|
||||
extern int nhl_pcall(lua_State *, int, int) NONNULLARG1;
|
||||
extern int nhl_pcall(lua_State *, int, int, const char *) NONNULLARG1;
|
||||
extern int nhl_pcall_handle(lua_State *, int, int, const char *, NHL_pcall_action) NONNULLARG1;
|
||||
extern boolean load_lua(const char *, nhl_sandbox_info *) NONNULLARG12;
|
||||
ATTRNORETURN extern void nhl_error(lua_State *, const char *) NORETURN NONNULLARG12;
|
||||
extern void lcheck_param_table(lua_State *) NONNULLARG1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 global.h $NHDT-Date: 1703716158 2023/12/27 22:29:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.157 $ */
|
||||
/* NetHack 3.7 global.h $NHDT-Date: 1704225560 2024/01/02 19:59:20 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.159 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -552,10 +552,6 @@ typedef struct nhl_sandbox_info {
|
||||
#define NHL_SB_VERSION 0x40000000
|
||||
/* Debugging library - mostly unsafe. */
|
||||
#define NHL_SB_DEBUGGING 0x08000000
|
||||
/* Use with memlimit/steps/perpcall to get usage. */
|
||||
#define NHL_SB_REPORT 0x04000000
|
||||
/* As above, but do full gc on each nhl_pcall. */
|
||||
#define NHL_SB_REPORT2 0x02000000
|
||||
|
||||
/* Low level groups. If you need these, you probably need to define
|
||||
* a new high level group instead. */
|
||||
@@ -591,4 +587,10 @@ typedef struct nhl_sandbox_info {
|
||||
#define NHL_SBRV_ACCEPT 2
|
||||
#define NHL_SBRV_FAIL 3
|
||||
|
||||
/* NHL_pcall_handle action values */
|
||||
typedef enum NHL_pcall_action {
|
||||
NHLpa_panic,
|
||||
NHLpa_impossible
|
||||
} NHL_pcall_action;
|
||||
|
||||
#endif /* GLOBAL_H */
|
||||
|
||||
Reference in New Issue
Block a user