texlive[68155] Build/source/texk/web2c/uptexdir: uptexdir: sync with

commits+hironobu at tug.org commits+hironobu at tug.org
Sun Sep 3 12:47:54 CEST 2023


Revision: 68155
          http://tug.org/svn/texlive?view=revision&revision=68155
Author:   hironobu
Date:     2023-09-03 12:47:53 +0200 (Sun, 03 Sep 2023)
Log Message:
-----------
uptexdir: sync with upstream

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/uptexdir/ChangeLog
    trunk/Build/source/texk/web2c/uptexdir/kanji.c
    trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch

Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2023-09-02 23:46:50 UTC (rev 68154)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2023-09-03 10:47:53 UTC (rev 68155)
@@ -1,3 +1,10 @@
+2023-09-03  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	* uptex-m.ch: Proper support for \kchar in math mode.
+	https://github.com/texjporg/tex-jp-build/pull/159
+	* kanji.c: Check character code range < 2^24.
+	https://github.com/texjporg/tex-jp-build/issues/160
+
 2023-08-20  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* am/uptex.am, {gkhuge,newjfm,nissya,ptriptest,

Modified: trunk/Build/source/texk/web2c/uptexdir/kanji.c
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/kanji.c	2023-09-02 23:46:50 UTC (rev 68154)
+++ trunk/Build/source/texk/web2c/uptexdir/kanji.c	2023-09-03 10:47:53 UTC (rev 68155)
@@ -16,7 +16,7 @@
 {
     if (c >= CS_TOKEN_FLAG) return false;
     else if (!(XXHi(c)>=KCAT_KANJI && XXHi(c)<=KCAT_HANGUL)) return false;
-    else return is_char_kanji(c);
+    else return is_char_kanji(c & CJK_TOKEN_FLAG);
 }
 
 boolean is_char_ascii(integer c)
@@ -27,7 +27,7 @@
 boolean is_char_kanji(integer c)
 {
     if (is_internalUPTEX()) 
-        return (c >= 0);
+        return ((c >= 0)&&(c<CJK_CHAR_LIMIT));
     else
         return iskanji1(Hi(c)) && iskanji2(Lo(c));
 }

Modified: trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2023-09-02 23:46:50 UTC (rev 68154)
+++ trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2023-09-03 10:47:53 UTC (rev 68155)
@@ -670,7 +670,6 @@
 @z
 
 @x
-
 @d ptex_revision_code=14 {command code for \.{\\ptexrevision}}
 @d ptex_convert_codes=15 {end of \pTeX's command codes}
 @y
@@ -783,22 +782,6 @@
 @z
 
 @x
-loop at +  begin get_x_token;
-  reswitch: case cur_cmd of
-  letter,other_char,char_given:@<Append a new letter or hyphen@>;
-  char_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=char_given;
-    goto reswitch;
-    end;
- at y
-loop at +  begin get_x_token;
-  reswitch: case cur_cmd of
-  letter,other_char,char_given,kchar_given:@<Append a new letter or hyphen@>;
-  char_num,kchar_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=char_given;
-    goto reswitch;
-    end;
- at z
-
- at x
 hmode+kanji,hmode+kana,hmode+other_kchar: goto main_loop_j;
 hmode+char_given:
   if is_char_ascii(cur_chr) then goto main_loop else goto main_loop_j;
@@ -811,11 +794,11 @@
    (cur_cmd=char_given)or(cur_cmd=char_num) then cancel_boundary:=true;
 @y
 hmode+kanji,hmode+kana,hmode+other_kchar,hmode+hangul: goto main_loop_j;
-hmode+kchar_given:
-  begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); goto main_loop_j; end;
 hmode+char_given:
   if check_echar_range(cur_chr) then goto main_loop
   else begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); goto main_loop_j; end;
+hmode+kchar_given:
+  begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); goto main_loop_j; end;
 hmode+char_num: begin scan_char_num; cur_chr:=cur_val;
   if check_echar_range(cur_chr) then goto main_loop
   else begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); goto main_loop_j; end;
@@ -874,6 +857,9 @@
   begin if check_echar_range(cur_chr) then goto main_loop_lookahead+1
   else begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); @<goto |main_lig_loop|@>; end;
   end;
+if cur_cmd=kchar_given then
+  begin cur_chr:=cur_chr mod max_cjk_val;
+  cur_cmd:=kcat_code(kcatcodekey(cur_chr)); @<goto |main_lig_loop|@>; end;
 if cur_cmd=char_num then
   begin scan_char_num; cur_chr:=cur_val;
   if check_echar_range(cur_chr) then goto main_loop_lookahead+1
@@ -995,11 +981,20 @@
 @x
     KANJI(cx):=cur_chr;
 kanji,kana,other_kchar: cx:=cur_chr;
+char_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=char_given;
+  goto reswitch;
+  end;
 @y
     KANJI(cx):=cur_chr;
+kanji,kana,other_kchar,hangul: cx:=cur_chr;
 kchar_given:
   KANJI(cx):=cur_chr;
-kanji,kana,other_kchar,hangul: cx:=cur_chr;
+char_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=char_given;
+  goto reswitch;
+  end;
+kchar_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=kchar_given;
+  goto reswitch;
+  end;
 @z
 
 @x



More information about the tex-live-commits mailing list.