texlive[42200] Build/source/texk/dvipdfm-x: dvipdfm-x/dpxfile.c: Sync

commits+kakuto at tug.org commits+kakuto at tug.org
Tue Oct 4 01:20:37 CEST 2016


Revision: 42200
          http://tug.org/svn/texlive?view=revision&revision=42200
Author:   kakuto
Date:     2016-10-04 01:20:37 +0200 (Tue, 04 Oct 2016)
Log Message:
-----------
dvipdfm-x/dpxfile.c: Sync with MikTeX

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/dpxfile.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2016-10-03 22:50:48 UTC (rev 42199)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2016-10-03 23:20:37 UTC (rev 42200)
@@ -1,3 +1,7 @@
+2016-10-03  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* dpxfile.c: Sync with MikTeX.
+
 2016-06-25  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
 
 	Modify to make PDF/A generation a bit easier.

Modified: trunk/Build/source/texk/dvipdfm-x/dpxfile.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dpxfile.c	2016-10-03 22:50:48 UTC (rev 42199)
+++ trunk/Build/source/texk/dvipdfm-x/dpxfile.c	2016-10-03 23:20:37 UTC (rev 42200)
@@ -1,10 +1,8 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
-
     Copyright (C) 2007-2016 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
-
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
@@ -28,6 +26,10 @@
 #include <kpathsea/dirent.h>
 #endif
 
+#if defined(MIKTEX_WINDOWS)
+#include <miktex/unxemu.h>
+#endif
+
 #include <time.h>
 
 #include "system.h"
@@ -151,7 +153,7 @@
 
 #endif /* TESTCOMPILE */
 
-#ifdef  MIKTEX
+#ifdef  MIKTEX_NO_KPATHSEA
 #ifndef PATH_SEP_CHR
 #  define PATH_SEP_CHR '\\'
 #endif
@@ -235,6 +237,9 @@
     qv++;
   }
 #ifdef WIN32
+#if defined(MIKTEX)
+  ret = _spawnvp(_P_WAIT, *cmdv, (const char* const*)cmdv); 
+#else
   cmdvw = xcalloc (i + 2, sizeof (wchar_t *));
   qv = cmdv;
   qvw = cmdvw;
@@ -253,6 +258,7 @@
     }
     free (cmdvw);
   }
+#endif
 #else
   i = fork ();
   if (i < 0)
@@ -293,7 +299,7 @@
   return  p;
 }
 
-#ifdef  MIKTEX
+#ifdef  MIKTEX_NO_KPATHSEA
 static char *
 dpx_find__app__xyz (const char *filename,
                     const char *suffix, int is_text)
@@ -340,6 +346,9 @@
               kpse_file_format_type foolformat,
               kpse_file_format_type realformat)
 {
+#if defined(MIKTEX)
+  /* users are not fools */
+#else
   kpse_format_info_type *fif;
   kpse_format_info_type *fir;
   if (verbose < 1)
@@ -356,6 +365,7 @@
   WARN(">> Default search path for this format file is:");
   WARN(">>   %s", fir->default_path);
   WARN(">> Please read \"README\" file.");
+#endif
 }
 
 static char *
@@ -489,7 +499,7 @@
   char  *q;
 
   q = ensuresuffix(filename, ".map");
-#ifdef  MIKTEX
+#ifdef  MIKTEX_NO_KPATHSEA
   fqpn = dpx_find__app__xyz(q, ".map", 1);
 #else /* !MIKTEX */
   fqpn = kpse_find_file(q, kpse_fontmap_format, 0);
@@ -513,7 +523,7 @@
   char  *q;
 
   q = ensuresuffix(filename, ".txt");
-#ifdef  MIKTEX
+#ifdef  MIKTEX_NO_KPATHSEA
   fqpn = dpx_find__app__xyz(q, ".txt", 1);
 #else /* !MIKTEX */
   fqpn = kpse_find_file(q, kpse_fontmap_format, 0);
@@ -540,7 +550,7 @@
   };
   int    i;
 
