summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/eptexdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-03-23 08:31:15 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-03-23 08:31:15 +0000
commit161cc5508f7aa14ffe0713f3d3e4979b551ca6c4 (patch)
tree996c83e64b73b92bb016141f29427992894530b8 /Build/source/texk/web2c/eptexdir
parent95f04855eb17eb020d1d8c8417d3bd09e649c569 (diff)
e-TeX, pTeX, and e-pTeX: reformulate/simplify \lastpenalty & Co
git-svn-id: svn://tug.org/texlive/trunk@21810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/eptexdir')
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog.TL5
-rw-r--r--Build/source/texk/web2c/eptexdir/eptex.ech50
-rw-r--r--Build/source/texk/web2c/eptexdir/etex.ch046
3 files changed, 82 insertions, 19 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog.TL b/Build/source/texk/web2c/eptexdir/ChangeLog.TL
index 6486175f987..89271a45d09 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog.TL
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog.TL
@@ -1,6 +1,11 @@
ChangeLog.TL: TeX Live (TL) changes for e-pTeX
==============================================
+2011-03-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * eptex.ech, etex.ch0: Reformulate @<Fetch an item in the
+ current node...@> to reduce interferences between e-TeX and pTeX.
+
2011-03-18 Peter Breitenlohner <peb@mppmu.mpg.de>
e-pTeX update eptex-110315_tlsvn110318.diff [ptex:00248]
diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech
index 3c16e9b26bb..a1df317dbcf 100644
--- a/Build/source/texk/web2c/eptexdir/eptex.ech
+++ b/Build/source/texk/web2c/eptexdir/eptex.ech
@@ -39,25 +39,43 @@
@d set_box_dir(#) == subtype(#):=(subtype(#)div 8)*8+set_box_dir_end
@z
+@x [26.424] l.8510 - e-pTeX: last node
+@d set_effective_tail==set_effective_tail_pTeX
+@y
+@d set_effective_tail_epTeX(#)== {Ignore final |disp_node| and\slash or \.{\\endM} node}
+set_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;
+ end
+@#
+@d set_effective_tail==set_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(tail)<>math_node)or(subtype(tail)<>end_M_code) then
- if type(tail)<=unset_node then cur_val:=type(tail)+1
+ last_node_type_code: if type(tx)<=unset_node then cur_val:=type(tx)+1
else cur_val:=unset_node+2;
- end; {there are no other cases}
- end
@y
- last_node_type_code:
- if ((type(q)<>math_node)or(subtype(q)<>end_M_code))and(head<>tail) then
- if type(q)<=unset_node then begin
- if type(q)=dir_node then q:=list_ptr(q);
- cur_val:=type(q);
- 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|}
- end; {there are no other cases}
- end;
+ 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
diff --git a/Build/source/texk/web2c/eptexdir/etex.ch0 b/Build/source/texk/web2c/eptexdir/etex.ch0
index 4b5b8365104..124e04796f6 100644
--- a/Build/source/texk/web2c/eptexdir/etex.ch0
+++ b/Build/source/texk/web2c/eptexdir/etex.ch0
@@ -10,6 +10,22 @@
@d count_base=int_base+int_pars {256 user \.{\\count} registers}
@z
+@x [26.413]
+ {fetch an internal parameter}
+label exit;
+var m:halfword; {|chr_code| part of the operand token}
+@!tx:pointer; {effective tail node}
+@y
+ {fetch an internal parameter}
+var m:halfword; {|chr_code| part of the operand token}
+@z
+
+@x [26.413]
+exit:end;
+@y
+end;
+@z
+
@x [26.420]
if q=null then cur_val:=0 @+else cur_val:=mem[q+m].sc;
@y
@@ -17,10 +33,34 @@ if box(cur_val)=null then cur_val:=0 @+else cur_val:=mem[box(cur_val)+m].sc;
@z
@x [26.424]
- else cur_val:=unset_node+2;
- end; {there are no other cases}
+@d set_effective_tail==set_effective_tail_eTeX
+
+@y
+@z
+
+@x [26.424]
+ begin set_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;
+@y
+ 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
@y
- else cur_val:=unset_node+2;
end {there are no other cases}
@z