summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-09-30 13:51:29 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-09-30 13:51:29 (GMT)
commitceb4115c7b941039411e1793e01239610ff112a2 (patch)
treed18c06222e0f84d6077b586e5633053a8bc09da8 /src/definition.cpp
parentf6d511e52eb55c5d5b980c4d226f2ea80b396095 (diff)
downloadDoxygen-ceb4115c7b941039411e1793e01239610ff112a2.zip
Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.tar.gz
Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.tar.bz2
Release-1.8.2-20120930
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp18
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");