diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-02-02 13:17:22 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-02-02 13:17:22 +0000 |
commit | 6dc0e38210bb5d23f33d43fa66832c8c38d54d4a (patch) | |
tree | 166ddd97bb5d2b46d9f9109785140052338e2615 /Build/source/texk/makejvf | |
parent | 9f7307579d809c7eca4c350e128045715a77303c (diff) |
makejvf: support SKIP property in GLUEKERN
git-svn-id: svn://tug.org/texlive/trunk@46519 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/makejvf')
-rw-r--r-- | Build/source/texk/makejvf/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/makejvf/Makefile.am | 11 | ||||
-rw-r--r-- | Build/source/texk/makejvf/Makefile.in | 7 | ||||
-rwxr-xr-x | Build/source/texk/makejvf/makejvf.test | 11 | ||||
-rw-r--r-- | Build/source/texk/makejvf/tests/gkhugeok.tfm | bin | 0 -> 121144 bytes | |||
-rw-r--r-- | Build/source/texk/makejvf/tests/gkhugeok.vf | bin | 0 -> 1590476 bytes | |||
-rw-r--r-- | Build/source/texk/makejvf/tests/skipjfmp.tfm | bin | 0 -> 632 bytes | |||
-rw-r--r-- | Build/source/texk/makejvf/tests/skipjfmp.vf | bin | 0 -> 141428 bytes | |||
-rw-r--r-- | Build/source/texk/makejvf/tfmread.c | 18 | ||||
-rw-r--r-- | Build/source/texk/makejvf/version.h | 2 | ||||
-rw-r--r-- | Build/source/texk/makejvf/write.c | 32 |
11 files changed, 66 insertions, 24 deletions
diff --git a/Build/source/texk/makejvf/ChangeLog b/Build/source/texk/makejvf/ChangeLog index b1c17773475..13671b0c076 100644 --- a/Build/source/texk/makejvf/ChangeLog +++ b/Build/source/texk/makejvf/ChangeLog @@ -1,3 +1,12 @@ +2018-02-02 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * tfmread.c: Support SKIP property in GLUEKERN table. + * write.c: Remove warning message on enhanced mode (hoping + well-tested). + * version.h: Bump version. + * tests/{gkhugeok,skipjfmp}.{tfm,vf}: New test files. + * Makefile.am, makejvf.test: Add new tests. + 2018-01-27 Hironobu Yamashita <h.y.acetaminophen@gmail.com> * tfmread.c: Support new JFM spec (3-byte characters in TYPE > 0). diff --git a/Build/source/texk/makejvf/Makefile.am b/Build/source/texk/makejvf/Makefile.am index 562eb35a0d1..cab51ca6c84 100644 --- a/Build/source/texk/makejvf/Makefile.am +++ b/Build/source/texk/makejvf/Makefile.am @@ -38,7 +38,12 @@ EXTRA_DIST += \ tests/tmin10.tfm \ tests/tmin10.vf \ tests/testnewu.tfm \ - tests/testnewu.vf - -DISTCLEANFILES = min10.vf rml.tfm rmlv.tfm tmin10.vf testnewu.vf urml.tfm + tests/testnewu.vf \ + tests/gkhugeok.tfm \ + tests/gkhugeok.vf \ + tests/skipjfmp.tfm \ + tests/skipjfmp.vf + +DISTCLEANFILES = min10.vf rml.tfm rmlv.tfm tmin10.vf testnewu.vf \ + gkhugeok.vf skipjfmp.vf urml.tfm diff --git a/Build/source/texk/makejvf/Makefile.in b/Build/source/texk/makejvf/Makefile.in index 0696e4ef53a..0644e58bfc8 100644 --- a/Build/source/texk/makejvf/Makefile.in +++ b/Build/source/texk/makejvf/Makefile.in @@ -556,11 +556,14 @@ LDADD = $(PTEXENC_LIBS) $(KPATHSEA_LIBS) EXTRA_DIST = COPYRIGHT COPYRIGHT.jis Changes.txt README.txt \ tests/min10.tfm tests/min10.vf tests/rml.tfm tests/rmlv.tfm \ tests/tmin10.tfm tests/tmin10.vf tests/testnewu.tfm \ - tests/testnewu.vf + tests/testnewu.vf tests/gkhugeok.tfm tests/gkhugeok.vf \ + tests/skipjfmp.tfm tests/skipjfmp.vf dist_check_SCRIPTS = makejvf.test TESTS = makejvf.test dist_man1_MANS = makejvf.1 -DISTCLEANFILES = min10.vf rml.tfm rmlv.tfm tmin10.vf testnewu.vf urml.tfm +DISTCLEANFILES = min10.vf rml.tfm rmlv.tfm tmin10.vf testnewu.vf \ + gkhugeok.vf skipjfmp.vf urml.tfm + all: c-auto.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/Build/source/texk/makejvf/makejvf.test b/Build/source/texk/makejvf/makejvf.test index 473045be9f0..ce8aa180fd1 100755 --- a/Build/source/texk/makejvf/makejvf.test +++ b/Build/source/texk/makejvf/makejvf.test @@ -12,10 +12,19 @@ cmp $srcdir/tests/tmin10.vf tmin10.vf && \ cmp $srcdir/tests/rmlv.tfm rmlv.tfm || exit 1 -./makejvf -e -i -u custom -t $srcdir/tests/uni10.cnf -m $srcdir/tests/testnewu urml && \ +# followings are supported in texjporg version +./makejvf -e -i -u custom -t $srcdir/tests/uni10.cnf $srcdir/tests/testnewu urml && \ cmp $srcdir/tests/testnewu.vf testnewu.vf && \ cmp $srcdir/tests/rml.tfm urml.tfm || exit 1 +./makejvf -e -i -u custom -t $srcdir/tests/uni10.cnf $srcdir/tests/gkhugeok urml && \ + cmp $srcdir/tests/gkhugeok.vf gkhugeok.vf && \ + cmp $srcdir/tests/rml.tfm urml.tfm || exit 1 + +./makejvf -e $srcdir/tests/skipjfmp rml && \ + cmp $srcdir/tests/skipjfmp.vf skipjfmp.vf && \ + cmp $srcdir/tests/rml.tfm rml.tfm || exit 1 + TEXMFCNF=$srcdir/../kpathsea \ ./makejvf -k0 -a abc && exit 1 diff --git a/Build/source/texk/makejvf/tests/gkhugeok.tfm b/Build/source/texk/makejvf/tests/gkhugeok.tfm Binary files differnew file mode 100644 index 00000000000..23c2a631d7f --- /dev/null +++ b/Build/source/texk/makejvf/tests/gkhugeok.tfm diff --git a/Build/source/texk/makejvf/tests/gkhugeok.vf b/Build/source/texk/makejvf/tests/gkhugeok.vf Binary files differnew file mode 100644 index 00000000000..37ed4cfbd71 --- /dev/null +++ b/Build/source/texk/makejvf/tests/gkhugeok.vf diff --git a/Build/source/texk/makejvf/tests/skipjfmp.tfm b/Build/source/texk/makejvf/tests/skipjfmp.tfm Binary files differnew file mode 100644 index 00000000000..1b6c4f18d07 --- /dev/null +++ b/Build/source/texk/makejvf/tests/skipjfmp.tfm diff --git a/Build/source/texk/makejvf/tests/skipjfmp.vf b/Build/source/texk/makejvf/tests/skipjfmp.vf Binary files differnew file mode 100644 index 00000000000..95b5aab58c5 --- /dev/null +++ b/Build/source/texk/makejvf/tests/skipjfmp.vf diff --git a/Build/source/texk/makejvf/tfmread.c b/Build/source/texk/makejvf/tfmread.c index 5459b2c8aca..5d4748fed20 100644 --- a/Build/source/texk/makejvf/tfmread.c +++ b/Build/source/texk/makejvf/tfmread.c @@ -28,12 +28,14 @@ int jfmread(int kcode) rightamount = 0; if (w != zw && ctype > 0) { /* get natural length of JFM glue between <type0> and <type of kcode> */ - tag = char_info[ctype*4+2] % 4; + tag = char_info[0*4+2] % 4; if (tag == 1) { gk_ind = char_info[0*4+3]; /* remainder for <type0> */ - if (glue_kern[gk_ind*4] == 254) /* support for large gluekern table */ + if (glue_kern[gk_ind*4] > 128) /* huge gluekern table rearranged */ gk_ind = upair(&glue_kern[gk_ind*4+2]); for (i = 0 ; i < nl-gk_ind ; i++) { + /* if rearrangement already handled ... */ + if (glue_kern[gk_ind*4] > 128) break; /* ... skip loop */ if (glue_kern[(gk_ind+i)*4+1] == ctype) { if (glue_kern[(gk_ind+i)*4+2] >= 128) { gk2_ind = glue_kern[(gk_ind+i)*4+3]; @@ -45,17 +47,21 @@ int jfmread(int kcode) } break; } - if (glue_kern[(gk_ind+i)*4] >= 128) + if (glue_kern[(gk_ind+i)*4] >= 128) /* end of program */ break; + else /* SKIP */ + i += glue_kern[(gk_ind+i)*4]; } } /* get natural length of JFM glue between <type of kcode> and <type0> */ tag = char_info[ctype*4+2] % 4; if (tag == 1) { gk_ind = char_info[ctype*4+3]; /* remainder for <type of kcode> */ - if (glue_kern[gk_ind*4] == 254) /* support for large gluekern table */ + if (glue_kern[gk_ind*4] > 128) /* huge gluekern table rearranged */ gk_ind = upair(&glue_kern[gk_ind*4+2]); for (i = 0 ; i < nl-gk_ind ; i++) { + /* if rearrangement already handled ... */ + if (glue_kern[gk_ind*4] > 128) break; /* ... skip loop */ if (glue_kern[(gk_ind+i)*4+1] == 0) { if (glue_kern[(gk_ind+i)*4+2] >= 128) { gk2_ind = glue_kern[(gk_ind+i)*4+3]; @@ -67,8 +73,10 @@ int jfmread(int kcode) } break; } - if (glue_kern[(gk_ind+i)*4] >= 128) + if (glue_kern[(gk_ind+i)*4] >= 128) /* end of program */ break; + else /* SKIP */ + i += glue_kern[(gk_ind+i)*4]; } } if (abs(zw - ll - w - rr) <= 1) /* allow round-off error */ diff --git a/Build/source/texk/makejvf/version.h b/Build/source/texk/makejvf/version.h index 70f33b6cccb..e7781745788 100644 --- a/Build/source/texk/makejvf/version.h +++ b/Build/source/texk/makejvf/version.h @@ -1,2 +1,2 @@ -#define VERSION "20180127" +#define VERSION "20180202" #define BUG_ADDRESS "issue@texjp.org" diff --git a/Build/source/texk/makejvf/write.c b/Build/source/texk/makejvf/write.c index dae91045ec6..c40cef92f98 100644 --- a/Build/source/texk/makejvf/write.c +++ b/Build/source/texk/makejvf/write.c @@ -321,12 +321,16 @@ void writevf(int code, FILE *fp) goto outputj; } } - if (skip != -rightamount && enhanced) { - fprintf(stderr, - "[Warning] Conflicting MOVERIGHT value for code %x,\n" - "[Warning] makejvf default: %08x\n" - "[Warning] suggested from JFM: %08x <= I'll use this ...\n", - code, skip, -rightamount); + if (enhanced) { +#ifdef DEBUG + if (skip != -rightamount) { + fprintf(stderr, + "[DEBUG] Conflicting MOVERIGHT value for code %x,\n" + "[DEBUG] makejvf default: %08x\n" + "[DEBUG] suggested from JFM: %08x <= I'll use this ...\n", + code, skip, -rightamount); + } +#endif skip=-rightamount; } @@ -722,12 +726,16 @@ void writevfu(int code, FILE *fp) goto outputu; } } - if (skip != -rightamount && enhanced) { - fprintf(stderr, - "[Warning] Conflicting MOVERIGHT value for code %x,\n" - "[Warning] makejvf default: %08x\n" - "[Warning] suggested from JFM: %08x <= I'll use this ...\n", - code, skip, -rightamount); + if (enhanced) { +#ifdef DEBUG + if (skip != -rightamount) { + fprintf(stderr, + "[DEBUG] Conflicting MOVERIGHT value for code %x,\n" + "[DEBUG] makejvf default: %08x\n" + "[DEBUG] suggested from JFM: %08x <= I'll use this ...\n", + code, skip, -rightamount); + } +#endif skip=-rightamount; } |