summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/eptexdir/etex.ch1
blob: 8596e15770dba99e2032b213d343c9dd9fd9f6a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
% eptexdir/etex.ch1: changefile used to build e-pTeX, see eptexdir/eptex-base.ch for details.
% Public domain. Originally written by Peter Breitenlohner <tex-live@tug.org>.

@x [1.2]
@d banner==pTeX_banner
@d banner_k==pTeX_banner_k
@y
@d banner==epTeX_banner
@d banner_k==epTeX_banner_k
@z

@x [12.184]
    begin print(", "); print_direction(box_dir(p));
@y
    begin print_direction_alt(box_dir(p));
@z

@x [17.236]
@d int_pars=60 {total number of integer parameters}
@d count_base=int_base+int_pars {256 user \.{\\count} registers}
@y
@d tex_int_pars=60 {total number of \TeX's integer parameters}
@#
@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
@d etex_convert_base=10 {base for \eTeX's command codes}
@d eTeX_revision_code=etex_convert_base {command code for \.{\\eTeXrevision}}
@d etex_convert_codes=etex_convert_base+1 {end of \eTeX's command codes}
@d job_name_code=etex_convert_codes {command code for \.{\\jobname}}
@z

@x [30.581]
var @!l:0..255; {small indices or counters}
@y
var @!l:0..255; {small indices or counters}
old_setting: integer; {saved value of |tracing_online|}
@z

@x [32.619]
base_line:=cur_v; left_edge:=cur_h; disp:=0;
@y
base_line:=cur_v; disp:=0; revdisp:=0;
prev_p:=this_box+list_offset;
@<Initialize |hlist_out| for mixed direction typesetting@>;
left_edge:=cur_h;
@z

@x [32.622]
@<Output node |p| for |hlist_out|...@>=
@y
@<Output node |p| for |hlist_out|...@>=
@z
@x [32.622]
    p:=link(p);
@y
    prev_p:=link(prev_p); {N.B.: not |prev_p:=p|, |p| might be |lig_trick|}
    p:=link(p);
@z

@x [32.623]
disp_node: begin disp:=disp_dimen(p); cur_v:=base_line+disp; end;
@y
disp_node: begin disp:=disp_dimen(p); revdisp:=disp; cur_v:=base_line+disp; end;
@z

@x [32.624]
  cur_h:=edge+width(p); cur_v:=base_line+disp; cur_dir_hv:=save_dir;
@y
  cur_h:=edge; cur_v:=base_line+disp; cur_dir_hv:=save_dir;
@z

@x [33.649]
exit: last_disp:=disp; hpack:=r;
@y
exit: last_disp:=disp;
if TeXXeT_en then @<Check for LR anomalies at the end of |hpack|@>; 
hpack:=r;
@z

@x [33.651]
  disp_node:disp:=disp_dimen(p);
@y
  disp_node:begin disp:=disp_dimen(p); revdisp:=disp; end;
@z

@x [44.977]
q:=prune_page_top(q); p:=list_ptr(v);
if q=null then box(n):=null {the |eq_level| of the box stays the same}
else begin
  box(n):=vpack(q,natural); set_box_dir(box(n))(box_dir(v));
  end;
@y
q:=prune_page_top(q,saving_vdiscards>0); p:=list_ptr(v);
if q<>null then begin
    q:=vpack(q,natural); set_box_dir(q)(box_dir(v));
  end;
change_box(q);
@z

@x [47.1080]
    if (type(tail)=hlist_node)or(type(tail)=vlist_node)
          or(type(tail)=dir_node) then
      @<Remove the last box, unless it's part of a discretionary@>;
@y
    begin if (type(tail)=math_node)and(subtype(tail)=end_M_code) then
      remove_end_M;
    if (type(tail)=hlist_node)or(type(tail)=vlist_node)
          or(type(tail)=dir_node) then
      @<Remove the last box, unless it's part of a discretionary@>;
    if LR_temp<>null then insert_end_M;
    end;
@z

@x [47.1096]
  else begin adjust_hlist(head,true); line_break(widow_penalty)
@y
  else begin adjust_hlist(head,true); line_break(false)
@z

@x [47.1105]
  if not is_char_node(tail) then if type(tail)=cur_chr then
@y
  if not is_char_node(tail) then
  begin if (type(tail)=math_node)and(subtype(tail)=end_M_code) then
    remove_end_M;
  if type(tail)=cur_chr then
@z
@x [47.1105]
    link(p):=null; flush_node_list(tail); tail:=p;
    end;
@y
    link(p):=null; flush_node_list(tail); tail:=p;
    end;
  if LR_temp<>null then insert_end_M;
  end;
@z

@x [47.1110]
  begin if type(box(cur_val))=dir_node then
    begin delete_glue_ref(space_ptr(box(cur_val)));
    delete_glue_ref(xspace_ptr(box(cur_val)));
    free_node(box(cur_val),box_node_size);
@y
  begin if type(p)=dir_node then
    begin delete_glue_ref(space_ptr(p));
    delete_glue_ref(xspace_ptr(p));
    free_node(p,box_node_size);
@z
@x [47.1110]
  link(tail):=list_ptr(p); box(cur_val):=null;
@y
  link(tail):=list_ptr(p); change_box(null);
@z

@x [48.1145]
else  begin adjust_hlist(head,true); line_break(display_widow_penalty);@/
@y
else  begin adjust_hlist(head,true); line_break(true);@/
@z

@x [49.1247]
if box(b)<>null then
  begin q:=box(b); p:=link(q);
@y
if b<>null then
  begin q:=b; p:=link(q);
@z
@x [49.1247]
    begin p:=link(box(b)); link(box(b)):=null;
@y
    begin p:=link(b); link(b):=null;
@z
@x [49.1247]
    link(q):=p; link(box(b)):=q;
@y
    link(q):=p; link(b):=q;
@z

@x [49.1291]
@d show_mode=4 { \.{\\showmode} }
@y
@d show_mode=7 { \.{\\showmode} }
@z

@x
@* \[55/p\TeX] System-dependent changes for p\TeX.
@y
@* \[54/p\TeX] System-dependent changes for p\TeX.
@z

@x
@* \[56] System-dependent changes.
@y
@* \[54] System-dependent changes.
@z