summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/mingw32.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-04-22 04:55:40 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-04-22 04:55:40 +0000
commit53a86b8a39f6783364566b93ad815a776b89eb84 (patch)
tree714006b4a9d693f3592a846e1d636005e2f4f8cb /Build/source/texk/kpathsea/mingw32.c
parent9b68170457708cb8a1754d462520bcc097acff54 (diff)
update win32lib.c and mingw32.c (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@43971 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/mingw32.c')
-rw-r--r--Build/source/texk/kpathsea/mingw32.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/Build/source/texk/kpathsea/mingw32.c b/Build/source/texk/kpathsea/mingw32.c
index 10d21e492a5..2eaf763aa31 100644
--- a/Build/source/texk/kpathsea/mingw32.c
+++ b/Build/source/texk/kpathsea/mingw32.c
@@ -409,26 +409,34 @@ void texlive_gs_init(void)
{
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");
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++) {