texlive[51021] Build/source/texk/web2c: upTeX 1.25

commits+takuji at tug.org commits+takuji at tug.org
Mon May 6 10:22:18 CEST 2019


Revision: 51021
          http://tug.org/svn/texlive?view=revision&revision=51021
Author:   takuji
Date:     2019-05-06 10:22:16 +0200 (Mon, 06 May 2019)
Log Message:
-----------
upTeX 1.25

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ptexdir/ChangeLog
    trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
    trunk/Build/source/texk/web2c/uptexdir/ChangeLog
    trunk/Build/source/texk/web2c/uptexdir/kanji.c
    trunk/Build/source/texk/web2c/uptexdir/kanji.h
    trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch
    trunk/Build/source/texk/web2c/uptexdir/updvitype.ch
    trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch
    trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch
    trunk/Build/source/texk/web2c/uptexdir/uptex_version.h
    trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch

Added Paths:
-----------
    trunk/Build/source/texk/web2c/uptexdir/tests/test_if.tex

Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2019-05-06 08:22:16 UTC (rev 51021)
@@ -1,3 +1,9 @@
+2019-05-06  Hironori Kitagawa  <h_kitagawa2001 at 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 at yahoo.co.jp>
 
 	* ptex-base.ch: Ignore newline char after Japanese control

Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2019-05-06 08:22:16 UTC (rev 51021)
@@ -324,6 +324,13 @@
   wterm(')');
 @z
 
+ at x
+ at d max_halfword==@"FFFFFFF {largest allowable value in a |halfword|}
+ at y
+ at d max_halfword==@"FFFFFFF {largest allowable value in a |halfword|}
+ at d max_cjk_val=@"10000
+ at 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 @@
   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
 

Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2019-05-06 08:22:16 UTC (rev 51021)
@@ -1,3 +1,23 @@
+2019-05-06  TANAKA Takuji  <ttk at 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 at 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 at 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 at 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
 

Modified: trunk/Build/source/texk/web2c/uptexdir/kanji.c
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/kanji.c	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/kanji.c	2019-05-06 08:22:16 UTC (rev 51021)
@@ -444,7 +444,7 @@
                || (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 @@
 {
     char *p;
 
-    enable_UPTEX (true); /* enable */
-
     init_kanji (file_str, internal_str);
 
     p = getenv ("PTEX_KANJI_ENC");
@@ -504,3 +502,33 @@
     }
 #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");
+
+    }
+}

Modified: trunk/Build/source/texk/web2c/uptexdir/kanji.h
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/kanji.h	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/kanji.h	2019-05-06 08:22:16 UTC (rev 51021)
@@ -38,8 +38,9 @@
 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()
 

Added: trunk/Build/source/texk/web2c/uptexdir/tests/test_if.tex
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/tests/test_if.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/uptexdir/tests/test_if.tex	2019-05-06 08:22:16 UTC (rev 51021)
@@ -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
+
+

Modified: trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch	2019-05-06 08:22:16 UTC (rev 51021)
@@ -3,7 +3,7 @@
 @d banner=='This is pBibTeX, Version 0.99d-j0.33'
 @y
 @d my_name=='upbibtex'
- at d banner=='This is upBibTeX, Version 0.99d-j0.33-u1.24'
+ at d banner=='This is upBibTeX, Version 0.99d-j0.33-u1.25'
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/uptexdir/updvitype.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/updvitype.ch	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/updvitype.ch	2019-05-06 08:22:16 UTC (rev 51021)
@@ -3,7 +3,7 @@
 @d banner=='This is pDVItype, Version 3.6-p0.4'
 @y
 @d my_name=='updvitype'
- at d banner=='This is upDVItype, Version 3.6-p0.4-u1.24'
+ at d banner=='This is upDVItype, Version 3.6-p0.4-u1.25'
 @z
 
 @x procedure initialize

Modified: trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch	2019-05-06 08:22:16 UTC (rev 51021)
@@ -3,7 +3,7 @@
 @d banner=='This is pPLtoTF, Version 3.6-p2.0'
 @y
 @d my_name=='uppltotf'
- at d banner=='This is upPLtoTF, Version 3.6-p2.0-u1.24'
+ at d banner=='This is upPLtoTF, Version 3.6-p2.0-u1.25'
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2019-05-06 08:22:16 UTC (rev 51021)
@@ -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 @@
 @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|}
+ at 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 @@
 
 @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

Modified: trunk/Build/source/texk/web2c/uptexdir/uptex_version.h
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptex_version.h	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/uptex_version.h	2019-05-06 08:22:16 UTC (rev 51021)
@@ -1 +1 @@
-#define UPTEX_VERSION "u1.24"
+#define UPTEX_VERSION "u1.25"

Modified: trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch	2019-05-05 23:37:56 UTC (rev 51020)
+++ trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch	2019-05-06 08:22:16 UTC (rev 51021)
@@ -3,7 +3,7 @@
 @d banner=='This is pTFtoPL, Version 3.3-p2.0'
 @y
 @d my_name=='uptftopl'
- at d banner=='This is upTFtoPL, Version 3.3-p2.0-u1.24'
+ at d banner=='This is upTFtoPL, Version 3.3-p2.0-u1.25'
 @z
 
 @x



More information about the tex-live-commits mailing list