texlive[54693] Build/source/texk/makejvf: makejvf v20200412, option

commits+takuji at tug.org commits+takuji at tug.org
Sun Apr 12 02:47:53 CEST 2020


Revision: 54693
          http://tug.org/svn/texlive?view=revision&revision=54693
Author:   takuji
Date:     2020-04-12 02:47:52 +0200 (Sun, 12 Apr 2020)
Log Message:
-----------
makejvf v20200412, option -O

Modified Paths:
--------------
    trunk/Build/source/texk/makejvf/ChangeLog
    trunk/Build/source/texk/makejvf/Makefile.am
    trunk/Build/source/texk/makejvf/configure
    trunk/Build/source/texk/makejvf/configure.ac
    trunk/Build/source/texk/makejvf/main.c
    trunk/Build/source/texk/makejvf/makejvf.h
    trunk/Build/source/texk/makejvf/makejvf.test
    trunk/Build/source/texk/makejvf/version.h
    trunk/Build/source/texk/makejvf/write.c

Added Paths:
-----------
    trunk/Build/source/texk/makejvf/tests/skipjfmp_omit.vf

Modified: trunk/Build/source/texk/makejvf/ChangeLog
===================================================================
--- trunk/Build/source/texk/makejvf/ChangeLog	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/ChangeLog	2020-04-12 00:47:52 UTC (rev 54693)
@@ -1,3 +1,13 @@
+2020-04-12  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* main.c, write.c, makejvf.h:
+	Add -O option: Omit entries in VF for characters with default metric.
+	* version.h, configure{,.ac}: Bump version.
+	* tests/skipjfmp_omit.vf: New test files.
+	* Makefile.am, makejvf.test: Add new tests.
+	Thanks to @aminophen for help.
+	https://github.com/texjporg/tex-jp-build/issues/99
+
 2020-02-16  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* uniblock.c, main.c: Update references Unicode blocks Blocks-13.0.0.txt

Modified: trunk/Build/source/texk/makejvf/Makefile.am
===================================================================
--- trunk/Build/source/texk/makejvf/Makefile.am	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/Makefile.am	2020-04-12 00:47:52 UTC (rev 54693)
@@ -42,7 +42,8 @@
 	tests/gkhugeok.tfm \
 	tests/gkhugeok.vf \
 	tests/skipjfmp.tfm \
-	tests/skipjfmp.vf
+	tests/skipjfmp.vf \
+	tests/skipjfmp_omit.vf
 
 DISTCLEANFILES = min10.vf rml.tfm rmlv.tfm tmin10.vf testnewu.vf \
 	gkhugeok.vf skipjfmp.vf urml.tfm

Modified: trunk/Build/source/texk/makejvf/configure
===================================================================
--- trunk/Build/source/texk/makejvf/configure	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/configure	2020-04-12 00:47:52 UTC (rev 54693)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for makejvf (TeX Live) 1.1a.
+# Generated by GNU Autoconf 2.69 for makejvf (TeX Live) 20200412.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
 # Identity of this package.
 PACKAGE_NAME='makejvf (TeX Live)'
 PACKAGE_TARNAME='makejvf--tex-live-'
