texlive[46519] Build/source/texk/makejvf: makejvf: support SKIP

commits+hironobu at tug.org commits+hironobu at tug.org
Fri Feb 2 14:17:22 CET 2018


Revision: 46519
          http://tug.org/svn/texlive?view=revision&revision=46519
Author:   hironobu
Date:     2018-02-02 14:17:22 +0100 (Fri, 02 Feb 2018)
Log Message:
-----------
makejvf: support SKIP property in GLUEKERN

Modified Paths:
--------------
    trunk/Build/source/texk/makejvf/ChangeLog
    trunk/Build/source/texk/makejvf/Makefile.am
    trunk/Build/source/texk/makejvf/Makefile.in
    trunk/Build/source/texk/makejvf/makejvf.test
    trunk/Build/source/texk/makejvf/tfmread.c
    trunk/Build/source/texk/makejvf/version.h
    trunk/Build/source/texk/makejvf/write.c

Added Paths:
-----------
    trunk/Build/source/texk/makejvf/tests/gkhugeok.tfm
    trunk/Build/source/texk/makejvf/tests/gkhugeok.vf
    trunk/Build/source/texk/makejvf/tests/skipjfmp.tfm
    trunk/Build/source/texk/makejvf/tests/skipjfmp.vf

Modified: trunk/Build/source/texk/makejvf/ChangeLog
===================================================================
--- trunk/Build/source/texk/makejvf/ChangeLog	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/ChangeLog	2018-02-02 13:17:22 UTC (rev 46519)
@@ -1,3 +1,12 @@
+2018-02-02  Hironobu Yamashita  <h.y.acetaminophen at 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 at gmail.com>
 
 	* tfmread.c: Support new JFM spec (3-byte characters in TYPE > 0).

Modified: trunk/Build/source/texk/makejvf/Makefile.am
===================================================================
--- trunk/Build/source/texk/makejvf/Makefile.am	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/Makefile.am	2018-02-02 13:17:22 UTC (rev 46519)
@@ -38,7 +38,12 @@
 	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
 
-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
 

Modified: trunk/Build/source/texk/makejvf/Makefile.in
===================================================================
--- trunk/Build/source/texk/makejvf/Makefile.in	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/Makefile.in	2018-02-02 13:17:22 UTC (rev 46519)
@@ -556,11 +556,14 @@
 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
 

Modified: trunk/Build/source/texk/makejvf/makejvf.test
===================================================================
--- trunk/Build/source/texk/makejvf/makejvf.test	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/makejvf.test	2018-02-02 13:17:22 UTC (rev 46519)
@@ -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
 

Added: trunk/Build/source/texk/makejvf/tests/gkhugeok.tfm
===================================================================
(Binary files differ)

Index: trunk/Build/source/texk/makejvf/tests/gkhugeok.tfm
===================================================================
--- trunk/Build/source/texk/makejvf/tests/gkhugeok.tfm	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/tests/gkhugeok.tfm	2018-02-02 13:17:22 UTC (rev 46519)

Property changes on: trunk/Build/source/texk/makejvf/tests/gkhugeok.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/makejvf/tests/gkhugeok.vf
===================================================================
(Binary files differ)

Index: trunk/Build/source/texk/makejvf/tests/gkhugeok.vf
===================================================================
--- trunk/Build/source/texk/makejvf/tests/gkhugeok.vf	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/tests/gkhugeok.vf	2018-02-02 13:17:22 UTC (rev 46519)

Property changes on: trunk/Build/source/texk/makejvf/tests/gkhugeok.vf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/makejvf/tests/skipjfmp.tfm
===================================================================
(Binary files differ)

Index: trunk/Build/source/texk/makejvf/tests/skipjfmp.tfm
===================================================================
--- trunk/Build/source/texk/makejvf/tests/skipjfmp.tfm	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/tests/skipjfmp.tfm	2018-02-02 13:17:22 UTC (rev 46519)

Property changes on: trunk/Build/source/texk/makejvf/tests/skipjfmp.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/makejvf/tests/skipjfmp.vf
===================================================================
(Binary files differ)

Index: trunk/Build/source/texk/makejvf/tests/skipjfmp.vf
===================================================================
--- trunk/Build/source/texk/makejvf/tests/skipjfmp.vf	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/tests/skipjfmp.vf	2018-02-02 13:17:22 UTC (rev 46519)

Property changes on: trunk/Build/source/texk/makejvf/tests/skipjfmp.vf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/texk/makejvf/tfmread.c
===================================================================
--- trunk/Build/source/texk/makejvf/tfmread.c	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/tfmread.c	2018-02-02 13:17:22 UTC (rev 46519)
@@ -28,12 +28,14 @@
 	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,8 +47,10 @@
 					}
 					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> */
@@ -53,9 +57,11 @@
 		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 @@
 					}
 					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 */

Modified: trunk/Build/source/texk/makejvf/version.h
===================================================================
--- trunk/Build/source/texk/makejvf/version.h	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/version.h	2018-02-02 13:17:22 UTC (rev 46519)
@@ -1,2 +1,2 @@
-#define VERSION "20180127"
+#define VERSION "20180202"
 #define BUG_ADDRESS "issue at texjp.org"

Modified: trunk/Build/source/texk/makejvf/write.c
===================================================================
--- trunk/Build/source/texk/makejvf/write.c	2018-02-02 13:13:02 UTC (rev 46518)
+++ trunk/Build/source/texk/makejvf/write.c	2018-02-02 13:17:22 UTC (rev 46519)
@@ -321,12 +321,16 @@
 			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 @@
 			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;
 	}
 



More information about the tex-live-commits mailing list