SOURCES: xetex-discretionary.patch (NEW) - xetex-discretionary.pat...
qrczak
qrczak at pld-linux.org
Sun Jul 15 18:04:18 CEST 2007
Author: qrczak Date: Sun Jul 15 16:04:18 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- xetex-discretionary.patch: fixed \discretionary, based on
http://scripts.sil.org/svn-view/xetex/TRUNK/texk/web2c/xetexdir/xetex.ch?r1=466&r2=467&view=patch
---- Files affected:
SOURCES:
xetex-discretionary.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/xetex-discretionary.patch
diff -u /dev/null SOURCES/xetex-discretionary.patch:1.1
--- /dev/null Sun Jul 15 18:04:18 2007
+++ SOURCES/xetex-discretionary.patch Sun Jul 15 18:04:13 2007
@@ -0,0 +1,165 @@
+--- xetex-0.996.orig/texk/web2c/xetexdir/xetex-new.ch 2007-01-24 20:42:26.000000000 +0100
++++ xetex-0.996/texk/web2c/xetexdir/xetex-new.ch 2007-07-15 17:33:32.000000000 +0200
+@@ -714,8 +714,6 @@
+
+ So |native_node_size|, which does not include any space for the actual text, is 6.}
+
+- at d deleted_native_node=41 {native words that have been superseded by their successors}
+-
+ @d native_node_size=6 {size of a native_word node (plus the actual chars) -- see also xetex.h}
+ @d native_size(#)==mem[#+4].hh.b0
+ @d native_font(#)==mem[#+4].hh.b1
+@@ -2936,8 +2934,7 @@
+ end
+
+ @ @<Advance |q| past ignorable nodes@>=
+-while (q <> null) and (not is_char_node(q))
+- and ( (type(q) = disc_node) or ((type(q) = whatsit_node) and (subtype(q) = deleted_native_node)) ) do
++while (q <> null) and (not is_char_node(q)) and (type(q) = disc_node) do
+ q := link(q)
+
+ @ We ought to give special care to the efficiency of one part of |hlist_out|,
+@@ -3293,7 +3290,6 @@
+ or (subtype(v)=pic_node)
+ or (subtype(v)=pdf_node)
+ then break_width[1]:=break_width[1]-width(v)
+- else if subtype(v)=deleted_native_node then do_nothing
+ else confusion("disc1a");
+ othercases confusion("disc1")
+ @z
+@@ -3307,7 +3303,6 @@
+ or (subtype(s)=pic_node)
+ or (subtype(s)=pdf_node)
+ then break_width[1]:=break_width[1]+width(s)
+- else if subtype(s)=deleted_native_node then do_nothing
+ else confusion("disc2a");
+ othercases confusion("disc2")
+ @z
+@@ -3327,7 +3322,6 @@
+ or (subtype(s)=pic_node)
+ or (subtype(s)=pdf_node)
+ then disc_width:=disc_width+width(s)
+- else if subtype(s)=deleted_native_node then do_nothing
+ else confusion("disc3a");
+ othercases confusion("disc3")
+ @z
+@@ -3341,7 +3335,6 @@
+ or (subtype(s)=pic_node)
+ or (subtype(s)=pdf_node)
+ then act_width:=act_width+width(s)
+- else if subtype(s)=deleted_native_node then do_nothing
+ else confusion("disc4a");
+ othercases confusion("disc4")
+ @z
+@@ -3784,7 +3777,7 @@
+ @!main_p:pointer; {temporary register for list manipulation}
+ @y
+ @!main_p:pointer; {temporary register for list manipulation}
+-@!main_pp:pointer; {another temporary register for list manipulation}
++@!main_pp,@!main_ppp:pointer; {more temporary registers for list manipulation}
+ @!main_h:pointer; {temp for hyphen offset in native-font text}
+ @!is_hyph:boolean; {whether the last char seen is the font's hyphenchar}
+ @z
+@@ -3859,11 +3852,22 @@
+
+ if mode=hmode then begin
+
++ main_ppp := head;
++ if main_ppp<>main_pp then
++ while (link(main_ppp)<>main_pp) do
++ main_ppp:=link(main_ppp); { find node preceding tail }
++
+ temp_ptr := str_start_macro(str_ptr);
+ repeat
+ if main_h = 0 then main_h := main_k;
+
+- 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
++ 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 type(main_ppp)<>disc_node
++ then begin
+
+ { make a new temp string that contains the concatenated text of |tail| + the current word/fragment }
+ main_k := main_h + native_length(main_pp);
+@@ -3888,9 +3892,13 @@
+ do incr(main_h); { look for next hyphen or end of text }
+ if (main_h < main_k) then incr(main_h);
+
+- { flag the previous node as no longer valid }
+- free_native_glyph_info(main_pp);
+- subtype(main_pp) := deleted_native_node;
++ { remove the preceding node from the list }
++ link(main_ppp) := link(main_pp);
++ link(main_pp) := null;
++ flush_node_list(main_pp);
++ main_pp := tail;
++ while (link(main_ppp)<>main_pp) do
++ main_ppp:=link(main_ppp);
+
+ end else begin
+
+@@ -3929,9 +3937,14 @@
+ set_native_char(tail, main_p + native_length(main_pp), str_pool[str_start_macro(str_ptr) + main_p]);
+ set_native_metrics(tail, XeTeX_use_glyph_metrics);
+
+- { flag the previous node as no longer valid }
+- free_native_glyph_info(main_pp);
+- subtype(main_pp) := deleted_native_node;
++ { remove the preceding node from the list }
++ main_p := head;
++ if main_p<>main_pp then
++ while link(main_p)<>main_pp do
++ main_p := link(main_p);
++ link(main_p) := link(main_pp);
++ link(main_pp) := null;
++ flush_node_list(main_pp);
+ end else begin
+ { package the current string into a |native_word| whatsit }
+ link(main_pp) := new_native_word_node(main_f, main_k);
+@@ -3997,7 +4010,6 @@
+ @y
+ if type(p)<>kern_node then if type(p)<>ligature_node then
+ if (type(p)<>whatsit_node) or ((subtype(p)<>native_word_node)
+- and (subtype(p)<>deleted_native_node)
+ and (subtype(p)<>glyph_node)) then
+ begin print_err("Improper discretionary list");
+ @z
+@@ -4802,8 +4814,6 @@
+ print_char(" ");
+ print_native_word(p);
+ end;
+-deleted_native_node:
+- print("[DELETED]");
+ glyph_node:begin
+ print_esc(font_id_text(native_font(p)));
+ print(" glyph#");
+@@ -4840,9 +4850,6 @@
+ native_glyph_info_ptr(r):=0; native_glyph_count(r):=0;
+ copy_native_glyph_info(p, r);
+ end;
+-deleted_native_node: begin words:=native_size(p);
+- r:=get_node(words);
+- end;
+ glyph_node: begin r:=get_node(glyph_node_size);
+ words:=glyph_node_size;
+ end;
+@@ -4858,7 +4865,6 @@
+ othercases confusion("ext3")
+ @y
+ native_word_node: begin free_native_glyph_info(p); free_node(p,native_size(p)); end;
+-deleted_native_node: free_node(p,native_size(p));
+ glyph_node: free_node(p,glyph_node_size);
+ pic_node,pdf_node: free_node(p,total_pic_node_size(p));
+ pdf_save_pos_node:
+@@ -5231,7 +5237,7 @@
+ @x
+ language_node:do_nothing;
+ @y
+-language_node,deleted_native_node:do_nothing;
++language_node:do_nothing;
+ @z
+
+ @x
================================================================
More information about the pld-cvs-commit
mailing list