texlive[42031] Build/source/texk/web2c/luatexdir: luatexdir: sync

commits+kakuto at tug.org commits+kakuto at tug.org
Sat Sep 10 11:53:00 CEST 2016


Revision: 42031
          http://tug.org/svn/texlive?view=revision&revision=42031
Author:   kakuto
Date:     2016-09-10 11:52:59 +0200 (Sat, 10 Sep 2016)
Log Message:
-----------
luatexdir: sync with the upstream

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/font/luafont.w
    trunk/Build/source/texk/web2c/luatexdir/font/texfont.h
    trunk/Build/source/texk/web2c/luatexdir/lang/texlang.w
    trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
    trunk/Build/source/texk/web2c/luatexdir/lua/luainit.w
    trunk/Build/source/texk/web2c/luatexdir/luatex.c
    trunk/Build/source/texk/web2c/luatexdir/ptexlib.h
    trunk/Build/source/texk/web2c/luatexdir/tex/commands.w
    trunk/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
    trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h
    trunk/Build/source/texk/web2c/luatexdir/tex/errors.w
    trunk/Build/source/texk/web2c/luatexdir/tex/linebreak.w
    trunk/Build/source/texk/web2c/luatexdir/tex/mainbody.w
    trunk/Build/source/texk/web2c/luatexdir/tex/mlist.w
    trunk/Build/source/texk/web2c/luatexdir/tex/texfileio.w
    trunk/Build/source/texk/web2c/luatexdir/tex/texmath.h
    trunk/Build/source/texk/web2c/luatexdir/tex/texmath.w
    trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.w

Modified: trunk/Build/source/texk/web2c/luatexdir/font/luafont.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/font/luafont.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/font/luafont.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -103,6 +103,8 @@
     "SubscriptShiftDownWithSuperscript",
     "FractionDelimiterSize",
     "FractionDelimiterDisplayStyleSize",
+    "NoLimitSubFactor",
+    "NoLimitSupFactor",
     NULL,
 };
 

Modified: trunk/Build/source/texk/web2c/luatexdir/font/texfont.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/font/texfont.h	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/font/texfont.h	2016-09-10 09:52:59 UTC (rev 42031)
@@ -139,7 +139,6 @@
     int _font_cache_id;         /* internal information */
     char _font_encodingbytes;   /* 1 or 2 bytes */
     boolean _font_oldmath;      /* default to false when MathConstants seen */
-
     int _font_slant;            /* a slant in ppt */
     int _font_extend;           /* an extension in ppt, or 1000 */
     int font_max_shrink;
@@ -230,114 +229,114 @@
 
 boolean cmp_font_area(int, str_number);
 
-#  define font_reassign(a,b)            { if (a!=NULL) free(a); a = b; }
+#  define font_reassign(a,b)             { if (a!=NULL) free(a); a = b; }
 
-#  define font_filename(a)            font_tables[a]->_font_filename
-#  define set_font_filename(f,b)      font_reassign(font_filename(f),b)
+#  define font_filename(a)               font_tables[a]->_font_filename
+#  define set_font_filename(f,b)         font_reassign(font_filename(f),b)
 
-#  define font_fullname(a)            font_tables[a]->_font_fullname
-#  define set_font_fullname(f,b)      font_reassign(font_fullname(f),b)
+#  define font_fullname(a)               font_tables[a]->_font_fullname
+#  define set_font_fullname(f,b)         font_reassign(font_fullname(f),b)
 
-#  define font_psname(a)              font_tables[a]->_font_psname
-#  define set_font_psname(f,b)        font_reassign(font_psname(f),b)
+#  define font_psname(a)                 font_tables[a]->_font_psname
+#  define set_font_psname(f,b)           font_reassign(font_psname(f),b)
 
-#  define font_encodingname(a)        font_tables[a]->_font_encodingname
-#  define set_font_encodingname(f,b)  font_reassign(font_encodingname(f),b)
+#  define font_encodingname(a)           font_tables[a]->_font_encodingname
+#  define set_font_encodingname(f,b)     font_reassign(font_encodingname(f),b)
 
-#  define cmp_font_filename(a,b)      (!(font_filename(a)!=NULL || font_filename(b)!=NULL || \
-                                       strcmp(font_filename(a),font_filename(b))))
-#  define cmp_font_fullname(a,b)      (!(font_fullname(a)!=NULL || font_fullname(b)!=NULL || \
-                                       strcmp(font_fullname(a),font_fullname(b))))
-#  define cmp_font_encodingname(a,b)  (!(font_encoding(a)!=NULL || font_encodingname(b)!=NULL || \
-                                       strcmp(font_encodingname(a),font_encodingname(b))))
+#  define cmp_font_filename(a,b)         (!(font_filename(a)!=NULL || font_filename(b)!=NULL || \
+                                          strcmp(font_filename(a),font_filename(b))))
+#  define cmp_font_fullname(a,b)         (!(font_fullname(a)!=NULL || font_fullname(b)!=NULL || \
+                                          strcmp(font_fullname(a),font_fullname(b))))
+#  define cmp_font_encodingname(a,b)     (!(font_encoding(a)!=NULL || font_encodingname(b)!=NULL || \
+                                          strcmp(font_encodingname(a),font_encodingname(b))))
 
-#  define font_bc(a)                  font_tables[a]->_font_bc
-#  define set_font_bc(f,b)            font_bc(f) = b
+#  define font_bc(a)                     font_tables[a]->_font_bc
+#  define set_font_bc(f,b)               font_bc(f) = b
 
-#  define font_ec(a)                  font_tables[a]->_font_ec
-#  define set_font_ec(f,b)            font_ec(f) = b
+#  define font_ec(a)                     font_tables[a]->_font_ec
+#  define set_font_ec(f,b)               font_ec(f) = b
 
-#  define font_used(a)                (font_tables[a]!=NULL && font_tables[a]->_font_used)
-#  define set_font_used(a,b)          font_tables[a]->_font_used = b
+#  define font_used(a)                   (font_tables[a]!=NULL && font_tables[a]->_font_used)
+#  define set_font_used(a,b)             font_tables[a]->_font_used = b
 
