summaryrefslogtreecommitdiffstats
path: root/src/config.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-04-04 19:15:20 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-04-04 19:15:20 (GMT)
commitbd691d38fe61aed85189a6675668a67deefd8002 (patch)
tree7f7bcc4353ffd2147b592358b06865a518c14d7b /src/config.l
parent97a3911e2682bfebeebbb8999c9e3844c414c3e0 (diff)
downloadDoxygen-bd691d38fe61aed85189a6675668a67deefd8002.zip
Doxygen-bd691d38fe61aed85189a6675668a67deefd8002.tar.gz
Doxygen-bd691d38fe61aed85189a6675668a67deefd8002.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