diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2017-03-11 00:31:06 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2017-03-11 00:31:06 +0000 |
commit | 7fa7e2984ec7346b13ce8d3a84826552d30f00ea (patch) | |
tree | f177da03ee3839977b28ee4f149cb612666eddde /Build/source/texk/web2c/luatexdir/lua/lstatslib.c | |
parent | dedac2fcc2339e6d9cddef8edb046fd0e04c397e (diff) |
sync with luatex r.6287 and mpost r.2125
git-svn-id: svn://tug.org/texlive/trunk@43454 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/lstatslib.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lstatslib.c | 50 |
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} }; |