-#  define font_touched(a)             font_tables[a]->_font_touched
-#  define set_font_touched(a,b)       font_touched(a) = b
+#  define font_touched(a)                font_tables[a]->_font_touched
+#  define set_font_touched(a,b)          font_touched(a) = b
 
-#  define font_type(a)                font_tables[a]->_font_type
-#  define set_font_type(a,b)          font_type(a) = b;
+#  define font_type(a)                   font_tables[a]->_font_type
+#  define set_font_type(a,b)             font_type(a) = b;
 
-#  define font_format(a)              font_tables[a]->_font_format
-#  define font_format_name(a)         font_format_strings[font_tables[a]->_font_format]
-#  define set_font_format(a,b)        font_format(a) = b
+#  define font_format(a)                 font_tables[a]->_font_format
+#  define font_format_name(a)            font_format_strings[font_tables[a]->_font_format]
+#  define set_font_format(a,b)           font_format(a) = b
 
-#  define font_embedding(a)           font_tables[a]->_font_embedding
-#  define set_font_embedding(a,b)     font_embedding(a) = b
+#  define font_embedding(a)              font_tables[a]->_font_embedding
+#  define set_font_embedding(a,b)        font_embedding(a) = b
 
-#  define font_cidversion(a)          font_tables[a]->_font_cidversion
-#  define set_font_cidversion(a,b)    font_cidversion(a) = b
+#  define font_cidversion(a)             font_tables[a]->_font_cidversion
+#  define set_font_cidversion(a,b)       font_cidversion(a) = b
 
-#  define font_cidsupplement(a)       font_tables[a]->_font_cidsupplement
-#  define set_font_cidsupplement(a,b) font_cidsupplement(a) = b
+#  define font_cidsupplement(a)          font_tables[a]->_font_cidsupplement
+#  define set_font_cidsupplement(a,b)    font_cidsupplement(a) = b
 
-#  define font_cidordering(a)         font_tables[a]->_font_cidordering
-#  define set_font_cidordering(f,b)   font_reassign(font_cidordering(f),b)
+#  define font_cidordering(a)            font_tables[a]->_font_cidordering
+#  define set_font_cidordering(f,b)      font_reassign(font_cidordering(f),b)
 
-#  define font_cidregistry(a)         font_tables[a]->_font_cidregistry
-#  define set_font_cidregistry(f,b)   font_reassign(font_cidregistry(f),b)
+#  define font_cidregistry(a)            font_tables[a]->_font_cidregistry
+#  define set_font_cidregistry(f,b)      font_reassign(font_cidregistry(f),b)
 
-#  define font_map(a)                 font_tables[a]->_font_map
-#  define set_font_map(a,b)           font_map(a) = b
+#  define font_map(a)                    font_tables[a]->_font_map
+#  define set_font_map(a,b)              font_map(a) = b
 
-#  define font_cache_id(a)            font_tables[a]->_font_cache_id
-#  define set_font_cache_id(a,b)      font_cache_id(a) = b
+#  define font_cache_id(a)               font_tables[a]->_font_cache_id
+#  define set_font_cache_id(a,b)         font_cache_id(a) = b
 
-#  define font_encodingbytes(a)       font_tables[a]->_font_encodingbytes
-#  define set_font_encodingbytes(a,b) font_encodingbytes(a) = b
+#  define font_encodingbytes(a)          font_tables[a]->_font_encodingbytes
+#  define set_font_encodingbytes(a,b)    font_encodingbytes(a) = b
 
-#  define font_oldmath(a)             font_tables[a]->_font_oldmath
-#  define set_font_oldmath(a,b)       font_oldmath(a) = b
+#  define font_oldmath(a)                font_tables[a]->_font_oldmath
+#  define set_font_oldmath(a,b)          font_oldmath(a) = b
 
-#  define font_slant(a)               font_tables[a]->_font_slant
-#  define set_font_slant(a,b)         font_slant(a) = b
+#  define font_slant(a)                  font_tables[a]->_font_slant
+#  define set_font_slant(a,b)            font_slant(a) = b
 
-#  define font_extend(a)              font_tables[a]->_font_extend
-#  define set_font_extend(a,b)        font_extend(a) = b
+#  define font_extend(a)                 font_tables[a]->_font_extend
+#  define set_font_extend(a,b)           font_extend(a) = b
 
-#  define font_shrink(a)              font_tables[a]->_font_shrink
-#  define set_font_shrink(a,b)        font_shrink(a) = b
+#  define font_shrink(a)                 font_tables[a]->_font_shrink
+#  define set_font_shrink(a,b)           font_shrink(a) = b
 
-#  define font_stretch(a)             font_tables[a]->_font_stretch
-#  define set_font_stretch(a,b)       font_stretch(a) = b
+#  define font_stretch(a)                font_tables[a]->_font_stretch
+#  define set_font_stretch(a,b)          font_stretch(a) = b
 
-#  define font_max_shrink(a)          font_tables[a]->font_max_shrink
-#  define set_font_max_shrink(a,b)    font_max_shrink(a) = b
+#  define font_max_shrink(a)             font_tables[a]->font_max_shrink
+#  define set_font_max_shrink(a,b)       font_max_shrink(a) = b
 
-#  define font_max_stretch(a)         font_tables[a]->font_max_stretch
-#  define set_font_max_stretch(a,b)   font_max_stretch(a) = b
+#  define font_max_stretch(a)            font_tables[a]->font_max_stretch
+#  define set_font_max_stretch(a,b)      font_max_stretch(a) = b
 
-#  define font_step(a)                font_tables[a]->_font_step
-#  define set_font_step(a,b)          font_step(a) = b
+#  define font_step(a)                   font_tables[a]->_font_step
+#  define set_font_step(a,b)             font_step(a) = b
 
