texlive[43971] Build/source/texk/kpathsea: update win32lib.c and

commits+kakuto at tug.org commits+kakuto at tug.org
Sat Apr 22 06:55:40 CEST 2017


Revision: 43971
          http://tug.org/svn/texlive?view=revision&revision=43971
Author:   kakuto
Date:     2017-04-22 06:55:40 +0200 (Sat, 22 Apr 2017)
Log Message:
-----------
update win32lib.c and mingw32.c (w32 only)

Modified Paths:
--------------
    trunk/Build/source/texk/kpathsea/ChangeLog
    trunk/Build/source/texk/kpathsea/mingw32.c
    trunk/Build/source/texk/kpathsea/win32lib.c

Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog	2017-04-22 00:07:12 UTC (rev 43970)
+++ trunk/Build/source/texk/kpathsea/ChangeLog	2017-04-22 04:55:40 UTC (rev 43971)
@@ -1,3 +1,7 @@
+2017-04-22  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* win32lib.c, mingw32.c: Update texlive_gs_init() (w32 only). 
+
 2017-04-21  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	* win32lib.c, mingw32.c: Update texlive_gs_init() (w32 only). 

Modified: trunk/Build/source/texk/kpathsea/mingw32.c
===================================================================
--- trunk/Build/source/texk/kpathsea/mingw32.c	2017-04-22 00:07:12 UTC (rev 43970)
+++ trunk/Build/source/texk/kpathsea/mingw32.c	2017-04-22 04:55:40 UTC (rev 43971)
@@ -409,9 +409,10 @@
 {
   char *nptr, *path;
   char tlgsbindir[512];
-  char tlgslibdir[1024];
+  char tlgslibdir[512];
+  char resourcedir[512];
   nptr = kpse_var_value("TEXLIVE_WINDOWS_EXTERNAL_GS");
-  if (nptr == NULL || !strcmp(nptr, "0") || !strcmp(nptr, "n") || !strcmp(nptr, "f")) {
+  if (nptr == NULL || *nptr == '0' || *nptr == 'n' || *nptr == 'f') {
     if (nptr)
       free (nptr);
     nptr = kpse_var_value("SELFAUTOPARENT");
@@ -418,17 +419,24 @@
     if (nptr) {
       strcpy(tlgsbindir, nptr);
       strcat(tlgsbindir,"/tlpkg/tlgs");
+      strcpy(resourcedir, tlgsbindir);
+      strcat(resourcedir, "/Resource");
       if(is_dir(tlgsbindir)) {
         strcpy(tlgslibdir, tlgsbindir);
         strcat(tlgslibdir, "/lib;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/fonts;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/Resource/Init;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/Resource;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/kanji");
+        if(is_dir(resourcedir)) {
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/fonts;");
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/Resource/Init;");
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/Resource;");
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/kanji");
+        } else {
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/fonts");
+        }
         strcat(tlgsbindir, "/bin;");
         free(nptr);
         for(nptr = tlgsbindir; *nptr; nptr++) {

Modified: trunk/Build/source/texk/kpathsea/win32lib.c
===================================================================
--- trunk/Build/source/texk/kpathsea/win32lib.c	2017-04-22 00:07:12 UTC (rev 43970)
+++ trunk/Build/source/texk/kpathsea/win32lib.c	2017-04-22 04:55:40 UTC (rev 43971)
@@ -133,9 +133,10 @@
 {
   char *nptr, *path;
   char tlgsbindir[512];
-  char tlgslibdir[1024];
+  char tlgslibdir[512];
+  char resourcedir[512];
   nptr = kpse_var_value("TEXLIVE_WINDOWS_EXTERNAL_GS");
-  if (nptr == NULL || !strcmp(nptr, "0") || !strcmp(nptr, "n") || !strcmp(nptr, "f")) {
+  if (nptr == NULL || *nptr == '0' || *nptr == 'n' || *nptr == 'f') {
     if (nptr)
       free (nptr);
     nptr = kpse_var_value("SELFAUTOPARENT");
@@ -142,17 +143,24 @@
     if (nptr) {
       strcpy(tlgsbindir, nptr);
       strcat(tlgsbindir,"/tlpkg/tlgs");
+      strcpy(resourcedir, tlgsbindir);
+      strcat(resourcedir, "/Resource");
       if(is_dir(tlgsbindir)) {
         strcpy(tlgslibdir, tlgsbindir);
         strcat(tlgslibdir, "/lib;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/fonts;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/Resource/Init;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/Resource;");
-        strcat(tlgslibdir, tlgsbindir);
-        strcat(tlgslibdir, "/kanji");
+        if(is_dir(resourcedir)) {
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/fonts;");
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/Resource/Init;");
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/Resource;");
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/kanji");
+        } else {
+          strcat(tlgslibdir, tlgsbindir);
+          strcat(tlgslibdir, "/fonts");
+        }
         strcat(tlgsbindir, "/bin;");
         free(nptr);
         for(nptr = tlgsbindir; *nptr; nptr++) {



More information about the tex-live-commits mailing list