texlive[46658] Build/source/texk/dvipdfm-x: dvipdfm-x version

commits+kakuto at tug.org commits+kakuto at tug.org
Sat Feb 17 09:41:35 CET 2018


Revision: 46658
          http://tug.org/svn/texlive?view=revision&revision=46658
Author:   kakuto
Date:     2018-02-17 09:41:35 +0100 (Sat, 17 Feb 2018)
Log Message:
-----------
dvipdfm-x version 20180217: Accept PDF version tag 2.0. (S. Hirata)

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/cid.c
    trunk/Build/source/texk/dvipdfm-x/configure
    trunk/Build/source/texk/dvipdfm-x/configure.ac
    trunk/Build/source/texk/dvipdfm-x/dpxfile.c
    trunk/Build/source/texk/dvipdfm-x/dpxfile.h
    trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c
    trunk/Build/source/texk/dvipdfm-x/epdf.c
    trunk/Build/source/texk/dvipdfm-x/jp2image.c
    trunk/Build/source/texk/dvipdfm-x/jpegimage.c
    trunk/Build/source/texk/dvipdfm-x/numbers.c
    trunk/Build/source/texk/dvipdfm-x/numbers.h
    trunk/Build/source/texk/dvipdfm-x/pdfcolor.c
    trunk/Build/source/texk/dvipdfm-x/pdfencoding.c
    trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c
    trunk/Build/source/texk/dvipdfm-x/pdflimits.h
    trunk/Build/source/texk/dvipdfm-x/pdfobj.c
    trunk/Build/source/texk/dvipdfm-x/pdfobj.h
    trunk/Build/source/texk/dvipdfm-x/pdfximage.c
    trunk/Build/source/texk/dvipdfm-x/pngimage.c
    trunk/Build/source/texk/dvipdfm-x/spc_dvips.c
    trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c
    trunk/Build/source/texk/dvipdfm-x/spc_tpic.c
    trunk/Build/source/texk/dvipdfm-x/tfm.c
    trunk/Build/source/texk/dvipdfm-x/type0.c
    trunk/Build/source/texk/dvipdfm-x/xbb.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,3 +1,14 @@
+2018-02-17  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
+
+	* cid.c, dpxfile.[ch], dvipdfmx.c, epdf.c, jp2image.c,
+	jpegimage.c, pdfcolor.c, pdfencoding.c, pdfencrypt.c,
+	pdflimits.h, pdfobj.[ch], pdfximage.c, pngimage.c,
+	spc_dvips.c, spc_pdfm.c, spc_tpic.c, type0.c, xbb.c:
+	Accept PDF version tag 2.0.
+	* numbers.[ch], tfm.c: Remove format specific number
+	representation from numbers.[ch].
+	* configure.ac: Version 20180217.
+
 2018-01-27  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
 	* tfm.c, number.[ch]: Support new JFM spec (3-byte characters

Modified: trunk/Build/source/texk/dvipdfm-x/cid.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/cid.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/cid.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     This program is free software; you can redistribute it and/or modify
@@ -62,15 +62,22 @@
   /* Heighest Supplement values supported by PDF-1.0, 1.1, ...; see
    * also http://partners.adobe.com/public/developer/font/index.html#ckf
    */
-  int   supplement[16];
+  int   supplement[21];
 } CIDFont_stdcc_def[] = {
-  {"Adobe", "UCS",      {-1, -1, 0, 0, 0, 0, 0, 0}}, 
-  {"Adobe", "GB1",      {-1, -1, 0, 2, 4, 4, 4, 4}}, 
-  {"Adobe", "CNS1",     {-1, -1, 0, 0, 3, 4, 4, 4}},
-  {"Adobe", "Japan1",   {-1, -1, 2, 2, 4, 5, 6, 6}},
-  {"Adobe", "Korea1",   {-1, -1, 1, 1, 2, 2, 2, 2}},
-  {"Adobe", "Identity", {-1, -1, 0, 0, 0, 0, 0, 0}},
-  {NULL,    NULL,       { 0,  0, 0, 0, 0, 0, 0, 0}}
+  {"Adobe", "UCS",      {-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0}},
+  {"Adobe", "GB1",      {-1, -1, 0, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+    4, 4, 4, 4, 4}},
+  {"Adobe", "CNS1",     {-1, -1, 0, 0, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+    4, 4, 4, 4, 4}},
+  {"Adobe", "Japan1",   {-1, -1, 2, 2, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+    6, 6, 6, 6, 6}},
+  {"Adobe", "Korea1",   {-1, -1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+    2, 2, 2, 2, 2}},
+  {"Adobe", "Identity", {-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0}},
+  {NULL,    NULL,       { 0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0}}
 };
 #define UCS_CC    0
 #define ACC_START 1
