Debian Codegraph @

texk/dvipng/TLpatches/patch-08-win32

raw
1 --- special.c.orig Sun Feb 02 23:55:30 2025
2 +++ special.c Thu Feb 06 13:40:55 2025
3 @@ -516,6 +516,25 @@
4
5 PSCodeInit(&image, NULL);
6 image.filename=kpse_find_file(psname,kpse_pict_format,0);
7 +#if !defined(MIKTEX) && defined(WIN32)
8 + if (image.filename == NULL) {
9 + wchar_t *wnam;
10 + char *tmpnam;
11 + int tmpcp;
12 + tmpcp = file_system_codepage;
13 + file_system_codepage = CP_UTF8;
14 + tmpnam = kpse_find_file(psname,kpse_pict_format,0);
15 + if (tmpnam) {
16 + wnam = get_wstring_from_mbstring(CP_UTF8, tmpnam, wnam=NULL);
17 + if (wnam) {
18 + image.filename = get_mbstring_from_wstring(tmpcp, wnam, image.filename=NULL);
19 + free(wnam);
20 + }
21 + free(tmpnam);
22 + }
23 + file_system_codepage = tmpcp;
24 + }
25 +#endif
26 if (image.filename == NULL) {
27 Warning("Image file %s cannot be found, image will be left blank",
28 psname);