texlive[63246] Build/source/texk: upbibtex: support Latin-{1,Ext-A},

commits+takuji at tug.org commits+takuji at tug.org
Sat May 7 13:34:59 CEST 2022


Revision: 63246
          http://tug.org/svn/texlive?view=revision&revision=63246
Author:   takuji
Date:     2022-05-07 13:34:59 +0200 (Sat, 07 May 2022)
Log Message:
-----------
upbibtex: support Latin-{1,Ext-A}, Greek & Cyrillic on change.case$

Modified Paths:
--------------
    trunk/Build/source/texk/bibtex-x/ChangeLog
    trunk/Build/source/texk/web2c/uptexdir/ChangeLog
    trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch

Modified: trunk/Build/source/texk/bibtex-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/bibtex-x/ChangeLog	2022-05-07 06:06:35 UTC (rev 63245)
+++ trunk/Build/source/texk/bibtex-x/ChangeLog	2022-05-07 11:34:59 UTC (rev 63246)
@@ -6,7 +6,7 @@
 	Accept max_print_line variable in kpathsea.
 	We can define max_print_line.bibtex8 or max_print_line.bibtexu
 	in texmf.cnf.
-	* tests/bibtex[8u]-char.test, tests/name[au].,bbl:
+	* tests/bibtex[8u]-char.test, tests/name[au].bbl:
 	Update tests.
 
 2022-04-29  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>

Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2022-05-07 06:06:35 UTC (rev 63245)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2022-05-07 11:34:59 UTC (rev 63246)
@@ -1,3 +1,10 @@
+2022-05-07  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* upbibtex.ch:
+	Support Latin-1, Latin Extended-A, Greek and Cyrillic on change.case$.
+	Ignore add.period$ after Interrobang ‽.
+	Make is.kanji.str$ false for Ideographic Description Characters.
+
 2022-05-06  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* upbibtex.ch: Fix bug on kpse_set_progname.

Modified: trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch	2022-05-07 06:06:35 UTC (rev 63245)
+++ trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch	2022-05-07 11:34:59 UTC (rev 63246)
@@ -50,6 +50,7 @@
 @d u_exclamation = @"FF01       {Zenkaku exclamation mark; in UCS}
 @d u_double_question = @"2047   {Zenkaku double question mark; in UCS}
 @d u_double_exclam   = @"203C   {Zenkaku double exclamation mark; in UCS}
+ at d u_interrobang     = @"203D   {Zenkaku interrobang; in UCS}
 @d u_question_exclam = @"2048   {Zenkaku question exclamation mark; in UCS}
 @d u_exclam_question = @"2049   {Zenkaku exclamation question mark; in UCS}
 @z
@@ -71,6 +72,130 @@
 @y
 @z
 