-#  define font_auto_expand(a)         font_tables[a]->_font_auto_expand
-#  define set_font_auto_expand(a,b)   font_auto_expand(a) = b
+#  define font_auto_expand(a)            font_tables[a]->_font_auto_expand
+#  define set_font_auto_expand(a,b)      font_auto_expand(a) = b
 
-#  define font_tounicode(a)           font_tables[a]->_font_tounicode
-#  define set_font_tounicode(a,b)     font_tounicode(a) = b
+#  define font_tounicode(a)              font_tables[a]->_font_tounicode
+#  define set_font_tounicode(a,b)        font_tounicode(a) = b
 
-#  define hyphen_char(a)              font_tables[a]->_hyphen_char
-#  define set_hyphen_char(a,b)        hyphen_char(a) = b
+#  define hyphen_char(a)                 font_tables[a]->_hyphen_char
+#  define set_hyphen_char(a,b)           hyphen_char(a) = b
 
-#  define skew_char(a)                font_tables[a]->_skew_char
-#  define set_skew_char(a,b)          skew_char(a) = b
+#  define skew_char(a)                   font_tables[a]->_skew_char
+#  define set_skew_char(a,b)             skew_char(a) = b
 
-#  define font_natural_dir(a)         font_tables[a]->_font_natural_dir
-#  define set_font_natural_dir(a,b)   font_natural_dir(a) = b
+#  define font_natural_dir(a)            font_tables[a]->_font_natural_dir
+#  define set_font_natural_dir(a,b)      font_natural_dir(a) = b
 
-#  define pdf_font_num(a)             font_tables[a]->_pdf_font_num
-#  define set_pdf_font_num(a,b)       pdf_font_num(a) = b
+#  define pdf_font_num(a)                font_tables[a]->_pdf_font_num
+#  define set_pdf_font_num(a,b)          pdf_font_num(a) = b
 
-#  define pdf_font_attr(a)            font_tables[a]->_pdf_font_attr
-#  define set_pdf_font_attr(a,b)      pdf_font_attr(a) = b
+#  define pdf_font_attr(a)               font_tables[a]->_pdf_font_attr
+#  define set_pdf_font_attr(a,b)         pdf_font_attr(a) = b
 
 #  define left_boundarychar  -1
 #  define right_boundarychar -2

Modified: trunk/Build/source/texk/web2c/luatexdir/lang/texlang.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lang/texlang.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/lang/texlang.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -906,11 +906,17 @@
                 }
                 if (wordlen <= lhmin) {
                     lhmin = lhmin - lchar + 1 ;
+                    if (lhmin < 0)
+                        lhmin = 1;
                 }
                 if (wordlen >= rhmin) {
                     rhmin = rhmin - lchar + 1 ;
+                    if (rhmin < 0)
+                        rhmin = 1;
                 }
                 hmin = hmin - lchar + 1 ;
+                if (hmin < 0)
+                    rhmin = 1;
                 lchar = character(r) ;
             }
             hy = uni2string(hy, (unsigned) lchar);
@@ -962,20 +968,35 @@
                 left = wordstart;
                 for (i = lhmin; i > 1; i--) {
                     left = vlink(left);
-                    while (!is_simple_character(left))
+                    while (!is_simple_character(left)) {
                         left = vlink(left);
+                    }
+                    /*
+                    if (!left)
+                        break ;
+                    */
+                    /* what is left overruns right .. a bit messy */
                 }
                 right = r;
                 for (i = rhmin; i > 0; i--) {
                     right = alink(right);
-                    while (!is_simple_character(right))
+                    while (!is_simple_character(right)) {
                         right = alink(right);
+                    }
+                    /*
+                    if (!right)
+                        break ;
+                    */
+                    /* what is right overruns left .. a bit messy */
                 }
+                /* maybe an extra check ... */
+                /* if (left && right) { */
 #ifdef VERBOSE
-                formatted_warning("hyphenation","hyphenate %s (c=%d,l=%d,r=%d) from %c to %c",
-                    utf8word, clang, lhmin, rhmin, character(left), character(right));
+                    formatted_warning("hyphenation","hyphenate %s (c=%d,l=%d,r=%d) from %c to %c",
+                        utf8word, clang, lhmin, rhmin, character(left), character(right));
 #endif
-                (void) hnj_hyphen_hyphenate(lang->patterns, wordstart, end_word, wordlen, left, right, &langdata);
+                    (void) hnj_hyphen_hyphenate(lang->patterns, wordstart, end_word, wordlen, left, right, &langdata);
+                /* } */
             }
         }
         explicit_hyphen = false;

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lnodelib.c	2016-09-10 09:52:59 UTC (rev 42031)
@@ -1694,6 +1694,28 @@
     return 0;                   /* not reached */
 }
 
+static int lua_nodelib_rangedimensions(lua_State * L) /* parent, first, last */
+{
+    int top = lua_gettop(L);
+    if (top > 1) {
+        scaled_whd siz;
+        halfword l = *(check_isnode(L, 1)); /* parent */
+        halfword n = *(check_isnode(L, 2)); /* first */
+        halfword p = null;
+        if (top > 2) {
+            p = *(check_isnode(L, 3)); /* last */
+        }
+        siz = natural_sizes(n, p, (glue_ratio) glue_set(l), glue_sign(l), glue_order(l), box_dir(l));
+        lua_pushinteger(L, siz.wd);
+        lua_pushinteger(L, siz.ht);
+        lua_pushinteger(L, siz.dp);
+        return 3;
+    } else {
+        luaL_error(L, "missing argument to 'rangedimensions' (2 or more nodes expected)");
+    }
+    return 0;                   /* not reached */
+}
+
 /* node.direct.dimensions*/
 
 static int lua_nodelib_direct_dimensions(lua_State * L)
@@ -1729,11 +1751,33 @@
         lua_pushinteger(L, siz.dp);
         return 3;
     } else {
-        luaL_error(L, "missing argument to 'dimensions' (node expected)");
+        luaL_error(L, "missing argument to 'dimensions' (direct node expected)");
     }
     return 0;                   /* not reached */
 }
 
