texlive[48493] Build/source/texk/dvipdfm-x: Additional dictionary

commits+kakuto at tug.org commits+kakuto at tug.org
Mon Aug 27 01:28:59 CEST 2018


Revision: 48493
          http://tug.org/svn/texlive?view=revision&revision=48493
Author:   kakuto
Date:     2018-08-27 01:28:58 +0200 (Mon, 27 Aug 2018)
Log Message:
-----------
Additional dictionary keys can be specified for tounicode conversion (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/jpegimage.c
    trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c
    trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2018-08-26 21:26:43 UTC (rev 48492)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2018-08-26 23:28:58 UTC (rev 48493)
@@ -1,3 +1,13 @@
+2018-08-27  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
+
+	* jpegimage.c: Do not write application specific markers which
+	are not necessary for displaying images.
+	* pdfencrypt.c: Set a compatibility flag bit for PDF 2.0.
+	* spc_pdfm.c: Fixed a bug that string objects are not handled
+	properly in pdf:stream special. Additional dictionay keys can
+	be specified for tounicode conversion.
+	* configure.ac: Version 20180827.
+
 2018-08-23  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
 
 	* type1.c: Add glyph names of component glyphs used by seac

Modified: trunk/Build/source/texk/dvipdfm-x/configure
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure	2018-08-26 21:26:43 UTC (rev 48492)
+++ trunk/Build/source/texk/dvipdfm-x/configure	2018-08-26 23:28:58 UTC (rev 48493)
@@ -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) 20180823.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20180827.
 #
 # 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='20180823'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20180823'
+PACKAGE_VERSION='20180827'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20180827'
 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) 20180823 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20180827 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) 20180823:";;
+     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20180827:";;
    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 20180823
+dvipdfm-x (TeX Live) configure 20180827
 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 20180823, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20180827, 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='20180823'
+ VERSION='20180827'
 
 
 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 20180823
+dvipdfm-x (TeX Live) config.lt 20180827
 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 20180823, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20180827, 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 20180823
+dvipdfm-x (TeX Live) config.status 20180827
 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-08-26 21:26:43 UTC (rev 48492)
+++ trunk/Build/source/texk/dvipdfm-x/configure.ac	2018-08-26 23:28:58 UTC (rev 48493)
@@ -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)], [20180823], [tex-k at tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20180827], [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/jpegimage.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/jpegimage.c	2018-08-26 21:26:43 UTC (rev 48492)
+++ trunk/Build/source/texk/dvipdfm-x/jpegimage.c	2018-08-26 23:28:58 UTC (rev 48493)
@@ -955,6 +955,12 @@
   return (found_SOFn ? 0 : -1);
 }
 
+/* Adobe Technical Note #5116 "Supporting the DCT Filters in PostScript Level 2" 
+ * 6. "DCTDecode Filter Summary"
+ *    ... APPn (application-specific) markers are skipped over harmlessly except
+ *   for the Adobe reserved marker described later.
+ *
+ */
 #define SET_SKIP(j,c) if ((c) < MAX_COUNT) { \
   (j)->skipbits[(c) / 8] |= (1 << (7 - ((c) % 8))); \
 }
@@ -990,11 +996,17 @@
             return -1;
           length -= 5;
           if (!memcmp(app_sig, "JFIF\000", 5)) {
+            /* APP0 JFIF marker preserved */
             j_info->flags |= HAVE_APPn_JFIF;
             length -= read_APP0_JFIF(j_info, fp);
           } else if (!memcmp(app_sig, "JFXX", 5)) {
             length -= read_APP0_JFXX(fp, length);
+            SET_SKIP(j_info, count);
+          } else {
+            SET_SKIP(j_info, count);
           }
+        } else {
+          SET_SKIP(j_info, count);
         }
         seek_relative(fp, length);
         break;
