texlive[73690] Build/source/texk/web2c/luatexdir: Sync with upstream

commits+lscarso at tug.org commits+lscarso at tug.org
Sun Feb 2 13:36:08 CET 2025


Revision: 73690
          https://tug.org/svn/texlive?view=revision&revision=73690
Author:   lscarso
Date:     2025-02-02 13:36:07 +0100 (Sun, 02 Feb 2025)
Log Message:
-----------
Sync with upstream luatex (not luajit).

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/ChangeLog
    trunk/Build/source/texk/web2c/luatexdir/font/tfmofm.c
    trunk/Build/source/texk/web2c/luatexdir/image/pdftoepdf.c
    trunk/Build/source/texk/web2c/luatexdir/lang/texlang.c
    trunk/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c
    trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
    trunk/Build/source/texk/web2c/luatexdir/lua/luainit.c
    trunk/Build/source/texk/web2c/luatexdir/luatex.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
    trunk/Build/source/texk/web2c/luatexdir/luatexcallbackids.h
    trunk/Build/source/texk/web2c/luatexdir/tex/commands.c
    trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h
    trunk/Build/source/texk/web2c/luatexdir/tex/errors.c
    trunk/Build/source/texk/web2c/luatexdir/tex/errors.h
    trunk/Build/source/texk/web2c/luatexdir/tex/mlist.c
    trunk/Build/source/texk/web2c/luatexdir/tex/packaging.c
    trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c
    trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.c

Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2025-02-02 12:36:07 UTC (rev 73690)
@@ -1,3 +1,28 @@
+2025-02-01 Luigi Scarso <luigi.scarso at gmail.com>
+	* LuaJIT 2.1.1736781742 (work in progress)
+	* LuaTeX 1.21.0
+
+
+2025-02-01 Luigi Scarso <luigi.scarso at gmail.com>
+	* Again on missing displacement when leqno is used in rtl paragraph (thanks to udifoglle at gmail.com)
+	* LuaTeX 1.20.8
+
+
+2025-02-01 Luigi Scarso <luigi.scarso at gmail.com>
+	* Fix getdisc tail fields and some related sanity check cleanup (HH)
+	* LuaTeX 1.20.7
+
+
+2025-02-01 Luigi Scarso <luigi.scarso at gmail.com>
+	* Fixed missing displacement when leqno is used in rtl paragraph (thanks to udifoglle at gmail.com)
+	* LuaTeX 1.20.6
+
+
+2025-01-31 Luigi Scarso <luigi.scarso at gmail.com>
+	* In read_tfm_info avoid scaling fonts to >= 2048pt, which can cause overflow (TeXLive rev. 73614)
+	* \ignoreprimitiveerror as in pdftex
+
+
 2025-01-19 Luigi Scarso <luigi.scarso at gmail.com>
 	* Fixed \shapemode does not reset at end of paragraphs (thanks to udifoglle at gmail.com)
 
@@ -7,29 +32,29 @@
 	* LuaTeX 1.20.5
 
 
-2025-01-04 Luigi Scarso <luigi.scarso at gmail.com>
+2025-01-11 Luigi Scarso <luigi.scarso at gmail.com>
 	* fixed "unexpected delimiter construction with classic tfm cmex font", 
 	  see https://tex.stackexchange.com/a/734734/1090 (HH)
 	* LuaTeX 1.20.4
 
 
-2025-01-04 Luigi Scarso <luigi.scarso at gmail.com>
+2025-01-09 Luigi Scarso <luigi.scarso at gmail.com>
 	* replaced # error with # define UNSUPPORTED_ARCH in ffi.[ch]
 	* LuaTeX 1.20.3
 
 
-2025-01-04 Luigi Scarso <luigi.scarso at gmail.com>
+2025-01-06 Luigi Scarso <luigi.scarso at gmail.com>
 	* ffi.h: do not assume that struct cdata is aligned(16). 
 	* More fixes for luaffi.
 	* LuaTeX 1.20.2
 
 
-2025-01-06 Luigi Scarso <luigi.scarso at gmail.com>
+2025-01-04 Luigi Scarso <luigi.scarso at gmail.com>
 	* Clean-up ffi.h
 	* LuaTeX 1.20.1
 
 
-2025-01-01 Luigi Scarso <luigi.scarso at gmail.com>
+2025-01-02 Luigi Scarso <luigi.scarso at gmail.com>
 	* New luaffi, support for aarch64.
 	* LuaTeX 1.20.0
 

