summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/eptexdir
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/eptexdir')
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog.TL6
-rw-r--r--Build/source/texk/web2c/eptexdir/eptex.ech72
-rw-r--r--Build/source/texk/web2c/eptexdir/etex.ch049
-rw-r--r--Build/source/texk/web2c/eptexdir/etex.ch124
4 files changed, 74 insertions, 77 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog.TL b/Build/source/texk/web2c/eptexdir/ChangeLog.TL
index 2950cfccdae..ca4acea57ab 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog.TL
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog.TL
@@ -1,6 +1,12 @@
ChangeLog.TL: TeX Live (TL) changes for e-pTeX
==============================================
+2011-03-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * eptex.ech, etex.ch[01]: Reformulate @<Fetch an item in the
+ current node...@>, begin_box, and delete_last to fix a bug in
+ \lastpenalty & Co; further reduce e-pTeX interferences.
+
2011-03-25 Peter Breitenlohner <peb@mppmu.mpg.de>
* eptex.ech, etex.ch[01]: Reformulate begin_box and delete_last
diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech
index 8a102eb99e4..49d80ac2d75 100644
--- a/Build/source/texk/web2c/eptexdir/eptex.ech
+++ b/Build/source/texk/web2c/eptexdir/eptex.ech
@@ -39,43 +39,51 @@
@d set_box_dir(#) == subtype(#):=(subtype(#)div 8)*8+set_box_dir_end
@z
+@x [26.413] l.8343 - e-pTeX: scan_something_internal
+var m:halfword; {|chr_code| part of the operand token}
+@y
+label exit;
+var m:halfword; {|chr_code| part of the operand token}
+@z
+
+@x [26.420] l.8474 - pTeX: Fetch a box dimension: dir_node
+begin scan_eight_bit_int; q:=box(cur_val);
+@y
+begin scan_register_num; fetch_box(q);
+@z
+
@x [26.424] l.8510 - e-pTeX: last node
@d find_effective_tail==find_effective_tail_pTeX
@y
-@d find_effective_tail_epTeX(#)== {sets |tx| to last non-\.{\\endM} non-|disp_node|}
-find_effective_tail_pTeX(#);
-if (type(tx)=math_node)and(subtype(tx)=end_M_code) then
- begin r:=head;
- repeat q:=r; r:=link(q); until link(r)=tx;
- if is_char_node(r) then #;
- if type(r)=disp_node then
- if is_char_node(q)or(q=head) then #
- else tx:=q
- else tx:=r;
+@d find_effective_tail_epTeX== {sets |tx| to last non-\.{\\endM} non-|disp_node|}
+tx:=tail;
+if not is_char_node(tx) then
+ begin if type(tx)=disp_node then tx:=prev_node;
+ if not is_char_node(tx) then
+ if (type(tx)=math_node)and(subtype(tx)=end_M_code) then
+ begin r:=head;
+ repeat q:=r; r:=link(q);
+ until r=tx;
+ tx:=q;
+ end;
+ if not is_char_node(tx) then
+ if type(tx)=disp_node then tx:=prev_node;
end
@#
@d find_effective_tail==find_effective_tail_epTeX
@z
-@x [26.424] l.8517 - e-pTeX: node types
- if (tail=head)or(mode=0) then cur_val:=-1;
-@y
- if (tail=head)or(mode=0)or@|
- ((tail=link(head))and not is_char_node(tail)and(type(tail)=disp_node))
- then cur_val:=-1;
-@z
-
@x [26.424] e-pTeX: node types
- last_node_type_code: if type(tx)<=unset_node then cur_val:=type(tx)+1
- else cur_val:=unset_node+2;
+ last_node_type_code: if type(tx)<=unset_node then cur_val:=type(tx)+1
+ else cur_val:=unset_node+2;
@y
- last_node_type_code: if type(tx)<=unset_node then
- begin if type(tx)=dir_node then tx:=list_ptr(tx);
- cur_val:=type(tx);
- if cur_val<dir_node then cur_val:=cur_val+1
- else if cur_val>disp_node then cur_val:=cur_val-1;
- end
- else cur_val:=unset_node; {\epTeX's |unset_node| is \eTeX's |unset_node+2|}
+ last_node_type_code: if type(tx)<=unset_node then
+ begin if type(tx)=dir_node then tx:=list_ptr(tx);
+ cur_val:=type(tx);
+ if cur_val<dir_node then cur_val:=cur_val+1
+ else if cur_val>disp_node then cur_val:=cur_val-1;
+ end
+ else cur_val:=unset_node; {\epTeX's |unset_node| is \eTeX's |unset_node+2|}
@z
@x e-pTeX: if primitives - leave room for three e-TeX codes
@@ -94,6 +102,12 @@ if (type(tx)=math_node)and(subtype(tx)=end_M_code) then
@d set_box_lrstat_end(#) == (#)
@z
+@x [45.996] l.19420
+last_node_type:=type(p)+1;
+@y
+last_node_type:=type(p)+1;
+@z
+
@x [47.1079] l.20920
@!fd:boolean; {a final |disp_node| pair?}
@y
@@ -201,10 +215,10 @@ if fm>0 then {drop \.{\\beginM} \.{\\endM} pair}
@z
@x e-pTeX: displacement value when typesetting right-to-left l.27798
-@!LR_temp:pointer; {holds a temporarily removed \.{\\endM} node}
+@!LR_ptr:pointer; {stack of LR codes for |hpack|, |ship_out|, and |init_math|}
@y
@!revdisp:scaled; {temporary value of displacement}
-@!LR_temp:pointer; {holds a temporarily removed \.{\\endM} node}
+@!LR_ptr:pointer; {stack of LR codes for |hpack|, |ship_out|, and |init_math|}
@z
@x e-pTeX: reverse nodes of an hlist l.28010
diff --git a/Build/source/texk/web2c/eptexdir/etex.ch0 b/Build/source/texk/web2c/eptexdir/etex.ch0
index 900b02c1715..cb2f8795e87 100644
--- a/Build/source/texk/web2c/eptexdir/etex.ch0
+++ b/Build/source/texk/web2c/eptexdir/etex.ch0
@@ -14,6 +14,7 @@
{fetch an internal parameter}
label exit;
var m:halfword; {|chr_code| part of the operand token}
+@!q,@!r:pointer; {general purpose indices}
@!tx:pointer; {effective tail node}
@y
{fetch an internal parameter}
@@ -27,8 +28,10 @@ end;
@z
@x [26.420]
+begin scan_register_num; fetch_box(q);
if q=null then cur_val:=0 @+else cur_val:=mem[q+m].sc;
@y
+begin scan_eight_bit_int;
if box(cur_val)=null then cur_val:=0 @+else cur_val:=mem[box(cur_val)+m].sc;
@z
@@ -39,29 +42,32 @@ if box(cur_val)=null then cur_val:=0 @+else cur_val:=mem[box(cur_val)+m].sc;
@z
@x [26.424]
- begin find_effective_tail(return);
- case cur_chr of
- int_val: if type(tx)=penalty_node then cur_val:=penalty(tx);
- dimen_val: if type(tx)=kern_node then cur_val:=width(tx);
- glue_val: if type(tx)=glue_node then
- begin cur_val:=glue_ptr(tx);
- if subtype(tx)=mu_glue then cur_val_level:=mu_val;
- end;
+ find_effective_tail;
@y
+@z
+
+@x [26.424]
+ if not is_char_node(tx)and(mode<>0) then
+ case cur_chr of
+ int_val: if type(tx)=penalty_node then cur_val:=penalty(tx);
+ dimen_val: if type(tx)=kern_node then cur_val:=width(tx);
+ glue_val: if type(tx)=glue_node then
+ begin cur_val:=glue_ptr(tx);
+ if subtype(tx)=mu_glue then cur_val_level:=mu_val;
+@y
+ if not is_char_node(tail)and(mode<>0) then
case cur_chr of
int_val: if type(tail)=penalty_node then cur_val:=penalty(tail);
dimen_val: if type(tail)=kern_node then cur_val:=width(tail);
glue_val: if type(tail)=glue_node then
begin cur_val:=glue_ptr(tail);
if subtype(tail)=mu_glue then cur_val_level:=mu_val;
- end;
@z
@x [26.424]
- end; {there are no other cases}
- end
+ else if (mode=vmode)and(tx=head) then
@y
- end {there are no other cases}
+ else if (mode=vmode)and(tail=head) then
@z
@x [27.468]
@@ -129,19 +135,17 @@ else box(n):=vpack(q,natural);
@y
@z
@x [47.1080]
- begin find_effective_tail(goto done);
+else begin find_effective_tail;
+ if not is_char_node(tx) then
if (type(tx)=hlist_node)or(type(tx)=vlist_node) then
- @<Remove the last box, unless it's part of a discretionary@>;
- done:end;
@y
+else begin if not is_char_node(tail) then
if (type(tail)=hlist_node)or(type(tail)=vlist_node) then
- @<Remove the last box, unless it's part of a discretionary@>;
@z
@x [47.1081]
begin fetch_effective_tail(goto done);
cur_box:=tx; shift_amount(cur_box):=0;
-end
@y
begin q:=head;
repeat p:=q;
@@ -153,7 +157,6 @@ q:=link(p);
until q=tail;
cur_box:=tail; shift_amount(cur_box):=0;
tail:=p; link(p):=null;
-done:end
@z
@x [47.1096]
@@ -170,11 +173,10 @@ done:end
@z
@x [47.1105]
-else if not is_char_node(tail) then
- begin find_effective_tail(return);
- if type(tx)<>cur_chr then return;
- fetch_effective_tail(return);
- flush_node_list(tx);
+else begin find_effective_tail;
+ if not is_char_node(tx) then if type(tx)=cur_chr then
+ begin fetch_effective_tail(return);
+ flush_node_list(tx);
@y
else begin if not is_char_node(tail) then if type(tail)=cur_chr then
begin q:=head;
@@ -186,7 +188,6 @@ else begin if not is_char_node(tail) then if type(tail)=cur_chr then
q:=link(p);
until q=tail;
link(p):=null; flush_node_list(tail); tail:=p;
- end;
@z
@x [47.1110]
diff --git a/Build/source/texk/web2c/eptexdir/etex.ch1 b/Build/source/texk/web2c/eptexdir/etex.ch1
index db1aa74ec32..0032ec606e5 100644
--- a/Build/source/texk/web2c/eptexdir/etex.ch1
+++ b/Build/source/texk/web2c/eptexdir/etex.ch1
@@ -24,30 +24,6 @@
@d etex_int_base=tex_int_pars {base for \eTeX's integer parameters}
@z
-@x [26.413]
-@!q:halfword; {general purpose index}
-@y
-@!qx:halfword; {general purpose index}
-@z
-
-@x [26.420]
-if box(cur_val)=null then cur_val:=0
-else
- begin q:=box(cur_val);
- while (q<>null)and(box_dir(q)<>abs(direction)) do q:=link(q);
- if q=null then
- begin r:=link(box(cur_val)); link(box(cur_val)):=null;
- q:=new_dir_node(box(cur_val),abs(direction)); link(box(cur_val)):=r;
-@y
-if q=null then cur_val:=0
-else
- begin qx:=q;
- while (q<>null)and(box_dir(q)<>abs(direction)) do q:=link(q);
- if q=null then
- begin r:=link(qx); link(qx):=null;
- q:=new_dir_node(qx,abs(direction)); link(qx):=r;
-@z
-
@x [27.468]
@d job_name_code=10 {command code for \.{\\jobname}}
@y