summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2011-02-17 19:40:38 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2011-02-17 19:40:38 (GMT)
commit2eccbfdb1a422e1ee594b1906de13d3f4a070c06 (patch)
treec2ee5bb85f9acfb3caa8479c32b49a1bf03de752 /src/pre.l
parente3867f798e35c06c2208899f9c0bc264d8e6cb83 (diff)
downloadDoxygen-2eccbfdb1a422e1ee594b1906de13d3f4a070c06.zip
Doxygen-2eccbfdb1a422e1ee594b1906de13d3f4a070c06.tar.gz
Doxygen-2eccbfdb1a422e1ee594b1906de13d3f4a070c06.tar.bz2
Release-1.7.3-20110217
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/pre.l b/src/pre.l
index 400178c..63c38d1 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -56,12 +56,9 @@ struct FileState
FileState(int size) : fileBuf(size),
oldFileBuf(0), oldFileBufPos(0) {}
int lineNr;
- //FILE *filePtr;
BufStr fileBuf;
- //FILE *oldYYin;
BufStr *oldFileBuf;
int oldFileBufPos;
- //bool isPlainFile;
YY_BUFFER_STATE bufState;
QCString fileName;
};
@@ -1264,7 +1261,10 @@ static void readIncludeFile(const QCString &inc)
if (oldFileDef)
{
// add include dependency to the file in which the #include was found
- oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude,g_isImported);
+ bool ambig;
+ // change to local name for bug 641336
+ FileDef *incFd = findFileDef(Doxygen::inputNameDict,incFileName,ambig);
+ oldFileDef->addIncludeDependency(ambig ? 0 : incFd,incFileName,localInclude,g_isImported);
// add included by dependency
if (g_yyFileDef)
{
@@ -1297,16 +1297,18 @@ static void readIncludeFile(const QCString &inc)
if (oldFileDef)
{
bool ambig;
- QCString absPath = incFileName;
- if (QDir::isRelativePath(incFileName))
- {
- absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName);
- //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data());
- }
- FileDef *fd = findFileDef(Doxygen::inputNameDict,absPath,ambig);
+ //QCString absPath = incFileName;
+ //if (QDir::isRelativePath(incFileName))
+ //{
+ // absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName);
+ // //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data());
+ //}
+
+ // change to local name for bug 641336
+ FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig);
//printf("%s::findFileDef(%s)=%p\n",oldFileDef->name().data(),incFileName.data(),fd);
// add include dependency to the file in which the #include was found
- oldFileDef->addIncludeDependency(fd,incFileName,localInclude,g_isImported);
+ oldFileDef->addIncludeDependency(ambig ? 0 : fd,incFileName,localInclude,g_isImported);
// add included by dependency
if (fd)
{
@@ -2506,9 +2508,10 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
g_expandedDict->clear();
g_condStack.clear();
g_condStack.setAutoDelete(TRUE);
+ g_fileDefineDict->clear(); // add due to bug 641346
- static bool firstTime=TRUE;
- if (firstTime)
+ //static bool firstTime=TRUE;
+ //if (firstTime)
{
// add predefined macros
char *defStr;
@@ -2618,7 +2621,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
// def->name.data(),def->definition.data(),def->nargs);
}
}
- firstTime=FALSE;
+ //firstTime=FALSE;
}
g_yyLineNr = 1;