diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2019-11-13 10:14:26 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2019-11-13 10:14:26 +0000 |
commit | 5f94645f37aef24b6a3a1952b0724f4782fe99de (patch) | |
tree | f97f7ac5fe4eee8f96c9b257fa6e8839f1958c49 /Build/source/texk/web2c/euptexdir | |
parent | febfa49f76b9698e3362af058db3ab357e3712fe (diff) |
e[u]ptex: add \Uchar and \Ucharcat (H. Kitagawa)
git-svn-id: svn://tug.org/texlive/trunk@52771 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/euptexdir')
-rw-r--r-- | Build/source/texk/web2c/euptexdir/ChangeLog | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch | 78 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch | 8 |
3 files changed, 94 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog index e9f74c7e328..548ffc6c54c 100644 --- a/Build/source/texk/web2c/euptexdir/ChangeLog +++ b/Build/source/texk/web2c/euptexdir/ChangeLog @@ -1,3 +1,11 @@ +2019-11-12 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * pdfstrcmp-eup-{pre,post}.ch: Adapt to e-pTeX 191112. + +2019-10-28 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * euptex.ch1: Add a primitive \currentcjktoken. + 2019-09-08 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> * euptex.ch1: Adapt to changes in eptexdir/. diff --git a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch index 2b154f9a28a..10becd15815 100644 --- a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch +++ b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch @@ -17,6 +17,84 @@ @z @x + check_kcat_code(cc) then + begin if (cc=not_cjk) then cc:=other_kchar; +@y + ((cat>=kanji)or check_kcat_code(cc)) then + begin 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>255 then begin diff --git a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch index 80c1a7dd555..b583095744c 100644 --- a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch +++ b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch @@ -1,4 +1,12 @@ @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); |