Skip to content

Commit

Permalink
Merge branch 'feature/bug_766059' of https://github.com/albert-github…
Browse files Browse the repository at this point in the history
…/doxygen into albert-github-feature/bug_766059
  • Loading branch information
Dimitri van Heesch committed Sep 3, 2016
2 parents 9ae1af9 + 752523c commit 3df5c42
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/doxygen.cpp
Expand Up @@ -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();

Expand Down Expand Up @@ -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()
Expand Down
24 changes: 23 additions & 1 deletion src/portable.cpp
Expand Up @@ -448,4 +448,26 @@ 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);
#endif
}
1 change: 1 addition & 0 deletions src/portable.h
Expand Up @@ -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);
Expand Down

0 comments on commit 3df5c42

Please sign in to comment.