summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/lstatslib.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lstatslib.c50
1 files changed, 47 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
index 7473ca214a4..d055dc35cea 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
@@ -121,6 +121,21 @@ static const char *getenginename(void)
return engine_name;
}
+static const char * get_lc_ctype(void)
+{
+ return lc_ctype;
+}
+
+static const char * get_lc_collate(void)
+{
+ return lc_collate;
+}
+
+static const char * get_lc_numeric(void)
+{
+ return lc_numeric;
+}
+
static lua_Number get_luatexhashchars(void)
@@ -216,14 +231,36 @@ static int get_hash_size(void)
static lua_Number shell_escape_state(void)
{
if (shellenabledp <= 0) {
+ /* No shell at all. */
return (lua_Number) 0;
} else if (restrictedshell == 0) {
+ /* Shell has no restriction. */
+ return (lua_Number) 2;
+ } else {
+ /* Shell has restrictions, see cnf file. */
+ return (lua_Number) 1;
+ }
+}
+
+static lua_Number safer_option_state(void)
+{
+ if (safer_option == 0) {
+ return (lua_Number) 0;
+ } else {
+ return (lua_Number) 1;
+ }
+}
+
+static lua_Number kpse_used_state(void)
+{
+ if (kpse_init == 1) {
return (lua_Number) 1;
} else {
- return (lua_Number) 2;
+ return (lua_Number) 0;
}
}
+
/* temp, for backward compat */
static int init_pool_ptr = 0;
@@ -255,14 +292,16 @@ static struct statistic stats[] = {
{"log_name", 'S', (void *) &getlogname},
{"banner", 'S', (void *) &getbanner},
{"luatex_version", 'G', &get_luatexversion},
- {"luatex_revision", 'S', (void *) &luatexrevision},
+ {"luatex_revision", 'S', (void *) &luatexrevision},
{"luatex_hashtype", 'S', (void *) &get_luatexhashtype},
{"luatex_hashchars", 'N', &get_luatexhashchars},
{"luatex_engine", 'S', (void *) &getenginename},
{"ini_version", 'b', &ini_version},
- {"shell_escape", 'N', &shell_escape_state}, /* be easy on old time usage */
+ {"shell_escape", 'N', &shell_escape_state},
+ {"safer_option", 'N', &safer_option_state},
+ {"kpse_used", 'N', &kpse_used_state},
/*
* mem stat
*/
@@ -310,8 +349,13 @@ static struct statistic stats[] = {
{"luabytecode_bytes", 'g', &luabytecode_bytes},
{"luastate_bytes", 'g', &luastate_bytes},
{"callbacks", 'g', &callback_count},
+
{"indirect_callbacks", 'g', &saved_callback_count},
+ {"lc_ctype", 'S', (void *) &get_lc_ctype},
+ {"lc_collate", 'S', (void *) &get_lc_collate},
+ {"lc_numeric",'S', (void *) &get_lc_numeric},
+
{NULL, 0, 0}
};