texlive[45330] Build/source/texk/dvipdfm-x: dvipdfm-x: Fixe a bug

commits+kakuto at tug.org commits+kakuto at tug.org
Mon Sep 18 15:14:51 CEST 2017


Revision: 45330
          http://tug.org/svn/texlive?view=revision&revision=45330
Author:   kakuto
Date:     2017-09-18 15:14:50 +0200 (Mon, 18 Sep 2017)
Log Message:
-----------
dvipdfm-x: Fixe a bug that only last specified OTL GSUB feature was enabled (by S. Hirata)

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/configure
    trunk/Build/source/texk/dvipdfm-x/configure.ac
    trunk/Build/source/texk/dvipdfm-x/tt_gsub.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2017-09-18 13:13:05 UTC (rev 45329)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2017-09-18 13:14:50 UTC (rev 45330)
@@ -1,3 +1,9 @@
+2017-09-18  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
+
+	* tt_gsub.c: Fixed a bug that only last specified OTL GSUB
+	feature was enabled.
+	* configure.ac: Version 20170918.
+
 2017-08-25  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	* pdfximage.h, spc_pdfm.c: Remove MAX_IMAGES which is not
@@ -7,7 +13,7 @@
 
 	* dpxutil.[ch], epdf.c, pdfdoc.[ch], pdfximage.c, xbb.c:
 	Support for /Rotate page attribute in PDF inclusion.
-	configure.ac: Version 20170806.
+	* configure.ac: Version 20170806.
 
 2017-06-27  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 

Modified: trunk/Build/source/texk/dvipdfm-x/configure
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure	2017-09-18 13:13:05 UTC (rev 45329)
+++ trunk/Build/source/texk/dvipdfm-x/configure	2017-09-18 13:14:50 UTC (rev 45330)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20170806.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20170918.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='dvipdfm-x (TeX Live)'
 PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20170806'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20170806'
+PACKAGE_VERSION='20170918'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20170918'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1350,7 +1350,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 dvipdfm-x (TeX Live) 20170806 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20170918 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1421,7 +1421,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20170806:";;
+     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20170918:";;
    esac
   cat <<\_ACEOF
 
@@ -1551,7 +1551,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20170806
+dvipdfm-x (TeX Live) configure 20170918
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2390,7 +2390,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dvipdfm-x (TeX Live) $as_me 20170806, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20170918, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -8075,7 +8075,7 @@
 
 # Define the identity of the package.
  PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20170806'
+ VERSION='20170918'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14744,7 +14744,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20170806
+dvipdfm-x (TeX Live) config.lt 20170918
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16624,7 +16624,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dvipdfm-x (TeX Live) $as_me 20170806, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20170918, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16694,7 +16694,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dvipdfm-x (TeX Live) config.status 20170806
+dvipdfm-x (TeX Live) config.status 20170918
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/dvipdfm-x/configure.ac
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure.ac	2017-09-18 13:13:05 UTC (rev 45329)
+++ trunk/Build/source/texk/dvipdfm-x/configure.ac	2017-09-18 13:14:50 UTC (rev 45330)
@@ -7,7 +7,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([dvipdfm-x (TeX Live)], [20170806], [tex-k at tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20170918], [tex-k at tug.org])
 AC_PREREQ([2.65])
 AC_CONFIG_SRCDIR([agl.c])
 AC_CONFIG_AUX_DIR([../../build-aux])

Modified: trunk/Build/source/texk/dvipdfm-x/tt_gsub.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tt_gsub.c	2017-09-18 13:13:05 UTC (rev 45329)
+++ trunk/Build/source/texk/dvipdfm-x/tt_gsub.c	2017-09-18 13:14:50 UTC (rev 45330)
@@ -1359,7 +1359,7 @@
   return retval;
 }
 
-static const char *
+static int
 scan_otl_tag (const char *otl_tags, const char *endptr,
               char *script, char *language, char *feature)
 {
@@ -1366,10 +1366,9 @@
   const char *p, *period;
 
   ASSERT(script && language && feature);
-  ASSERT(otl_tags < endptr);
 
-  if (!otl_tags)
-    return NULL;
+  if (!otl_tags || otl_tags >= endptr)
+    return -1;
 
   memset(script, ' ', 4);   script[4]   = 0;
   memset(language, ' ', 4); language[4] = 0;
@@ -1384,6 +1383,7 @@
       strncpy(script, p, period - p);
     } else {
       WARN("Invalid OTL script tag found: %s", p);
+      return -1;
     }
     p = period + 1;
     period = strchr(p, '.');
@@ -1393,6 +1393,7 @@
         strncpy(language, p, period - p);
       } else {
         WARN("Invalid OTL lanuage tag found: %s", p);
+        return -1;
       }
       p = period + 1;
     }
@@ -1400,13 +1401,17 @@
     strcpy(script, "*");
     strcpy(language, "*");
   }
+
   /* Finally feature */
-  if (p < endptr) {
+  if (p + 4 <= endptr) {
     strncpy(feature, p, endptr - p);
     p = endptr;
+  } else {
+    WARN("No valid OTL feature tag specified.");
+    return -1;
   }
 
-  return p;
+  return 0;
 }
 
 void
@@ -1598,21 +1603,23 @@
     nextptr = strchr(p, ':');
     if (!nextptr)
       nextptr = endptr;
-    scan_otl_tag(p, nextptr, script, language, feature);
+    if (scan_otl_tag(p, nextptr, script, language, feature) >= 0) {
     idx = gsub_find(gsub_list, script, language, feature);
-    if (idx >= 0 && idx <= gsub_list->num_gsubs) {
-      struct gsub_entry *entry;
-      entry = NEW(1, struct gsub_entry);
-      if (prev)
-        prev->next = entry;
-      entry->index = idx;
-      prev = entry;
+      if (idx >= 0 && idx <= gsub_list->num_gsubs) {
+        struct gsub_entry *entry;
+        entry = NEW(1, struct gsub_entry);
+          if (!gsub_list->first)
+            gsub_list->first = entry;
+        if (prev)
+          prev->next = entry;
+        entry->index = idx;
+        prev = entry;
+      }
     }
     nextptr++;
   }
   if (prev)
     prev->next = NULL;
-  gsub_list->first = prev;
 
   return 0;
 }
@@ -1633,10 +1640,11 @@
     nextptr = strchr(p, ':');
     if (!nextptr)
       nextptr = endptr;
-    scan_otl_tag(p, nextptr, script, language, feature);
-    idx = gsub_find(gsub_list, script, language, feature);
-    if (idx < 0) {
-      otl_gsub_add_feat(gsub_list, script, language, feature, sfont);
+    if (scan_otl_tag(p, nextptr, script, language, feature) >= 0) {
+      idx = gsub_find(gsub_list, script, language, feature);
+      if (idx < 0) {
+        otl_gsub_add_feat(gsub_list, script, language, feature, sfont);
+      }
     }
     nextptr++;
   }



More information about the tex-live-commits mailing list