Modified: trunk/Build/source/texk/web2c/luatexdir/font/tfmofm.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/font/tfmofm.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/font/tfmofm.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -849,7 +849,21 @@
     /*tex Read the arrays before the character info. */
     set_font_dsize(f, z);
     if (s != -1000) {
+        boolean saved_arith_error = arith_error;
+	scaled sw = z;
+	arith_error = false;
         z = (s >= 0 ? s : xn_over_d(z, -s, 1000));
+	if ((arith_error) || (z>= 01000000000)) {
+	  char err[256];
+	  const char *errhelp[] = {
+	    "I will ignore the scaling factor.",
+	    NULL
+	  };
+	  snprintf(err, 255, "Font scaled to 2048pt or higher");
+	  tex_error(err, errhelp);
+	}
+	z = sw ;
+	arith_error = saved_arith_error;
     }
     set_font_size(f, z);
     if (np > 7) {

Modified: trunk/Build/source/texk/web2c/luatexdir/image/pdftoepdf.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/image/pdftoepdf.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/image/pdftoepdf.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -361,9 +361,11 @@
             because new objects are being added while the list is being
             written out by writeRefs().
         */
+        q = NULL;
         for (p = pdf_doc->inObjList; p != NULL; p = p->next)
             q = p;
-        q->next = n;
+        if (q) 
+            q->next = n;
     }
     return n->num;
 }

Modified: trunk/Build/source/texk/web2c/luatexdir/lang/texlang.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lang/texlang.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/lang/texlang.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -213,7 +213,6 @@
     int i = 0;
     char *uindex = (char *)word;
     const char *s = buff;
-
     while (*s && !isspace((unsigned char)*s)) {
         word[i++] = (unsigned)*s;
         s++;
@@ -472,7 +471,8 @@
 void set_disc_field(halfword f, halfword t)
 {
     if (t != null) {
-        couple_nodes(f, t);
+        alink(t) = null; /* don't expose this one! */
+        vlink(f) = t;
         tlink(f) = tail_of_list(t);
     } else {
         vlink(f) = null;
@@ -943,7 +943,7 @@
     int lchar, i;
     struct tex_language *lang;
     lang_variables langdata;
-    char utf8word[(4 * MAX_WORD_LEN) + 1];
+    char utf8word[(4 * MAX_WORD_LEN) + 1] = { 0 };
     int wordlen = 0;
     char *hy = utf8word;
     char *replacement = NULL;

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -68,7 +68,7 @@
     "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",

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -1187,9 +1187,9 @@
         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 @@
 
 */
 
-#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_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_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_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;
 }

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/luainit.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/luainit.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/luainit.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -491,7 +491,7 @@
                  "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")) {

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -32,9 +32,9 @@
     stick to "0" upto "9" so users can expect a number represented as string.
 */
 
-int luatex_version = 120;
-int luatex_revision = '5';
-const char *luatex_version_string = "1.20.5";
+int luatex_version = 121;
+int luatex_revision = '0';
+const char *luatex_version_string = "1.21.0";
 const char *engine_name = my_name;
 
 #include <kpathsea/c-ctype.h>

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2025-02-02 12:36:07 UTC (rev 73690)
@@ -1,4 +1,4 @@
 #ifndef luatex_svn_revision_h
 #define luatex_svn_revision_h
-#define luatex_svn_revision 7643
+#define luatex_svn_revision 7653
 #endif

Modified: trunk/Build/source/texk/web2c/luatexdir/luatexcallbackids.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatexcallbackids.h	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/luatexcallbackids.h	2025-02-02 12:36:07 UTC (rev 73690)
@@ -60,7 +60,7 @@
     finish_pdfpage_callback,
     pre_dump_callback,
     start_file_callback, stop_file_callback,
-    show_error_message_callback, show_lua_error_hook_callback,
+    show_error_message_callback, show_lua_error_hook_callback,show_ignored_error_message_callback,
     show_warning_message_callback,
     hpack_quality_callback, vpack_quality_callback,
     process_rule_callback,

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/commands.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/commands.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/commands.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -789,6 +789,7 @@
     primitive_etex("lastlinefit", assign_int_cmd, int_base + last_line_fit_code, int_base);
     primitive_etex("savingvdiscards", assign_int_cmd, int_base + saving_vdiscards_code, int_base);
     primitive_etex("savinghyphcodes", assign_int_cmd, int_base + saving_hyph_codes_code, int_base);
+    primitive_etex("ignoreprimitiveerror", assign_int_cmd, int_base + ignore_primitive_error_code, int_base);
     primitive_luatex("suppressfontnotfounderror", assign_int_cmd, int_base + suppress_fontnotfound_error_code, int_base);
     primitive_luatex("suppresslongerror", assign_int_cmd, int_base + suppress_long_error_code, int_base);
     primitive_luatex("suppressprimitiveerror", assign_int_cmd, int_base + suppress_primitive_error_code, int_base);

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h	2025-02-02 12:36:07 UTC (rev 73690)
@@ -316,8 +316,11 @@
 #  define math_eq_dir_mode_code 123
 #  define var_fam_code 124
 
-#  define math_option_code 125
+#  define ignore_primitive_error_code 125 				/*ignore some primitive/engine errors*/
 
+#  define math_option_code 126
+
+
 #  define mathoption_int_base_code (math_option_code+1)                 /* one reserve */
 #  define mathoption_int_last_code (mathoption_int_base_code+8)
 
@@ -805,6 +808,7 @@
 #define default_hyphen_char_par            int_par(default_hyphen_char_code)
 #define default_skew_char_par              int_par(default_skew_char_code)
 #define saving_hyph_codes_par              int_par(saving_hyph_codes_code)
+#define ignore_primitive_error_par         int_par(ignore_primitive_error_code)
 
 #define hyphen_penalty_mode_par            int_par(hyphen_penalty_mode_code)
 #define automatic_hyphen_penalty_par       int_par(automatic_hyphen_penalty_code)

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/errors.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/errors.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/errors.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -106,7 +106,12 @@
         if (callback_id > 0) {
             run_callback(callback_id, "->");
         } else {
-            tprint(s);
+	    callback_id = callback_defined(show_ignored_error_message_callback);
+	    if (callback_id > 0) {
+	      run_callback(callback_id, "->");
+	    } else {
+              tprint(s);
+	    }  
         }
         in_error = 0 ;
     }
