diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2024-04-24 11:59:16 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2024-04-24 11:59:16 +0000 |
commit | 077a0be4f7b6a200df25e6b56f81467c867be744 (patch) | |
tree | 5a862e8b35b8ecbe076f2448b5a85869ad549932 | |
parent | 1427575c7f2162e134b1043a9c35054bc6a38199 (diff) |
web2c/euptexdir: clean up
git-svn-id: svn://tug.org/texlive/trunk@71055 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/README | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/Makefile.in | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/am/euptex.am | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/eptex.ech | 89 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/etex.ch1 | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/euptex.ch0 | 24 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/euptex.ch1 | 134 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch | 108 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch | 25 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/pdfutils.ch | 89 |
11 files changed, 133 insertions, 367 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README index 1c17cc28392..a0f3d8f40c4 100644 --- a/Build/source/texk/README +++ b/Build/source/texk/README @@ -118,10 +118,10 @@ web2c - maintained here, by us - core web2c, plain tex, etc. cweb - https://github.com/ascherer/cwebbin (original Knuth, ftp://ftp.cs.stanford.edu/pub/cweb/ and ftp://ftp.cs.stanford.edu/pub/ctwill/) - eptex - https://github.com/texjporg/tex-jp-build - also: https://osdn.jp/projects/eptex etex - maintained here - euptex - https://www.t-lab.opal.ne.jp/tex/uptex_en.html + euptex - https://github.com/texjporg/tex-jp-build + also: https://www.t-lab.opal.ne.jp/tex/uptex_en.html + also: https://github.com/h-kitagawa/eptex-wiki hitex - https://hint.userweb.mwn.de/hint/hitex.html mflua[jit] - https://serveur-svn.lri.fr/svn/modhel/mflua also: https://www.luatex.org/download.html diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index d1f49dec8e6..3db189aaa7f 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -4491,15 +4491,11 @@ euptex_ch_srcs = \ euptexdir/etex.ch0 \ uptexdir/ptex-base.ch \ uptexdir/uptex-m.ch \ - euptexdir/euptex.ch0 \ euptexdir/eptex.ech \ euptexdir/etex.ch1 \ - euptexdir/euptex.ch1 \ $(euptex_ch_synctex) \ euptexdir/fam256.ch \ - euptexdir/pdfstrcmp-eup-pre.ch \ euptexdir/pdfutils.ch \ - euptexdir/pdfstrcmp-eup-post.ch \ euptexdir/suppresserrors.ch \ euptexdir/unbalanced-braces-eptex.ch \ euptexdir/char-warning-eptex.ch \ diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog index 4d074d004c9..27ee3ab5b38 100644 --- a/Build/source/texk/web2c/euptexdir/ChangeLog +++ b/Build/source/texk/web2c/euptexdir/ChangeLog @@ -1,3 +1,10 @@ +2024-04-24 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * eptex.ech, etex.ch1, euptex.ch{0,1}, + pdfstrcmp-eup-{pre,post}.ch, pdfutils.ch, am/euptex.am: + Clean up building environment. + https://github.com/texjporg/tex-jp-build/issues/32 + 2024-04-14 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * epTeX_doc/{{README,Changes}.txt,ChangeLog,eptex-base.ch}, diff --git a/Build/source/texk/web2c/euptexdir/am/euptex.am b/Build/source/texk/web2c/euptexdir/am/euptex.am index 9c4ced1d3b4..1103cc70d83 100644 --- a/Build/source/texk/web2c/euptexdir/am/euptex.am +++ b/Build/source/texk/web2c/euptexdir/am/euptex.am @@ -71,15 +71,11 @@ euptex_ch_srcs = \ euptexdir/etex.ch0 \ uptexdir/ptex-base.ch \ uptexdir/uptex-m.ch \ - euptexdir/euptex.ch0 \ euptexdir/eptex.ech \ euptexdir/etex.ch1 \ - euptexdir/euptex.ch1 \ $(euptex_ch_synctex) \ euptexdir/fam256.ch \ - euptexdir/pdfstrcmp-eup-pre.ch \ euptexdir/pdfutils.ch \ - euptexdir/pdfstrcmp-eup-post.ch \ euptexdir/suppresserrors.ch \ euptexdir/unbalanced-braces-eptex.ch \ euptexdir/char-warning-eptex.ch \ diff --git a/Build/source/texk/web2c/euptexdir/eptex.ech b/Build/source/texk/web2c/euptexdir/eptex.ech index bb4d31519f4..cf6878cb1e5 100644 --- a/Build/source/texk/web2c/euptexdir/eptex.ech +++ b/Build/source/texk/web2c/euptexdir/eptex.ech @@ -25,6 +25,7 @@ @y \def\eTeX{$\varepsilon$-\TeX} \def\epTeX{$\varepsilon$-\pTeX} +\def\eupTeX{$\varepsilon$-\upTeX} @z @x [1.2] l.190 - epTeX: @@ -36,23 +37,23 @@ @d epTeX_version_number==230214 @z -@x e-pTeX: banner - {printed when \pTeX\ starts} +@x e-upTeX: banner + {printed when \upTeX\ starts} @y - {printed when \pTeX\ starts} + {printed when \upTeX\ starts} @# -@d epTeX_version==pTeX_version_string,epTeX_version_string,eTeX_version_string -@d epTeX_banner=='This is e-pTeX, Version 3.141592653',epTeX_version -@d epTeX_banner_k==epTeX_banner - {printed when \epTeX\ starts} +@d eupTeX_version==pTeX_version_string,upTeX_version_string,epTeX_version_string,eTeX_version_string +@d eupTeX_banner=='This is e-upTeX, Version 3.141592653',eupTeX_version +@d eupTeX_banner_k==eupTeX_banner + {printed when \eupTeX\ starts} @z @x [1.2] -@d banner==pTeX_banner -@d banner_k==pTeX_banner_k +@d banner==upTeX_banner +@d banner_k==upTeX_banner_k @y -@d banner==epTeX_banner -@d banner_k==epTeX_banner_k +@d banner==eupTeX_banner +@d banner_k==eupTeX_banner_k @z @x [10.135] l.2895 - e-pTeX: box_lr and box_dir @@ -86,6 +87,12 @@ In \epTeX\ the |subtype| field is |qi(16*box_lr+box_dir)|. @d read_papersize_special==int_par(read_papersize_special_code) @z +@x +@d protected_token=@'7001 {$2^8\cdot|end_match|+1$} +@y +@d protected_token=@"E01 {$2^8\cdot|end_match|+1$} +@z + @x [26.???] prepare for |scan_font_ident| to recognize \lastnodefont @p procedure@?scan_int; forward; {scans an integer value} @y @@ -105,7 +112,7 @@ var m:halfword; {|chr_code| part of the operand token} end; @y @<Fix the reference count, if any, and negate |cur_val| if |negative|@>; -end; +exit:end; @ @p procedure scan_something_internal_ident; begin scan_something_internal(ident_val,false); end; @@ -123,16 +130,18 @@ end; @z @x -@d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}} +@d uptex_version_code=ptex_version_code+1 {code for \.{\\uptexversion}} +@d ptex_minor_version_code=uptex_version_code+1 {code for \.{\\ptexminorversion}} @y -@d eptex_version_code=ptex_version_code+1 {code for \.{\\epTeXversion}} +@d uptex_version_code=ptex_version_code+1 {code for \.{\\uptexversion}} +@d eptex_version_code=uptex_version_code+1 {code for \.{\\epTeXversion}} @d ptex_minor_version_code=eptex_version_code+1 {code for \.{\\ptexminorversion}} @z @x e-pTeX: \current(x)spacingmode @d eTeX_dim=eTeX_int+8 {first of \eTeX\ codes for dimensions} @y -@d eTeX_dim=eTeX_int+10 {first of \eTeX\ codes for dimensions} +@d eTeX_dim=eTeX_int+11 {first of \eTeX\ codes for dimensions} @z @x @@ -146,8 +155,10 @@ primitive("ptexminorversion",last_item,ptex_minor_version_code); @z @x + uptex_version_code: print_esc("uptexversion"); ptex_minor_version_code: print_esc("ptexminorversion"); @y + uptex_version_code: print_esc("uptexversion"); eptex_version_code: print_esc("epTeXversion"); ptex_minor_version_code: print_esc("ptexminorversion"); @z @@ -188,7 +199,7 @@ if not is_char_node(tx) then @d find_effective_tail==find_effective_tail_epTeX @# @d find_last_char== -if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) +if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) mod max_cjk_val else cur_val:=qo(character(tx)) @d ignore_font_kerning== @@ -705,22 +716,37 @@ if j=1 then @ @<Handle \.{\\readline} and |goto done|@>= if j=1 then begin while loc<=limit do {current line not yet finished} - begin cur_chr:=buffer[loc]; incr(loc); - if multistrlen(ustringcast(buffer), limit+1, loc-1)=2 then - begin cur_tok:=fromBUFF(ustringcast(buffer), limit+1, loc-1); incr(loc); + begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc); + cur_tok:=kcat_code(kcatcodekey(cur_chr)); + if (multistrlen(ustringcast(buffer), limit+1,loc)>1)and + check_kcat_code(cur_tok) then + begin if (cur_tok=not_cjk) then cur_tok:=other_kchar; + cur_tok:=cur_chr+cur_tok*max_cjk_val; + loc:=loc+multistrlen(ustringcast(buffer), limit+1,loc); end - else if cur_chr=" " then cur_tok:=space_token - @+else cur_tok:=cur_chr+other_token; + else begin cur_chr:=buffer[loc]; incr(loc); + if cur_chr=" " then cur_tok:=space_token + else cur_tok:=cur_chr+other_token; + end; @z @x e-pTeX: ifcsname l.28620 buffer[m]:=info(p) mod @'400; incr(m); p:=link(p); @y if check_kanji(info(p)) then {|wchar_token|} - begin buffer[m]:=Hi(info(p)); buffer2[m]:=1; incr(m); buffer2[m]:=1; + begin + if BYTE1(toBUFF(info(p) mod max_cjk_val))<>0 then + begin buffer[m]:=BYTE1(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end; + if BYTE2(toBUFF(info(p) mod max_cjk_val))<>0 then + begin buffer[m]:=BYTE2(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end; + if BYTE3(toBUFF(info(p) mod max_cjk_val))<>0 then + begin buffer[m]:=BYTE3(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end; + buffer[m]:=BYTE4(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); + p:=link(p); end - else buffer2[m]:=0; - buffer[m]:=Lo(info(p)); incr(m); p:=link(p); + else + begin buffer[m]:=info(p) mod max_char_val; buffer2[m]:=0; incr(m); p:=link(p); + end; @z @x e-pTeX: if_font_char_code l.28633 @@ -800,5 +826,20 @@ current_xspacing_mode_code: print_esc("currentxspacingmode"); current_spacing_mode_code: cur_val:=auto_spacing; current_xspacing_mode_code: cur_val:=auto_xspacing; +@ The \.{\\currentcjktoken} command returns the current \upTeX's +status of \.{\\(disable|enable|force)cjktoken}. + +@d current_cjk_token_code=eTeX_int+10 {code for \.{\\currentcjktoken}} + +@<Generate all \eTeX...@>= +primitive("currentcjktoken",last_item,current_cjk_token_code); +@!@:current_cjk_token_}{\.{\\currentcjktoken} primitive@> + +@ @<Cases of |last_item| for |print_cmd_chr|@>= +current_cjk_token_code: print_esc("currentcjktoken"); + +@ @<Cases for fetching an integer value@>= +current_cjk_token_code: cur_val:=enable_cjk_token; + @* \[54] System-dependent changes. @z diff --git a/Build/source/texk/web2c/euptexdir/etex.ch1 b/Build/source/texk/web2c/euptexdir/etex.ch1 index 5826dbcb4f8..289fc26084b 100644 --- a/Build/source/texk/web2c/euptexdir/etex.ch1 +++ b/Build/source/texk/web2c/euptexdir/etex.ch1 @@ -29,14 +29,6 @@ last_node_type:=-1; last_node_subtype:=-1; buffer[first+j]:=Lo(so(str_pool[k+j])); buffer2[first+j]:=Hi(so(str_pool[k+j])); end; @z -@x [26.413] -@<Fix the reference count, if any, and negate |cur_val| if |negative|@>; -end; -@y -@<Fix the reference count, if any, and negate |cur_val| if |negative|@>; -exit:end; -@z - @x @d eTeX_int=badness_code+1 {first of \eTeX\ codes for integers} @y @@ -48,6 +40,7 @@ exit:end; input_line_no_code: cur_val:=line; badness_code: cur_val:=last_badness; ptex_version_code: cur_val:=pTeX_version; + uptex_version_code: cur_val:=upTeX_version; eptex_version_code: cur_val:=epTeX_version_number; ptex_minor_version_code: cur_val:=pTeX_minor_version; end; {there and no other cases} @@ -63,6 +56,7 @@ exit:end; input_line_no_code: cur_val:=line; badness_code: cur_val:=last_badness; ptex_version_code: cur_val:=pTeX_version; + uptex_version_code: cur_val:=upTeX_version; eptex_version_code: cur_val:=epTeX_version_number; ptex_minor_version_code: cur_val:=pTeX_minor_version; @/@<Cases for fetching an integer value@>@/ diff --git a/Build/source/texk/web2c/euptexdir/euptex.ch0 b/Build/source/texk/web2c/euptexdir/euptex.ch0 deleted file mode 100644 index 1e0f3383dff..00000000000 --- a/Build/source/texk/web2c/euptexdir/euptex.ch0 +++ /dev/null @@ -1,24 +0,0 @@ -@x [1.2] -@d banner==upTeX_banner -@d banner_k==upTeX_banner_k -@y -@d banner==pTeX_banner -@d banner_k==pTeX_banner_k -@z - -@x -@d uptex_version_code=ptex_version_code+1 {code for \.{\\uptexversion}} -@d ptex_minor_version_code=uptex_version_code+1 {code for \.{\\ptexminorversion}} -@y -@d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}} -@z - -@x - uptex_version_code: print_esc("uptexversion"); -@y -@z - -@x - uptex_version_code: cur_val:=upTeX_version; -@y -@z diff --git a/Build/source/texk/web2c/euptexdir/euptex.ch1 b/Build/source/texk/web2c/euptexdir/euptex.ch1 deleted file mode 100644 index f4973c7ff1a..00000000000 --- a/Build/source/texk/web2c/euptexdir/euptex.ch1 +++ /dev/null @@ -1,134 +0,0 @@ -@x e-upTeX: logo -\def\epTeX{$\varepsilon$-\pTeX} -@y -\def\epTeX{$\varepsilon$-\pTeX} -\def\eupTeX{$\varepsilon$-\upTeX} -@z - -@x e-upTeX: banner - {printed when \upTeX\ starts} -@y - {printed when \upTeX\ starts} -@# -@d eupTeX_version==pTeX_version_string,upTeX_version_string,epTeX_version_string,eTeX_version_string -@d eupTeX_banner=='This is e-upTeX, Version 3.141592653',eupTeX_version -@d eupTeX_banner_k==eupTeX_banner - {printed when \eupTeX\ starts} -@z - -@x [1.2] -@d banner==epTeX_banner -@d banner_k==epTeX_banner_k -@y -@d banner==eupTeX_banner -@d banner_k==eupTeX_banner_k -@z - -@x -@d protected_token=@'7001 {$2^8\cdot|end_match|+1$} -@y -@d protected_token=@"E01 {$2^8\cdot|end_match|+1$} -@z - -@x -@d eptex_version_code=ptex_version_code+1 {code for \.{\\epTeXversion}} -@y -@d uptex_version_code=ptex_version_code+1 {code for \.{\\uptexversion}} -@d eptex_version_code=uptex_version_code+1 {code for \.{\\epTeXversion}} -@z - -@x e-upTeX: \currentcjktoken -@d eTeX_dim=eTeX_int+10 {first of \eTeX\ codes for dimensions} -@y -@d eTeX_dim=eTeX_int+11 {first of \eTeX\ codes for dimensions} -@z - -@x - eptex_version_code: print_esc("epTeXversion"); -@y - uptex_version_code: print_esc("uptexversion"); - eptex_version_code: print_esc("epTeXversion"); -@z - -@x -if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) -@y -if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) mod max_cjk_val -@z - -@x - eptex_version_code: cur_val:=epTeX_version_number; -@y - uptex_version_code: cur_val:=upTeX_version; - eptex_version_code: cur_val:=epTeX_version_number; -@z - -@x -@ @<Handle \.{\\readline} and |goto done|@>= -if j=1 then - begin while loc<=limit do {current line not yet finished} - begin cur_chr:=buffer[loc]; incr(loc); - if multistrlen(ustringcast(buffer), limit+1, loc-1)=2 then - begin cur_tok:=fromBUFF(ustringcast(buffer), limit+1, loc-1); incr(loc); - end - else if cur_chr=" " then cur_tok:=space_token - @+else cur_tok:=cur_chr+other_token; -@y -@ @<Handle \.{\\readline} and |goto done|@>= -if j=1 then - begin while loc<=limit do {current line not yet finished} - begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc); - cur_tok:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(ustringcast(buffer), limit+1,loc)>1)and - check_kcat_code(cur_tok) then - begin if (cur_tok=not_cjk) then cur_tok:=other_kchar; - cur_tok:=cur_chr+cur_tok*max_cjk_val; - loc:=loc+multistrlen(ustringcast(buffer), limit+1,loc); - end - else begin cur_chr:=buffer[loc]; incr(loc); - if cur_chr=" " then cur_tok:=space_token - else cur_tok:=cur_chr+other_token; - end; -@z - -@x e-pTeX: ifcsname l.28620 - begin buffer[m]:=Hi(info(p)); buffer2[m]:=1; incr(m); buffer2[m]:=1; - end - else buffer2[m]:=0; - buffer[m]:=Lo(info(p)); incr(m); p:=link(p); -@y - begin - if BYTE1(toBUFF(info(p) mod max_cjk_val))<>0 then - begin buffer[m]:=BYTE1(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end; - if BYTE2(toBUFF(info(p) mod max_cjk_val))<>0 then - begin buffer[m]:=BYTE2(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end; - if BYTE3(toBUFF(info(p) mod max_cjk_val))<>0 then - begin buffer[m]:=BYTE3(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end; - buffer[m]:=BYTE4(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); - p:=link(p); - end - else - begin buffer[m]:=info(p) mod max_char_val; buffer2[m]:=0; incr(m); p:=link(p); - end; -@z - -@x e-upTeX: fetch \(disable|enable|force)cjktoken status -@* \[54] System-dependent changes. -@y -@ The \.{\\currentcjktoken} command returns the current \upTeX's -status of \.{\\(disable|enable|force)cjktoken}. - -@d current_cjk_token_code=eTeX_int+10 {code for \.{\\currentcjktoken}} - -@<Generate all \eTeX...@>= -primitive("currentcjktoken",last_item,current_cjk_token_code); -@!@:current_cjk_token_}{\.{\\currentcjktoken} primitive@> - -@ @<Cases of |last_item| for |print_cmd_chr|@>= -current_cjk_token_code: print_esc("currentcjktoken"); - -@ @<Cases for fetching an integer value@>= -current_cjk_token_code: cur_val:=enable_cjk_token; - -@* \[54] System-dependent changes. -@z diff --git a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch deleted file mode 100644 index 9fae1c626fc..00000000000 --- a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch +++ /dev/null @@ -1,108 +0,0 @@ -@x - cur_tok := (cur_cmd*@'400)+cur_chr; -@y - cur_tok := (cur_cmd*max_char_val)+cur_chr; -@z - -@x - if (cc=not_cjk) then cc:=other_kchar; -@y - if cat>=kanji then cc:=cat else if (cc=not_cjk) then cc:=other_kchar; -@z - -@x - else if (t=" ")and(cat=0) then t:=space_token - else if (cat=0)or(cat>=kanji) then t:=other_token+t - else if cat=active_char then t:= cs_token_flag + active_base + t - else t:=left_brace_token*cat+t; -@y - if (t=" ")and(cat=0) then t:=space_token - else if (cat=0)or(cat>=kanji) then t:=other_token+t - else if cat=active_char then t:= cs_token_flag + active_base + t - else t:=left_brace_token*cat+t; -@z - -@x -@d illegal_Ucharcat_wchar_catcode(#)==(#<kanji)or(#>other_kchar) -@y -@d illegal_Ucharcat_wchar_catcode(#)==(#<kanji)or(#>hangul) -@z - -@x -Uchar_convert_code: scan_char_num; -Ucharcat_convert_code: - begin - scan_ascii_num; -@y -Uchar_convert_code: begin scan_char_num; - if not is_char_ascii(cur_val) then - if kcat_code(kcatcodekey(cur_val))=not_cjk then cat:=other_kchar; - end; -Ucharcat_convert_code: - begin - scan_char_num; -@z - -@x - if illegal_Ucharcat_ascii_catcode(cur_val) then - begin print_err("Invalid code ("); print_int(cur_val); -@.Invalid code@> - print("), should be in the ranges 1..4, 6..8, 10..13"); - help1("I'm going to use 12 instead of that illegal code value.");@/ - error; cat:=12; - end else cat:=cur_val; -@y - if i<=@"7F then { no |wchar_token| } - begin if illegal_Ucharcat_ascii_catcode(cur_val) then - begin print_err("Invalid code ("); print_int(cur_val); -@.Invalid code@> - print("), should be in the ranges 1..4, 6..8, 10..13"); - help1("I'm going to use 12 instead of that illegal code value.");@/ - error; cat:=12; - end else cat:=cur_val; - end else if i<=@"FF then - begin if (illegal_Ucharcat_ascii_catcode(cur_val)) - and (illegal_Ucharcat_wchar_catcode(cur_val)) then - begin print_err("Invalid code ("); print_int(cur_val); -@.Invalid code@> - print("), should be in the ranges 1..4, 6..8, 10..13, 16..19"); - help1("I'm going to use 12 instead of that illegal code value.");@/ - error; cat:=12; - end else cat:=cur_val; - end else { |wchar_token| only } - begin if illegal_Ucharcat_wchar_catcode(cur_val) then - begin print_err("Invalid code ("); print_int(cur_val); -@.Invalid code@> - print("), should be in the ranges 16..19"); - help1("I'm going to use 18 instead of that illegal code value.");@/ - error; cat:=other_kchar; - end else cat:=cur_val; - end; -@z - -@x -procedure print_kanji(@!s:integer); {prints a single character} -begin -if s>@"FF then begin - if isprint_utf8 then begin - s:=UCStoUTF8(toUCS(s)); - if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); - if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); - if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); - end - else begin print_char(@"100+Hi(s)); print_char(@"100+Lo(s)); end; -end -else print_char(s); -end; -@y -procedure print_kanji(@!s:KANJI_code); {prints a single character} -begin -if isprint_utf8 then s:=UCStoUTF8(toUCS(s mod max_cjk_val)) -else s:=toBUFF(s mod max_cjk_val); -if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); -if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); -if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); -end; -@z diff --git a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch deleted file mode 100644 index 00b3864b571..00000000000 --- a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch +++ /dev/null @@ -1,25 +0,0 @@ -@x - if t=" " then t:=space_token - else t:=other_token+t; -@y - else if t=" " then t:=space_token - else t:=other_token+t; -@z - -@x -procedure print_kanji(@!s:KANJI_code); {prints a single character} -begin -s:=toBUFF(s mod max_cjk_val); -if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); -if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); -if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); -end; -@y -procedure print_kanji(@!s:KANJI_code); {prints a single character} -begin -if s>@"FF then - begin print_char(@"100+Hi(s)); print_char(@"100+Lo(s)); - end else print_char(s); -end; -@z diff --git a/Build/source/texk/web2c/euptexdir/pdfutils.ch b/Build/source/texk/web2c/euptexdir/pdfutils.ch index 73dfb8e3fe6..7324dd29b66 100644 --- a/Build/source/texk/web2c/euptexdir/pdfutils.ch +++ b/Build/source/texk/web2c/euptexdir/pdfutils.ch @@ -740,7 +740,7 @@ if cur_cs<>undefined_primitive then begin if t>max_command then begin cur_cmd := t; cur_chr := prim_equiv(cur_cs); - cur_tok := (cur_cmd*@'400)+cur_chr; + cur_tok := (cur_cmd*max_char_val)+cur_chr; cur_cs := 0; goto reswitch; end @@ -879,14 +879,20 @@ function str_toks(@!b:pool_pointer):pointer; function str_toks_cat(@!b:pool_pointer;@!cat:small_number):pointer; @z +@x + if (cc=not_cjk) then cc:=other_kchar; +@y + if cat>=kanji then cc:=cat else if (cc=not_cjk) then cc:=other_kchar; +@z + @x \Ucharcat: str_toks_cat - else if t=" " then t:=space_token - else t:=other_token+t; + if t=" " then t:=space_token + else t:=other_token+t; @y - else if (t=" ")and(cat=0) then t:=space_token - else if (cat=0)or(cat>=kanji) then t:=other_token+t - else if cat=active_char then t:= cs_token_flag + active_base + t - else t:=left_brace_token*cat+t; + if (t=" ")and(cat=0) then t:=space_token + else if (cat=0)or(cat>=kanji) then t:=other_token+t + else if cat=active_char then t:= cs_token_flag + active_base + t + else t:=left_brace_token*cat+t; @z @x \Ucharcat: str_toks_cat @@ -962,7 +968,7 @@ we have to create a temporary string that is destroyed immediately after. @ Not all catcode values are allowed by \.{\\Ucharcat}: @d illegal_Ucharcat_ascii_catcode(#)==(#<left_brace)or(#>active_char)or(#=out_param)or(#=ignore) -@d illegal_Ucharcat_wchar_catcode(#)==(#<kanji)or(#>other_kchar) +@d illegal_Ucharcat_wchar_catcode(#)==(#<kanji)or(#>hangul) @p procedure conv_toks; @z @@ -1148,19 +1154,41 @@ pdf_file_dump_code: end; uniform_deviate_code: scan_int; normal_deviate_code: do_nothing; -Uchar_convert_code: scan_char_num; +Uchar_convert_code: begin scan_char_num; + if not is_char_ascii(cur_val) then + if kcat_code(kcatcodekey(cur_val))=not_cjk then cat:=other_kchar; + end; Ucharcat_convert_code: begin - scan_ascii_num; + scan_char_num; i:=cur_val; scan_int; - if illegal_Ucharcat_ascii_catcode(cur_val) then - begin print_err("Invalid code ("); print_int(cur_val); + if i<=@"7F then { no |wchar_token| } + begin if illegal_Ucharcat_ascii_catcode(cur_val) then + begin print_err("Invalid code ("); print_int(cur_val); +@.Invalid code@> + print("), should be in the ranges 1..4, 6..8, 10..13"); + help1("I'm going to use 12 instead of that illegal code value.");@/ + error; cat:=12; + end else cat:=cur_val; + end else if i<=@"FF then + begin if (illegal_Ucharcat_ascii_catcode(cur_val)) + and (illegal_Ucharcat_wchar_catcode(cur_val)) then + begin print_err("Invalid code ("); print_int(cur_val); @.Invalid code@> - print("), should be in the ranges 1..4, 6..8, 10..13"); - help1("I'm going to use 12 instead of that illegal code value.");@/ - error; cat:=12; - end else cat:=cur_val; + print("), should be in the ranges 1..4, 6..8, 10..13, 16..19"); + help1("I'm going to use 12 instead of that illegal code value.");@/ + error; cat:=12; + end else cat:=cur_val; + end else { |wchar_token| only } + begin if illegal_Ucharcat_wchar_catcode(cur_val) then + begin print_err("Invalid code ("); print_int(cur_val); +@.Invalid code@> + print("), should be in the ranges 16..19"); + help1("I'm going to use 18 instead of that illegal code value.");@/ + error; cat:=other_kchar; + end else cat:=cur_val; + end; cur_val:=i; end; @z @@ -1857,27 +1885,22 @@ if_font_char_code:begin scan_font_ident; n:=cur_val; @x procedure print_kanji(@!s:KANJI_code); {prints a single character} begin -if s>@"FF then - begin print_char(@"100+Hi(s)); print_char(@"100+Lo(s)); - end else print_char(s); +s:=toBUFF(s mod max_cjk_val); +if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); +if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); +if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); + print_char(@"100+BYTE4(s)); end; @y -procedure print_kanji(@!s:integer); {prints a single character} +procedure print_kanji(@!s:KANJI_code); {prints a single character} begin -if s>@"FF then begin - if isprint_utf8 then begin - s:=UCStoUTF8(toUCS(s)); - if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); - if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); - if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); - end - else begin print_char(@"100+Hi(s)); print_char(@"100+Lo(s)); end; -end -else print_char(s); +if isprint_utf8 then s:=UCStoUTF8(toUCS(s mod max_cjk_val)) +else s:=toBUFF(s mod max_cjk_val); +if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); +if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); +if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); + print_char(@"100+BYTE4(s)); end; - - @z @x |