texlive[51623] Build/source/texk/web2c/ptexdir: ptex: strict '!
commits+hironobu at tug.org
commits+hironobu at tug.org
Fri Jul 12 18:07:28 CEST 2019
Revision: 51623
http://tug.org/svn/texlive?view=revision&revision=51623
Author: hironobu
Date: 2019-07-12 18:07:27 +0200 (Fri, 12 Jul 2019)
Log Message:
-----------
ptex: strict '! Improper alphabetic or KANJI constant.' error
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ptexdir/ChangeLog
trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
Added Paths:
-----------
trunk/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex
Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2019-07-11 23:54:50 UTC (rev 51622)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2019-07-12 16:07:27 UTC (rev 51623)
@@ -1,3 +1,9 @@
+2019-06-24 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+
+ * ptex-base.ch: 'Improper alphabetic or KANJI constant' error
+ should be raised for multibyte CS.
+ * tests/let_char_token.tex: Added.
+
2019-05-28 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
* am/ptex.am: Add a new test.
Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2019-07-11 23:54:50 UTC (rev 51622)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2019-07-12 16:07:27 UTC (rev 51623)
@@ -2275,8 +2275,16 @@
end
else if cur_tok<cs_token_flag+single_base then
cur_val:=cur_tok-cs_token_flag-active_base
-else cur_val:=cur_tok-cs_token_flag-single_base;
-if (cur_val>255)and((cur_cmd<kanji)or(cur_cmd>max_char_code)) then
+else
+ { the token is a CS;
+ * if |kanji|<=|cur_cmd|<=|max_char_code|, then CS is let-equal to |wchar_token|
+ * if |max_char_code|<|cur_cmd|, then CS is a multibyte CS
+ => both case should raise "Improper ..." error
+ * otherwise it should be a single-character CS with |cur_val|<=255 }
+ begin if not (cur_cmd<kanji) then cur_cmd:=invalid_char;
+ cur_val:=cur_tok-cs_token_flag-single_base;
+ end;
+if (cur_val>255)and(cur_cmd<kanji) then
begin print_err("Improper alphabetic or KANJI constant");
@.Improper alphabetic constant@>
help2("A one-character control sequence belongs after a ` mark.")@/
Added: trunk/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex (rev 0)
+++ trunk/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex 2019-07-12 16:07:27 UTC (rev 51623)
@@ -0,0 +1,11 @@
+%#!ptex
+\newcount\x
+\scrollmode
+\def\T#1{\x=`#1 \message{\the\x}}
+\def\漢{}
+\def\aaa{西}\T{\aaa}% err
+\def\AAA{s}\T{\AAA} % err
+\let\ccc=西\relax\T{\ccc} % err
+\T~ \T\a \T{漢}
+\T\漢 % err
+\end
Property changes on: trunk/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list