@@ -136,6 +141,30 @@
     }
 }
 
+void print_ignored_err(const char *s)
+{
+    int callback_id = callback_defined(show_ignored_error_message_callback);
+    if (interaction == error_stop_mode) {
+        wake_up_terminal();
+    }
+    if (callback_id > 0) {
+        err_old_setting = selector;
+        selector = new_string;
+        in_error = 1 ;
+    }
+    if (filelineerrorstylep) {
+        print_file_line();
+    } else {
+        tprint_nl("ignored error ");
+    }
+    tprint(s);
+    if (callback_id <= 0) {
+        xfree(last_error);
+        last_error = (string) xmalloc((unsigned) (strlen(s) + 1));
+        strcpy(last_error,s);
+    }
+}
+
 /*tex
 
 \TeX\ is careful not to call |error| when the print |selector| setting might be

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/errors.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/errors.h	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/errors.h	2025-02-02 12:36:07 UTC (rev 73690)
@@ -50,6 +50,7 @@
 extern void set_last_error_context(void);
 
 extern void print_err(const char *s);
+extern void print_ignored_err(const char *s);
 
 extern void fixup_selector(boolean log_opened);
 

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/mlist.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/mlist.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/mlist.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -1553,6 +1553,7 @@
         return b;
     }
 
+    x = 0;
     f = null_font;
     c = 0;
     if (d == null) {

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/packaging.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/packaging.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/packaging.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -1854,7 +1854,11 @@
             active_height[2 + stretch_order(p)] += stretch(p);
             active_height[7] += shrink(p);
             if ((shrink_order(p) != normal) && (shrink(p) != 0)) {
+	      if (((unsigned int)ignore_primitive_error_par) & 0x1){
+		print_ignored_err("Infinite glue shrinkage found in box being split");
+	      } else {
                 print_err("Infinite glue shrinkage found in box being split");
+		
                 help4(
                     "The box you are \\vsplitting contains some infinitely",
                     "shrinkable glue, e.g., `\\vss' or `\\vskip 0pt minus 1fil'.",
@@ -1862,7 +1866,8 @@
                     "since the offensive shrinkability has been made finite."
                 );
                 error();
-                shrink_order(p) = normal;
+	      }
+	    shrink_order(p) = normal;
             }
         }
         cur_height = cur_height + prev_dp + width(p);

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -2565,14 +2565,13 @@
                 if (math_direction_par==dir_TLT) {
                     /*tex TRT + TLT + \eqno: (swap_dir=true,  math_direction_par=TLT, l=true) */
                     s = new_kern(width(r) + eqno_w);
