summaryrefslogtreecommitdiffstats
path: root/src/config.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2007-04-04 19:15:20 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2007-04-04 19:15:20 (GMT)
commit66353e2ea8318031a0dc02de3599861980e25a51 (patch)
tree7f7bcc4353ffd2147b592358b06865a518c14d7b /src/config.l
parentcc52853c15833c9a18be11c140b99d94d9e06e9e (diff)
downloadDoxygen-66353e2ea8318031a0dc02de3599861980e25a51.zip
Doxygen-66353e2ea8318031a0dc02de3599861980e25a51.tar.gz
Doxygen-66353e2ea8318031a0dc02de3599861980e25a51.tar.bz2
Release-1.5.2
Diffstat (limited to 'src/config.l')
-rw-r--r--src/config.l22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/config.l b/src/config.l
index b1ea378..26fb9b9 100644
--- a/src/config.l
+++ b/src/config.l
@@ -384,7 +384,7 @@ static void checkEncoding()
static FILE *tryPath(const char *path,const char *fileName)
{
- QCString absName=(QCString)path+"/"+fileName;
+ QCString absName=(path ? (QCString)path+"/"+fileName : (QCString)fileName);
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
@@ -398,8 +398,27 @@ static FILE *tryPath(const char *path,const char *fileName)
static void substEnvVarsInStrList(QStrList &sl);
static void substEnvVarsInString(QCString &s);
+static bool isAbsolute(const char * fileName)
+{
+# ifdef _WIN32
+ if (isalpha (fileName [0]) && fileName[1] == ':')
+ fileName += 2;
+# endif
+ char const fst = fileName [0];
+ if (fst == '/') {
+ return true;
+ }
+# ifdef _WIN32
+ if (fst == '\\')
+ return true;
+# endif
+ return false;
+}
+
static FILE *findFile(const char *fileName)
{
+ if(isAbsolute(fileName))
+ return tryPath(NULL, fileName);
substEnvVarsInStrList(includePathList);
char *s=includePathList.first();
while (s) // try each of the include paths
@@ -431,7 +450,6 @@ static void readIncludeFile(const char *incName)
FILE *f;
- //printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(inc))) // see if the include file can be found
{
// For debugging