@@ -711,10 +718,10 @@
 get_cidsysinfo (const char *map_name, fontmap_opt *fmap_opt)
 {
   CIDSysInfo *csi = NULL;
-  int pdf_ver;
+  int sup_idx;
   int i, csi_idx = -1, n, m;
 
-  pdf_ver = pdf_get_version();
+  sup_idx = pdf_get_version() - 10;
 
   if (!fmap_opt || !fmap_opt->charcoll)
     return NULL;
@@ -733,7 +740,7 @@
       if (strlen(fmap_opt->charcoll) > n) {
         csi->supplement = (int) strtoul(&(fmap_opt->charcoll[n]), NULL, 10);
       } else { /* Use heighest supported value for current output PDF version. */
-        csi->supplement = CIDFont_stdcc_def[csi_idx].supplement[pdf_ver];
+        csi->supplement = CIDFont_stdcc_def[csi_idx].supplement[sup_idx];
       }
       break;
     }
@@ -785,11 +792,12 @@
   }
 
   if (csi && csi_idx >= 0) {
-    if (csi->supplement > CIDFont_stdcc_def[csi_idx].supplement[pdf_ver]
+    if (csi->supplement > CIDFont_stdcc_def[csi_idx].supplement[sup_idx]
         && (fmap_opt->flags & FONTMAP_OPT_NOEMBED)) {
-      WARN("%s: Heighest supplement number supported in PDF-1.%d for %s-%s is %d.",
-           CIDFONT_DEBUG_STR, pdf_ver, csi->registry, csi->ordering,
-           CIDFont_stdcc_def[csi_idx].supplement[pdf_ver]);
+      WARN("%s: Heighest supplement number supported in PDF-%d.%d for %s-%s is %d.",
+           CIDFONT_DEBUG_STR, pdf_get_version_major(), pdf_get_version_minor(),
+           csi->registry, csi->ordering,
+           CIDFont_stdcc_def[csi_idx].supplement[sup_idx]);
       WARN("%s: Some character may not shown without embedded font (--> %s).",
            CIDFONT_DEBUG_STR, map_name);
     }

Modified: trunk/Build/source/texk/dvipdfm-x/configure
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/configure	2018-02-17 08:41:35 UTC (rev 46658)
@@ -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) 20170918.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20180217.
 #
 # 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='20170918'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20170918'
+PACKAGE_VERSION='20180217'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20180217'
 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) 20170918 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20180217 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) 20170918:";;
+     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20180217:";;
    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 20170918
+dvipdfm-x (TeX Live) configure 20180217
 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 20170918, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20180217, 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='20170918'
+ VERSION='20180217'
 
 
 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 20170918
+dvipdfm-x (TeX Live) config.lt 20180217
 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 20170918, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20180217, 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 20170918
+dvipdfm-x (TeX Live) config.status 20180217
 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	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/configure.ac	2018-02-17 08:41:35 UTC (rev 46658)
