texlive[51236] branches/branch2019/Build/source/texk/web2c: (u)ptex

commits+karl at tug.org commits+karl at tug.org
Tue May 28 00:19:58 CEST 2019


Revision: 51236
          http://tug.org/svn/texlive?view=revision&revision=51236
Author:   karl
Date:     2019-05-28 00:19:58 +0200 (Tue, 28 May 2019)
Log Message:
-----------
(u)ptex fix from ttk committed to branch2019

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

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

Modified: branches/branch2019/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- branches/branch2019/Build/source/texk/web2c/ptexdir/ChangeLog	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/ptexdir/ChangeLog	2019-05-27 22:19:58 UTC (rev 51236)
@@ -1,3 +1,11 @@
+2019-05-06  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* ptex-base.ch:
+	Make appropriate comparison of U+0100 by \if in upTeX.
+	https://github.com/texjporg/tex-jp-build/issues/68
+	Re-eval kcatcode of Japanese character token in \if and \ifcat.
+	https://github.com/texjporg/ptex-manual/issues/4
+
 2019-02-03  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* ptex-base.ch: Ignore newline char after Japanese control

Modified: branches/branch2019/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- branches/branch2019/Build/source/texk/web2c/ptexdir/ptex-base.ch	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/ptexdir/ptex-base.ch	2019-05-27 22:19:58 UTC (rev 51236)
@@ -59,6 +59,7 @@
 % (2017-09-07) HK  pTeX p3.7.2 More restrictions on direction change commands.
 % (2018-01-21) HK  Added \ptexversion primitive and co. pTeX p3.8.
 % (2018-04-14) HK  pTeX p3.8.1 Bug fix for discontinuous KINSOKU table.
+% (2019-02-03) HK  pTeX p3.8.2 Change \inhibitglue, add \disinhibitglue.
 %
 
 @x
@@ -324,6 +325,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 +2541,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: branches/branch2019/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/ChangeLog	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/ChangeLog	2019-05-27 22:19:58 UTC (rev 51236)
@@ -1,3 +1,28 @@
+2019-05-25  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* uptex-m.ch:
+	Correct upTeX_revision ".25", upTeX_version_string "-u1.25".
+
+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, kanji.h:
+	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 +49,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: branches/branch2019/Build/source/texk/web2c/uptexdir/kanji.c
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/kanji.c	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/kanji.c	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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: branches/branch2019/Build/source/texk/web2c/uptexdir/kanji.h
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/kanji.h	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/kanji.h	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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: branches/branch2019/Build/source/texk/web2c/uptexdir/tests/test_if.tex
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/tests/test_if.tex	                        (rev 0)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/tests/test_if.tex	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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
+
+


Property changes on: branches/branch2019/Build/source/texk/web2c/uptexdir/tests/test_if.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2019/Build/source/texk/web2c/uptexdir/upbibtex.ch
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/upbibtex.ch	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/upbibtex.ch	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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: branches/branch2019/Build/source/texk/web2c/uptexdir/updvitype.ch
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/updvitype.ch	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/updvitype.ch	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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: branches/branch2019/Build/source/texk/web2c/uptexdir/uppltotf.ch
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/uppltotf.ch	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/uppltotf.ch	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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: branches/branch2019/Build/source/texk/web2c/uptexdir/uptex-m.ch
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/uptex-m.ch	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/uptex-m.ch	2019-05-27 22:19:58 UTC (rev 51236)
@@ -1,4 +1,4 @@
-% This is a change file for upTeX u1.24
+% This is a change file for upTeX u1.25
 % By Takuji Tanaka.
 %
 % (02/26/2007) TTK  upTeX u0.01
@@ -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}
@@ -46,8 +48,8 @@
   {printed when \pTeX\ starts}
 @#
 @d upTeX_version=1
- at d upTeX_revision==".24"
- at d upTeX_version_string=='-u1.24' {current u\pTeX\ version}
+ at d upTeX_revision==".25"
+ at d upTeX_version_string=='-u1.25' {current u\pTeX\ version}
 @#
 @d upTeX_banner=='This is upTeX, Version 3.14159265',pTeX_version_string,upTeX_version_string
 @d upTeX_banner_k==upTeX_banner
@@ -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: branches/branch2019/Build/source/texk/web2c/uptexdir/uptex_version.h
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/uptex_version.h	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/uptex_version.h	2019-05-27 22:19:58 UTC (rev 51236)
@@ -1 +1 @@
-#define UPTEX_VERSION "u1.24"
+#define UPTEX_VERSION "u1.25"

Modified: branches/branch2019/Build/source/texk/web2c/uptexdir/uptftopl.ch
===================================================================
--- branches/branch2019/Build/source/texk/web2c/uptexdir/uptftopl.ch	2019-05-27 21:22:37 UTC (rev 51235)
+++ branches/branch2019/Build/source/texk/web2c/uptexdir/uptftopl.ch	2019-05-27 22:19:58 UTC (rev 51236)
@@ -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