-                    try_couple_nodes(eqno_box,r);
-                    try_couple_nodes(r,eq_box);
-                    try_couple_nodes(eq_box,s);
                 } else {
                     /*tex TLT + TRT + \eqno: (swap_dir=true,  math_direction_par=TRT, l=true) */
-                    try_couple_nodes(eqno_box,r);
-                    try_couple_nodes(r,eq_box);
+                    s = new_kern(d);
                 }
+                try_couple_nodes(eqno_box,r);
+                try_couple_nodes(r,eq_box);
+                try_couple_nodes(eq_box,s);
             } else {
                 if (math_direction_par==dir_TLT) {
                     /*tex TLT + TLT + \leqno: (swap_dir=false, math_direction_par=TLT, l=true) */
@@ -2579,7 +2578,7 @@
                     s = new_kern(width(r) + eqno_w);
                 } else {
                     /*tex TRT + TRT + \leqno: (swap_dir=false, math_direction_par=TRT, l=true) */
-                    s = new_kern(width(r));
+                    s = new_kern(d);
                 }
                 try_couple_nodes(eqno_box,r);
                 try_couple_nodes(r,eq_box);
@@ -2590,9 +2589,12 @@
             if (swap_dir) {
                 if (math_direction_par==dir_TLT) {
                     /*tex TRT + TLT + \leqno: (swap_dir=true,  math_direction_par=TLT, l=false) */
+                    s = new_kern(d);
                 } else {
                     /*tex TLT + TRT + \leqno: (swap_dir=true,  math_direction_par=TRT, l=false) */
+                    s = new_kern(width(r) + eqno_w);
                 }
+                try_couple_nodes(s,eq_box);
                 try_couple_nodes(eq_box,r);
                 try_couple_nodes(r,eqno_box);
             } else {
@@ -2606,8 +2608,8 @@
                 try_couple_nodes(s,eq_box);
                 try_couple_nodes(eq_box,r);
                 try_couple_nodes(r,eqno_box);
-                eq_box = s;
             }
+            eq_box = s;
         }
         eq_box = hpack(eq_box, 0, additional, -1);
         subtype(eq_box) = equation_list; /* new */

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.c	2025-02-02 12:33:19 UTC (rev 73689)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.c	2025-02-02 12:36:07 UTC (rev 73690)
@@ -2018,6 +2018,17 @@
     }
 }
 
+static void check_disc(halfword p) 
+{ 
+    if (p != null) { 
+        if (vlink(p) != null) { 
+            tlink(p) = tail_of_list(vlink(p));
+        } else { 
+            tlink(p) = null;
+        }
+    }
+}
+
 halfword copy_node(const halfword p)
 {
     /*tex current node being fabricated for new list */
@@ -2091,31 +2102,22 @@
             break;
         case disc_node:
             pre_break(r) = pre_break_head(r);
-            if (vlink_pre_break(p) != null) {
-                s = copy_node_list(vlink_pre_break(p));
-                alink(s) = pre_break(r);
-                tlink_pre_break(r) = tail_of_list(s);
-                vlink_pre_break(r) = s;
-            } else {
-                assert(tlink(pre_break(r)) == null);
-            }
             post_break(r) = post_break_head(r);
-            if (vlink_post_break(p) != null) {
-                s = copy_node_list(vlink_post_break(p));
-                alink(s) = post_break(r);
-                tlink_post_break(r) = tail_of_list(s);
-                vlink_post_break(r) = s;
-            } else {
-                assert(tlink_post_break(r) == null);
+            no_break(r) = no_break_head(r);
+            if (vlink(pre_break(p)) != null) {
+               s = copy_node_list(vlink(pre_break(p)));
+               vlink(pre_break(r)) = s;
+               check_disc(pre_break(r));
             }
-            no_break(r) = no_break_head(r);
+            if (vlink(post_break(p)) != null) {
+                s = copy_node_list(vlink(post_break(p)));
+                vlink(post_break(r)) = s;
+                check_disc(post_break(r));
+            }
             if (vlink(no_break(p)) != null) {
-                s = copy_node_list(vlink_no_break(p));
-                alink(s) = no_break(r);
-                tlink_no_break(r) = tail_of_list(s);
-                vlink_no_break(r) = s;
-            } else {
-                assert(tlink_no_break(r) == null);
+                s = copy_node_list(vlink(no_break(p)));
+                vlink(no_break(r)) = s;
+                check_disc(no_break(r));
             }
             break;
         case math_node:



More information about the tex-live-commits mailing list.