+static int lua_nodelib_direct_rangedimensions(lua_State * L) /* parent, first, last */
+{
+    int top = lua_gettop(L);
+    if (top > 1) {
+        scaled_whd siz;
+        halfword l = (halfword) lua_tointeger(L,1); /* parent */
+        halfword n = (halfword) lua_tointeger(L,2); /* first */
+        halfword p = null;
+        if (top > 2) {
+            p = (halfword) lua_tointeger(L,3); /* last */
+        }
+        siz = natural_sizes(n, p, (glue_ratio) glue_set(l), glue_sign(l), glue_order(l), box_dir(l));
+        lua_pushinteger(L, siz.wd);
+        lua_pushinteger(L, siz.ht);
+        lua_pushinteger(L, siz.dp);
+        return 3;
+    } else {
+        luaL_error(L, "missing argument to 'rangedimensions' (2 or more direct nodes expected)");
+    }
+    return 0;                   /* not reached */
+}
+
 /* node.mlist_to_hlist (create a hlist from a formula) */
 
 static int lua_nodelib_mlist_to_hlist(lua_State * L)
@@ -6991,6 +7035,7 @@
     {"count", lua_nodelib_direct_count},
     {"current_attr", lua_nodelib_direct_currentattr},
     {"dimensions", lua_nodelib_direct_dimensions},
+    {"rangedimensions", lua_nodelib_direct_rangedimensions},
  /* {"do_ligature_n", lua_nodelib_direct_do_ligature_n}, */
     {"end_of_math", lua_nodelib_direct_end_of_math},
  /* {"family_font", lua_nodelib_mfont}, */ /* no node argument */
@@ -7086,6 +7131,7 @@
     {"count", lua_nodelib_count},
     {"current_attr", lua_nodelib_currentattr},
     {"dimensions", lua_nodelib_dimensions},
+    {"rangedimensions", lua_nodelib_rangedimensions},
  /* {"do_ligature_n", lua_nodelib_do_ligature_n}, */
     {"end_of_math", lua_nodelib_end_of_math},
     {"family_font", lua_nodelib_mfont},

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/luainit.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/luainit.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/luainit.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -167,7 +167,11 @@
     return;
 }
 
+
 @ @c
+int kpse_init = -1;
+
+@ @c
 string input_name = NULL;
 
 static string user_progname = NULL;
@@ -471,26 +475,16 @@
             }
         }
 #ifdef WIN32
-    } else if (sargv[sargc-1] && sargv[sargc-1][0] != '-' &&
+    } else if (sargc > 1 && sargv[sargc-1] && sargv[sargc-1][0] != '-' &&
                sargv[sargc-1][0] != '\\') {
         if (sargv[sargc-1][0] == '&')
             dump_name = xstrdup(sargv[sargc-1] + 1);
         else  {
-            char *p;
             if (sargv[sargc-1][0] == '*')
                 input_name = xstrdup(sargv[sargc-1] + 1);
             else
                 input_name = xstrdup(sargv[sargc-1]);
             sargv[sargc-1] = normalize_quotes(input_name, "argument");
-            /* Same as
-                  input_name = (char *)xbasename(input_name);
-               but without cast const => non-const.  */
-            input_name += xbasename(input_name) - input_name;
-            p = strrchr(input_name, '.');
-            if (p != NULL && strcasecmp(p, ".tex") == 0)
-                *p = '\0';
-            if (!c_job_name)
-                c_job_name = normalize_quotes(input_name, "jobname");
         }
         if (safer_option)      /* --safer implies --nosocket */
             nosocket_option = 1;
@@ -596,8 +590,10 @@
             TEX_format_default = concat(dump_name, DUMP_EXT);
     } else {
         /* For |dump_name| to be NULL is a bug.  */
-        if (!ini_version)
-            normal_error("luatex","no format given");
+        if (!ini_version) {
+          fprintf(stdout, "no format given, quitting\n");
+          exit(1);
+        }
     }
 }
 
