diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-09-30 13:51:29 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-09-30 13:51:29 (GMT) |
commit | 9c9313827b29876de43ad5305fd7ac162013359c (patch) | |
tree | d18c06222e0f84d6077b586e5633053a8bc09da8 /src/definition.cpp | |
parent | 489cefdf7a2ce294a15cb12b866dce13f5664f12 (diff) | |
download | Doxygen-9c9313827b29876de43ad5305fd7ac162013359c.zip Doxygen-9c9313827b29876de43ad5305fd7ac162013359c.tar.gz Doxygen-9c9313827b29876de43ad5305fd7ac162013359c.tar.bz2 |
Release-1.8.2-20120930
Diffstat (limited to 'src/definition.cpp')
-rw-r--r-- | src/definition.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index c4d3a6e..1e60730 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -691,7 +691,7 @@ void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int * The line actually containing the bracket is returned via endLine. * Note that for VHDL code the bracket search is not done. */ -static bool readCodeFragment(const char *fileName, +bool readCodeFragment(const char *fileName, int &startLine,int &endLine,QCString &result) { static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); @@ -1546,7 +1546,7 @@ void Definition::writeToc(OutputList &ol) ol.writeString("<ul>"); SDict<SectionInfo>::Iterator li(*sectionDict); SectionInfo *si; - int level=1; + int level=1,l; char cs[2]; cs[1]='\0'; bool inLi[5]={ FALSE, FALSE, FALSE, FALSE }; @@ -1561,13 +1561,19 @@ void Definition::writeToc(OutputList &ol) int nextLevel = (int)si->type; if (nextLevel>level) { - ol.writeString("<ul>"); + for (l=level;l<nextLevel;l++) + { + ol.writeString("<ul>"); + } } else if (nextLevel<level) { - if (inLi[level]) ol.writeString("</li>\n"); - inLi[level]=FALSE; - ol.writeString("</ul>\n"); + for (l=level;l>nextLevel;l--) + { + if (inLi[l]) ol.writeString("</li>\n"); + inLi[l]=FALSE; + ol.writeString("</ul>\n"); + } } cs[0]='0'+nextLevel; if (inLi[nextLevel]) ol.writeString("</li>\n"); |