diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-13 23:02:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-13 23:02:37 +0000 |
commit | e92c58198e1e685b4b31d3d192b96a7e1cf752a6 (patch) | |
tree | eb9f50a9066104af8f5cd9e2ac46421672450dd9 /Build/source/texk/web2c/enctexdir/enctex1.ch | |
parent | 94faf82bbf3cb74039496233e5eb5abdcbef739d (diff) |
split enctex.ch for maintainability
git-svn-id: svn://tug.org/texlive/trunk@57736 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/enctexdir/enctex1.ch')
-rw-r--r-- | Build/source/texk/web2c/enctexdir/enctex1.ch | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/enctexdir/enctex1.ch b/Build/source/texk/web2c/enctexdir/enctex1.ch new file mode 100644 index 00000000000..272f99ef17c --- /dev/null +++ b/Build/source/texk/web2c/enctexdir/enctex1.ch @@ -0,0 +1,94 @@ +% $Id$ +% enctex1.ch: implementation of enc\TeX, to be applied on top of tex.ch. +% This is the first set of changes, used by all engines supporting encTeX +% (i.e., everything but XeTeX and LuaTeX). + +@x [2.20] l.579 - encTeX: global declarations +xprn: array [ASCII_code] of ASCII_code; + { non zero iff character is printable } +@y +xprn: array [ASCII_code] of ASCII_code; + { non zero iff character is printable } +mubyte_read: array [ASCII_code] of pointer; + { non zero iff character begins the multi byte code } +mubyte_write: array [ASCII_code] of str_number; + { non zero iff character expands to multi bytes in log and write files } +mubyte_cswrite: array [0..127] of pointer; + { non null iff cs mod 128 expands to multi bytes in log and write files } +mubyte_skip: integer; { the number of bytes to skip in |buffer| } +mubyte_keep: integer; { the number of chars we need to keep unchanged } +mubyte_skeep: integer; { saved |mubyte_keep| } +mubyte_prefix: integer; { the type of mubyte prefix } +mubyte_tablein: boolean; { the input side of table will be updated } +mubyte_tableout: boolean; { the output side of table will be updated } +mubyte_relax: boolean; { the relax prefix is used } +mubyte_start: boolean; { we are making the token at the start of the line } +mubyte_sstart: boolean; { saved |mubyte_start| } +mubyte_token: pointer; { the token returned by |read_buffer| } +mubyte_stoken: pointer; { saved first token in mubyte primitive } +mubyte_sout: integer; { saved value of |mubyte_out| } +mubyte_slog: integer; { saved value of |mubyte_log| } +spec_sout: integer; { saved value of |spec_out| } +no_convert: boolean; { conversion supressed by noconvert primitive } +active_noconvert: boolean; { true if noconvert primitive is active } +write_noexpanding: boolean; { true only if we need not write expansion } +cs_converting: boolean; { true only if we need csname converting } +special_printing: boolean; { true only if we need converting in special } +message_printing: boolean; { true if message or errmessage prints to string } +@z + +@x [2.23] l.723 - encTeX +for i:=@'177 to @'377 do xchr[i]:=i; +@y +for i:=@'177 to @'377 do xchr[i]:=i; +{Initialize enc\TeX\ data.} +for i:=0 to 255 do mubyte_read[i]:=null; +for i:=0 to 255 do mubyte_write[i]:=0; +for i:=0 to 127 do mubyte_cswrite[i]:=null; +mubyte_keep := 0; mubyte_start := false; +write_noexpanding := false; cs_converting := false; +special_printing := false; message_printing := false; +no_convert := false; active_noconvert := false; +@z + +@x [5.59] l.1508 FIXME -- enc\TeX\ modifications of |print|. + else begin if selector>pseudo then + begin print_char(s); return; {internal strings are not expanded} + end; + if (@<Character |s| is the current new-line character@>) then + if selector<pseudo then + begin print_ln; return; + end; +@y + else begin if (selector>pseudo) and (not special_printing) + and (not message_printing) then + begin print_char(s); return; {internal strings are not expanded} + end; + if (@<Character |s| is the current new-line character@>) then + if selector<pseudo then + begin print_ln; no_convert := false; return; + end + else if message_printing then + begin print_char(s); no_convert := false; return; + end; + if (mubyte_log>0) and (not no_convert) and (mubyte_write[s]>0) then + s := mubyte_write[s] + else if xprn[s] or special_printing then + begin print_char(s); no_convert := false; return; end; + no_convert := false; +@z + +@x [5.71] encTeX - native buffer printing +if last<>first then for k:=first to last-1 do print(buffer[k]); +@y +k:=first; while k < last do begin print_buffer(k) end; +@z + +@x [17.230] l.4725 - encTeX: xord_code_base, xchr_code_base, prn_code_base, +@d math_font_base=cur_font_loc+1 {table of 48 math font numbers} +@y +@d xord_code_base=cur_font_loc+1 +@d xchr_code_base=xord_code_base+1 +@d xprn_code_base=xchr_code_base+1 +@d math_font_base=xprn_code_base+1 +@z |