@@ -858,7 +854,7 @@
 {
     char *given_file = NULL;
     char *banner;
-    int kpse_init;
+    /*int kpse_init;*/
     size_t len;
     int starttime;
     int utc;

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex.c	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex.c	2016-09-10 09:52:59 UTC (rev 42031)
@@ -29,9 +29,9 @@
 #define TeX
 
 int luatex_version = 98;        /* \.{\\luatexversion}  */
-int luatex_revision = '3';      /* \.{\\luatexrevision}  */
-int luatex_date_info = 2016081300;     /* the compile date is now hardwired */
-const char *luatex_version_string = "0.98.3";
+int luatex_revision = '4';      /* \.{\\luatexrevision}  */
+int luatex_date_info = 2016090500;     /* the compile date is now hardwired */
+const char *luatex_version_string = "0.98.4";
 const char *engine_name = my_name;     /* the name of this engine */
 
 #include <kpathsea/c-ctype.h>

Modified: trunk/Build/source/texk/web2c/luatexdir/ptexlib.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ptexlib.h	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/ptexlib.h	2016-09-10 09:52:59 UTC (rev 42031)
@@ -373,4 +373,7 @@
 
 extern int program_name_set;    /* in lkpselib.c */
 
+extern int kpse_init; /* in luainit.w */
+extern int kpse_available(const char * m); /* in texfileio.w */
+
 #endif                          /* PTEXLIB_H */

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/commands.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/commands.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/commands.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -557,6 +557,8 @@
     primitive_luatex("Umathlimitbelowvgap", set_math_param_cmd, math_param_limit_below_vgap, 0);
     primitive_luatex("Umathlimitbelowbgap", set_math_param_cmd, math_param_limit_below_bgap, 0);
     primitive_luatex("Umathlimitbelowkern", set_math_param_cmd, math_param_limit_below_kern, 0);
+    primitive_luatex("Umathnolimitsubfactor", set_math_param_cmd, math_param_nolimit_sub_factor, 0); /* bonus */
+    primitive_luatex("Umathnolimitsupfactor", set_math_param_cmd, math_param_nolimit_sup_factor, 0); /* bonus */
     primitive_luatex("Umathunderdelimitervgap", set_math_param_cmd, math_param_under_delimiter_vgap, 0);
     primitive_luatex("Umathunderdelimiterbgap", set_math_param_cmd, math_param_under_delimiter_bgap, 0);
     primitive_luatex("Umathoverdelimitervgap", set_math_param_cmd, math_param_over_delimiter_vgap, 0);
@@ -751,6 +753,7 @@
     primitive_luatex("matheqnogapstep", assign_int_cmd, int_base + math_eqno_gap_step_code, int_base);
     primitive_luatex("mathdisplayskipmode", assign_int_cmd, int_base + math_display_skip_mode_code, int_base);
     primitive_luatex("mathscriptsmode", assign_int_cmd, int_base + math_scripts_mode_code, int_base);
+    primitive_luatex("mathnolimitsmode", assign_int_cmd, int_base + math_nolimits_mode_code, int_base);
     primitive_luatex("synctex", assign_int_cmd, int_base + synctex_code, int_base);
 
     primitive_etex("currentgrouplevel", last_item_cmd, current_group_level_code, 0);

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/dumpdata.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/dumpdata.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -23,7 +23,7 @@
 
 /* we start with 907: the sum of the values of the bytes of "don knuth" */
 
-#define FORMAT_ID (907+17)
+#define FORMAT_ID (907+18)
 #if ((FORMAT_ID>=0) && (FORMAT_ID<=256))
 #error Wrong value for FORMAT_ID.
 #endif

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h	2016-09-10 09:52:59 UTC (rev 42031)
@@ -278,20 +278,21 @@
 #  define math_eqno_gap_step_code 87                                    /* factor/1000 used for distance between eq and eqno */
 #  define math_display_skip_mode_code 88
 #  define math_scripts_mode_code 89
-#  define synctex_code 90                                               /* is synctex file generation enabled ?  */
-#  define shape_mode_code 91
-#  define first_valid_language_code 92
-#  define hyphenation_bounds_code 93
+#  define math_nolimits_mode_code 90
+#  define synctex_code 91                                               /* is synctex file generation enabled ?  */
+#  define shape_mode_code 92
+#  define first_valid_language_code 93
+#  define hyphenation_bounds_code 94
 
-#  define math_option_code 94
+#  define math_option_code 95
 
-#  define mathoption_int_base (int_base+95)                             /* one reserve */
-#  define mathoption_int_last (int_base+100)
+#  define mathoption_int_base (int_base+96)                             /* one reserve */
+#  define mathoption_int_last (int_base+104)
 
-#  define backend_int_base (int_base+101)
-#  define backend_int_last (int_base+125)
+#  define backend_int_base (int_base+105)
+#  define backend_int_last (int_base+129)
 
-#  define tex_int_pars (126)                                            /* total number of integer parameters */
+#  define tex_int_pars (130)                                            /* total number of integer parameters */
 
 #  define page_direction_code (tex_int_pars)
 #  define body_direction_code (tex_int_pars+1)
@@ -637,6 +638,7 @@
 #define disable_kern_par                   int_par(disable_kern_code)
 #define disable_space_par                  int_par(disable_space_code)
 #define scripts_mode_par                   int_par(math_scripts_mode_code)
+#define nolimits_mode_par                  int_par(math_nolimits_mode_code)
 
 #define thin_mu_skip_par                   glue_par(thin_mu_skip_code)
 #define med_mu_skip_par                    glue_par(med_mu_skip_code)

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/errors.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/errors.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/errors.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -219,6 +219,7 @@
 {
     update_terminal();
     ready_already = 0;
+    lua_close(Luas); /* new per 0.99 */
     if ((history != spotless) && (history != warning_issued))
         uexit(1);
     else

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/linebreak.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/linebreak.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/linebreak.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -183,7 +183,7 @@
                           club_penalty_par,
                           club_penalties_par_ptr,
                           (d ? display_widow_penalties_par_ptr : widow_penalties_par_ptr),
-                          (d ? display_widow_penalty_code : widow_penalty_code),
+                          (d ? display_widow_penalty_par : widow_penalty_par),
                           broken_penalty_par,
                           final_par_glue);
     }

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/mainbody.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/mainbody.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/mainbody.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -449,7 +449,7 @@
     initialize_math();
     fixup_selector(log_opened_global);
     check_texconfig_init();
-    if ((iloc < ilimit) && (get_cat_code(cat_code_table_code, buffer[iloc]) != escape_cmd))
+    if ((iloc < ilimit) && (get_cat_code(cat_code_table_par, buffer[iloc]) != escape_cmd))
         start_input();          /* \.{\\input} assumed */
     /* DIR: Initialize |text_dir_ptr| */
     text_dir_ptr = new_dir(0);

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/mlist.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/mlist.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/mlist.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -53,6 +53,7 @@
 @ @c
 #define is_new_mathfont(A)   ((font_math_params(A) >0) && (math_old_par == 0))
 #define is_old_mathfont(A,B) ((font_math_params(A)==0) && (font_params(A)>=(B)))
+#define do_new_math(A)       ((font_math_params(A) >0) && (font_oldmath(A) == 0) && (math_old_par == 0))
 
 @
 \def\LuaTeX{Lua\TeX}
@@ -94,7 +95,7 @@
     }                                                        \
   } while (0)
 
-#define font_MATH_par(a,b)                                                  \
+#define font_MATH_par(a,b) \
   (font_math_params(a)>=b ? font_math_param(a,b) : undefined_math_parameter)
 
 @ here are the math parameters that are font-dependant
