| 1 |
% eptexdir/etex.ch0: changefile used to build e-pTeX, see eptexdir/eptex-base.ch for details. |
| 2 |
% Public domain. Originally written by Peter Breitenlohner <[email protected]>. |
| 3 |
|
| 4 |
@x [10] m.135 l.2895 - e-TeX TeXXeT |
| 5 |
|fil|, |fill|, or |filll|). The |subtype| field is not used in \TeX. |
| 6 |
@y |
| 7 |
|fil|, |fill|, or |filll|). The |subtype| field is not used. |
| 8 |
@z |
| 9 |
|
| 10 |
@x [17.236] l.4960 - first web2c, then e-TeX additional integer parameters |
| 11 |
@d int_pars=web2c_int_pars {total number of integer parameters} |
| 12 |
@# |
| 13 |
@d etex_int_base=tex_int_pars {base for \eTeX's integer parameters} |
| 14 |
@y |
| 15 |
@d int_pars=web2c_int_pars {total number of integer parameters} |
| 16 |
@z |
| 17 |
|
| 18 |
@x [18.???] pTeX: ensure buffer2[]=0 in primitive |
| 19 |
for j:=0 to l-1 do buffer[first+j]:=so(str_pool[k+j]); |
| 20 |
@y |
| 21 |
for j:=0 to l-1 do buffer[j]:=so(str_pool[k+j]); |
| 22 |
@z |
| 23 |
|
| 24 |
@x [26.413] |
| 25 |
{fetch an internal parameter} |
| 26 |
label exit; |
| 27 |
var m:halfword; {|chr_code| part of the operand token} |
| 28 |
@!q,@!r:pointer; {general purpose indices} |
| 29 |
@!tx:pointer; {effective tail node} |
| 30 |
@y |
| 31 |
{fetch an internal parameter} |
| 32 |
var m:halfword; {|chr_code| part of the operand token} |
| 33 |
@z |
| 34 |
|
| 35 |
@x [26.413] |
| 36 |
exit:end; |
| 37 |
@y |
| 38 |
end; |
| 39 |
@z |
| 40 |
|
| 41 |
@x |
| 42 |
@d badness_code=input_line_no_code+1 {code for \.{\\badness}} |
| 43 |
@y |
| 44 |
@d badness_code=glue_val+2 {code for \.{\\badness}} |
| 45 |
@z |
| 46 |
|
| 47 |
@x [26.420] |
| 48 |
begin scan_register_num; fetch_box(q); |
| 49 |
if q=null then cur_val:=0 @+else cur_val:=mem[q+m].sc; |
| 50 |
@y |
| 51 |
begin scan_eight_bit_int; |
| 52 |
if box(cur_val)=null then cur_val:=0 @+else cur_val:=mem[box(cur_val)+m].sc; |
| 53 |
@z |
| 54 |
|
| 55 |
@x [26.424] |
| 56 |
legal in similar contexts. |
| 57 |
|
| 58 |
@y |
| 59 |
legal in similar contexts. |
| 60 |
@z |
| 61 |
|
| 62 |
@x [26.424] |
| 63 |
@d find_effective_tail==find_effective_tail_eTeX |
| 64 |
|
| 65 |
@y |
| 66 |
@z |
| 67 |
|
| 68 |
@x |
| 69 |
if m>=eTeX_glue then @<Process an expression and |return|@>@; |
| 70 |
else if m>=eTeX_dim then |
| 71 |
begin case m of |
| 72 |
@/@<Cases for fetching a dimension value@>@/ |
| 73 |
end; {there are no other cases} |
| 74 |
cur_val_level:=dimen_val; |
| 75 |
end |
| 76 |
else begin case m of |
| 77 |
input_line_no_code: cur_val:=line; |
| 78 |
badness_code: cur_val:=last_badness; |
| 79 |
@/@<Cases for fetching an integer value@>@/ |
| 80 |
end; {there are no other cases} |
| 81 |
@y |
| 82 |
begin if cur_chr=input_line_no_code then cur_val:=line |
| 83 |
else cur_val:=last_badness; {|cur_chr=badness_code|} |
| 84 |
@z |
| 85 |
|
| 86 |
@x [26.424] |
| 87 |
find_effective_tail; |
| 88 |
@y |
| 89 |
@z |
| 90 |
|
| 91 |
@x [26.424] |
| 92 |
if not is_char_node(tx)and(mode<>0) then |
| 93 |
case cur_chr of |
| 94 |
int_val: if type(tx)=penalty_node then cur_val:=penalty(tx); |
| 95 |
dimen_val: if type(tx)=kern_node then cur_val:=width(tx); |
| 96 |
glue_val: if type(tx)=glue_node then |
| 97 |
begin cur_val:=glue_ptr(tx); |
| 98 |
if subtype(tx)=mu_glue then cur_val_level:=mu_val; |
| 99 |
@y |
| 100 |
if not is_char_node(tail)and(mode<>0) then |
| 101 |
case cur_chr of |
| 102 |
int_val: if type(tail)=penalty_node then cur_val:=penalty(tail); |
| 103 |
dimen_val: if type(tail)=kern_node then cur_val:=width(tail); |
| 104 |
glue_val: if type(tail)=glue_node then |
| 105 |
begin cur_val:=glue_ptr(tail); |
| 106 |
if subtype(tail)=mu_glue then cur_val_level:=mu_val; |
| 107 |
@z |
| 108 |
|
| 109 |
@x [26.424] |
| 110 |
else if (mode=vmode)and(tx=head) then |
| 111 |
@y |
| 112 |
else if (mode=vmode)and(tail=head) then |
| 113 |
@z |
| 114 |
|
| 115 |
@x [27.468] |
| 116 |
@d etex_convert_base=5 {base for \eTeX's command codes} |
| 117 |
@d eTeX_revision_code=etex_convert_base {command code for \.{\\eTeXrevision}} |
| 118 |
@d etex_convert_codes=etex_convert_base+1 {end of \eTeX's command codes} |
| 119 |
@d job_name_code=etex_convert_codes {command code for \.{\\jobname}} |
| 120 |
@y |
| 121 |
@d job_name_code=5 {command code for \.{\\jobname}} |
| 122 |
@z |
| 123 |
|
| 124 |
@x [30.581] |
| 125 |
@p procedure char_warning(@!f:internal_font_number;@!c:eight_bits); |
| 126 |
var old_setting: integer; {saved value of |tracing_online|} |
| 127 |
@y |
| 128 |
@p procedure char_warning(@!f:internal_font_number;@!c:eight_bits); |
| 129 |
@z |
| 130 |
|
| 131 |
@x [32.619] |
| 132 |
save_loc:=dvi_offset+dvi_ptr; base_line:=cur_v; |
| 133 |
prev_p:=this_box+list_offset; |
| 134 |
@<Initialize |hlist_out| for mixed direction typesetting@>; |
| 135 |
left_edge:=cur_h; |
| 136 |
@y |
| 137 |
save_loc:=dvi_offset+dvi_ptr; base_line:=cur_v; left_edge:=cur_h; |
| 138 |
@z |
| 139 |
|
| 140 |
@x [32.620] |
| 141 |
prev_p:=link(prev_p); {N.B.: not |prev_p:=p|, |p| might be |lig_trick|} |
| 142 |
@y |
| 143 |
@z |
| 144 |
|
| 145 |
@x [32.624] l.13005 - pTeX: output a box(and dir_node) with disp |
| 146 |
cur_h:=edge; cur_v:=base_line; |
| 147 |
@y |
| 148 |
cur_h:=edge+width(p); cur_v:=base_line; |
| 149 |
@z |
| 150 |
|
| 151 |
@x [33.649] |
| 152 |
exit: if TeXXeT_en then @<Check for LR anomalies at the end of |hpack|@>; |
| 153 |
hpack:=r; |
| 154 |
@y |
| 155 |
exit: hpack:=r; |
| 156 |
@z |
| 157 |
|
| 158 |
@x |
| 159 |
hn:=0; |
| 160 |
loop@+ begin if is_char_node(s) then |
| 161 |
begin if font(s)<>hf then goto done3; |
| 162 |
hyf_bchar:=character(s); c:=qo(hyf_bchar); |
| 163 |
set_lc_code(c); |
| 164 |
if hc[0]=0 then goto done3; |
| 165 |
if hn=63 then goto done3; |
| 166 |
hb:=s; incr(hn); hu[hn]:=c; hc[hn]:=hc[0]; hyf_bchar:=non_char; |
| 167 |
end |
| 168 |
@y |
| 169 |
hn:=0; |
| 170 |
loop@+ begin if is_char_node(s) then |
| 171 |
begin if font(s)<>hf then goto done3; |
| 172 |
hyf_bchar:=character(s); c:=qo(hyf_bchar); |
| 173 |
if lc_code(c)=0 then goto done3; |
| 174 |
if hn=63 then goto done3; |
| 175 |
hb:=s; incr(hn); hu[hn]:=c; hc[hn]:=lc_code(c); hyf_bchar:=non_char; |
| 176 |
end |
| 177 |
@z |
| 178 |
|
| 179 |
@x |
| 180 |
while q>null do |
| 181 |
begin c:=qo(character(q)); |
| 182 |
set_lc_code(c); |
| 183 |
if hc[0]=0 then goto done3; |
| 184 |
if j=63 then goto done3; |
| 185 |
incr(j); hu[j]:=c; hc[j]:=hc[0];@/ |
| 186 |
q:=link(q); |
| 187 |
end; |
| 188 |
@y |
| 189 |
while q>null do |
| 190 |
begin c:=qo(character(q)); |
| 191 |
if lc_code(c)=0 then goto done3; |
| 192 |
if j=63 then goto done3; |
| 193 |
incr(j); hu[j]:=c; hc[j]:=lc_code(c);@/ |
| 194 |
q:=link(q); |
| 195 |
end; |
| 196 |
@z |
| 197 |
|
| 198 |
@x [44.977] |
| 199 |
q:=prune_page_top(q,saving_vdiscards>0); |
| 200 |
p:=list_ptr(v); free_node(v,box_node_size); |
| 201 |
if q<>null then q:=vpack(q,natural); |
| 202 |
change_box(q); {the |eq_level| of the box stays the same} |
| 203 |
@y |
| 204 |
q:=prune_page_top(q); p:=list_ptr(v); free_node(v,box_node_size); |
| 205 |
if q=null then box(n):=null {the |eq_level| of the box stays the same} |
| 206 |
else box(n):=vpack(q,natural); |
| 207 |
@z |
| 208 |
|
| 209 |
@x [47.1079] |
| 210 |
@!r:pointer; {running behind |p|} |
| 211 |
@!fm:boolean; {a final \.{\\beginM} \.{\\endM} node pair?} |
| 212 |
@!tx:pointer; {effective tail node} |
| 213 |
@y |
| 214 |
@z |
| 215 |
|
| 216 |
@x [47.1080] |
| 217 |
@d check_effective_tail(#)==find_effective_tail_eTeX |
| 218 |
@d fetch_effective_tail==fetch_effective_tail_eTeX |
| 219 |
|
| 220 |
@y |
| 221 |
@z |
| 222 |
@x [47.1080] |
| 223 |
else begin check_effective_tail(goto done); |
| 224 |
if not is_char_node(tx) then |
| 225 |
if (type(tx)=hlist_node)or(type(tx)=vlist_node) then |
| 226 |
@<Remove the last box, unless it's part of a discretionary@>; |
| 227 |
done:end; |
| 228 |
@y |
| 229 |
else begin if not is_char_node(tail) then |
| 230 |
if (type(tail)=hlist_node)or(type(tail)=vlist_node) then |
| 231 |
@<Remove the last box, unless it's part of a discretionary@>; |
| 232 |
end; |
| 233 |
@z |
| 234 |
|
| 235 |
@x [47.1081] |
| 236 |
begin fetch_effective_tail(goto done); |
| 237 |
cur_box:=tx; shift_amount(cur_box):=0; |
| 238 |
end |
| 239 |
@y |
| 240 |
begin q:=head; |
| 241 |
repeat p:=q; |
| 242 |
if not is_char_node(q) then if type(q)=disc_node then |
| 243 |
begin for m:=1 to replace_count(q) do p:=link(p); |
| 244 |
if p=tail then goto done; |
| 245 |
end; |
| 246 |
q:=link(p); |
| 247 |
until q=tail; |
| 248 |
cur_box:=tail; shift_amount(cur_box):=0; |
| 249 |
tail:=p; link(p):=null; |
| 250 |
done:end |
| 251 |
@z |
| 252 |
|
| 253 |
@x [47.1096] |
| 254 |
else line_break(false); |
| 255 |
@y |
| 256 |
else line_break(widow_penalty); |
| 257 |
@z |
| 258 |
|
| 259 |
@x [47.1105] |
| 260 |
@!r:pointer; {running behind |p|} |
| 261 |
@!fm:boolean; {a final \.{\\beginM} \.{\\endM} node pair?} |
| 262 |
@!tx:pointer; {effective tail node} |
| 263 |
@y |
| 264 |
@z |
| 265 |
|
| 266 |
@x [47.1105] |
| 267 |
else begin check_effective_tail(return); |
| 268 |
if not is_char_node(tx) then if type(tx)=cur_chr then |
| 269 |
begin fetch_effective_tail(return); |
| 270 |
flush_node_list(tx); |
| 271 |
@y |
| 272 |
else begin if not is_char_node(tail) then if type(tail)=cur_chr then |
| 273 |
begin q:=head; |
| 274 |
repeat p:=q; |
| 275 |
if not is_char_node(q) then if type(q)=disc_node then |
| 276 |
begin for m:=1 to replace_count(q) do p:=link(p); |
| 277 |
if p=tail then return; |
| 278 |
end; |
| 279 |
q:=link(p); |
| 280 |
until q=tail; |
| 281 |
link(p):=null; flush_node_list(tail); tail:=p; |
| 282 |
@z |
| 283 |
|
| 284 |
@x [47.1110] |
| 285 |
else begin link(tail):=list_ptr(p); change_box(null); |
| 286 |
@y |
| 287 |
else begin link(tail):=list_ptr(p); box(cur_val):=null; |
| 288 |
@z |
| 289 |
|
| 290 |
@x [48.1145] |
| 291 |
else begin line_break(true);@/ |
| 292 |
@y |
| 293 |
else begin line_break(display_widow_penalty);@/ |
| 294 |
@z |
| 295 |
|
| 296 |
@x [49.1247] |
| 297 |
if b<>null then mem[b+c].sc:=cur_val; |
| 298 |
@y |
| 299 |
if box(b)<>null then mem[box(b)+c].sc:=cur_val; |
| 300 |
@z |
| 301 |
|