summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/uptexdir
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2021-06-25 09:14:15 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2021-06-25 09:14:15 +0000
commit8d8684458b9d43c49479394b5411f999bfc0f154 (patch)
treed12688c889f06c754541b257886f750830fe5e6b /Build/source/texk/web2c/uptexdir
parent74be7c8354ce18fa150ae5096acb9b01ea56783e (diff)
ptex: no re-eval of kcatcode for \ifcat
git-svn-id: svn://tug.org/texlive/trunk@59699 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/uptexdir')
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/uptexdir/tests/test_if.tex55
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex-m.ch8
3 files changed, 46 insertions, 22 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index 418c58697c3..c1ea8c4ea4e 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-25 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * uptex—m.ch: Adapt to ptex-base.ch for no re-eval.
+ * tests/test_if.tex: Update.
+
2021-03-23 Karl Berry <karl@tug.org>
* TL'21.
diff --git a/Build/source/texk/web2c/uptexdir/tests/test_if.tex b/Build/source/texk/web2c/uptexdir/tests/test_if.tex
index 35588f992c1..ddae745e7fb 100644
--- a/Build/source/texk/web2c/uptexdir/tests/test_if.tex
+++ b/Build/source/texk/web2c/uptexdir/tests/test_if.tex
@@ -1,29 +1,56 @@
+%#!ptex
\kcatcode`あ=18
\def\xA{あ}\let\yA=あ
\kcatcode`あ=17
\def\xB{あ}\let\yB=あ
\kcatcode`あ=16
+\def\xC{あ}\let\yC=あ
-\message{\ifcat あ\xA Y\else N\fi}
-\message{\ifcat あ\yA Y\else N\fi}
-\message{\ifcat あ\xB Y\else N\fi}
-\message{\ifcat あ\yB Y\else N\fi}
+%% for pTeX
+% * x: macro -> re-eval kcatcode
+% * y: let -> copy kcatcode
+%% for upTeX
+% * x: macro -> reserved kcatcode
+% * y: let -> copy kcatcode
-\message{\if あ\xA Y\else N\fi}
-\message{\if あ\yA Y\else N\fi}
-\message{\if い\xA Y\else N\fi}
-\message{\if い\yA Y\else N\fi}
+\message{ifcat}
+\message{\ifcat あ\xA Y\else N\fi}% pY, uN
+\message{\ifcat あ\yA Y\else N\fi}% pN, uN
+\message{\ifcat あ\xB Y\else N\fi}% pY, uN
+\message{\ifcat あ\yB Y\else N\fi}% pN, uN
+\message{\ifcat あ\xC Y\else N\fi}% pY, uY
+\message{\ifcat あ\yC Y\else N\fi}% pY, uY
+
+\message{if}
+\message{\if あ\xA Y\else N\fi}% pY, uY
+\message{\if あ\yA Y\else N\fi}% pY, uY
+\message{\if あ\xB Y\else N\fi}% pY, uY
+\message{\if あ\yB Y\else N\fi}% pY, uY
+\message{\if あ\xC Y\else N\fi}% pY, uY
+\message{\if あ\yC Y\else N\fi}% pY, uY
+\message{\if い\xA Y\else N\fi}% pN, uN
+\message{\if い\yA Y\else N\fi}% pN, uN
+
+\message{ifx}
+\message{\ifx あ\xA Y\else N\fi}% pN, uN
+\message{\ifx あ\yA Y\else N\fi}% pN, uN
+\message{\ifx あ\xB Y\else N\fi}% pN, uN
+\message{\ifx あ\yB Y\else N\fi}% pN, uN
+\message{\ifx あ\xC Y\else N\fi}% pN, uN
+\message{\ifx あ\yC Y\else N\fi}% pY, uY
+\message{\ifx \xA\xB Y\else N\fi}% pY, uN
+\message{\ifx \xA\xC Y\else N\fi}% pY, uN
+\message{\ifx \yA\yB Y\else N\fi}% pN, uN
+\message{\ifx \yA\yC Y\else N\fi}% pN, uN
\ifx\ucs\undefined\else
\kcatcode"100=16
\message{upTeX}
\def\xA{Ā}% U+0100
\def\xB{ā}% U+0101
- \message{\if \xA\relax Y\else N\fi}
- \message{\if \xB\relax Y\else N\fi}
- \message{\ifcat\xA\relax Y\else N\fi}
- \message{\ifcat\xB\relax Y\else N\fi}
+ \message{\if \xA\relax Y\else N\fi}% uN
+ \message{\if \xB\relax Y\else N\fi}% uN
+ \message{\ifcat\xA\relax Y\else N\fi}% uN
+ \message{\ifcat\xB\relax Y\else N\fi}% uN
\fi
\end
-
-
diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch
index 78f830cb897..780f83a9e38 100644
--- a/Build/source/texk/web2c/uptexdir/uptex-m.ch
+++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch
@@ -704,24 +704,16 @@ uptex_revision_code: print(upTeX_revision);
@x
if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then
- begin n:=cur_chr; m:=kcat_code(kcatcodekey(n));
- end
@y
if (cur_cmd>=kanji)and(cur_cmd<=hangul) then
- begin m:=cur_cmd; n:=cur_chr;
- end
@z
@x
get_x_token_or_active_char;
if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then
- begin cur_cmd:=kcat_code(kcatcodekey(cur_chr));
- end
@y
get_x_token_or_active_char;
if (cur_cmd>=kanji)and(cur_cmd<=hangul) then
- begin cur_cmd:=cur_cmd;
- end {dummy}
@z
@x