texlive[45329] Build/source/texk/web2c/ptexdir: ptex-base.ch:

commits+hironobu at tug.org commits+hironobu at tug.org
Mon Sep 18 15:13:06 CEST 2017


Revision: 45329
          http://tug.org/svn/texlive?view=revision&revision=45329
Author:   hironobu
Date:     2017-09-18 15:13:05 +0200 (Mon, 18 Sep 2017)
Log Message:
-----------
ptex-base.ch: improved adjust_hlist, etc (H. Kitagawa)

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ptexdir/ChangeLog
    trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch

Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2017-09-18 00:21:25 UTC (rev 45328)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2017-09-18 13:13:05 UTC (rev 45329)
@@ -1,3 +1,9 @@
+2017-09-09  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* ptex-base.ch: Remove JFM glue after kinsoku penalty at the top
+	of list in adjust_hlist. Do not insert kinsoku penalty when it is
+	set to zero.
+
 2017-09-09  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
 	* ptftopl.ch: Check for fifth byte (= upper byte of lf) of input JFM.

Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2017-09-18 00:21:25 UTC (rev 45328)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2017-09-18 13:13:05 UTC (rev 45329)
@@ -6401,7 +6401,7 @@
 
 @<Insert kinsoku penalty@>=
 begin kp:=get_kinsoku_pos(cx,cur_pos);
-if kp<>no_entry then
+if kp<>no_entry then if kinsoku_penalty(kp)<>0 then
   begin if kinsoku_type(kp)=pre_break_penalty_code then
     begin if not is_char_node(cur_q)and(type(cur_q)=penalty_node) then
       penalty(cur_q):=penalty(cur_q)+kinsoku_penalty(kp)
@@ -6419,7 +6419,7 @@
 
 @ @<Insert |pre_break_penalty| of |cur_chr|@>=
 begin kp:=get_kinsoku_pos(cur_chr,cur_pos);
-if kp<>no_entry then
+if kp<>no_entry then if kinsoku_penalty(kp)<>0 then
   begin if kinsoku_type(kp)=pre_break_penalty_code then
     if not is_char_node(tail)and(type(tail)=penalty_node) then
       penalty(tail):=penalty(tail)+kinsoku_penalty(kp)
@@ -6432,7 +6432,7 @@
 
 @ @<Insert |post_break_penalty|@>=
 begin kp:=get_kinsoku_pos(cx,cur_pos);
-if kp<>no_entry then
+if kp<>no_entry then if kinsoku_penalty(kp)<>0 then
   begin if kinsoku_type(kp)=post_break_penalty_code then
     begin tail_append(new_penalty(kinsoku_penalty(kp)));
     subtype(tail):=kinsoku_pena;
@@ -6608,11 +6608,19 @@
   end;
 u:=space_ptr(p); add_glue_ref(u);
 s:=xspace_ptr(p); add_glue_ref(s);
-if not is_char_node(link(p)) {p1.0.9d}
-    and(type(link(p))=glue_node)and(subtype(link(p))=jfm_skip+1) then
+if not is_char_node(link(p)) then
+  if (type(link(p))=glue_node)and(subtype(link(p))=jfm_skip+1) then
   begin v:=link(p); link(p):=link(v);
   fast_delete_glue_ref(glue_ptr(v)); free_node(v,small_node_size);
-  end;
+  end
+  else if (type(link(p))=penalty_node)and(subtype(link(p))=kinsoku_pena) then
+    begin v:=link(link(p));
+    if (not is_char_node(v)) and (type(v)=glue_node)and(subtype(v)=jfm_skip+1) then
+      begin link(link(p)):=link(v);
+      fast_delete_glue_ref(glue_ptr(v)); free_node(v,small_node_size);
+      end
+    end;
+
 i:=0; insert_skip:=no_skip; p:=link(p); v:=p; q:=p;
 while p<>null do
   begin if is_char_node(p) then



More information about the tex-live-commits mailing list