summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2008-06-06 08:54:55 +0000
committerJonathan Kew <jfkthame@googlemail.com>2008-06-06 08:54:55 +0000
commitecc329b75dd65c445ecdef856686d85381a5975f (patch)
tree9b5e9e5cb5c47e7f3b663575421007dbbcd1ac84 /Build
parent0f6504dfac0740402a541a6e6fa002b01a658f70 (diff)
xetex 0.999.1 (bugfix for \discretionary)
git-svn-id: svn://tug.org/texlive/trunk@8593 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.ch30
1 files changed, 26 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/xetexdir/xetex.ch b/Build/source/texk/web2c/xetexdir/xetex.ch
index 030a4828f3f..d7adc709950 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.ch
+++ b/Build/source/texk/web2c/xetexdir/xetex.ch
@@ -65,7 +65,7 @@ authorization from SIL International.
@d XeTeX_version=0
@d XeTeX_revision==".999"
-@d XeTeX_version_string=='-0.999.0' {current \XeTeX\ version}
+@d XeTeX_version_string=='-0.999.1' {current \XeTeX\ version}
@z
@x
@@ -5720,7 +5720,24 @@ collected:
end else begin
{ must be restricted hmode, so no need for line-breaking or discretionaries }
- if (not is_char_node(main_pp)) and (type(main_pp)=whatsit_node) and (subtype(main_pp)=native_word_node) and (native_font(main_pp)=main_f) then begin
+ { but there might already be explicit |disc_node|s in the list }
+ main_ppp := head;
+ if main_ppp<>main_pp then { find node preceding tail, skipping discretionaries }
+ while (link(main_ppp)<>main_pp) do begin
+ if (not is_char_node(main_ppp)) and (type(main_ppp=disc_node)) then begin
+ temp_ptr:=main_ppp;
+ for main_p:=1 to replace_count(temp_ptr) do main_ppp:=link(main_ppp);
+ end;
+ if main_ppp<>main_pp then main_ppp:=link(main_ppp);
+ end;
+ if (not is_char_node(main_pp))
+ and (type(main_pp)=whatsit_node)
+ and (subtype(main_pp)=native_word_node)
+ and (native_font(main_pp)=main_f)
+ and (main_ppp<>main_pp)
+ and (not is_char_node(main_ppp))
+ and (type(main_ppp)<>disc_node)
+ then begin
{ total string length for the new merged whatsit }
link(main_pp) := new_native_word_node(main_f, main_k + native_length(main_pp));
tail := link(main_pp);
@@ -7088,10 +7105,15 @@ begin
native_word_node:
begin
{ merge with any following word fragments in same font, discarding discretionary breaks }
- while (link(q) <> p) do q := link(q); { bring q up in preparation for deletion of nodes starting at p }
+ if type(q) = disc_node then k:=replace_count(q) else k:=0;
+ while (link(q) <> p) do begin
+ decr(k);
+ q := link(q); { bring q up in preparation for deletion of nodes starting at p }
+ if type(q) = disc_node then k:=replace_count(q);
+ end;
pp := link(p);
restart:
- if (pp <> null) and (not is_char_node(pp)) then begin
+ if (k <= 0) and (pp <> null) and (not is_char_node(pp)) then begin
if (type(pp) = whatsit_node)
and (subtype(pp) = native_word_node)
and (native_font(pp) = native_font(p)) then begin