-#if  defined(MIKTEX)
+#if  defined(MIKTEX_NO_KPATHSEA)
   /* Find in Acrobat's Resource/CMap dir */
   {
     char  _acrodir[_MAX_PATH+1];
@@ -577,7 +587,7 @@
   for (i = 0; !fqpn && fools[i]; i++) { 
     fqpn = dpx_foolsearch(fools[i], filename, 1);
     if (fqpn) {
-#ifndef  MIKTEX
+#ifndef  MIKTEX_NO_KPATHSEA
       insistupdate(filename, fqpn, fools[i],
                    kpse_program_text_format, kpse_cmap_format); 
 #endif
@@ -610,13 +620,13 @@
   int    i;
 
   q    = ensuresuffix(filename, ".sfd");
-#ifndef  MIKTEX
+#ifndef  MIKTEX_NO_KPATHSEA
   fqpn = kpse_find_file(q, kpse_sfd_format, 0);
 #endif /* !MIKTEX */
 
   for (i = 0; !fqpn && fools[i]; i++) { 
     fqpn = dpx_foolsearch(fools[i], q, 1);
-#ifndef  MIKTEX
+#ifndef  MIKTEX_NO_KPATHSEA
     if (fqpn)
       insistupdate(filename, fqpn, fools[i],
                    kpse_program_text_format, kpse_sfd_format); 
@@ -639,7 +649,7 @@
   int    i;
 
   q = ensuresuffix(filename, ".enc");
-#ifdef  MIKTEX
+#ifdef  MIKTEX_NO_KPATHSEA
   if (miktex_find_psheader_file(q, _tmpbuf)) {
     fqpn = NEW(strlen(_tmpbuf) + 1, char);
     strcpy(fqpn, _tmpbuf);
@@ -650,7 +660,7 @@
 
   for (i = 0; !fqpn && fools[i]; i++) { 
     fqpn = dpx_foolsearch(fools[i], q, 1);
-#ifndef  MIKTEX
+#ifndef  MIKTEX_NO_KPATHSEA
     if (fqpn)
       insistupdate(filename, fqpn, fools[i],
                    kpse_program_text_format, kpse_enc_format); 
@@ -721,7 +731,7 @@
   char  *q;
 
   q = ensuresuffix(filename, ".otf");
-#ifndef MIKTEX
+#ifndef MIKTEX_NO_KPATHSEA
   if (is_absolute_path(q))
     fqpn = xstrdup(q);
   else
@@ -729,7 +739,7 @@
   if (!fqpn) {
 #endif
     fqpn = dpx_foolsearch("dvipdfmx", q, 0);
-#ifndef  MIKTEX
+#ifndef  MIKTEX_NO_KPATHSEA
     if (fqpn)
       insistupdate(filename, fqpn, "dvipdfmx",
                    kpse_program_binary_format, kpse_opentype_format); 
@@ -814,6 +824,18 @@
   {
     tmp = NEW(_MAX_PATH + 1, char);
     miktex_create_temp_file_name(tmp); /* FIXME_FIXME */
+#if defined(MIKTEX_WINDOWS)
+    {
+      char * lpsz;
+      for (lpsz = tmp; *lpsz != 0; ++ lpsz)
+      {
+	if (*lpsz == '\\')
+	{
+	  *lpsz = '/';
+	}
+      }
+    }
+#endif
   }
 #elif defined(HAVE_MKSTEMP)
 #  define TEMPLATE     "/dvipdfmx.XXXXXX"
@@ -903,10 +925,15 @@
   }
 #ifdef WIN32
   for (p = ret; *p; p++) {
+#if defined(MIKTEX)
+    if (*p == '\\')
+      *p = '/';
+#else
     if (IS_KANJI (p))
       p++;
     else if (*p == '\\')
       *p = '/';
+#endif
   }
 #endif
   /* printf("dpx_create_fix_temp_file: %s\n", ret); */
@@ -1217,4 +1244,3 @@
 
   return  r;
 }
-



More information about the tex-live-commits mailing list