diff options
Diffstat (limited to 'src/fortrancode.l')
-rw-r--r-- | src/fortrancode.l | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l index 80fc333..a0965d0 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -132,6 +132,7 @@ 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_collectXRefs; static bool g_isFixedForm; static bool g_insideBody; //!< inside subprog/program body? => create links @@ -378,36 +379,6 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol, } } -#if 0 -static QCString fileLocation() -{ - QCString result = g_sourceFileDef?g_sourceFileDef->absFilePath():QCString("[unknown]"); - result+=":"+QCString().setNum(g_yyLineNr); - result+=":"+QCString().setNum(1); - return result; -} - - -/** - generates dictionay entries that are used if REFERENCED_BY_RELATION ... options are set - (e.g. the "referenced by ..." list after the function documentation) -*/ - -static void addDocCrossReference(MemberDef *src, MemberDef *dst) -{ - if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types - //printf("======= addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data()); - if ((Config_getBool("REFERENCED_BY_RELATION") || Config_getBool("CALLER_GRAPH")) && - (src->isFunction())) - { - dst->addSourceReferencedBy(src,fileLocation()); - } - if ((Config_getBool("REFERENCES_RELATION") || Config_getBool("CALL_GRAPH")) && (src->isFunction())) - { - src->addSourceReferences(dst,fileLocation()); - } -} -#endif //------------------------------------------------------------------------------- /** @@ -565,7 +536,8 @@ static bool getLink(UseSDict *usedict, // dictonary with used modules if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable()) { - if (g_currentDefinition && g_currentMemberDef && md!=g_currentMemberDef && g_insideBody) + if (g_currentDefinition && g_currentMemberDef && + md!=g_currentMemberDef && g_insideBody && g_collectXRefs) { addDocCrossReference(g_currentMemberDef,md); } @@ -1133,7 +1105,8 @@ 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,Definition *searchCtx) + MemberDef *memberDef,bool,Definition *searchCtx, + bool collectXRefs) { //printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd); @@ -1150,6 +1123,7 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri g_currentFontClass = 0; g_needsTermination = FALSE; g_searchCtx = searchCtx; + g_collectXRefs = collectXRefs; if (endLine!=-1) g_inputLines = endLine+1; else |