summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/uptexdir
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-06 10:58:23 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-06 10:58:23 +0000
commit174b83580efb7953436f4ab9cfbebddc19936217 (patch)
treeae8a7c89151ee9f93a9555f56d7bc6138ff0b6b3 /Build/source/texk/web2c/uptexdir
parent9904a9f5b98acf226b7295d30db24f951991faa3 (diff)
kanji-internal (ptex and friends 1 of 5)
git-svn-id: svn://tug.org/texlive/trunk@49955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/uptexdir')
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/uptexdir/kanji_dump.c7
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex-m.ch14
3 files changed, 13 insertions, 14 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index 8d1bb7cca2b..dda72bb8cf2 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,9 @@
+2019-01-23 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * kanji_dump.c: Throw a warning when kanji internal encoding
+ is incompatible with the preloaded format.
+ https://github.com/texjporg/tex-jp-build/issues/55
+
2018-09-16 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* upbibtex.ch: Fix bug of substring$
diff --git a/Build/source/texk/web2c/uptexdir/kanji_dump.c b/Build/source/texk/web2c/uptexdir/kanji_dump.c
index 83760980e95..ce1b6d7d407 100644
--- a/Build/source/texk/web2c/uptexdir/kanji_dump.c
+++ b/Build/source/texk/web2c/uptexdir/kanji_dump.c
@@ -26,6 +26,7 @@ void undump_kanji (FILE *fp)
{
char buffer[12];
char *p;
+ int i;
do_undump (buffer, 1, 12, fp);
buffer[11] = 0; /* force string termination, just in case */
@@ -36,6 +37,12 @@ void undump_kanji (FILE *fp)
else
p = buffer;
+ i = get_internal_enc();
+
/* Now BUFFER and P are the file and internal encoding strings. */
init_kanji (NULL, p);
+ if (get_internal_enc() != i) {
+ fprintf (stderr, "Option --kanji-internal invalid when a format file is loaded.\n", p);
+ fprintf (stderr, "I'll stick to %s.\n", enc_to_string(get_internal_enc()));
+ }
}
diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch
index 848783bce7a..6d52e7f24ba 100644
--- a/Build/source/texk/web2c/uptexdir/uptex-m.ch
+++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch
@@ -1082,20 +1082,6 @@ if (t<cs_token_flag+single_base)and(not check_kanji(t)) then
@z
@x
-libc_free(format_engine);@/
-@y
-libc_free(format_engine);@/
-dump_kanji(fmt_file);
-@z
-
-@x
-libc_free(format_engine);
-@y
-libc_free(format_engine);
-undump_kanji(fmt_file);
-@z
-
-@x
@d set_auto_xspacing_code=3
@y
@d set_auto_xspacing_code=3