-PACKAGE_VERSION='1.1a'
-PACKAGE_STRING='makejvf (TeX Live) 1.1a'
+PACKAGE_VERSION='20200412'
+PACKAGE_STRING='makejvf (TeX Live) 20200412'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1329,7 +1329,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures makejvf (TeX Live) 1.1a to adapt to many kinds of systems.
+\`configure' configures makejvf (TeX Live) 20200412 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1400,7 +1400,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of makejvf (TeX Live) 1.1a:";;
+     short | recursive ) echo "Configuration of makejvf (TeX Live) 20200412:";;
    esac
   cat <<\_ACEOF
 
@@ -1521,7 +1521,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-makejvf (TeX Live) configure 1.1a
+makejvf (TeX Live) configure 20200412
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2173,7 +2173,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by makejvf (TeX Live) $as_me 1.1a, which was
+It was created by makejvf (TeX Live) $as_me 20200412, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -7860,7 +7860,7 @@
 
 # Define the identity of the package.
  PACKAGE='makejvf--tex-live-'
- VERSION='1.1a'
+ VERSION='20200412'
 
 
 # Some tools Automake needs.
@@ -13885,7 +13885,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-makejvf (TeX Live) config.lt 1.1a
+makejvf (TeX Live) config.lt 20200412
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -15494,7 +15494,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by makejvf (TeX Live) $as_me 1.1a, which was
+This file was extended by makejvf (TeX Live) $as_me 20200412, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15560,7 +15560,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-makejvf (TeX Live) config.status 1.1a
+makejvf (TeX Live) config.status 20200412
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/makejvf/configure.ac
===================================================================
--- trunk/Build/source/texk/makejvf/configure.ac	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/configure.ac	2020-04-12 00:47:52 UTC (rev 54693)
@@ -6,7 +6,7 @@
 dnl   gives unlimited permission to copy and/or distribute it,
 dnl   with or without modifications, as long as this notice is preserved.
 dnl
-AC_INIT([makejvf (TeX Live)], [1.1a])
+AC_INIT([makejvf (TeX Live)], [20200412])
 AC_PREREQ([2.63])
 AC_CONFIG_SRCDIR([main.c])
 AC_CONFIG_AUX_DIR([../../build-aux])

Modified: trunk/Build/source/texk/makejvf/main.c
===================================================================
--- trunk/Build/source/texk/makejvf/main.c	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/main.c	2020-04-12 00:47:52 UTC (rev 54693)
@@ -11,7 +11,7 @@
 
 FILE *vfp,*afp=NULL;
 char *atfmname,*vtfmname,*afmname,*vfname,*kanatfm,*jistfm,*ucsqtfm,*usertable;
-int kanatume=-1,chotai=0,baseshift=0,minute=0,useset3=0,hankana=0,fidzero=0,enhanced=0;
+int kanatume=-1,chotai=0,baseshift=0,minute=0,useset3=0,hankana=0,fidzero=0,enhanced=0,omitzw=0;
 int pstfm_nt;
 long ucs=0;
 
@@ -25,7 +25,7 @@
 	kpse_set_program_name(argv[0], "makejvf");
 	set_enc_string("sjis", "euc");
 
-	while ((c = getopt (argc, argv, "k:K:Ca:b:mu:3J:U:Hiet:")) != -1)
+	while ((c = getopt (argc, argv, "k:K:Ca:b:mu:3J:U:Hiet:O")) != -1)
 		switch (c) {
 
 		case 'k':
@@ -93,6 +93,9 @@
 		case 'e':
 			enhanced=1;
 			break;
+		case 'O':
+			omitzw=1;
+			break;
 		case 't':
 			usertable = xstrdup(optarg);
 			break;
@@ -103,7 +106,7 @@
 
 	if (kanatume>=0 && !afp) {
 		fprintf(stderr,"No AFM file for kanatume.\n");
-		exit(100);
+		exit(101);
 	}
 
 	if (argc - optind != 2) {
@@ -127,7 +130,7 @@
 	}
 	if (FILESTRCASEEQ(&vtfmname[0], &atfmname_base[0])) {
 		fprintf(stderr,"Invalid usage: input TFM and output TFM must be different.\n");
-		exit(100);
+		exit(102);
 	}
 
 	if (kanatfm) {
@@ -136,7 +139,7 @@
 		}
 		if (FILESTRCASEEQ(&kanatfm[0], &atfmname_base[0])) {
 			fprintf(stderr,"Invalid usage: input TFM and output TFM must be different.\n");
-			exit(100);
+			exit(102);
 		}
 	}
 
@@ -161,7 +164,7 @@
 
 	if (jistfm && ucsqtfm) {
 		fprintf(stderr,"Options -J and -U at the same time? I'm confused.\n");
-		exit(100);
+		exit(110);
 	}
 
 	if (jistfm) {
@@ -170,7 +173,7 @@
 		}
 		if (FILESTRCASEEQ(&jistfm[0], &atfmname_base[0])) {
 			fprintf(stderr,"Invalid usage: input TFM and output TFM must be different.\n");
-			exit(100);
+			exit(102);
 		}
 	}
 
@@ -180,10 +183,14 @@
 		}
 		if (FILESTRCASEEQ(&ucsqtfm[0], &atfmname_base[0])) {
 			fprintf(stderr,"Invalid usage: input TFM and output TFM must be different.\n");
-			exit(100);
+			exit(102);
 		}
 	}
 
+	if (omitzw && usertable) {
+		fprintf(stderr,"Invalid usage: conflict options -O and -t.\n");
+		exit(120);
+	}
 	if (usertable) {
 		get_usertable(usertable);
 	}
@@ -194,7 +201,7 @@
 	}
 	if (ucs==ENTRY_CUSTOM && usertable_charset_max<1) {
 		fprintf(stderr,"No custom charset definition in usertable.\n");
-		exit(101);
+		exit(130);
 	}
 
 	tfmget(atfmname);
@@ -255,6 +262,7 @@
 	fputs2("-e           Enhanced mode; the horizontal shift amount is determined\n", stderr);
 	fputs2("             from the glue/kern table of <TFMfile> input\n", stderr);
 	fputs2("-t <CNFfile> Use <CNFfile> as a configuration file\n", stderr);
+	fputs2("-O           Omit entries in VF for characters with default metric\n", stderr);
 	fputs2("-u <Charset> UCS mode\n", stderr);
 	fputs2("             <Charset> gb : GB,  cns : CNS,  ks : KS\n", stderr);
 	fputs2("                       jis : JIS,  jisq : JIS quote only\n", stderr);

Modified: trunk/Build/source/texk/makejvf/makejvf.h
===================================================================
--- trunk/Build/source/texk/makejvf/makejvf.h	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/makejvf.h	2020-04-12 00:47:52 UTC (rev 54693)
@@ -1,6 +1,6 @@
 extern char *vtfmname,*kanatfm,*jistfm,*ucsqtfm,*usertable;
 extern int unit,zh,zw,jfm_id,rightamount;
-extern int kanatume,chotai,baseshift,minute,hankana,fidzero,enhanced;
+extern int kanatume,chotai,baseshift,minute,hankana,fidzero,enhanced,omitzw;
 extern int pstfm_nt;
 extern FILE *afp;
 extern long ucs;

Modified: trunk/Build/source/texk/makejvf/makejvf.test
===================================================================
--- trunk/Build/source/texk/makejvf/makejvf.test	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/makejvf.test	2020-04-12 00:47:52 UTC (rev 54693)
@@ -10,23 +10,30 @@
 
 ./makejvf -m $srcdir/tests/tmin10 rmlv && \
   cmp $srcdir/tests/tmin10.vf tmin10.vf && \
-  cmp $srcdir/tests/rmlv.tfm rmlv.tfm || exit 1
+  cmp $srcdir/tests/rmlv.tfm rmlv.tfm || exit 2
 
 # 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
+  cmp $srcdir/tests/rml.tfm urml.tfm || exit 3
 
 ./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
+  cmp $srcdir/tests/rml.tfm urml.tfm || exit 4
 
 ./makejvf -e $srcdir/tests/skipjfmp rml && \
   cmp $srcdir/tests/skipjfmp.vf skipjfmp.vf && \
-  cmp $srcdir/tests/rml.tfm rml.tfm || exit 1
+  cmp $srcdir/tests/rml.tfm rml.tfm || exit 5
 
+./makejvf -e -O $srcdir/tests/skipjfmp rml && \
+  cmp $srcdir/tests/skipjfmp_omit.vf skipjfmp.vf && \
+  cmp $srcdir/tests/rml.tfm rml.tfm || exit 6
+
 TEXMFCNF=$srcdir/../kpathsea \
-	./makejvf -k0 -a abc && exit 1
+	./makejvf -k0 -a abc && exit 100
 
+./makejvf -t $srcdir/tests/uni10.cnf -O $srcdir/tests/skipjfmp rml && \
+ exit 101
+
 exit 0
 

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

Index: trunk/Build/source/texk/makejvf/tests/skipjfmp_omit.vf
===================================================================
--- trunk/Build/source/texk/makejvf/tests/skipjfmp_omit.vf	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/tests/skipjfmp_omit.vf	2020-04-12 00:47:52 UTC (rev 54693)

Property changes on: trunk/Build/source/texk/makejvf/tests/skipjfmp_omit.vf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/texk/makejvf/version.h
===================================================================
--- trunk/Build/source/texk/makejvf/version.h	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/version.h	2020-04-12 00:47:52 UTC (rev 54693)
@@ -1,2 +1,2 @@
-#define VERSION "20200216"
+#define VERSION "20200412"
 #define BUG_ADDRESS "issue at texjp.org"

Modified: trunk/Build/source/texk/makejvf/write.c
===================================================================
--- trunk/Build/source/texk/makejvf/write.c	2020-04-11 23:55:02 UTC (rev 54692)
+++ trunk/Build/source/texk/makejvf/write.c	2020-04-12 00:47:52 UTC (rev 54693)
@@ -93,8 +93,6 @@
 
 	w = jfmread(code); /* rightamount is also obtained */
 
-	fputc(242,fp); /* long_char */
-
 	skip2=baseshift;
 	switch (code) {
 	case 0x2146: /* \xA1\xC6 */
@@ -127,6 +125,7 @@
 				skip2+=-(int)(zh*3/5.0); /* skip2+=-(int)((0.6)*zh); */
 			}
 
+			fputc(242,fp); /* long_char */
 			if (kanatfm)
 				cc=4;
 			else
@@ -195,6 +194,7 @@
 				skip2+=(int)(zh*3/5.0); /* skip2+=(int)((0.6)*zh); */
 			}
 
+			fputc(242,fp); /* long_char */
 			if (kanatfm)
 				cc=4;
 			else
@@ -305,9 +305,17 @@
 				skip = -(zw-w)/2;
 			}
 		}
+		else {
+			if (omitzw) { /* Omit entries in VF for characters with default ZW metric */
+				if (!kanatfm || code > 0x2576)
+					return;
+			}
+		}
 		break;
 	}
 
+	fputc(242,fp); /* long_char */
+
 	for (l = 0; l < usertable_replace_max; l++) {
 		if (code == usertable_replace[l].codepoint) {
 			outcode = usertable_replace[l].newcodepoint;
@@ -375,8 +383,6 @@
 
 	w = jfmread(code); /* rightamount is also obtained */
 
-	fputc(242,fp); /* long_char */
-
 	skip2=baseshift;
 	switch (code) {
 	case 0x2018: /* \xA1\xC6 */
@@ -404,6 +410,7 @@
 				skip = -(zw-w); /* changed */
 			/* no correction needed for skip2 */
 
+			fputc(242,fp); /* long_char */
 			if (kanatfm)
 				cc=4;
 			else
@@ -432,6 +439,7 @@
 			return;
 		}
 		else if (ucsqtfm) { /* UniJIS-UCS2-H\xB7Ϥ\xD8\xCAѴ\xB9 */
+			fputc(242,fp); /* long_char */
 			cc=4;
 			skip = -(zw-w);
 			if (skip)
@@ -456,6 +464,7 @@
 		}
 		else if (jfm_id == 11 && jistfm) { /* \xB2\xA3\xBD񤭻\xFE\xA4\xCFJIS\xB7Ϥ\xD8\xCAѴ\xB9 */
 		  /* UCS U+2018 \xA2\xAA JIS 0x2146, UCS U+201C \xA2\xAA JIS 0x2148 */
+			fputc(242,fp); /* long_char */
 			cc=4;
 			skip = -(zw-w);
 			if (skip)
@@ -528,6 +537,7 @@
 				skip = zw; /* changed */
 			/* no correction needed for skip2 */
 
+			fputc(242,fp); /* long_char */
 			if (kanatfm)
 				cc=4;
 			else
@@ -562,6 +572,7 @@
 			return;
 		}
 		else if (ucsqtfm) { /* UniJIS-UCS2-H\xB7Ϥ\xD8\xCAѴ\xB9 */
+			fputc(242,fp); /* long_char */
 			cc=4;
 			if (skip2)
 				cc+=numcount(skip2)+1;
@@ -579,6 +590,7 @@
 		}
 		else if (jfm_id == 11 && jistfm) { /* \xB2\xA3\xBD񤭻\xFE\xA4\xCFJIS\xB7Ϥ\xD8\xCAѴ\xB9 */
 		  /* UCS U+2019 \xA2\xAA JIS 0x2147, UCS U+201D \xA2\xAA JIS 0x2149 */
+			fputc(242,fp); /* long_char */
 			cc=4;
 			if (skip2)
 				cc+=numcount(skip2)+1;
@@ -711,9 +723,17 @@
 				skip = -(zw-w)/2;
 			}
 		}
+		else {
+			if (omitzw) { /* Omit entries in VF for characters with default ZW metric */
+				if (!kanatfm || uniblock_iskanji)
+					return;
+			}
+		}
 		break;
 	}
 
+	fputc(242,fp); /* long_char */
+
 	for (l = 0; l < usertable_replace_max; l++) {
 		if (code == usertable_replace[l].codepoint) {
 			outcode = usertable_replace[l].newcodepoint;



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