diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-01-12 10:43:40 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-01-12 10:43:40 +0000 |
commit | 211eeafe381b75aeff8ef6c9920a5ea035bec732 (patch) | |
tree | df85c7ada2b2a23ef950129f6e5e811ba2c05d60 /Build/source/texk/web2c/ptexdir/ptex-base.ch | |
parent | 12a2781d8bdabf8a3283a3753b2569203c518260 (diff) |
preliminary e-pTeX
git-svn-id: svn://tug.org/texlive/trunk@21042 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/ptex-base.ch')
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ptex-base.ch | 114 |
1 files changed, 59 insertions, 55 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index 863abb4aea3..e78ae593e1d 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -45,12 +45,18 @@ % (05/23/2010) AK Bug fix by Hironori Kitagawa. % (31/12/2010) AK Bug fix and accent Kanji by Hironori Kitagawa. % -@x [1.2] l.195 - pTeX: -@d TeX_banner_k=='This is TeXk, Version 3.1415926' {printed when \TeX\ starts} -@d TeX_banner=='This is TeX, Version 3.1415926' {printed when \TeX\ starts} +@x [1.2] l.200 - pTeX: +@d banner==TeX_banner +@d banner_k==TeX_banner_k @y -@d TeX_banner_k=='This is pTeXk, Version 3.1415926-p3.1.11' {printed when p\TeX\ starts} -@d TeX_banner=='This is pTeX, Version 3.1415926-p3.1.11' {printed when p\TeX\ starts} +@d pTeX_version_string=='-p3.1.11' {current p\TeX\ version} +@# +@d pTeX_banner_k=='This is pTeXk, Version 3.1415926',pTeX_version_string +@d pTeX_banner=='This is pTeX, Version 3.1415926',pTeX_version_string + {printed when p\TeX\ starts} +@# +@d banner==pTeX_banner +@d banner_k==pTeX_banner_k @z @x [2.??] l.586 - pTeX: @@ -606,9 +612,14 @@ begin case type(p) of if shift_amount(p)<>0 then begin print(", shifted "); print_scaled(shift_amount(p)); end; +@z +@x [12.184] l.3845 - pTeX: display dir_node. + end; +@y if box_dir(p)<>dir_default then begin print(", "); print_direction(box_dir(p)); end; + end; @z @x [12.188] l.3896 - pTeX: Display insertion and ins_dir. @@ -1881,20 +1892,17 @@ else cur_tok:=cs_token_flag+cur_cs; @x [26.413] l.8659 - pTeX: scan_somthing_internal @p procedure scan_something_internal(@!level:small_number;@!negative:boolean); - {fetch an internal parameter} -var m:halfword; {|chr_code| part of the operand token} -@!p:0..nest_size; {index into |nest|} +@y +@p @t\4@>@<Declare procedures needed in |scan_something|@>@t@>@/ +procedure scan_something_internal(@!level:small_number;@!negative:boolean); +@z +@x [26.413] l.8663 - pTeX: scan_somthing_internal begin m:=cur_chr; case cur_cmd of def_code: @<Fetch a character code from some table@>; toks_register,assign_toks,def_family,set_font,def_font: @<Fetch a token list or font identifier, provided that |level=tok_val|@>; @y -@p @t\4@>@<Declare procedures needed in |scan_something|@>@t@>@/ -procedure scan_something_internal(@!level:small_number;@!negative:boolean); - {fetch an internal parameter} -var m:halfword; {|chr_code| part of the operand token} -@!p:0..nest_size; {index into |nest|} @!q:pointer; begin m:=cur_chr; case cur_cmd of @@ -2589,8 +2597,6 @@ begin if tracing_lost_chars>0 then @.Missing character@> print_ASCII(c); print(" in font "); slow_print(font_name[f]); print_char("!"); end_diagnostic(false); - end; -end; @y @d print_lc_hex(#)==l:=#; if l<10 then print_char(l+"0")@+else print_char(l-10+"a") @@ -2610,8 +2616,6 @@ begin if tracing_lost_chars>0 then else print_ASCII(c); print(" in font "); slow_print(font_name[f]); print_char("!"); end_diagnostic(false); - end; -end; @z @x [31.586] l.12189 - pTeX: define set2 @@ -2668,7 +2672,7 @@ doing_leaders:=false; dead_cycles:=0; cur_s:=-1; dir_used:=false; dvi_h:=0; dvi_v:=0; cur_h:=h_offset; dvi_f:=null_font; @y dvi_h:=0; dvi_v:=0; cur_h:=h_offset; dvi_f:=null_font; -dvi_dir:=dir_yoko; cur_dir:=dvi_dir; +dvi_dir:=dir_yoko; cur_dir_hv:=dvi_dir; @z @x [32.619] l.12892 - pTeX: hlist_out Kanji, disp_node @@ -2795,24 +2799,25 @@ disp_node: begin disp:=disp_dimen(p); cur_v:=base_line+disp; end; if list_ptr(p)=null then cur_h:=cur_h+width(p) else begin save_h:=dvi_h; save_v:=dvi_v; cur_v:=base_line+shift_amount(p); {shift the box down} - temp_ptr:=p; edge:=cur_h; - if type(p)=vlist_node then vlist_out@+else hlist_out; - dvi_h:=save_h; dvi_v:=save_v; - cur_h:=edge+width(p); cur_v:=base_line; - end @y @ @<Output a box in an hlist@>= if list_ptr(p)=null then cur_h:=cur_h+width(p) else begin save_h:=dvi_h; save_v:=dvi_v; save_dir:=dvi_dir; cur_v:=base_line+disp+shift_amount(p); {shift the box down} - temp_ptr:=p; edge:=cur_h; +@z +@x [32.624] l.13005 - pTeX: output a box(and dir_node) with disp + if type(p)=vlist_node then vlist_out@+else hlist_out; + dvi_h:=save_h; dvi_v:=save_v; + cur_h:=edge+width(p); cur_v:=base_line; + end +@y case type(p) of hlist_node:hlist_out; vlist_node:vlist_out; dir_node:dir_out; endcases; dvi_h:=save_h; dvi_v:=save_v; dvi_dir:=save_dir; - cur_h:=edge+width(p); cur_v:=base_line+disp; cur_dir:=save_dir; + cur_h:=edge+width(p); cur_v:=base_line+disp; cur_dir_hv:=save_dir; end @z @@ -2830,17 +2835,18 @@ if is_running(rule_dp) then rule_dp:=depth(this_box)-disp; @<Output a leader box at |cur_h|, ...@>= begin cur_v:=base_line+shift_amount(leader_box); synch_v; save_v:=dvi_v;@/ synch_h; save_h:=dvi_h; temp_ptr:=leader_box; -outer_doing_leaders:=doing_leaders; doing_leaders:=true; +@y +@<Output a leader box at |cur_h|, ...@>= +begin cur_v:=base_line+disp+shift_amount(leader_box); synch_v; save_v:=dvi_v;@/ +synch_h; save_h:=dvi_h; save_dir:=dvi_dir; temp_ptr:=leader_box; +@z +@x [32.629] l.13107 - pTeX: Output a leader box(and dir_node) with disp if type(leader_box)=vlist_node then vlist_out@+else hlist_out; doing_leaders:=outer_doing_leaders; dvi_v:=save_v; dvi_h:=save_h; cur_v:=base_line; cur_h:=save_h+leader_wd+lx; end @y -@<Output a leader box at |cur_h|, ...@>= -begin cur_v:=base_line+disp+shift_amount(leader_box); synch_v; save_v:=dvi_v;@/ -synch_h; save_h:=dvi_h; save_dir:=dvi_dir; temp_ptr:=leader_box; -outer_doing_leaders:=doing_leaders; doing_leaders:=true; case type(leader_box) of hlist_node:hlist_out; vlist_node:vlist_out; @@ -2848,7 +2854,7 @@ case type(leader_box) of endcases; doing_leaders:=outer_doing_leaders; dvi_v:=save_v; dvi_h:=save_h; dvi_dir:=save_dir; -cur_v:=base_line; cur_h:=save_h+leader_wd+lx; cur_dir:=save_dir; +cur_v:=base_line; cur_h:=save_h+leader_wd+lx; cur_dir_hv:=save_dir; end @z @@ -2894,32 +2900,34 @@ rule_node: begin rule_ht:=height(p); rule_dp:=depth(p); rule_wd:=width(p); if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p) else begin cur_v:=cur_v+height(p); synch_v; save_h:=dvi_h; save_v:=dvi_v; - cur_h:=left_edge+shift_amount(p); {shift the box right} - temp_ptr:=p; - if type(p)=vlist_node then vlist_out@+else hlist_out; - dvi_h:=save_h; dvi_v:=save_v; - cur_v:=save_v+depth(p); cur_h:=left_edge; - end @y @<Output a box in a vlist@>= if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p) else begin cur_v:=cur_v+height(p); synch_v; save_h:=dvi_h; save_v:=dvi_v; save_dir:=dvi_dir; - cur_h:=left_edge+shift_amount(p); {shift the box right} - temp_ptr:=p; +@z +@x [32.633] l.13181 - pTeX: Output a box in a vlist + if type(p)=vlist_node then vlist_out@+else hlist_out; + dvi_h:=save_h; dvi_v:=save_v; + cur_v:=save_v+depth(p); cur_h:=left_edge; + end +@y case type(p) of hlist_node:hlist_out; vlist_node:vlist_out; dir_node:dir_out; endcases; dvi_h:=save_h; dvi_v:=save_v; dvi_dir:=save_dir; - cur_v:=save_v+depth(p); cur_h:=left_edge; cur_dir:=save_dir; + cur_v:=save_v+depth(p); cur_h:=left_edge; cur_dir_hv:=save_dir; end @z @x [32.637] l.13256 - pTeX: Output a leader in a vlist @<Output a leader box at |cur_v|, ...@>= -begin cur_h:=left_edge+shift_amount(leader_box); synch_h; save_h:=dvi_h;@/ +@y +@<Output a leader box at |cur_v|, ...@>= +@z +@x [32.637] l.13258 - pTeX: Output a leader in a vlist cur_v:=cur_v+height(leader_box); synch_v; save_v:=dvi_v; temp_ptr:=leader_box; outer_doing_leaders:=doing_leaders; doing_leaders:=true; @@ -2929,8 +2937,6 @@ dvi_v:=save_v; dvi_h:=save_h; cur_h:=left_edge; cur_v:=save_v-height(leader_box)+leader_ht+lx; end @y -@<Output a leader box at |cur_v|, ...@>= -begin cur_h:=left_edge+shift_amount(leader_box); synch_h; save_h:=dvi_h;@/ cur_v:=cur_v+height(leader_box); synch_v; save_v:=dvi_v; save_dir:=dvi_dir; temp_ptr:=leader_box; outer_doing_leaders:=doing_leaders; doing_leaders:=true; @@ -2942,7 +2948,7 @@ endcases; doing_leaders:=outer_doing_leaders; dvi_v:=save_v; dvi_h:=save_h; dvi_dir:=save_dir; cur_h:=left_edge; cur_v:=save_v-height(leader_box)+leader_ht+lx; -cur_dir:=save_dir; +cur_dir_hv:=save_dir; end @z @@ -5698,10 +5704,8 @@ primitive("showmode",xray,show_mode); @z @x [49.1292] l.24483 - pTeX: show_mode - show_lists:print_esc("showlists"); othercases print_esc("show") @y - show_lists:print_esc("showlists"); show_mode:print_esc("showmode"); othercases print_esc("show") @z @@ -6172,7 +6176,7 @@ The procedure |synch_dir| is used in |hlist_out| and |vlist_out|. @<Glob...@>= @!dvi_dir:integer; {a \.{DVI} reader program thinks we direct to} -@!cur_dir:integer; {\TeX\ thinks we direct to} +@!cur_dir_hv:integer; {\TeX\ thinks we direct to} @!page_dir:eight_bits; @ @<Set init...@>= @@ -6182,36 +6186,36 @@ page_dir:=dir_yoko; procedure synch_dir; var tmp:scaled; {temporary resister} begin - case cur_dir of + case cur_dir_hv of dir_yoko: - if dvi_dir<>cur_dir then begin + if dvi_dir<>cur_dir_hv then begin synch_h; synch_v; dvi_out(dirchg); dvi_out(dvi_yoko); dir_used:=true; case dvi_dir of dir_tate: begin tmp:=cur_h; cur_h:=-cur_v; cur_v:=tmp end; dir_dtou: begin tmp:=cur_h; cur_h:=cur_v; cur_v:=-tmp end; endcases; - dvi_h:=cur_h; dvi_v:=cur_v; dvi_dir:=cur_dir; + dvi_h:=cur_h; dvi_v:=cur_v; dvi_dir:=cur_dir_hv; end; dir_tate: - if dvi_dir<>cur_dir then begin + if dvi_dir<>cur_dir_hv then begin synch_h; synch_v; dvi_out(dirchg); dvi_out(dvi_tate); dir_used:=true; case dvi_dir of dir_yoko: begin tmp:=cur_h; cur_h:=cur_v; cur_v:=-tmp end; dir_dtou: begin cur_v:=-cur_v; cur_h:=-cur_h; end; endcases; - dvi_h:=cur_h; dvi_v:=cur_v; dvi_dir:=cur_dir; + dvi_h:=cur_h; dvi_v:=cur_v; dvi_dir:=cur_dir_hv; end; dir_dtou: - if dvi_dir<>cur_dir then begin + if dvi_dir<>cur_dir_hv then begin synch_h; synch_v; dvi_out(dirchg); dvi_out(dvi_dtou); dir_used:=true; case dvi_dir of dir_yoko: begin tmp:=cur_h; cur_h:=-cur_v; cur_v:=tmp end; dir_tate: begin cur_v:=-cur_v; cur_h:=-cur_h; end; endcases; - dvi_h:=cur_h; dvi_v:=cur_v; dvi_dir:=cur_dir; + dvi_h:=cur_h; dvi_v:=cur_v; dvi_dir:=cur_dir_hv; end; othercases confusion("synch_dir"); @@ -6588,7 +6592,7 @@ begin this_box:=temp_ptr; end; endcases; endcases; - cur_dir:=box_dir(temp_ptr); + cur_dir_hv:=box_dir(temp_ptr); if type(temp_ptr)=vlist_node then vlist_out@+else hlist_out; end; |