@@ -197,7 +198,7 @@
 static scaled accent_base_height(int f)
 {
     scaled a;
-    if (is_new_mathfont(f)) {
+    if (do_new_math(f)) {
         a = font_MATH_par(f, AccentBaseHeight);
         if (a == undefined_math_parameter)
             a = x_height(f);
@@ -280,6 +281,7 @@
 
 @c
 #define get_math_param_or_error(a,b) do_get_math_param_or_error(a, math_param_##b, #b)
+#define get_math_param_or_zero(a,b) do_get_math_param_or_zero(a, math_param_##b, #b)
 
 static scaled do_get_math_param_or_error(int var, int param, const char *name)
 {
@@ -291,6 +293,15 @@
     return a;
 }
 
+static scaled do_get_math_param_or_zero(int var, int param, const char *name)
+{
+    scaled a = get_math_param(param, var);
+    if (a == undefined_math_parameter) {
+        a = 0;
+    }
+    return a;
+}
+
 @ A variant on a suggestion on the list based on analysis by UV.
 
 @c
@@ -365,6 +376,9 @@
 #define limit_below_bgap(a)      get_math_param_or_error(a, limit_below_bgap)
 #define limit_below_kern(a)      get_math_param_or_error(a, limit_below_kern)
 
+#define nolimit_sub_factor(a)    get_math_param_or_zero(a, nolimit_sub_factor)
+#define nolimit_sup_factor(a)    get_math_param_or_zero(a, nolimit_sup_factor)
+
 #define sub_shift_drop(a)        get_math_param_or_error(a, sub_shift_drop)
 #define sup_shift_drop(a)        get_math_param_or_error(a, sup_shift_drop)
 #define sub_shift_down(a)        get_math_param_or_error(a, sub_shift_down)
@@ -563,6 +577,14 @@
             0, lvl);
         DEFINE_DMATH_PARAMETERS(math_param_limit_below_kern, size_id,
             0, lvl);
+        DEFINE_MATH_PARAMETERS(math_param_nolimit_sub_factor, size_id,
+            font_MATH_par(f, NoLimitSubFactor), lvl); /* bonus */
+        DEFINE_DMATH_PARAMETERS(math_param_nolimit_sub_factor, size_id,
+            font_MATH_par(f, NoLimitSubFactor), lvl); /* bonus */
+        DEFINE_MATH_PARAMETERS(math_param_nolimit_sup_factor, size_id,
+            font_MATH_par(f, NoLimitSupFactor), lvl); /* bonus */
+        DEFINE_DMATH_PARAMETERS(math_param_nolimit_sup_factor, size_id,
+            font_MATH_par(f, NoLimitSupFactor), lvl); /* bonus */
 
         DEFINE_MATH_PARAMETERS(math_param_fraction_rule, size_id,
             font_MATH_par(f, FractionRuleThickness), lvl);
@@ -819,6 +841,14 @@
            big_op_spacing5(size_id), lvl);
         DEFINE_DMATH_PARAMETERS(math_param_limit_below_kern, size_id,
             big_op_spacing5(size_id), lvl);
+        DEFINE_MATH_PARAMETERS(math_param_nolimit_sub_factor, size_id,
+            font_MATH_par(f, NoLimitSubFactor), lvl); /* bonus */
+        DEFINE_DMATH_PARAMETERS(math_param_nolimit_sub_factor, size_id,
+            font_MATH_par(f, NoLimitSubFactor), lvl); /* bonus */
+        DEFINE_MATH_PARAMETERS(math_param_nolimit_sup_factor, size_id,
+            font_MATH_par(f, NoLimitSupFactor), lvl); /* bonus */
+        DEFINE_DMATH_PARAMETERS(math_param_nolimit_sup_factor, size_id,
+            font_MATH_par(f, NoLimitSupFactor), lvl); /* bonus */
         DEFINE_MATH_PARAMETERS(math_param_subsup_vgap, size_id,
             4 * default_rule_thickness(size_id), lvl);
         DEFINE_DMATH_PARAMETERS(math_param_subsup_vgap, size_id,
@@ -991,7 +1021,7 @@
 {
     pointer b, p; /* the new box and its character node */
     b = new_null_box();
-    if (is_new_mathfont(f))
+    if (do_new_math(f))
         width(b) = char_width(f, c);
     else
         width(b) = char_width(f, c) + char_italic(f, c);
@@ -1404,7 +1434,7 @@
                 b = get_delim_box(d, ext, f, v, att, cur_style, vlist_node);
             }
             if (delta != NULL) {
-                if (is_new_mathfont(f)) {
+                if (do_new_math(f)) {
                     *delta = char_vert_italic(f,x);
                 } else {
                     *delta = char_italic(f,x);
@@ -1414,12 +1444,12 @@
                 *stack = true ;
         } else {
             b = char_box(f, c, att);
-            if (!is_new_mathfont(f)) {
+            if (!do_new_math(f)) {
                 /* italic gets added to width */
                 width(b) += char_italic(f, c);
             }
             if (delta != NULL) {
-                *delta = char_italic(f,x);
+                *delta = char_italic(f, c); /* was historically (f, x) */
             }
             if (stack != NULL)
                 *stack = false ;
@@ -2113,7 +2143,7 @@
     boolean s_is_absolute = false; /* will be true if a top-accent is placed in |s| */
     if (type(nucleus(q)) == math_char_node) {
         fetch(nucleus(q));
-        if (is_new_mathfont(cur_f)) {
+        if (do_new_math(cur_f)) {
             /*
                 there is no bot_accent so let's assume similarity
 
@@ -2183,7 +2213,7 @@
     x = clean_box(nucleus(q), cramped_style(cur_style), cur_style);
     w = width(x);
     h = height(x);
-    if (is_new_mathfont(cur_f) && !s_is_absolute) {
+    if (do_new_math(cur_f) && !s_is_absolute) {
         s = half(w);
         s_is_absolute = true;
     }
@@ -2261,7 +2291,7 @@
     } else if ((vlink(q) != null) && (type(nucleus(q)) == math_char_node)) {
         /* only pure math char nodes */
         internal_font_number f = fam_fnt(math_fam(nucleus(q)),cur_size);
-        if (is_new_mathfont(f)) {
+        if (do_new_math(f)) {
             ic = char_italic(f,math_character(nucleus(q)));
         }
     }
@@ -2545,7 +2575,7 @@
         put the fraction into a box with its delimiters, and make |new_hlist(q)|
         point to it
     */
-    if (is_new_mathfont(cur_f)) {
+    if (do_new_math(cur_f)) {
         if (math_use_old_fraction_scaling_par) {
             delta = fraction_del_size_old(cur_style);
         } else {
@@ -2610,7 +2640,7 @@
                 small_fam(y) = math_fam(nucleus(q));
                 small_char(y) = math_character(nucleus(q));
                 x = do_delimiter(q, y, text_size, ok_size, false, cur_style, true, NULL, &delta);
-                if (is_new_mathfont(cur_f)) {
+                if (do_new_math(cur_f)) {
                     /* we never added italic correction */
                 } else if ((subscr(q) != null) && (subtype(q) != op_noad_type_limits)) {
                     /* remove italic correction */
@@ -2628,7 +2658,7 @@
                 delta = char_italic(cur_f, cur_c);
                 x = clean_box(nucleus(q), cur_style, cur_style);
                 if (delta != null) {
-                    if (is_new_mathfont(cur_f)) {
+                    if (do_new_math(cur_f)) {
                         /* we never added italic correction */
                     } else if ((subscr(q) != null) && (subtype(q) != op_noad_type_limits)) {
                         /* remove italic correction */
@@ -2642,7 +2672,7 @@
             delta = char_italic(cur_f, cur_c);
             x = clean_box(nucleus(q), cur_style, cur_style);
             if (delta != 0) {
-                if (is_new_mathfont(cur_f)) {
+                if (do_new_math(cur_f)) {
                     /* we never added italic correction */
                 } else if ((subscr(q) != null) && (subtype(q) != op_noad_type_limits)) {
                     /* remove italic correction */
@@ -2662,15 +2692,56 @@
     /* we now handle op_nod_type_no_limits here too */
 
     if (subtype(q) == op_noad_type_no_limits) {
-        if (is_new_mathfont(cur_f)) {
-            if (delta != 0) {
-                delta = half(delta) ;
-            }
+        if (do_new_math(cur_f)) {
+            /*
+                if (delta != 0) {
+                    delta = half(delta) ;
+                }
+            */
             p = check_nucleus_complexity(q, &dummy, cur_style);
             if ((subscr(q) == null) && (supscr(q) == null)) {
                 assign_new_hlist(q, p);
             } else {
-                make_scripts(q, p, 0, cur_style, delta, -delta);
+                /*
+                    make_scripts(q, p, 0, cur_style, delta, -delta);
+                */
+                int mode = nolimits_mode_par; /* wins */
+                /*
+                    for easy configuration ... fonts are somewhat inconsistent and the
+                    values for italic correction run from 30 to 60% of the width
+                */
+                switch (mode) {
+                    case 0 :
+                        /* as with limits */
+                        make_scripts(q, p, 0, cur_style, half(delta), -half(delta));
+                        break;
+                    case 1 :
+                        /* MathConstants driven */
+                        make_scripts(q, p, 0, cur_style,
+                             round_xn_over_d(delta, nolimit_sup_factor(cur_style), 1000),
+                            -round_xn_over_d(delta, nolimit_sub_factor(cur_style), 1000));
+                    case 2 :
+                        /* no correction */
+                        make_scripts(q, p, 0, cur_style, 0, 0);
+                        break;
+                    case 3 :
+                        /* half bottom correction */
+                        make_scripts(q, p, 0, cur_style, 0, -half(delta));
+                        break;
+                    case 4 :
+                        /* full bottom correction */
+                        make_scripts(q, p, 0, cur_style, 0, -delta);
+                        break;
+                    default :
+                        /* half bottom and top correction */
+                        if (mode > 15) {
+                            /* for quickly testing values */
+                            make_scripts(q, p, 0, cur_style, 0, -round_xn_over_d(delta, mode, 1000));
+                        } else {
+                            make_scripts(q, p, 0, cur_style, half(delta), -half(delta));
+                        }
+                        break;
+                }
             }
             delta = 0;
         } else {
@@ -2691,7 +2762,7 @@
         v = new_null_box();
         reset_attributes(v, node_attr(q));
         type(v) = vlist_node;
-        if (is_new_mathfont(cur_f)) {
+        if (do_new_math(cur_f)) {
             n = null;
             if (! math_no_italic_compensation_par) {
                 n = nucleus(q);
@@ -2802,7 +2873,7 @@
             supscr(q) = null;
         }
         assign_new_hlist(q, v);
-        if (is_new_mathfont(cur_f)) {
+        if (do_new_math(cur_f)) {
             delta = 0;
         }
     }
@@ -2844,7 +2915,7 @@
             fetch(nucleus(q));
             a = cur_c;
             /* add italic correction */
-            if (is_new_mathfont(cur_f) && (char_italic(cur_f,math_character(nucleus(q))) != 0)) {
+            if (do_new_math(cur_f) && (char_italic(cur_f,math_character(nucleus(q))) != 0)) {
                 p = new_kern(char_italic(cur_f,math_character(nucleus(q))));
                 reset_attributes(p, node_attr(q));
                 couple_nodes(p,vlink(q));
@@ -3005,7 +3076,7 @@
 {
     scaled corr_height_top = 0, corr_height_bot = 0;
     scaled krn_l = 0, krn_r = 0, krn = 0;
-    if ((!is_new_mathfont(l_f)) || (!is_new_mathfont(r_f)) || (!char_exists(l_f, l_c)) || (!char_exists(r_f, r_c)))
+    if ((!do_new_math(l_f)) || (!do_new_math(r_f)) || (!char_exists(l_f, l_c)) || (!char_exists(r_f, r_c)))
         return MATH_KERN_NOT_FOUND;
 
     if (cmd == sup_mark_cmd) {
@@ -3732,7 +3803,7 @@
         fetch(nucleus(q));
         if (char_exists(cur_f, cur_c)) {
             /* we could look at neighbours */
-            if (is_new_mathfont(cur_f)) {
+            if (do_new_math(cur_f)) {
                 *delta = 0 ; /* cf spec only the last one */
             } else {
                 *delta = char_italic(cur_f, cur_c);
@@ -3739,7 +3810,7 @@
             }
             p = new_glyph(cur_f, cur_c);
             reset_attributes(p, node_attr(nucleus(q)));
-            if (is_new_mathfont(cur_f)) {
+            if (do_new_math(cur_f)) {
                 if (! math_no_char_italic_par) {
                     /* keep italic, but bad with two successive letters */
                 } else if (get_char_cat_code(cur_c) == 11) {
@@ -3759,7 +3830,7 @@
                 couple_nodes(p,x);
                 *delta = 0;
             }
-            if (is_new_mathfont(cur_f)) {
+            if (do_new_math(cur_f)) {
                 *delta = char_italic(cur_f, cur_c); /* must be more selective */
             }
         }

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texfileio.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texfileio.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texfileio.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -107,6 +107,14 @@
 @ find an \.{\\input} or \.{\\read} file. |n| differentiates between those case.
 
 @c
+int kpse_available(const char *m) {
+    if (!kpse_init) {
+          fprintf(stdout,"missing kpse replacement callback '%s', quitting\n",m);
+          exit(1);
+    }
+    return 1 ;
+}
+
 char *luatex_find_read_file(const char *s, int n, int callback_index)
 {
     char *ftemp = NULL;
@@ -113,7 +121,7 @@
     int callback_id = callback_defined(callback_index);
     if (callback_id > 0) {
         (void) run_callback(callback_id, "dS->R", n, s, &ftemp);
-    } else {
+    } else if (kpse_available("find_read_file")) {
         /* use kpathsea here */
         ftemp = find_in_output_directory(s);
         if (!ftemp)
@@ -136,7 +144,7 @@
     if (callback_id > 0) {
         (void) run_callback(callback_id, "S->R", s, &ftemp);
 
-    } else {
+    } else if (kpse_available("find_read_file")) {
         /* use kpathsea here */
         switch (callback_index) {
         case find_enc_file_callback:

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texmath.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texmath.h	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texmath.h	2016-09-10 09:52:59 UTC (rev 42031)
@@ -155,6 +155,8 @@
     math_param_limit_below_vgap,
     math_param_limit_below_bgap,
     math_param_limit_below_kern,
+    math_param_nolimit_sub_factor, /* bonus */
+    math_param_nolimit_sup_factor, /* bonus */
     math_param_under_delimiter_vgap,
     math_param_under_delimiter_bgap,
     math_param_over_delimiter_vgap,
@@ -307,6 +309,8 @@
     SubscriptShiftDownWithSuperscript,
     FractionDelimiterSize,
     FractionDelimiterDisplayStyleSize,
+    NoLimitSubFactor,
+    NoLimitSupFactor,
     MATH_param_last,
 } MATH_param_codes;
 

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texmath.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texmath.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texmath.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -452,6 +452,7 @@
     "fractiondenomvgap", "fractiondenomdown", "fractiondelsize",
     "limitabovevgap", "limitabovebgap", "limitabovekern",
     "limitbelowvgap", "limitbelowbgap", "limitbelowkern",
+    "nolimitsubfactor", "nolimitsupfactor", /* bonus */
     "underdelimitervgap", "underdelimiterbgap",
     "overdelimitervgap", "overdelimiterbgap",
     "subshiftdrop", "supshiftdrop", "subshiftdown",

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.w
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.w	2016-09-10 01:16:03 UTC (rev 42030)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texnodes.w	2016-09-10 09:52:59 UTC (rev 42031)
@@ -2827,11 +2827,23 @@
 @ Recursive calls on |show_node_list| therefore use the following pattern:
 @c
 #define node_list_display(A) do { \
-    append_char('.');             \
-    show_node_list(A);            \
-    flush_char();                 \
+    append_char('.');  \
+    show_node_list(A); \
+    flush_char();      \
 } while (0)
 
+#define node_list_display_x(A,B) do { \
+    if ((B) != null) {     \
+        append_char('.');  \
+        append_char(A);    \
+        append_char(' ');  \
+        show_node_list(B); \
+        flush_char();      \
+        flush_char();      \
+        flush_char();      \
+    } \
+} while (0)
+
 /* prints a node list symbolically */
 
 void show_node_list(int p)
@@ -3145,17 +3157,26 @@
                 /* Display discretionary |p|; */
                 /* The |post_break| list of a discretionary node is indicated by a prefixed
                    `\.{\char'174}' instead of the `\..' before the |pre_break| list. */
+                /* We're not compatible anyway  so ...
+                    tprint_esc("discretionary");
+                    print_int(disc_penalty(p));
+                    print_char('|');
+                    if (vlink(no_break(p)) != null) {
+                        tprint(" replacing ");
+                        node_list_display(vlink(no_break(p)));
+                    }
+                    node_list_display(vlink(pre_break(p)));
+                    append_char('|');
+                    show_node_list(vlink(post_break(p)));
+                    flush_char();
+                */
                 tprint_esc("discretionary");
+                tprint(" (penalty ");
                 print_int(disc_penalty(p));
-                print_char('|');
-                if (vlink(no_break(p)) != null) {
-                    tprint(" replacing ");
-                    node_list_display(vlink(no_break(p)));
-                }
-                node_list_display(vlink(pre_break(p))); /* recursive call */
-                append_char('|');
-                show_node_list(vlink(post_break(p)));
-                flush_char();   /* recursive call */
+                print_char(')');
+                node_list_display_x('<',vlink(pre_break(p)));
+                node_list_display_x('>',vlink(post_break(p)));
+                node_list_display_x('=',vlink(no_break(p)));
                 break;
             case mark_node:
                 /* Display mark |p|; */



More information about the tex-live-commits mailing list