texlive[45463] Build/source/texk/web2c/ptexdir: ptex-base.ch:
commits+hironobu at tug.org
commits+hironobu at tug.org
Wed Oct 4 14:57:17 CEST 2017
Revision: 45463
http://tug.org/svn/texlive?view=revision&revision=45463
Author: hironobu
Date: 2017-10-04 14:57:17 +0200 (Wed, 04 Oct 2017)
Log Message:
-----------
ptex-base.ch: direction check in \discretionary (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-10-04 00:37:24 UTC (rev 45462)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2017-10-04 12:57:17 UTC (rev 45463)
@@ -1,3 +1,7 @@
+2017-10-04 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
+
+ * ptex-base.ch: Direction check in \discretionary.
+
2017-09-11 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
* ptex-base.ch: Assigning the default value frees the KINSOKU table
Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2017-10-04 00:37:24 UTC (rev 45462)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2017-10-04 12:57:17 UTC (rev 45463)
@@ -5132,7 +5132,7 @@
end
else begin
if abs(box_dir(p))<>abs(adjust_dir) then
- begin print_err("Direction Incompatible.");
+ begin print_err("Direction Incompatible");
help1("\vadjust's argument and outer vlist must have same direction.");
error; flush_node_list(list_ptr(p));
end
@@ -5326,6 +5326,48 @@
end;
@z
+ at x pTeX: direction check in \discretionary
+@!n:integer; {length of discretionary list}
+ at y
+@!n:integer; {length of discretionary list}
+@!d:integer; {direction}
+ at z
+
+ at x pTeX: direction check in \discretionary
+p:=link(head); pop_nest;
+case saved(-1) of
+0:pre_break(tail):=p;
+1:post_break(tail):=p;
+ at y
+p:=link(head); d:=abs(direction); pop_nest;
+case saved(-1) of
+0:if abs(direction)=d then pre_break(tail):=p
+ else begin
+ print_err("Direction Incompatible");
+ help2("\discretionary's argument and outer hlist must have same direction.")@/
+ ("I delete your first part."); error; pre_break(tail):=null; flush_node_list(p);
+ end;
+1:if abs(direction)=d then post_break(tail):=p
+ else begin
+ print_err("Direction Incompatible");
+ help2("\discretionary's argument and outer hlist must have same direction.")@/
+ ("I delete your second part."); error; post_break(tail):=null; flush_node_list(p);
+ end;
+ at z
+
+ at x pTeX: direction check in \discretionary
+else link(tail):=p;
+if n<=max_quarterword then replace_count(tail):=n
+ at y
+else if (n>0)and(abs(direction)<>d) then
+ begin print_err("Direction Incompatible");
+ help2("\discretionary's argument and outer hlist must have same direction.")@/
+ ("I delete your third part."); flush_node_list(p); n:=0; error;
+ end
+else link(tail):=p;
+if n<=max_quarterword then replace_count(tail):=n
+ at z
+
@x [47.1120] l.22119 - pTeX: discretionary with disp_node
decr(save_ptr); return;
@y
More information about the tex-live-commits
mailing list