diff options
author | Sergio Oller <sergioller@gmail.com> | 2013-09-14 18:06:06 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-09-28 22:05:33 (GMT) |
commit | e835d4b28e1db3bdcdf3bfa718bc85445587ccd9 (patch) | |
tree | 074cf95073900a2514e1b67ce0f9db84a879cc95 /src/fortrancode.l | |
parent | 54f60c116bdb22b6ec5a11ced9888ebe2785eb2b (diff) | |
download | Doxygen-e835d4b28e1db3bdcdf3bfa718bc85445587ccd9.zip Doxygen-e835d4b28e1db3bdcdf3bfa718bc85445587ccd9.tar.gz Doxygen-e835d4b28e1db3bdcdf3bfa718bc85445587ccd9.tar.bz2 |
Bug 707641 - `FILTER_SOURCE_FILES=YES` required to build CALL_GRAPHS
https://bugzilla.gnome.org/show_bug.cgi?id=707641
Add references if the file is filtered, as the parser
does not know whether we are insideBody or not.
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 |