summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-01-17 18:56:38 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-01-17 18:56:38 (GMT)
commitf000dd870b772ed6bc26ea383a8657301eb5ef17 (patch)
tree05e55417a750c1275c9139b7952de6941db168dd /src/pre.l
parentb00ec8923dcf911a38323429f1744048b20a35a7 (diff)
downloadDoxygen-f000dd870b772ed6bc26ea383a8657301eb5ef17.zip
Doxygen-f000dd870b772ed6bc26ea383a8657301eb5ef17.tar.gz
Doxygen-f000dd870b772ed6bc26ea383a8657301eb5ef17.tar.bz2
Release-1.5.4-20080101
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/pre.l b/src/pre.l
index 38a9ae5..c578763 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -2,7 +2,7 @@
*
*
*
- * Copyright (C) 1997-2007 by Dimitri van Heesch.
+ * Copyright (C) 1997-2008 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -215,15 +215,20 @@ static FILE *checkAndOpenFile(const QCString &absName)
static FILE *findFile(const char *fileName,bool localInclude)
{
- if (localInclude && g_yyFileDef)
+ //printf("** findFile(%s,%d) g_yyFileName=%s\n",fileName,localInclude,g_yyFileName.data());
+ if (localInclude && !g_yyFileName.isEmpty())
{
- QCString absName = g_yyFileDef->getPath()+"/"+fileName;
- FILE *f = checkAndOpenFile(absName);
- if (f)
+ QFileInfo fi(g_yyFileName);
+ if (fi.exists())
{
- setFileName(absName);
- g_yyLineNr=1;
- return f;
+ QCString absName = QCString(fi.dirPath().data())+"/"+fileName;
+ FILE *f = checkAndOpenFile(absName);
+ if (f)
+ {
+ setFileName(absName);
+ g_yyLineNr=1;
+ return f;
+ }
}
}
if (g_pathList==0)
@@ -1665,7 +1670,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<DefinedExpr1,DefinedExpr2>.
<SkipCPPBlock>^{B}*"#" { BEGIN(SkipCommand); }
<SkipCPPBlock>^{B}*/[^#] { BEGIN(SkipLine); }
-<SkipCPPBlock>\n { g_yyLineNr++; }
+<SkipCPPBlock>\n { g_yyLineNr++; outputChar('\n'); }
<SkipCPPBlock>.
<SkipCommand>"if"(("n")?("def"))?/[ \t(!] {
incrLevel();
@@ -1757,6 +1762,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<EndImport>\\[\r]?"\n" {
outputChar('\n');
+ g_yyLineNr++;
}
<EndImport>. {
}