@@ -1004,6 +1016,7 @@
             return -1;
           length -= 5;
           if (!memcmp(app_sig, "Exif\000", 5)) {
+            /* APP1 Exif marker preserved */
             j_info->flags |= HAVE_APPn_Exif;
             length -= read_APP1_Exif(j_info, fp, length);
           } else if (!memcmp(app_sig, "http:", 5) && length > 24) {
@@ -1013,9 +1026,11 @@
             if (!memcmp(app_sig, "//ns.adobe.com/xap/1.0/\000", 24)) {
               j_info->flags |= HAVE_APPn_XMP;
               length -= read_APP1_XMP(j_info, fp, length);
-              SET_SKIP(j_info, count);
             }
+            SET_SKIP(j_info, count);
           }
+        } else {
+          SET_SKIP(j_info, count);
         }
         seek_relative(fp, length);
         break;
@@ -1027,10 +1042,10 @@
           if (!memcmp(app_sig, "ICC_PROFILE\000", 12)) {
             j_info->flags |= HAVE_APPn_ICC;
             length -= read_APP2_ICC(j_info, fp, length);
-            SET_SKIP(j_info, count);
           }
         }
         seek_relative(fp, length);
+        SET_SKIP(j_info, count);
         break;
       case JM_APP14:
         if (length > 5) {
@@ -1038,11 +1053,14 @@
             return -1;
           length -= 5;
           if (!memcmp(app_sig, "Adobe", 5)) {
+            /* APP14 Adobe marker preserved */
             j_info->flags |= HAVE_APPn_ADOBE;
             length -= read_APP14_Adobe(j_info, fp);
           } else {
             SET_SKIP(j_info, count);
           }
+        } else {
+          SET_SKIP(j_info, count);
         }
         seek_relative(fp, length);
         break;

Modified: trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c	2018-08-26 21:26:43 UTC (rev 48492)
+++ trunk/Build/source/texk/dvipdfm-x/pdfencrypt.c	2018-08-26 23:28:58 UTC (rev 48493)
@@ -579,6 +579,9 @@
   check_version(p, version);
 
   p->P = (int32_t) (perm | 0xC0U);
+  /* Bit position 10 shall be always set to 1 for PDF >= 2.0. */
+  if (version >= 20)
+    p->P |= (1 << 9);
   switch (p->V) {
   case 1:
     p->R = (p->P < 0x100L) ? 2 : 3;

Modified: trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c	2018-08-26 21:26:43 UTC (rev 48492)
+++ trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c	2018-08-26 23:28:58 UTC (rev 48493)
@@ -1484,8 +1484,7 @@
     break;
   case STRING_STREAM:
     fstream = pdf_new_stream(STREAM_COMPRESS);
-    if (instring)
-      pdf_add_stream(fstream, instring, strlen(instring));
+    pdf_add_stream(fstream, pdf_string_value(tmp), pdf_string_length(tmp));
     break;
   default:
     pdf_release_obj(tmp);
@@ -1864,6 +1863,7 @@
 {
   struct spc_pdf_ *sd = &_pdf_stat;
   char *cmap_name;
+  pdf_obj *taint_keys;
 
   /* First clear */
   sd->cd.cmap_id = -1;
@@ -1904,6 +1904,28 @@
       sd->cd.unescape_backslash = 1;
   }
   RELEASE(cmap_name);
+
+  /* Additional "taint key" */
+  taint_keys = parse_pdf_object(&args->curptr, args->endptr, NULL);
+  if (taint_keys) {
+    if (PDF_OBJ_ARRAYTYPE(taint_keys)) {
+      int i;
+      for (i = 0; i < pdf_array_length(taint_keys); i++) {
+        pdf_obj *key;
+        
+        key = pdf_get_array(taint_keys, i);
+        if (PDF_OBJ_NAMETYPE(key))
+          pdf_add_array(sd->cd.taintkeys, pdf_link_obj(key));
+        else {
+          spc_warn(spe, "Invalid argument specified in pdf:tounicode special.");
+        }
+      }
+    } else {
+      spc_warn(spe, "Invalid argument specified in pdf:unicode special.");
+    }
+    pdf_release_obj(taint_keys);
+  }
+
   return 0;
 }
 



More information about the tex-live-commits mailing list