@@ -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)], [20170918], [tex-k at tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20180217], [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/dpxfile.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dpxfile.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/dpxfile.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,5 +1,5 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
-    Copyright (C) 2007-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -1016,8 +1016,7 @@
  */
 int
 dpx_file_apply_filter (const char *cmdtmpl,
-                      const char *input, const char *output,
-                      unsigned char version)
+                      const char *input, const char *output, int version)
 {
   char   *cmd = NULL;
   const char   *p, *q;
@@ -1061,7 +1060,7 @@
         break;
       case  'v': /* Version number, e.g. 1.4 */ {
        char buf[6];
-       sprintf(buf, "1.%hu", (unsigned short) version);
+       sprintf(buf, "%d.%d", version/10, version%10);
        need(cmd, n, size, strlen(buf));
        strcpy(cmd + n, buf);  n += strlen(buf);
        break;

Modified: trunk/Build/source/texk/dvipdfm-x/dpxfile.h
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dpxfile.h	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/dpxfile.h	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -60,7 +60,7 @@
 
 extern int   dpx_file_apply_filter (const char *cmdtmpl,
                                    const char *input, const char *output,
-                                   unsigned char version);
+                                   int version);
 extern char *dpx_create_temp_file  (void);
 extern char *dpx_create_fix_temp_file (const char *filename);
 extern void  dpx_delete_old_cache  (int life);

Modified: trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -2,7 +2,7 @@
 
     DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
 
-    Copyright (C) 2002-2017 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
     the DVIPDFMx project team.
     
     Copyright (c) 2006 SIL. (xdvipdfmx extensions for XeTeX support)
@@ -164,8 +164,8 @@
   if (*my_name == 'x')
     printf ("an extended version of DVIPDFMx, which in turn was\n");
   printf ("an extended version of dvipdfm-0.13.2c developed by Mark A. Wicks.\n");
-  printf ("\nCopyright (C) 2002-2017 the DVIPDFMx project team\n");
-  printf ("Copyright (C) 2006-2017 SIL International.\n");
+  printf ("\nCopyright (C) 2002-2018 the DVIPDFMx project team\n");
+  printf ("Copyright (C) 2006-2018 SIL International.\n");
   printf ("\nThis is free software; you can redistribute it and/or modify\n");
   printf ("it under the terms of the GNU General Public License as published by\n");
   printf ("the Free Software Foundation; either version 2 of the License, or\n");
@@ -227,7 +227,8 @@
   printf ("  -O number\tSet maximum depth of open bookmark items [0]\n");
   printf ("  -P number\tSet permission flags for PDF encryption [0x003C]\n");
   printf ("  -S \t\tEnable PDF encryption\n");
-  printf ("  -V number\tSet PDF minor version [%d]\n", PDF_VERSION_DEFAULT);
+  printf ("  -V number\tSet PDF version [%d.%d]\n",
+    PDF_VERSION_DEFAULT/10,PDF_VERSION_DEFAULT%10);
   printf ("\nAll dimensions entered on the command line are \"true\" TeX dimensions.\n");
   printf ("Argument of \"-s\" lists physical page ranges separated by commas,\n");
   printf ("\te.g., \"-s 1-3,5-6\".\n");
@@ -584,17 +585,29 @@
 
     case 'V':
     {
-      int ver_minor = atoi(optarg);
-      if (ver_minor < PDF_VERSION_MIN) {
-        WARN("PDF version 1.%d not supported. Using PDF 1.%d instead.",
-             ver_minor, PDF_VERSION_MIN);
+      int    version, ver_major, ver_minor;
+
+      if (strchr(optarg, '.')) { /* new format X.X */
+        double tmp = atof(optarg);
+        ver_major = (int) tmp;
+        ver_minor = (int) (10 * (tmp - ver_major) + 0.5);
+      } else {
+        ver_major = 1;
+        ver_minor = atoi(optarg);
+      }
+      version = ver_major * 10 + ver_minor;
+      if (version < PDF_VERSION_MIN) {
+        WARN("PDF version %d.%d not supported. Using PDF %d.%d instead.",
+             ver_major, ver_minor, PDF_VERSION_MIN/10, PDF_VERSION_MIN%10);
         ver_minor = PDF_VERSION_MIN;
-      } else if (ver_minor > PDF_VERSION_MAX) {
-        WARN("PDF version 1.%d not supported. Using PDF 1.%d instead.",
-             ver_minor, PDF_VERSION_MAX);
+        version = ver_major * 10 + ver_minor;
+      } else if (version > PDF_VERSION_MAX) {
+        WARN("PDF version %d.%d not supported. Using PDF %d.%d instead.",
+             ver_major, ver_minor, PDF_VERSION_MAX/10, PDF_VERSION_MAX%10);
         ver_minor = PDF_VERSION_MAX;
+        version = ver_major * 10 + ver_minor;
       }
-      pdf_set_version((unsigned) ver_minor);
+      pdf_set_version(version);
       break;
     }
 
@@ -1060,7 +1073,7 @@
 
   pdf_enc_compute_id_string(dvi_filename, pdf_filename);
   if (do_encryption) {
-    if (key_bits > 40 && pdf_get_version() < 4)
+    if (key_bits > 40 && pdf_check_version(1, 4) < 0)
       ERROR("Chosen key length requires at least PDF 1.4. "
             "Use \"-V 4\" to change.");
     pdf_enc_set_passwd(key_bits, permission, NULL, NULL);
@@ -1071,7 +1084,7 @@
     y_offset = 0.0;
     dvi2pts  = 0.01; /* dvi2pts controls accuracy. */
   } else {
-    int ver_major = 0,  ver_minor = 0;
+    int  version, ver_major = 1, ver_minor = 0;
     char owner_pw[MAX_PWD_LEN], user_pw[MAX_PWD_LEN];
     /* Dependency between DVI and PDF side is rather complicated... */
     dvi2pts = dvi_init(dvi_filename, mag);
@@ -1090,8 +1103,9 @@
       /* FIXME: pdf_set_version() should come before ecrcyption setting.
        *        It's too late to set here...
        */
-      if (ver_minor >= PDF_VERSION_MIN && ver_minor <= PDF_VERSION_MAX) {
-        pdf_set_version(ver_minor);
+      version = ver_major * 10 + ver_minor;
+      if (version >= PDF_VERSION_MIN && version <= PDF_VERSION_MAX) {
+        pdf_set_version(version);
       }
     } else {
       dvi_scan_specials(0,
@@ -1099,14 +1113,15 @@
                         &x_offset, &y_offset, &landscape_mode,
                         &ver_major, &ver_minor,
                         &do_encryption, &key_bits, &permission, owner_pw, user_pw);
-      if (ver_minor >= PDF_VERSION_MIN && ver_minor <= PDF_VERSION_MAX) {
-        pdf_set_version(ver_minor);
+      version = ver_major * 10 + ver_minor;
+      if (version >= PDF_VERSION_MIN && version <= PDF_VERSION_MAX) {
+        pdf_set_version(version);
       }
       if (do_encryption) {
         if (!(key_bits >= 40 && key_bits <= 128 && (key_bits % 8 == 0)) &&
               key_bits != 256)
           ERROR("Invalid encryption key length specified: %u", key_bits);
-        else if (key_bits > 40 && pdf_get_version() < 4)
+        else if (key_bits > 40 && pdf_check_version(1, 4) < 0)
           ERROR("Chosen key length requires at least PDF 1.4. " \
                 "Use \"-V 4\" to change.");
         do_encryption = 1;

Modified: trunk/Build/source/texk/dvipdfm-x/epdf.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/epdf.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/epdf.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2007-2017 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -402,9 +402,10 @@
   if (!pf)
     return -1;
 
-  if (pdf_file_get_version(pf) > pdf_get_version()) {
+  if (pdf_file_check_version(pf, pdf_get_version()) < 0) {
     WARN("Trying to include PDF file which has newer version number " \
-         "than output PDF: 1.%d.", pdf_get_version());
+         "than output PDF: %d.%d.",
+         pdf_get_version_major(), pdf_get_version_minor());
   }
 
   pdf_ximage_init_form_info(&info);

Modified: trunk/Build/source/texk/dvipdfm-x/jp2image.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/jp2image.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/jp2image.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Matthias Franz,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Matthias Franz,
     the dvipdfmx project team.
 
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -362,14 +362,12 @@
 int
 jp2_include_image (pdf_ximage *ximage, FILE *fp)
 {
-  unsigned pdf_version;
   int      smask = 0;
   pdf_obj *stream, *stream_dict;
   ximage_info info;
 
-  pdf_version = pdf_get_version();
-  if (pdf_version < 5) {
-    WARN("JPEG 2000 support requires PDF version >= 1.5 (Current setting 1.%d)\n", pdf_version);
+  if (pdf_check_version(1, 5) < 0) {
+    WARN("JPEG 2000 support requires PDF version >= 1.5 (Current setting %d.%d)\n", pdf_get_version_major(), pdf_get_version_minor());
     return -1;
   }
 

Modified: trunk/Build/source/texk/dvipdfm-x/jpegimage.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/jpegimage.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/jpegimage.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2017 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
 
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -273,7 +273,7 @@
   pdf_add_dict(stream_dict, pdf_new_name("Filter"), pdf_new_name("DCTDecode"));
 
   /* XMP Metadata */
-  if (pdf_get_version() >= 4) {
+  if (pdf_check_version(1, 4) >= 0) {
     if (j_info.flags & HAVE_APPn_XMP) {
       pdf_obj *XMP_stream;
 

Modified: trunk/Build/source/texk/dvipdfm-x/numbers.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/numbers.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/numbers.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -84,16 +84,6 @@
   return triple;
 }
 
-#ifndef WITHOUT_ASCII_PTEX
-unsigned int get_unsigned_triple_kanji(FILE *file)
-{
-  unsigned int triple = get_unsigned_byte(file);
-  triple = (triple << 8) | get_unsigned_byte(file);
-  triple = triple | (get_unsigned_byte(file)<<16);
-  return triple;
-}
-#endif
-
 signed int get_signed_triple(FILE *file)
 {
   int i;
@@ -179,4 +169,3 @@
   result += j << 28;
   return (sign > 0) ? result : -result;
 }
-

Modified: trunk/Build/source/texk/dvipdfm-x/numbers.h
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/numbers.h	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/numbers.h	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -59,9 +59,6 @@
 extern unsigned short sget_unsigned_pair (unsigned char *);
 extern signed short get_signed_pair (FILE *);
 extern unsigned int get_unsigned_triple (FILE *);
-#ifndef WITHOUT_ASCII_PTEX
-extern unsigned int get_unsigned_triple_kanji (FILE *);
-#endif
 extern signed int get_signed_triple (FILE *);
 extern int32_t get_signed_quad (FILE *);
 extern uint32_t get_unsigned_quad (FILE *);

Modified: trunk/Build/source/texk/dvipdfm-x/pdfcolor.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfcolor.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdfcolor.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -596,19 +596,22 @@
   {0x04, 0x00}, /* PDF-1.5 */
   {0x04, 0x00}, /* PDF-1.6 */
   {0x04, 0x20}, /* PDF-1.7 */
+  {0x04, 0x20}, /* Dummy(1.8)*/
+  {0x04, 0x20}, /* Dummy(1.9) */
+  {0x04, 0x20}  /* PDF-2.0 */
 };
 
 static int
 iccp_version_supported (int major, int minor)
 {
-  int  pdf_ver;
+  int  idx;
 
-  pdf_ver = pdf_get_version();
-  if (pdf_ver < 8) {
-    if (icc_versions[pdf_ver].major < major)
+  idx = pdf_get_version() - 10;
+  if (idx < 11) {
+    if (icc_versions[idx].major < major)
       return 0;
-    else if (icc_versions[pdf_ver].major == major &&
-             icc_versions[pdf_ver].minor <  minor)
+    else if (icc_versions[idx].major == major &&
+             icc_versions[idx].minor <  minor)
       return 0;
     else {
       return 1;

Modified: trunk/Build/source/texk/dvipdfm-x/pdfencoding.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfencoding.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdfencoding.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2008-2016 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
+    Copyright (C) 2008-2018 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -470,7 +470,7 @@
        * we do use a base encodings for PDF versions >= 1.3.
        */
       int with_base = !(encoding->flags & FLAG_USED_BY_TYPE3)
-	              || pdf_get_version() >= 4;
+	              || pdf_check_version(1, 4) >= 0;
       ASSERT(!encoding->resource);
       encoding->resource = create_encoding_resource(encoding,
 						    with_base ? encoding->baseenc : NULL);
@@ -676,7 +676,7 @@
       /* Adobe glyph naming conventions are not used by viewers,
        * hence even ligatures (e.g, "f_i") must be explicitly defined
        */
-      if (pdf_get_version() < 5 || !agln || !agln->is_predef) {
+      if (pdf_check_version(1, 5) < 0 || !agln || !agln->is_predef) {
         wbuf[0] = (code & 0xff);
         p      = wbuf + 1;
         endptr = wbuf + WBUF_SIZE;

Modified: trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     This program is free software; you can redistribute it and/or modify
@@ -463,14 +463,14 @@
 static void
 check_version (struct pdf_sec *p, int version)
 {
-  if (p->V > 2 && version < 4) {
+  if (p->V > 2 && version < 14) {
     WARN("Current encryption setting requires PDF version >= 1.4.");
     p->V = 1;
     p->key_size = 5;
-  } else if (p->V == 4 && version < 5) {
+  } else if (p->V == 4 && version < 15) {
     WARN("Current encryption setting requires PDF version >= 1.5.");
     p->V = 2;
-  } else if (p->V ==5 && version < 7) {
+  } else if (p->V ==5 && version < 17) {
     WARN("Current encryption setting requires PDF version >= 1.7" \
          " (plus Adobe Extension Level 3).");
     p->V = 4;

Modified: trunk/Build/source/texk/dvipdfm-x/pdflimits.h
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdflimits.h	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdflimits.h	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -28,9 +28,9 @@
  * NOTE: Don't forget to update CIDFont_stdcc_def[] in cid.c
  * if you increase PDF_VERSION_MAX!
  */
-#define PDF_VERSION_MIN  3
-#define PDF_VERSION_MAX  7
-#define PDF_VERSION_DEFAULT 5
+#define PDF_VERSION_MIN  13
+#define PDF_VERSION_MAX  20
+#define PDF_VERSION_DEFAULT 15
 
 /*
  * PDF_NAME_LEN_MAX: see, Appendix C of PDF Ref. v1.3, 2nd. ed.

Modified: trunk/Build/source/texk/dvipdfm-x/pdfobj.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfobj.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdfobj.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2007-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -271,10 +271,10 @@
   compression_use_predictor = bval ? 1 : 0;
 }
 
-static unsigned pdf_version = PDF_VERSION_DEFAULT;
+static int pdf_version = PDF_VERSION_DEFAULT;
 
 void
-pdf_set_version (unsigned version)
+pdf_set_version (int version)
 {
   /* Don't forget to update CIDFont_stdcc_def[] in cid.c too! */
   if (version >= PDF_VERSION_MIN && version <= PDF_VERSION_MAX) {
@@ -282,7 +282,7 @@
   }
 }
 
-unsigned
+int
 pdf_get_version (void)
 {
   return pdf_version;
@@ -289,6 +289,24 @@
 }
 
 int
+pdf_get_version_major (void)
+{
+  return pdf_version/10;
+}
+
+int
+pdf_get_version_minor (void)
+{
+  return pdf_version%10;
+}
+
+int
+pdf_check_version (int major, int minor)
+{
+  return (pdf_version >= major*10+minor) ? 0 : -1;
+}
+
+int
 pdf_obj_get_verbose(void)
 {
   return verbose;
@@ -329,7 +347,7 @@
   add_xref_entry(0, 0, 0, 0xffff);
   next_label = 1;
 
-  if (pdf_version >= 5) {
+  if (pdf_version >= 15) {
     if (enable_objstm) {
       xref_stream = pdf_new_stream(STREAM_COMPRESS);
       xref_stream->flags |= OBJ_NO_ENCRYPT;
@@ -362,9 +380,12 @@
         ERROR("Unable to open file.");
     }
   }
-  pdf_out(pdf_output_file, "%PDF-1.", strlen("%PDF-1."));
-  v = '0' + pdf_version;
+  pdf_out(pdf_output_file, "%PDF-", strlen("%PDF-"));
+  v = '0' + (pdf_version / 10);
   pdf_out(pdf_output_file, &v, 1);
+  pdf_out(pdf_output_file, ".", 1);
+  v = '0' + (pdf_version % 10);
+  pdf_out(pdf_output_file, &v, 1);
   pdf_out(pdf_output_file, "\n", 1);
   pdf_out(pdf_output_file, BINARY_MARKER, strlen(BINARY_MARKER));
 
@@ -510,7 +531,7 @@
     if (verbose) {
       if (compression_level > 0) {
 	MESG("Compression saved %ld bytes%s\n", compression_saved,
-	     pdf_version < 5 ? ". Try \"-V 5\" for better compression" : "");
+	     pdf_version < 15 ? ". Try \"-V 1.5\" for better compression" : "");
       }
     }
 #if !defined(LIBDPX)
@@ -3724,6 +3745,13 @@
   return pf->version;
 }
 
+int
+pdf_file_check_version (pdf_file *pf, int version)
+{
+  ASSERT(pf);
+  return (pf->version >= version ? 0 : -1);
+}
+
 pdf_obj *
 pdf_file_get_trailer (pdf_file *pf)
 {
@@ -3754,13 +3782,12 @@
     pdf_obj *new_version;
     int version = check_for_pdf_version(file);
 
-    if (version < 1 || version > pdf_version) {
-      WARN("pdf_open: Not a PDF 1.[1-%u] file.", pdf_version);
-/*
-  Try to embed the PDF image, even if the PDF version is newer than
-  the setting.
-      return NULL;
-*/
+    if (version < 10)
+      WARN("Unrecognized PDF version specified for input PDF file: %d.%d",
+        pdf_version/10, pdf_version%10);
+    else if (version > pdf_version) {
+      WARN("Trying to inlucde PDF file with version newer than current " \
+        "output PDF setting: %d.%d", version/10, version%10);
     }
 
     pf = pdf_file_new(file);
@@ -3782,17 +3809,17 @@
 
     new_version = pdf_deref_obj(pdf_lookup_dict(pf->catalog, "Version"));
     if (new_version) {
-      unsigned int minor;
+      unsigned int major, minor;
 
       if (!PDF_OBJ_NAMETYPE(new_version) ||
-	  sscanf(pdf_name_value(new_version), "1.%u", &minor) != 1) {
+          sscanf(pdf_name_value(new_version), "%u.%u", &major, &minor) != 2) {
 	pdf_release_obj(new_version);
 	WARN("Illegal Version entry in document catalog. Broken PDF file?");
 	goto error;
       }
 
-      if (pf->version < minor)
-	pf->version = minor;
+      if (pf->version < major*10+minor)
+        pf->version = major*10+minor;
 
       pdf_release_obj(new_version);
     }
@@ -3826,12 +3853,12 @@
 static int
 check_for_pdf_version (FILE *file) 
 {
-  unsigned int minor;
+  unsigned int major, minor;
 
   rewind(file);
 
   return (ungetc(fgetc(file), file) == '%' &&
-	  fscanf(file, "%%PDF-1.%u", &minor) == 1) ? minor : -1;
+	  fscanf(file, "%%PDF-%u.%u", &major, &minor) == 2) ? (major*10+minor) : -1;
 }
 
 int
@@ -3845,8 +3872,8 @@
   if (version <= pdf_version)
     return 1;
 
-  WARN("Version of PDF file (1.%d) is newer than version limit specification.",
-       version);
+  WARN("Version of PDF file (%d.%d) is newer than version limit specification.",
+       version/10, version%10);
   return 1;
 }
 

Modified: trunk/Build/source/texk/dvipdfm-x/pdfobj.h
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfobj.h	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdfobj.h	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2007-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -59,8 +59,10 @@
 extern void     pdf_out_init      (const char *filename,
                                    int enable_encrypt, int enable_objstm);
 extern void     pdf_out_flush     (void);
-extern void     pdf_set_version   (unsigned version);
-extern unsigned pdf_get_version   (void);
+extern void     pdf_set_version   (int version);
+extern int      pdf_get_version   (void);
+extern int      pdf_get_version_major (void);
+extern int      pdf_get_version_minor (void);
 
 extern void     pdf_release_obj (pdf_obj *object);
 extern int      pdf_obj_typeof  (pdf_obj *object);
@@ -188,8 +190,9 @@
 extern pdf_file *pdf_open          (const char *ident, FILE *file);
 extern void      pdf_close         (pdf_file *pf);
 extern pdf_obj  *pdf_file_get_trailer (pdf_file *pf);
+extern pdf_obj  *pdf_file_get_catalog (pdf_file *pf);
 extern int       pdf_file_get_version (pdf_file *pf);
-extern pdf_obj  *pdf_file_get_catalog (pdf_file *pf);
+extern int       pdf_file_check_version (pdf_file *pf, int version);
 
 extern pdf_obj *pdf_deref_obj     (pdf_obj *object);
 extern pdf_obj *pdf_import_object (pdf_obj *object);
@@ -201,4 +204,6 @@
 extern time_t get_unique_time_if_given(void);
 #define INVALID_EPOCH_VALUE ((time_t)-1)
 
+extern int pdf_check_version (int major, int minor);
+
 #endif  /* _PDFOBJ_H_ */

Modified: trunk/Build/source/texk/dvipdfm-x/pdfximage.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfximage.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pdfximage.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2007-2017 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2019 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -961,7 +961,7 @@
       MESG("pdf_image>> ...");
     }
     error = dpx_file_apply_filter(distiller_template, filename, temp,
-                               (unsigned char) pdf_get_version());
+      pdf_get_version());
     if (error) {
       WARN("Image format conversion for \"%s\" failed...", filename);
       dpx_delete_temp_file(temp, true);

Modified: trunk/Build/source/texk/dvipdfm-x/pngimage.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pngimage.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/pngimage.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
 
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -190,7 +190,7 @@
 
   /* Ask libpng to convert down to 8-bpc. */
   if (bpc > 8) {
-    if (pdf_get_version() < 5) {
+    if (pdf_check_version(1, 5) < 0) {
       WARN("%s: 16-bpc PNG requires PDF version 1.5.", PNG_DEBUG_STR);
     png_set_strip_16(png_ptr);
     bpc = 8;
@@ -354,7 +354,7 @@
    * flag of iTxt chunks.
    */
 #if PNG_LIBPNG_VER >= 10614
-  if (pdf_get_version() >= 4) {
+  if (pdf_check_version(1, 4) >= 0) {
     png_textp text_ptr;
     pdf_obj  *XMP_stream, *XMP_stream_dict;
     int       i, num_text;
@@ -438,13 +438,11 @@
 check_transparency (png_structp png_ptr, png_infop info_ptr)
 {
   int           trans_type;
-  unsigned      pdf_version;
   png_byte      color_type;
   png_color_16p trans_values;
   png_bytep     trans;
   int           num_trans;
 
-  pdf_version = pdf_get_version();
   color_type  = png_get_color_type(png_ptr, info_ptr);
 
   /*
@@ -486,8 +484,8 @@
    * We can convert alpha cahnnels to explicit mask via user supplied alpha-
    * threshold value. But I will not do that.
    */
-  if (( pdf_version < 3 && trans_type != PDF_TRANS_TYPE_NONE   ) ||
-      ( pdf_version < 4 && trans_type == PDF_TRANS_TYPE_ALPHA )) {
+  if (( pdf_check_version(1, 3) < 0 && trans_type != PDF_TRANS_TYPE_NONE   ) ||
+      ( pdf_check_version(1, 4) < 0 && trans_type == PDF_TRANS_TYPE_ALPHA )) {
     /*
      *   No transparency supported but PNG uses transparency, or Soft-Mask
      * required but no support for it is available in this version of PDF.
@@ -504,9 +502,9 @@
     bg.red = 255; bg.green = 255; bg.blue  = 255; bg.gray = 255; bg.index = 0;
     png_set_background(png_ptr, &bg, PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
     WARN("%s: Transparency will be ignored. (no support in PDF ver. < 1.3)", PNG_DEBUG_STR);
-    if (pdf_version < 3)
+    if (pdf_check_version(1, 3) < 0)
       WARN("%s: Please use -V 3 option to enable binary transparency support.", PNG_DEBUG_STR);
-    if (pdf_version < 4)
+    if (pdf_check_version(1, 4) < 0)
       WARN("%s: Please use -V 4 option to enable full alpha channel support.", PNG_DEBUG_STR);
     trans_type = PDF_TRANS_TYPE_NONE;
   }

Modified: trunk/Build/source/texk/dvipdfm-x/spc_dvips.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_dvips.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/spc_dvips.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -606,7 +606,7 @@
   fclose(fp);
 
   error = dpx_file_apply_filter(distiller_template, gs_in, gs_out,
-                               (unsigned char) pdf_get_version());
+    pdf_get_version());
   if (error) {
     WARN("Image format conversion for PSTricks failed.");
     RELEASE(gs_in);
@@ -701,7 +701,7 @@
     fclose(fp);
 
     error = dpx_file_apply_filter(distiller_template, gs_in, gs_out,
-                                 (unsigned char) pdf_get_version());
+      pdf_get_version());
     if (error) {
       WARN("Image format conversion for PSTricks failed.");
       RELEASE(gs_in);

Modified: trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2007-2017 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -1971,6 +1971,7 @@
   {"code",       spc_handler_pdfm_code},
 
   {"minorversion", spc_handler_pdfm_do_nothing},
+  {"majorversion", spc_handler_pdfm_do_nothing},
   {"encrypt",      spc_handler_pdfm_do_nothing},
 };
 

Modified: trunk/Build/source/texk/dvipdfm-x/spc_tpic.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_tpic.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/spc_tpic.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -763,7 +763,8 @@
   tp->num_points = 0;
   tp->max_points = 0;
 
-  if (tp->mode.fill != TPIC_MODE__FILL_SOLID && pdf_get_version() < 4) {
+  if (tp->mode.fill != TPIC_MODE__FILL_SOLID &&
+      pdf_check_version(1, 4) < 0) {
       spc_warn(spe, "Tpic shading support requires PDF version 1.4.");
     tp->mode.fill = TPIC_MODE__FILL_SOLID;
   }
@@ -957,7 +958,7 @@
   error = pdf_foreach_dict(dict, tpic_filter_getopts, tp);
   if (!error) {
     if (tp->mode.fill != TPIC_MODE__FILL_SOLID &&
-        pdf_get_version() < 4) {
+        pdf_check_version(1, 4) < 0) {
       spc_warn(spe, "Transparent fill mode requires PDF version 1.4.");
       tp->mode.fill = TPIC_MODE__FILL_SOLID;
     }
@@ -1115,4 +1116,3 @@
   return  0;
 }
 #endif /* 0 */
-

Modified: trunk/Build/source/texk/dvipdfm-x/tfm.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tfm.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/tfm.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -455,6 +455,14 @@
 }
 
 #ifndef WITHOUT_ASCII_PTEX
+unsigned int get_unsigned_triple_kanji(FILE *file)
+{
+  unsigned int triple = get_unsigned_byte(file);
+  triple = (triple << 8) | get_unsigned_byte(file);
+  triple = triple | (get_unsigned_byte(file)<<16);
+  return triple;
+}
+
 static void
 jfm_do_char_type_array (FILE *tfm_file, struct tfm_font *tfm)
 {

Modified: trunk/Build/source/texk/dvipdfm-x/type0.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/type0.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/type0.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     This program is free software; you can redistribute it and/or modify
@@ -392,10 +392,8 @@
   CIDSysInfo *csi;
   char       *fontname = NULL;
   int         cid_id = -1, parent_id = -1, wmode = 0;
-  int         pdf_ver;
 
-  pdf_ver = pdf_get_version();
-  if (!map_name || cmap_id < 0 || pdf_ver < 2)
+  if (!map_name || cmap_id < 0 || pdf_check_version(1, 2) < 0)
     return -1;
 
   /*

Modified: trunk/Build/source/texk/dvipdfm-x/xbb.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/xbb.c	2018-02-17 06:32:18 UTC (rev 46657)
+++ trunk/Build/source/texk/dvipdfm-x/xbb.c	2018-02-17 08:41:35 UTC (rev 46658)
@@ -1,5 +1,5 @@
 /* This is extractbb, a bounding box extraction program.
-    Copyright (C) 2008-2017 by Jin-Hwan Cho and Matthias Franz
+    Copyright (C) 2008-2018 by Jin-Hwan Cho and Matthias Franz
     and the dvipdfmx project team.
 
     This program is free software; you can redistribute it and/or modify
@@ -180,7 +180,7 @@
     fprintf(fp, "%%%%HiResBoundingBox: %f %f %f %f\n",
             bbllx_f, bblly_f, bburx_f, bbury_f);
     if (pdf_version >= 0) {
-      fprintf(fp, "%%%%PDFVersion: 1.%d\n", pdf_version);
+      fprintf(fp, "%%%%PDFVersion: %d.%d\n", pdf_version/10, pdf_version%10);
       fprintf(fp, "%%%%Pages: %d\n", pagecount);
     }
   }



More information about the tex-live-commits mailing list