summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2018-09-05 21:30:41 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2018-09-05 21:30:41 +0000
commit1b8b254a766350291f8e7e19feaf6326ebabe633 (patch)
tree8a20823763635906b94a68b72541a10dc6f91377 /Build/source/texk/web2c/luatexdir/lua/lstatslib.c
parentef7aedbc1cabb3eebb59082e349f9792c9c4d3c1 (diff)
sync with luatex revision 6924.
git-svn-id: svn://tug.org/texlive/trunk@48591 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.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
index 43f33008db4..5f3b72262c6 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
@@ -147,13 +147,15 @@ static lua_Number get_luatexhashchars(void)
static const char *get_luatexhashtype(void)
{
#ifdef LuajitTeX
- return (const char *)jithash_hashname;
+ if (jithash_hashname)
+ return (const char *)jithash_hashname;
+ else
+ return "???";
#else
return "lua";
#endif
}
-
static lua_Number get_pdf_gone(void)
{
if (static_pdf != NULL)
@@ -266,8 +268,22 @@ static lua_Number get_development_id(void)
return (lua_Number) luatex_svn_revision ;
}
+static lua_Number get_dvi_gone(void)
+{
+ if (static_pdf != NULL)
+ return (lua_Number) dvi_get_status_gone(static_pdf);
+ return (lua_Number) 0;
+}
+
+static lua_Number get_dvi_ptr(void)
+{
+ if (static_pdf != NULL)
+ return (lua_Number) dvi_get_status_ptr(static_pdf);
+ return (lua_Number) 0;
+}
/* temp, for backward compat */
+
static int init_pool_ptr = 0;
static struct statistic stats[] = {
@@ -291,8 +307,9 @@ static struct statistic stats[] = {
{"pdf_gone", 'N', &get_pdf_gone},
{"pdf_ptr", 'N', &get_pdf_ptr},
- {"dvi_gone", 'g', &dvi_offset},
- {"dvi_ptr", 'g', &dvi_ptr},
+ {"dvi_gone", 'g', &get_dvi_gone},
+ {"dvi_ptr", 'g', &get_dvi_ptr},
+
{"total_pages", 'g', &total_pages},
{"output_file_name", 'S', (void *) &get_output_file_name},
{"log_name", 'S', (void *) &getlogname},
@@ -355,9 +372,14 @@ static struct statistic stats[] = {
{"luabytecodes", 'g', &luabytecode_max},
{"luabytecode_bytes", 'g', &luabytecode_bytes},
{"luastate_bytes", 'g', &luastate_bytes},
+
{"callbacks", 'g', &callback_count},
+ {"indirect_callbacks", 'g', &saved_callback_count}, /* these are file io callbacks */
- {"indirect_callbacks", 'g', &saved_callback_count},
+ {"saved_callbacks", 'g', &saved_callback_count},
+ {"late_callbacks", 'g', &late_callback_count},
+ {"direct_callbacks", 'g', &direct_callback_count},
+ {"function_callbacks", 'g', &function_callback_count},
{"lc_ctype", 'S', (void *) &get_lc_ctype},
{"lc_collate", 'S', (void *) &get_lc_collate},