texlive[73746] Build/source/texk/dvipng: dvipng: small changes for

commits+kakuto at tug.org commits+kakuto at tug.org
Thu Feb 6 06:03:43 CET 2025


Revision: 73746
          https://tug.org/svn/texlive?view=revision&revision=73746
Author:   kakuto
Date:     2025-02-06 06:03:43 +0100 (Thu, 06 Feb 2025)
Log Message:
-----------
dvipng: small changes for windows

Modified Paths:
--------------
    trunk/Build/source/texk/dvipng/TLpatches/ChangeLog
    trunk/Build/source/texk/dvipng/TLpatches/patch-08-win32
    trunk/Build/source/texk/dvipng/dvipng-src/special.c

Modified: trunk/Build/source/texk/dvipng/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipng/TLpatches/ChangeLog	2025-02-06 00:42:06 UTC (rev 73745)
+++ trunk/Build/source/texk/dvipng/TLpatches/ChangeLog	2025-02-06 05:03:43 UTC (rev 73746)
@@ -1,3 +1,11 @@
+2025-02-06  Akira Kakuto  <kakuto at jcom.zaq.ne.jp>
+
+	* patch-08-win32: adapted.
+
+2025-02-06  Karl Berry  <karl at freefriends.org>
+
+	Import dvipng-1.18.
+
 2020-01-06  Akira Kakuto  <kakuto at w32tex.org>
 
 	Import dvipng-1.17.

Modified: trunk/Build/source/texk/dvipng/TLpatches/patch-08-win32
===================================================================
--- trunk/Build/source/texk/dvipng/TLpatches/patch-08-win32	2025-02-06 00:42:06 UTC (rev 73745)
+++ trunk/Build/source/texk/dvipng/TLpatches/patch-08-win32	2025-02-06 05:03:43 UTC (rev 73746)
@@ -1,8 +1,6 @@
-	Does not apply in 1.18.
-
---- special.c.orig	Fri Aug 31 16:39:04 2018
-+++ special.c	Mon Jan 06 18:53:34 2020
-@@ -492,6 +492,25 @@
+--- special.c.orig	Sun Feb 02 23:55:30 2025
++++ special.c	Thu Feb 06 13:40:55 2025
+@@ -516,6 +516,25 @@
  
        PSCodeInit(&image, NULL);
        image.filename=kpse_find_file(psname,kpse_pict_format,0);
@@ -25,6 +23,6 @@
 +        file_system_codepage = tmpcp;
 +      }
 +#endif
-       if (MmapFile(image.filename,&(image.fmmap)) || image.fmmap.size==0) {
- 	Warning("Image file %s unusable, image will be left blank",
- 		image.filename);
+       if (image.filename == NULL) {
+         Warning("Image file %s cannot be found, image will be left blank",
+ 		psname);

Modified: trunk/Build/source/texk/dvipng/dvipng-src/special.c
===================================================================
--- trunk/Build/source/texk/dvipng/dvipng-src/special.c	2025-02-06 00:42:06 UTC (rev 73745)
+++ trunk/Build/source/texk/dvipng/dvipng-src/special.c	2025-02-06 05:03:43 UTC (rev 73746)
@@ -516,7 +516,26 @@
 
       PSCodeInit(&image, NULL);
       image.filename=kpse_find_file(psname,kpse_pict_format,0);
+#if !defined(MIKTEX) && defined(WIN32)
       if (image.filename == NULL) {
+        wchar_t *wnam;
+        char *tmpnam;
+        int tmpcp;
+        tmpcp = file_system_codepage;
+        file_system_codepage = CP_UTF8;
+        tmpnam = kpse_find_file(psname,kpse_pict_format,0);
+        if (tmpnam) {
+          wnam = get_wstring_from_mbstring(CP_UTF8, tmpnam, wnam=NULL);
+          if (wnam) {
+            image.filename = get_mbstring_from_wstring(tmpcp, wnam, image.filename=NULL);
+            free(wnam);
+          }
+          free(tmpnam);
+        }
+        file_system_codepage = tmpcp;
+      }
+#endif
+      if (image.filename == NULL) {
         Warning("Image file %s cannot be found, image will be left blank",
 		psname);
 	page_flags |= PAGE_GAVE_WARN;



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