diff options
Diffstat (limited to 'Build/source/texk/web2c/ptexdir')
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ptex-base.ch | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/tests/endlinechar.tex | 53 |
3 files changed, 64 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index 165b6777fbd..57f75090f55 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,9 @@ +2017-04-09 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * ptex-base.ch: Fix a bug in single-letter control sequence + when \endlinechar=-1. + * tests/endlinechar.tex: Added. + 2017-04-06 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> * ptex-base.ch: Fix a bug that the postbreakpenalty sometimes reappears diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index ea83b1719c2..abfe5925cdd 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -1711,7 +1711,11 @@ start_cs: sequence is found, adjust |cur_cs| and |loc|, and |goto found|@> else @<If an expanded code is present, reduce it and |goto start_cs|@>; - cur_cs:=single_base+buffer[loc]; incr(loc); + {single-letter control sequence} + if (cat=kanji)or(cat=kana) then + begin cur_cs:=id_lookup(loc,k-loc); loc:=k; goto found; + end + else begin cur_cs:=single_base+buffer[loc]; incr(loc); end; end; found: cur_cmd:=eq_type(cur_cs); cur_chr:=equiv(cur_cs); if cur_cmd>=outer_call then check_outer_validity; diff --git a/Build/source/texk/web2c/ptexdir/tests/endlinechar.tex b/Build/source/texk/web2c/ptexdir/tests/endlinechar.tex new file mode 100644 index 00000000000..ef59b1fc886 --- /dev/null +++ b/Build/source/texk/web2c/ptexdir/tests/endlinechar.tex @@ -0,0 +1,53 @@ +\font\x=ecrm1000 \x +\parindent0pt\noautoxspacing +\output{\shipout\box255} +\def\あ{ア} +\def\,{イ} + +1a\, +% --> 1aイ + +2a\あ +% --> 2aア + +\endlinechar=-1\relax + +3a\, +% --> 3aイ +% previous pTeX, upTeX: Undefined cs. + +4a\あ +% --> 4aア +% prev. pTeX: Undefined cs. + +5a, +% prev. upTeX: byte-seq. + +6aあ +% prev. upTeX: byte-seq. + +7a\^^e3^^81^^82b\^^e3^^81^^82 +% 2回エラーが出るが,これは正しい. + +% upTeX only tests +\ifx\enablecjktoken\undefined +\else + \catcode"E3=11\relax + \catcode"81=11\relax + \catcode"82=11\relax + 8a\^^e3^^81^^82 + % --> 8aア + \kcatcode`あ=15\relax + 9a\あ + % == 9a\^^e3^^81^^82. --> 9aア + \def\^^e3^^81^^82{ウ} + 10a\あ b\あ + % == 10a\^^e3^^81^^82 b\^^e3^^81^^82. --> 10aウbウ + \kcatcode12354=16\relax + 11a\あ b\あ + % == 10a\^^e3^^81^^82 b\^^e3^^81^^82. --> 11aウbウ +\fi + +\bye + + |