diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2010-05-24 15:56:25 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2010-05-24 15:56:25 +0000 |
commit | c93d46e6e839f6b8735f7d5debc7aaf9e92bd45d (patch) | |
tree | 1b5fe401c7e295db5425b9ee45d6a3ee1111bcab /Build | |
parent | 2955d47562cb9423130327ebbb4493f62e9d6d7d (diff) |
quote command in WIN32 case.
git-svn-id: svn://tug.org/texlive/trunk@18449 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/search.c | 20 |
2 files changed, 21 insertions, 4 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index c8364c97b86..4eeed943857 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2010-05-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * search.c: quote command in W32 case to allow path name + with spaces. + 2010-05-18 Karl Berry <karl@tug.org> * config.h (type1path): rename from type1. diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c index e135ef2cd67..615802f2b6c 100644 --- a/Build/source/texk/dvipsk/search.c +++ b/Build/source/texk/dvipsk/search.c @@ -75,16 +75,28 @@ selfautoloc_prog (const char *prog) { char *ret; #ifdef WIN32 - char *p; + char *p, *q, *r; /* Get value of SELFAUTOLOC, but \ works better for path separator. */ char *selfautoloc = kpse_var_value ("SELFAUTOLOC"); for (p = selfautoloc; *p; p++) { if (*p == '/') *p = '\\'; } - - /* Prepend that to PROG. */ - ret = concat3 (selfautoloc, "\\", prog); + q = xstrdup (prog); + r = q; + while (*r && *r != ' ' && *r != '\t') + r++; + if (*r == '\0') + ret = (char *)concatn ("\"", selfautoloc, "\\", q, "\"", NULL); + else { + *r = '\0'; + r++; + if (*r) + ret = (char *)concatn ("\"", selfautoloc, "\\", q, "\" ", r, NULL); + else + ret = (char *)concatn ("\"", selfautoloc, "\\", q, "\"", NULL); + } + free (q); free (selfautoloc); #else /* not WIN32 */ |