summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch17
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog22
-rw-r--r--Build/source/texk/web2c/uptexdir/kanji.c34
-rw-r--r--Build/source/texk/web2c/uptexdir/kanji.h3
-rw-r--r--Build/source/texk/web2c/uptexdir/tests/test_if.tex29
-rw-r--r--Build/source/texk/web2c/uptexdir/upbibtex.ch2
-rw-r--r--Build/source/texk/web2c/uptexdir/updvitype.ch2
-rw-r--r--Build/source/texk/web2c/uptexdir/uppltotf.ch2
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex-m.ch11
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex_version.h2
-rw-r--r--Build/source/texk/web2c/uptexdir/uptftopl.ch2
12 files changed, 117 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index 2b7ac6d0f55..8f21f8930aa 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-06 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * ptex-base.ch:
+ Make appropreate comparison of U+0100 by \if in upTeX.
+ https://github.com/texjporg/tex-jp-build/issues/68
+
2019-02-03 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* ptex-base.ch: Ignore newline char after Japanese control
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index bd850b61a73..52ac033eecd 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -324,6 +324,13 @@ else
wterm(')');
@z
+@x
+@d max_halfword==@"FFFFFFF {largest allowable value in a |halfword|}
+@y
+@d max_halfword==@"FFFFFFF {largest allowable value in a |halfword|}
+@d max_cjk_val=@"10000
+@z
+
@x [8.111] l.2436 - pTeX: check hi/ho
(mem_top+sup_main_memory>=max_halfword) then bad:=14;
@y
@@ -2533,19 +2540,19 @@ if (cur_cmd>active_char)or(cur_chr>255) then
end;
@y
if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then
- begin m:=cur_cmd; n:=cur_chr;
+ begin n:=cur_chr; m:=kcat_code(kcatcodekey(n));
end
else if (cur_cmd>active_char)or(cur_chr>255) then
- begin m:=relax; n:=256;
+ begin m:=relax; n:=max_cjk_val;
end
else begin m:=cur_cmd; n:=cur_chr;
end;
get_x_token_or_active_char;
if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then
- begin cur_cmd:=cur_cmd;
- end {dummy}
+ begin cur_cmd:=kcat_code(kcatcodekey(cur_chr));
+ end
else if (cur_cmd>active_char)or(cur_chr>255) then
- begin cur_cmd:=relax; cur_chr:=256;
+ begin cur_cmd:=relax; cur_chr:=max_cjk_val;
end;
@z
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index 30146218288..fcc6001a56c 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,23 @@
+2019-05-06 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * uptex-m.ch, upbibtex.ch, updvitype.ch, uppltotf.ch, uptftopl.ch,
+ uptex_version.h: upTeX version u1.25.
+ * kanji.c:
+ Fix bug of kcatcode at Fullwidth ASCII variants and
+ Halfwidth Katakana variants from Yusuke Terada san:
+ https://github.com/texjporg/tex-jp-build/pull/79
+ Set default internal encoding EUC/SJIS if a command name is
+ with prefix of "p" or "ep", intending to be compatible with
+ pTeX family (ptex, eptex, pbibtex, pdvitype, ppltotf, ptftopl)
+ (experimental).
+
+2019-05-06 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * uptex-m.ch:
+ Make appropreate comparison of U+0100 by \if.
+ https://github.com/texjporg/tex-jp-build/issues/68
+ * tests/test_if.tex: Test case.
+
2019-02-23 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* uptex-m.ch, upbibtex.ch, updvitype.ch, uppltotf.ch, uptftopl.ch,
@@ -24,7 +44,7 @@
2018-09-16 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* upbibtex.ch: Fix bug of substring$
- from Takashi Sakai:
+ from Takashi Sakai san:
https://github.com/texjporg/tex-jp-build/issues/64
https://github.com/texjporg/tex-jp-build/pull/66
diff --git a/Build/source/texk/web2c/uptexdir/kanji.c b/Build/source/texk/web2c/uptexdir/kanji.c
index ae6d7b87013..2d7c9278086 100644
--- a/Build/source/texk/web2c/uptexdir/kanji.c
+++ b/Build/source/texk/web2c/uptexdir/kanji.c
@@ -444,7 +444,7 @@ integer kcatcodekey(integer c)
|| (LATIN_SMALL_LETTER_O_WITH_STROKE <=c && c<=LATIN_SMALL_LETTER_Y_WITH_DIAERESIS ) )
return 0x1FD;
}
- if (block==0xa0) {
+ if (block==0xa1) {
/* Fullwidth ASCII variants except for U+FF01..FF0F, U+FF1A..FF20, U+FF3B..FF40, U+FF5B..FF5E */
if ( (FULLWIDTH_DIGIT_0 <=c && c<=FULLWIDTH_DIGIT_9 )
|| (FULLWIDTH_CAPITAL_A<=c && c<=FULLWIDTH_CAPITAL_Z)
@@ -485,8 +485,6 @@ void init_default_kanji (const_string file_str, const_string internal_str)
{
char *p;
- enable_UPTEX (true); /* enable */
-
init_kanji (file_str, internal_str);
p = getenv ("PTEX_KANJI_ENC");
@@ -504,3 +502,33 @@ void init_default_kanji (const_string file_str, const_string internal_str)
}
#endif
}
+
+void init_default_kanji_select(void)
+{
+ char *base;
+
+ base = kpse_program_basename (argv[0]);
+
+ if (FILESTRNCASEEQ(base, "p", 1) || FILESTRNCASEEQ(base, "ep", 2)) {
+
+ enable_UPTEX (false); /* disable */
+#if defined(WIN32)
+/* pBibTeX is EUC only */
+ if (FILESTRNCASEEQ(base, "pbibtex", 7)) {
+ init_default_kanji(NULL, "euc");
+ } else {
+/* for pTeX, e-pTeX, pDVItype, pPLtoTF, and pTFtoPL */
+ init_default_kanji(NULL, "sjis");
+ }
+#else
+ init_default_kanji(NULL, "euc");
+#endif
+
+ } else {
+
+/* for upTeX, e-upTeX, upBibTeX, upDVItype, upPLtoTF, and upTFtoPL */
+ enable_UPTEX (true); /* enable */
+ init_default_kanji ("utf8", "uptex");
+
+ }
+}
diff --git a/Build/source/texk/web2c/uptexdir/kanji.h b/Build/source/texk/web2c/uptexdir/kanji.h
index 8206f72f83e..20f87f33f41 100644
--- a/Build/source/texk/web2c/uptexdir/kanji.h
+++ b/Build/source/texk/web2c/uptexdir/kanji.h
@@ -38,8 +38,9 @@ extern integer kcatcodekey (integer c);
extern integer multilenbuffchar (integer c);
extern void init_default_kanji (const_string file_str, const_string internal_str);
+extern void init_default_kanji_select (void);
/* for upTeX, e-upTeX, upBibTeX, upDVItype, upPLtoTF, and upTFtoPL */
-#define initkanji() init_default_kanji("utf8", "uptex")
+#define initkanji() init_default_kanji_select()
/* for upDVItype */
#define setpriorfileenc() set_prior_file_enc()
diff --git a/Build/source/texk/web2c/uptexdir/tests/test_if.tex b/Build/source/texk/web2c/uptexdir/tests/test_if.tex
new file mode 100644
index 00000000000..35588f992c1
--- /dev/null
+++ b/Build/source/texk/web2c/uptexdir/tests/test_if.tex
@@ -0,0 +1,29 @@
+\kcatcode`あ=18
+\def\xA{あ}\let\yA=あ
+\kcatcode`あ=17
+\def\xB{あ}\let\yB=あ
+\kcatcode`あ=16
+
+\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}
+
+\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}
+
+\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}
+\fi
+\end
+
+
diff --git a/Build/source/texk/web2c/uptexdir/upbibtex.ch b/Build/source/texk/web2c/uptexdir/upbibtex.ch
index 852ba3c589c..fefd2951da4 100644
--- a/Build/source/texk/web2c/uptexdir/upbibtex.ch
+++ b/Build/source/texk/web2c/uptexdir/upbibtex.ch
@@ -3,7 +3,7 @@
@d banner=='This is pBibTeX, Version 0.99d-j0.33'
@y
@d my_name=='upbibtex'
-@d banner=='This is upBibTeX, Version 0.99d-j0.33-u1.24'
+@d banner=='This is upBibTeX, Version 0.99d-j0.33-u1.25'
@z
@x
diff --git a/Build/source/texk/web2c/uptexdir/updvitype.ch b/Build/source/texk/web2c/uptexdir/updvitype.ch
index 7ec29670097..155e3b3417a 100644
--- a/Build/source/texk/web2c/uptexdir/updvitype.ch
+++ b/Build/source/texk/web2c/uptexdir/updvitype.ch
@@ -3,7 +3,7 @@
@d banner=='This is pDVItype, Version 3.6-p0.4'
@y
@d my_name=='updvitype'
-@d banner=='This is upDVItype, Version 3.6-p0.4-u1.24'
+@d banner=='This is upDVItype, Version 3.6-p0.4-u1.25'
@z
@x procedure initialize
diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.ch b/Build/source/texk/web2c/uptexdir/uppltotf.ch
index a3b1cf087c9..c36299da75a 100644
--- a/Build/source/texk/web2c/uptexdir/uppltotf.ch
+++ b/Build/source/texk/web2c/uptexdir/uppltotf.ch
@@ -3,7 +3,7 @@
@d banner=='This is pPLtoTF, Version 3.6-p2.0'
@y
@d my_name=='uppltotf'
-@d banner=='This is upPLtoTF, Version 3.6-p2.0-u1.24'
+@d banner=='This is upPLtoTF, Version 3.6-p2.0-u1.25'
@z
@x
diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch
index c5ced29fab4..ab68542f62e 100644
--- a/Build/source/texk/web2c/uptexdir/uptex-m.ch
+++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch
@@ -39,6 +39,8 @@
% (2018-01-21) HK Added \uptexversion primitive and co.
% (2018-02-24) TTK upTeX u1.23
% (2019-02-23) TTK upTeX u1.24
+% (2019-05-06) HK Hironori Kitagawa fixed a bug in \if.
+% (2019-05-06) TTK upTeX u1.25
@x upTeX: banner
{printed when \pTeX\ starts}
@@ -142,6 +144,7 @@ if (kcode_pos=1)or((kcode_pos>=@'11)and(kcode_pos<=@'12))
@d max_quarterword=255 {largest allowable value in a |quarterword|}
@d min_halfword==-@"FFFFFFF {smallest allowable value in a |halfword|}
@d max_halfword==@"FFFFFFF {largest allowable value in a |halfword|}
+@d max_cjk_val=@"10000
@y
@d min_quarterword=0 {smallest allowable value in a |quarterword|}
@d max_quarterword=@"FFFF {largest allowable value in a |quarterword|}
@@ -699,16 +702,24 @@ 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
diff --git a/Build/source/texk/web2c/uptexdir/uptex_version.h b/Build/source/texk/web2c/uptexdir/uptex_version.h
index 62752c3fdef..5483afaa4e7 100644
--- a/Build/source/texk/web2c/uptexdir/uptex_version.h
+++ b/Build/source/texk/web2c/uptexdir/uptex_version.h
@@ -1 +1 @@
-#define UPTEX_VERSION "u1.24"
+#define UPTEX_VERSION "u1.25"
diff --git a/Build/source/texk/web2c/uptexdir/uptftopl.ch b/Build/source/texk/web2c/uptexdir/uptftopl.ch
index a4a6c4a8040..54fdd114be1 100644
--- a/Build/source/texk/web2c/uptexdir/uptftopl.ch
+++ b/Build/source/texk/web2c/uptexdir/uptftopl.ch
@@ -3,7 +3,7 @@
@d banner=='This is pTFtoPL, Version 3.3-p2.0'
@y
@d my_name=='uptftopl'
-@d banner=='This is upTFtoPL, Version 3.3-p2.0-u1.24'
+@d banner=='This is upTFtoPL, Version 3.3-p2.0-u1.25'
@z
@x