diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2019-09-08 09:39:10 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2019-09-08 09:39:10 +0000 |
commit | 3dbf4f3fa11c18e4342033a7e86a01f9c4ac2a3c (patch) | |
tree | 2b8c40e1500228c2d0696c626fac3609e3f28e1b /Build/source/texk | |
parent | e5ef3b9eb4e0063551aa9322e886071964127459 (diff) |
e-pTeX 190908: \readline correctly handles Japanese characters.
git-svn-id: svn://tug.org/texlive/trunk@52053 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/eptexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/eptex.ech | 23 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/eptex_version.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/euptexdir/euptex.ch1 | 28 |
5 files changed, 58 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog index fd82e6d1b95..3b5a30a8f1b 100644 --- a/Build/source/texk/web2c/eptexdir/ChangeLog +++ b/Build/source/texk/web2c/eptexdir/ChangeLog @@ -1,3 +1,7 @@ +2019-09-08 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * eptex.ech: \readline correctly handles Japanese characters. + 2019-07-21 Hironobu Yamashita <h.y.acetaminophen@gmail.com> * eptex.ech: More compatible with original e-TeX, because diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech index 2c7fe7b4e34..ea29201dbb6 100644 --- a/Build/source/texk/web2c/eptexdir/eptex.ech +++ b/Build/source/texk/web2c/eptexdir/eptex.ech @@ -26,8 +26,8 @@ @y @d eTeX_version_string=='-2.6' {current \eTeX\ version} @# -@d epTeX_version_string=='-190709' -@d epTeX_version_number==190709 +@d epTeX_version_string=='-190908' +@d epTeX_version_number==190908 @z @x e-pTeX: banner @@ -629,6 +629,25 @@ othercases goto next_p add_glue_ref(space_ptr(r)); add_glue_ref(xspace_ptr(r)); @z +@x e-pTeX: \readline +@ @<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 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:=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; +@z + @x e-pTeX: ifcsname l.28620 buffer[m]:=info(p) mod @'400; incr(m); p:=link(p); @y diff --git a/Build/source/texk/web2c/eptexdir/eptex_version.h b/Build/source/texk/web2c/eptexdir/eptex_version.h index 6fa8a213345..c0034c25103 100644 --- a/Build/source/texk/web2c/eptexdir/eptex_version.h +++ b/Build/source/texk/web2c/eptexdir/eptex_version.h @@ -1 +1 @@ -#define EPTEX_VERSION "190709" +#define EPTEX_VERSION "190908" diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog index cd0d73d57c6..e9f74c7e328 100644 --- a/Build/source/texk/web2c/euptexdir/ChangeLog +++ b/Build/source/texk/web2c/euptexdir/ChangeLog @@ -1,3 +1,7 @@ +2019-09-08 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * euptex.ch1: Adapt to changes in eptexdir/. + 2019-05-28 Hironobu Yamashita <h.y.acetaminophen@gmail.com> * am/euptex.am: Add a new test. diff --git a/Build/source/texk/web2c/euptexdir/euptex.ch1 b/Build/source/texk/web2c/euptexdir/euptex.ch1 index 69a520d901c..d33a3df7552 100644 --- a/Build/source/texk/web2c/euptexdir/euptex.ch1 +++ b/Build/source/texk/web2c/euptexdir/euptex.ch1 @@ -32,6 +32,34 @@ if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) mod max_c uptex_version_code: cur_val:=upTeX_version; @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)); incr(m); end; |