+ at x procedure lower_case
+procedure lower_case (var buf:buf_type; @!bf_ptr,@!len:buf_pointer);
+var i:buf_pointer;
+begin
+if (len > 0) then
+  for i := bf_ptr to bf_ptr+len-1 do
+    if ((buf[i]>="A") and (buf[i]<="Z")) then
+        buf[i] := buf[i] + case_difference;
+ at y
+procedure lower_case (var buf:buf_type; @!bf_ptr,@!len:buf_pointer);
+var i:buf_pointer;
+    @!ch:integer;
+begin
+if (len > 0) then
+  for i := bf_ptr to bf_ptr+len-1 do
+    if ((buf[i]>="A") and (buf[i]<="Z")) then begin
+        buf[i] := buf[i] + case_difference;
+    end
+    else if ((is_internalUPTEX) and (buf[i]>=@"C3) and (buf[i]<=@"D4)) then begin
+        ch := fromBUFF(buf,i+2,i);
+        if (((ch>=@"C0) and (ch<=@"DE) and (ch<>@"D7)) or
+            ((ch>=@"391) and (ch<=@"3AA) and (ch<>@"3A2)) or
+            ((ch>=@"410) and (ch<=@"42F))) then begin
+            ch := toBUFF(ch + case_difference);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if (((ch>=@"100) and (ch<=@"137) and ((ch mod 2)=0)) or
+                 ((ch>=@"139) and (ch<=@"148) and ((ch mod 2)=1)) or
+                 ((ch>=@"14A) and (ch<=@"177) and ((ch mod 2)=0)) or
+                 ((ch>=@"179) and (ch<=@"17E) and ((ch mod 2)=1)) or
+                 ((ch>=@"370) and (ch<=@"373) and ((ch mod 2)=0)) or
+                 ( ch=@"376 ) or
+                 ((ch>=@"3D8) and (ch<=@"3EF) and ((ch mod 2)=0)) or
+                 ( ch=@"3F7 ) or  ( ch=@"3FA ) or
+                 ((ch>=@"460) and (ch<=@"481) and ((ch mod 2)=0)) or
+                 ((ch>=@"48A) and (ch<=@"4BF) and ((ch mod 2)=0)) or
+                 ((ch>=@"4C1) and (ch<=@"4CE) and ((ch mod 2)=1)) or
+                 ((ch>=@"4D0) and (ch<=@"52F) and ((ch mod 2)=0))) then begin
+            ch := toBUFF(ch + 1);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if (ch=@"178) then begin
+            ch := toBUFF(@"FF);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if ((ch>=@"400) and (ch<=@"40F)) then begin
+            ch := toBUFF(ch + @"50);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if (ch=@"4C0) then begin
+            ch := toBUFF(@"4CF);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+    end
+ at z
+
+ at x procedure upper_case
+var i:buf_pointer;
+begin
+if (len > 0) then
+  for i := bf_ptr to bf_ptr+len-1 do
+    if ((buf[i]>="a") and (buf[i]<="z")) then
+        buf[i] := buf[i] - case_difference;
+ at y
+var i:buf_pointer;
+    @!ch:integer;
+begin
+if (len > 0) then
+  for i := bf_ptr to bf_ptr+len-1 do
+    if ((buf[i]>="a") and (buf[i]<="z")) then begin
+        buf[i] := buf[i] - case_difference;
+    end
+    else if ((is_internalUPTEX) and (buf[i]>=@"C3) and (buf[i]<=@"D4)) then begin
+        ch := fromBUFF(buf,i+2,i);
+        if (((ch>=@"E0) and (ch<=@"FE) and (ch<>@"F7)) or
+            ((ch>=@"3B1) and (ch<=@"3CA) and (ch<>@"3C2)) or
+            ((ch>=@"430) and (ch<=@"44F))) then begin
+            ch := toBUFF(ch - case_difference);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if (((ch>=@"100) and (ch<=@"137) and ((ch mod 2)=1)) or
+                 ((ch>=@"139) and (ch<=@"148) and ((ch mod 2)=0)) or
+                 ((ch>=@"14A) and (ch<=@"177) and ((ch mod 2)=1)) or
+                 ((ch>=@"179) and (ch<=@"17E) and ((ch mod 2)=0)) or
+                 ((ch>=@"370) and (ch<=@"373) and ((ch mod 2)=1)) or
+                 ( ch=@"377 ) or
+                 ((ch>=@"3D8) and (ch<=@"3EF) and ((ch mod 2)=1)) or
+                 ( ch=@"3F8 ) or  ( ch=@"3FB ) or
+                 ((ch>=@"460) and (ch<=@"481) and ((ch mod 2)=1)) or
+                 ((ch>=@"48A) and (ch<=@"4BF) and ((ch mod 2)=1)) or
+                 ((ch>=@"4C1) and (ch<=@"4CE) and ((ch mod 2)=0)) or
+                 ((ch>=@"4D0) and (ch<=@"52F) and ((ch mod 2)=1))) then begin
+            ch := toBUFF(ch - 1);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if (ch=@"DF) then begin { Latin Small Letter Sharp S }
+            buf[i]   := "S";
+            buf[i+1] := "S";
+        end
+        else if (ch=@"FF) then begin
+            ch := toBUFF(@"178);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if ((ch>=@"450) and (ch<=@"45F)) then begin
+            ch := toBUFF(ch - @"50);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+        else if (ch=@"4CF) then begin
+            ch := toBUFF(@"4C0);
+            buf[i]   := BYTE3(ch);
+            buf[i+1] := BYTE4(ch);
+        end
+    end
+ at z
+
 @x procedure get_the_top_level_aux_file_name
 label aux_found,@!aux_not_found;
 @y
@@ -122,6 +247,7 @@
                 u_exclamation,
                 u_double_question,
                 u_double_exclam,
+                u_interrobang,
                 u_question_exclam,
                 u_exclam_question:
                     repush_string;
@@ -405,7 +531,7 @@
   if (is_internalUPTEX) then begin { should be in sync with |kcat_code| of uptex-m.ch }
     k := kcatcodekey(c);
     if k=@"25 then return { Hangul Jamo }
-    else if (k>=@"68)and(k<=@"6A) then return { CJK Radicals Supplement .. Ideographic Description Characters }
+    else if (k>=@"68)and(k<=@"69) then return { CJK Radicals Supplement, Kangxi Radicals }
     else if (k>=@"6C)and(k<=@"6D) then return { Hiragana, Katakana }
     else if k=@"6E then return { Bopomofo }
     else if k=@"6F then return { Hangul Compatibility Jamo }



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