summaryrefslogtreecommitdiffstats
path: root/src/fortrancode.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/fortrancode.l')
-rw-r--r--src/fortrancode.l27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l
index d7385ff..ed891c0 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -107,6 +107,7 @@ static int g_inputPosition; //!< read offset during parsing
static int g_inputLines; //!< number of line in the code fragment
static int g_yyLineNr; //!< current line number
static bool g_needsTermination;
+static Definition *g_searchCtx;
static bool g_isFixedForm;
static bool g_insideBody; //!< inside subprog/program body? => create links
@@ -182,11 +183,18 @@ static void startFontClass(const char *s)
g_currentFontClass=s;
}
-static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="")
+static void setCurrentDoc(const QCString &anchor)
{
if (Doxygen::searchIndex)
{
- Doxygen::searchIndex->setCurrentDoc(name,base,anchor);
+ if (g_searchCtx)
+ {
+ Doxygen::searchIndex->setCurrentDoc(g_searchCtx,g_searchCtx->anchor(),FALSE);
+ }
+ else
+ {
+ Doxygen::searchIndex->setCurrentDoc(g_sourceFileDef,anchor,TRUE);
+ }
}
}
@@ -226,20 +234,14 @@ static void startCodeLine()
g_code->writeLineNumber(g_currentMemberDef->getReference(),
g_currentMemberDef->getOutputFileBase(),
g_currentMemberDef->anchor(),g_yyLineNr);
- setCurrentDoc(
- g_currentMemberDef->qualifiedName(),
- g_sourceFileDef->getSourceFileBase(),
- lineAnchor);
+ setCurrentDoc(lineAnchor);
}
else if (d->isLinkableInProject())
{
g_code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
0,g_yyLineNr);
- setCurrentDoc(
- d->qualifiedName(),
- g_sourceFileDef->getSourceFileBase(),
- lineAnchor);
+ setCurrentDoc(lineAnchor);
}
}
else
@@ -1066,7 +1068,7 @@ void resetFortranCodeParserState() {}
void parseFortranCode(CodeOutputInterface &od,const char *className,const QCString &s,
bool exBlock, const char *exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
- MemberDef *memberDef,bool)
+ MemberDef *memberDef,bool,Definition *searchCtx)
{
//printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
@@ -1081,6 +1083,7 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
g_isFixedForm = recognizeFixedForm((const char*)s);
g_currentFontClass = 0;
g_needsTermination = FALSE;
+ g_searchCtx = searchCtx;
if (endLine!=-1)
g_inputLines = endLine+1;
else
@@ -1101,7 +1104,7 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
}
if (g_sourceFileDef)
{
- setCurrentDoc(g_sourceFileDef->name(),g_sourceFileDef->getSourceFileBase());
+ setCurrentDoc("l00001");
}
g_currentDefinition = 0;
g_currentMemberDef = 0;