diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-09-03 09:30:41 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-09-03 09:30:41 (GMT) |
commit | 0bdf976df43dfc1eea03fd3e31d949d05422b2ca (patch) | |
tree | ebb05fc47f864465b7776ee7d02c04026551e57f | |
parent | 9ae1af9b8679a0f14cb568d1db3afcc6e3ba40a6 (diff) | |
parent | 4dc6c6c2f01b7b7bda82f5c3dbf4f78e489341bc (diff) | |
download | Doxygen-0bdf976df43dfc1eea03fd3e31d949d05422b2ca.zip Doxygen-0bdf976df43dfc1eea03fd3e31d949d05422b2ca.tar.gz Doxygen-0bdf976df43dfc1eea03fd3e31d949d05422b2ca.tar.bz2 |
Merge branch 'albert-github-feature/bug_766059'
-rw-r--r-- | src/doxygen.cpp | 3 | ||||
-rw-r--r-- | src/portable.cpp | 25 | ||||
-rw-r--r-- | src/portable.h | 1 |
3 files changed, 27 insertions, 2 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index d545265..07214cb 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9987,6 +9987,8 @@ void initDoxygen() setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8 setlocale(LC_NUMERIC,"C"); + portable_correct_path(); + Doxygen::runningTime.start(); initPreprocessor(); @@ -10067,7 +10069,6 @@ void initDoxygen() g_compoundKeywordDict.insert("union",(void *)8); g_compoundKeywordDict.insert("interface",(void *)8); g_compoundKeywordDict.insert("exception",(void *)8); - } void cleanUpDoxygen() diff --git a/src/portable.cpp b/src/portable.cpp index 5886793..1983fe7 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -448,4 +448,27 @@ bool portable_isAbsolutePath(const char *fileName) return false; } - +/** + * Correct a possible wrong PATH variable + * + * This routine was inspired by the cause for bug 766059 was that in the Windows path there were forward slahes. + */ +void portable_correct_path(void) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + const char *p = portable_getenv("PATH"); + char *q = (char *)malloc(strlen(p) + 1); + strcpy(q, p); + bool found = false; + for (int i = 0 ; i < strlen(q); i++) + { + if (q[i] == '/') + { + q[i] = '\\'; + found = true; + } + } + if (found) portable_setenv("PATH",q); + free(q); +#endif +} diff --git a/src/portable.h b/src/portable.h index 1471ce1..c5578a3 100644 --- a/src/portable.h +++ b/src/portable.h @@ -35,6 +35,7 @@ void portable_sysTimerStop(); double portable_getSysElapsedTime(); void portable_sleep(int ms); bool portable_isAbsolutePath(const char *fileName); +void portable_correct_path(void); extern "C" { void * portable_iconv_open(const char* tocode, const char* fromcode); |