From 983b2a015ab122b8b609444c87d675712cef0d72 Mon Sep 17 00:00:00 2001 From: Luigi Scarso Date: Sun, 2 Feb 2025 12:36:07 +0000 Subject: Sync with upstream luatex (not luajit). git-svn-id: svn://tug.org/texlive/trunk@73690 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/texk/web2c/luatexdir/lua/lcallbacklib.c | 2 +- Build/source/texk/web2c/luatexdir/lua/lnodelib.c | 48 +++++++++++----------- Build/source/texk/web2c/luatexdir/lua/luainit.c | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-) (limited to 'Build/source/texk/web2c/luatexdir/lua') diff --git a/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c b/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c index c4472c07f7f..4c5bf74c036 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c @@ -68,7 +68,7 @@ static const char *const callbacknames[] = { "finish_pdffile", "finish_pdfpage", "pre_dump","start_file", "stop_file", - "show_error_message","show_lua_error_hook", + "show_error_message","show_lua_error_hook","show_ignored_error_message", "show_warning_message", "hpack_quality", "vpack_quality", "process_rule", diff --git a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c index 72dbe01b076..bb265a31d1f 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c @@ -1187,9 +1187,9 @@ static int lua_nodelib_direct_getdisc(lua_State * L) nodelib_pushdirect_or_nil_alink(vlink(post_break(n))); nodelib_pushdirect_or_nil_alink(vlink(no_break(n))); if (lua_isboolean(L, 2) && lua_toboolean(L, 2)) { - nodelib_pushdirect_or_nil_alink(tlink(pre_break(n))); - nodelib_pushdirect_or_nil_alink(tlink(post_break(n))); - nodelib_pushdirect_or_nil_alink(tlink(no_break(n))); + nodelib_pushdirect_or_nil(tlink(pre_break(n))); + nodelib_pushdirect_or_nil(tlink(post_break(n))); + nodelib_pushdirect_or_nil(tlink(no_break(n))); return 6; } return 3; @@ -8542,19 +8542,24 @@ static int lua_nodelib_direct_effective_glue(lua_State * L) */ -#define check_disc(c) \ - p = c ; \ - if (p != null && vlink(p) != null) \ - tlink(p) = tail_of_list(vlink(p)); +static void check_disc(halfword p) +{ + if (p != null) { + if (vlink(p) != null) { + tlink(p) = tail_of_list(vlink(p)); + } else { + tlink(p) = null; + } + } +} static int lua_nodelib_direct_check_discretionaries(lua_State * L) { halfword c = lua_tointeger(L, 1); - halfword p ; while (c != null) { if (type(c) == disc_node) { - check_disc(no_break(c)) ; - check_disc(pre_break(c)) ; - check_disc(post_break(c)) ; + check_disc(no_break(c)); + check_disc(pre_break(c)); + check_disc(post_break(c)); } c = vlink(c) ; } @@ -8564,10 +8569,9 @@ static int lua_nodelib_direct_check_discretionaries(lua_State * L) { static int lua_nodelib_direct_check_discretionary(lua_State * L) { halfword c = lua_tointeger(L, 1); if (c != null && type(c) == disc_node) { - halfword p ; - check_disc(no_break(c)) ; - check_disc(pre_break(c)) ; - check_disc(post_break(c)) ; + check_disc(no_break(c)); + check_disc(pre_break(c)); + check_disc(post_break(c)); } return 0; } @@ -8614,12 +8618,11 @@ static int lua_nodelib_direct_flatten_discretionaries(lua_State * L) static int lua_nodelib_check_discretionaries(lua_State * L) { halfword c = *check_isnode(L, 1); - halfword p ; while (c != null) { if (type(c) == disc_node) { - check_disc(no_break(c)) ; - check_disc(pre_break(c)) ; - check_disc(post_break(c)) ; + check_disc(no_break(c)); + check_disc(pre_break(c)); + check_disc(post_break(c)); } c = vlink(c) ; } @@ -8629,10 +8632,9 @@ static int lua_nodelib_check_discretionaries(lua_State * L) { static int lua_nodelib_check_discretionary(lua_State * L) { halfword c = *check_isnode(L, 1); if (c != null && type(c) == disc_node) { - halfword p ; - check_disc(no_break(c)) ; - check_disc(pre_break(c)) ; - check_disc(post_break(c)) ; + check_disc(no_break(c)); + check_disc(pre_break(c)); + check_disc(post_break(c)); } return 0; } diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.c b/Build/source/texk/web2c/luatexdir/lua/luainit.c index 1b932a29ca2..dad4ef7167f 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luainit.c +++ b/Build/source/texk/web2c/luatexdir/lua/luainit.c @@ -491,7 +491,7 @@ static void parse_options(int ac, char **av) "the terms of the GNU General Public License, version 2 or (at your option)\n" "any later version. For more information about these matters, see the file\n" "named COPYING and the LuaTeX source.\n\n" - "LuaTeX is Copyright 2022 Taco Hoekwater and the LuaTeX Team.\n"); + "LuaTeX is Copyright 2025 Taco Hoekwater and the LuaTeX Team.\n"); /* *INDENT-ON* */ uexit(0); } else if (ARGUMENT_IS("credits")) { -- cgit v1.2.3