texlive[71231] Build/source/texk/ptexenc: ptexenc: Accept new
commits+takuji at tug.org
commits+takuji at tug.org
Sat May 11 10:27:16 CEST 2024
Revision: 71231
https://tug.org/svn/texlive?view=revision&revision=71231
Author: takuji
Date: 2024-05-11 10:27:16 +0200 (Sat, 11 May 2024)
Log Message:
-----------
ptexenc: Accept new internal encoding of upTeX also with pTeX mode
Modified Paths:
--------------
trunk/Build/source/texk/ptexenc/ChangeLog
trunk/Build/source/texk/ptexenc/ptexenc.c
trunk/Build/source/texk/ptexenc/unicode.c
Modified: trunk/Build/source/texk/ptexenc/ChangeLog
===================================================================
--- trunk/Build/source/texk/ptexenc/ChangeLog 2024-05-11 08:27:12 UTC (rev 71230)
+++ trunk/Build/source/texk/ptexenc/ChangeLog 2024-05-11 08:27:16 UTC (rev 71231)
@@ -1,3 +1,9 @@
+2024-05-11 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * unicode.c, ptexenc.c:
+ Enable to treat the new internal encoding of upTeX
+ also with pTeX mode (--kanji-internal={euc,sjis}).
+
2024-04-27 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* unicode.c, ptexenc/unicode.h:
Modified: trunk/Build/source/texk/ptexenc/ptexenc.c
===================================================================
--- trunk/Build/source/texk/ptexenc/ptexenc.c 2024-05-11 08:27:12 UTC (rev 71230)
+++ trunk/Build/source/texk/ptexenc/ptexenc.c 2024-05-11 08:27:16 UTC (rev 71231)
@@ -370,9 +370,17 @@
/* EUC */ return JIStoEUC(kcode);
}
+#define UCS_MAX 0x110000L
+
/* internal (EUC/SJIS/UPTEX) to DVI (JIS/UCS) code conversion */
long toDVI (long kcode)
{
+ if (kcode >= UCS_MAX) {
+ if (kcode < UCS_MAX*2) /* for Japanese OTF package */
+ return kcode % UCS_MAX;
+ else /* for upTeX internal encoding */
+ return kcode;
+ }
if (is_internalUPTEX()) return UPTEXtoUCS(kcode);
if (is_internalSJIS()) return SJIStoJIS(kcode);
/* EUC */ return EUCtoJIS(kcode);
Modified: trunk/Build/source/texk/ptexenc/unicode.c
===================================================================
--- trunk/Build/source/texk/ptexenc/unicode.c 2024-05-11 08:27:12 UTC (rev 71230)
+++ trunk/Build/source/texk/ptexenc/unicode.c 2024-05-11 08:27:16 UTC (rev 71231)
@@ -118,9 +118,6 @@
}
-#define UCS_MAX 0x110000L
-
-/* using over U+10.FFFF Area */
long UCStoUPTEX (long ucs)
{
return ucs;
@@ -135,8 +132,6 @@
if (UVS_divide_code(uptex, vs) == 0) return 0;
return uptex;
}
- if (uptex>=UCS_MAX*2) return uptex;
- if (uptex>=UCS_MAX) return uptex % UCS_MAX; /* for OTF package */
return uptex;
}
More information about the tex-live-commits
mailing list.