diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2018-09-15 16:01:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-15 16:01:49 (GMT) |
commit | c6892316233d5c03b1b2ce3ccff7ea9e36dbf628 (patch) | |
tree | 610f7ae30be2dec7f53fcee2ff966c6133fd8540 /src | |
parent | 8176639e13357f74d317c631a5bf01a60bb543af (diff) | |
parent | 6c1c88f41aa68e6999bfa4b72e37c5a8034588a5 (diff) | |
download | Doxygen-c6892316233d5c03b1b2ce3ccff7ea9e36dbf628.zip Doxygen-c6892316233d5c03b1b2ce3ccff7ea9e36dbf628.tar.gz Doxygen-c6892316233d5c03b1b2ce3ccff7ea9e36dbf628.tar.bz2 |
Merge branch 'master' into feature/bug_tests_extensions
Diffstat (limited to 'src')
-rw-r--r-- | src/clangparser.cpp | 1 | ||||
-rw-r--r-- | src/code.l | 2 | ||||
-rw-r--r-- | src/config.h | 5 | ||||
-rw-r--r-- | src/config.xml | 24 | ||||
-rw-r--r-- | src/configimpl.h | 14 | ||||
-rw-r--r-- | src/configimpl.l | 60 | ||||
-rw-r--r-- | src/context.cpp | 12 | ||||
-rw-r--r-- | src/definition.cpp | 3 | ||||
-rw-r--r-- | src/docparser.h | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 33 | ||||
-rw-r--r-- | src/ftvhelp.cpp | 3 | ||||
-rw-r--r-- | src/htmlgen.cpp | 1 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/latexgen.cpp | 8 | ||||
-rw-r--r-- | src/layout.cpp | 2 | ||||
-rw-r--r-- | src/layout.h | 3 | ||||
-rw-r--r-- | src/namespacedef.cpp | 1 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 2 | ||||
-rw-r--r-- | src/pyscanner.l | 10 | ||||
-rwxr-xr-x | src/res2cc_cmd.py | 3 | ||||
-rw-r--r-- | src/tagreader.cpp | 4 | ||||
-rw-r--r-- | src/tclscanner.l | 1 | ||||
-rw-r--r-- | src/xmlgen.cpp | 8 |
23 files changed, 174 insertions, 30 deletions
diff --git a/src/clangparser.cpp b/src/clangparser.cpp index 78b8faa..18dd404 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -964,6 +964,7 @@ void ClangParser::writeSources(CodeOutputInterface &,FileDef *) ClangParser::ClangParser() { + p = NULL; } ClangParser::~ClangParser() @@ -2598,7 +2598,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" generatePHPVariableLink(*g_code,yytext); g_name+=yytext+7; } -<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>]*">"("::"{ID})*/{B}* { // A<T> *pt; +<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>\(]*">"("::"{ID})*/{B}* { // A<T> *pt; int i=QCString(yytext).find('<'); QCString kw = QCString(yytext).left(i).stripWhiteSpace(); if (kw.right(5)=="_cast" && YY_START==Body) diff --git a/src/config.h b/src/config.h index e86e950..98f5a92 100644 --- a/src/config.h +++ b/src/config.h @@ -51,6 +51,11 @@ namespace Config */ void writeTemplate(FTextStream &t,bool shortList,bool updateOnly=FALSE); + /*! Writes a the differences between the current configuration and the + * template configuration to stream \a t. + */ + void compareDoxyfile(FTextStream &t); + /*! Parses a configuration file with name \a fn. * \returns TRUE if successful, FALSE if the file could not be * opened or read. diff --git a/src/config.xml b/src/config.xml index e12141c..08795dc 100644 --- a/src/config.xml +++ b/src/config.xml @@ -551,6 +551,30 @@ Go to the <a href="commands.html">next</a> section or return to the a physical newline was in the original file. ]]> </docs> + <docs doxyfile='0' documentation='0'> +<![CDATA[ + When you need a literal `{` or `}` or `,` in the value part of an alias you have to + escape them by means of a backslash, this can lead to conflicts with the + commands \c \\{ and \c \\} for these it is advised to use the version \c @{ and \c @} or + use a double escape (\c \\\\{ and \c \\\\}) +]]> + </docs> + <docs doxywizard='0' documentation='0'> +<![CDATA[ + When you need a literal `{` or `}` or `,` in the value part of an alias you have to + escape them by means of a backslash (\c \\), this can lead to conflicts with the + commands \c \\{ and \c \\} for these it is advised to use the version \c @{ and \c @} or + use a double escape (\c \\\\{ and \c \\\\}) +]]> + </docs> + <docs doxyfile='0' doxywizard='0'> +<![CDATA[ + When you need a literal `{` or `}` or `,` in the value part of an alias you have to + escape them by means of a backslash (`\`), this can lead to conflicts with the + commands \c \\{ and \c \\} for these it is advised to use the version \c @@{ and \c @@} or + use a double escape (\c \\\\{ and \c \\\\}) +]]> + </docs> </option> <option type='list' id='TCL_SUBST' format='string'> <docs> diff --git a/src/configimpl.h b/src/configimpl.h index c901198..ef8bb21 100644 --- a/src/configimpl.h +++ b/src/configimpl.h @@ -73,6 +73,7 @@ class ConfigOption protected: virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0; + virtual void compareDoxyfile(FTextStream &t) = 0; virtual void convertStrToVal() {} virtual void substEnvVars() = 0; virtual void init() {} @@ -103,6 +104,7 @@ class ConfigInfo : public ConfigOption m_doc = doc; } void writeTemplate(FTextStream &t, bool sl,bool); + void compareDoxyfile(FTextStream &){}; void substEnvVars() {} }; @@ -124,6 +126,7 @@ class ConfigList : public ConfigOption WidgetType widgetType() const { return m_widgetType; } QStrList *valueRef() { return &m_value; } void writeTemplate(FTextStream &t,bool sl,bool); + void compareDoxyfile(FTextStream &t); void substEnvVars(); void init() { m_value = m_defaultValue; } private: @@ -153,6 +156,7 @@ class ConfigEnum : public ConfigOption QCString *valueRef() { return &m_value; } void substEnvVars(); void writeTemplate(FTextStream &t,bool sl,bool); + void compareDoxyfile(FTextStream &t); void init() { m_value = m_defValue.copy(); } private: @@ -182,6 +186,7 @@ class ConfigString : public ConfigOption void setDefaultValue(const char *v) { m_defValue = v; } QCString *valueRef() { return &m_value; } void writeTemplate(FTextStream &t,bool sl,bool); + void compareDoxyfile(FTextStream &t); void substEnvVars(); void init() { m_value = m_defValue.copy(); } @@ -213,6 +218,7 @@ class ConfigInt : public ConfigOption void convertStrToVal(); void substEnvVars(); void writeTemplate(FTextStream &t,bool sl,bool upd); + void compareDoxyfile(FTextStream &t); void init() { m_value = m_defValue; } private: int m_value; @@ -241,6 +247,7 @@ class ConfigBool : public ConfigOption void substEnvVars(); void setValueString(const QCString &v) { m_valueString = v; } void writeTemplate(FTextStream &t,bool sl,bool upd); + void compareDoxyfile(FTextStream &t); void init() { m_value = m_defValue; } private: bool m_value; @@ -256,6 +263,7 @@ class ConfigObsolete : public ConfigOption ConfigObsolete(const char *name) : ConfigOption(O_Obsolete) { m_name = name; } void writeTemplate(FTextStream &,bool,bool); + void compareDoxyfile(FTextStream &) {} void substEnvVars() {} }; @@ -267,6 +275,7 @@ class ConfigDisabled : public ConfigOption ConfigDisabled(const char *name) : ConfigOption(O_Disabled) { m_name = name; } void writeTemplate(FTextStream &,bool,bool); + void compareDoxyfile(FTextStream &) {} void substEnvVars() {} }; @@ -466,6 +475,11 @@ class ConfigImpl */ void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly); + /*! Writes a the differences between the current configuration and the + * template configuration to stream \a t. + */ + void compareDoxyfile(FTextStream &t); + void setHeader(const char *header) { m_header = header; } ///////////////////////////// diff --git a/src/configimpl.l b/src/configimpl.l index df032a6..72584d7 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -315,6 +315,28 @@ void ConfigList::writeTemplate(FTextStream &t,bool sl,bool) t << "\n"; } +void ConfigList::compareDoxyfile(FTextStream &t) +{ + if ( m_value.count() != m_defaultValue.count()) + { + writeTemplate(t,TRUE,TRUE); + return; + } + + const char *p = m_value.first(); + const char *q = m_defaultValue.first(); + while (p) + { + p = m_value.next(); + q = m_defaultValue.next(); + if (QCString(p).stripWhiteSpace() != QCString(q).stripWhiteSpace()) + { + writeTemplate(t,TRUE,TRUE); + return; + } + } +} + void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) @@ -332,6 +354,11 @@ void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool) t << "\n"; } +void ConfigEnum::compareDoxyfile(FTextStream &t) +{ + if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE); +} + void ConfigString::writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) @@ -349,6 +376,11 @@ void ConfigString::writeTemplate(FTextStream &t,bool sl,bool) t << "\n"; } +void ConfigString::compareDoxyfile(FTextStream &t) +{ + if (m_value.stripWhiteSpace() != m_defValue.stripWhiteSpace()) writeTemplate(t,TRUE,TRUE); +} + void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd) { if (!sl) @@ -373,6 +405,11 @@ void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd) t << "\n"; } +void ConfigInt::compareDoxyfile(FTextStream &t) +{ + if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE); +} + void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd) { if (!sl) @@ -397,6 +434,11 @@ void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd) t << "\n"; } +void ConfigBool::compareDoxyfile(FTextStream &t) +{ + if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE); +} + void ConfigObsolete::writeTemplate(FTextStream &,bool,bool) {} void ConfigDisabled::writeTemplate(FTextStream &,bool,bool) {} @@ -871,6 +913,18 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd) } } +void ConfigImpl::compareDoxyfile(FTextStream &t) +{ + t << "# Difference with default Doxyfile " << versionString << endl; + QListIterator<ConfigOption> it = iterator(); + ConfigOption *option; + for (;(option=it.current());++it) + { + option->m_userComment = ""; + option->compareDoxyfile(t); + } +} + void ConfigImpl::convertStrToVal() { QListIterator<ConfigOption> it = iterator(); @@ -1749,6 +1803,12 @@ void Config::writeTemplate(FTextStream &t,bool shortList,bool update) ConfigImpl::instance()->writeTemplate(t,shortList,update); } +void Config::compareDoxyfile(FTextStream &t) +{ + postProcess(FALSE); + ConfigImpl::instance()->compareDoxyfile(t); +} + bool Config::parse(const char *fileName,bool update) { return ConfigImpl::instance()->parse(fileName,update); diff --git a/src/context.cpp b/src/context.cpp index c9a6bb3..33e7dcf 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -6978,7 +6978,8 @@ class NamespaceTreeContext::Private SharedPtr<NestingContext> m_namespaceTree; struct Cachable { - Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {} + Cachable() : maxDepth(0), maxDepthComputed(FALSE), + preferredDepth(0), preferredDepthComputed(FALSE) {} int maxDepth; bool maxDepthComputed; int preferredDepth; @@ -7352,7 +7353,8 @@ class PageTreeContext::Private SharedPtr<NestingContext> m_pageTree; struct Cachable { - Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {} + Cachable() : maxDepth(0), maxDepthComputed(FALSE), + preferredDepth(0), preferredDepthComputed(FALSE) {} int maxDepth; bool maxDepthComputed; int preferredDepth; @@ -7604,7 +7606,8 @@ class ModuleTreeContext::Private SharedPtr<NestingContext> m_moduleTree; struct Cachable { - Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {} + Cachable() : maxDepth(0), maxDepthComputed(FALSE), + preferredDepth(0), preferredDepthComputed(FALSE) {} int maxDepth; bool maxDepthComputed; int preferredDepth; @@ -7807,7 +7810,8 @@ class ExampleTreeContext::Private SharedPtr<NestingContext> m_exampleTree; struct Cachable { - Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {} + Cachable() : maxDepth(0), maxDepthComputed(FALSE), + preferredDepth(0), preferredDepthComputed(FALSE) {} int maxDepth; bool maxDepthComputed; int preferredDepth; diff --git a/src/definition.cpp b/src/definition.cpp index cbfad94..c9f4ac3 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -304,6 +304,7 @@ Definition::Definition(const Definition &d) : DefinitionIntf(), m_cookie(0) { m_name = d.m_name; m_defLine = d.m_defLine; + m_defColumn = d.m_defColumn; m_impl = new DefinitionImpl; *m_impl = *d.m_impl; m_impl->sectionDict = 0; @@ -1633,7 +1634,7 @@ void Definition::writeToc(OutputList &ol, const LocalToc &localToc) int level=1,l; char cs[2]; cs[1]='\0'; - bool inLi[5]={ FALSE, FALSE, FALSE, FALSE }; + bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE }; for (li.toFirst();(si=li.current());++li) { if (si->type==SectionInfo::Section || diff --git a/src/docparser.h b/src/docparser.h index 6b75426..25602cf 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -1370,7 +1370,7 @@ class DocHtmlTable : public CompAccept<DocHtmlTable> { public: DocHtmlTable(DocNode *parent,const HtmlAttribList &attribs) - : m_attribs(attribs) { m_caption=0; m_parent = parent; } + : m_attribs(attribs) { m_caption=0; m_numCols=0; m_parent = parent; } ~DocHtmlTable() { delete m_caption; } Kind kind() const { return Kind_HtmlTable; } uint numRows() const { return m_children.count(); } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index bf93a9b..f0fc650 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9151,7 +9151,24 @@ static void generateConfigFile(const char *configFile,bool shortList, exit(1); } } - +static void compareDoxyfile() +{ + QFile f; + char configFile[2]; + configFile[0] = '-'; + configFile[1] = '\0'; + bool fileOpened=openOutputFile(configFile,f); + if (fileOpened) + { + FTextStream t(&f); + Config::compareDoxyfile(t); + } + else + { + err("Cannot open file %s for writing\n",configFile); + exit(1); + } +} //---------------------------------------------------------------------------- // read and parse a tag file @@ -10009,6 +10026,8 @@ static void usage(const char *name) msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name); msg("6) Use doxygen to generate a rtf extensions file\n"); msg(" RTF: %s -e rtf extensionsFile\n\n",name); + msg("7) Use doxygen to compare the used configuration file with the template configuration file\n"); + msg(" %s -x [configFile]\n\n",name); msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n"); msg("If configName is omitted `Doxyfile' will be used as a default.\n\n"); msg("-v print version string\n"); @@ -10211,6 +10230,7 @@ void readConfiguration(int argc, char **argv) const char *formatName; bool genConfig=FALSE; bool shortList=FALSE; + bool diffList=FALSE; bool updateConfig=FALSE; int retVal; while (optind<argc && argv[optind][0]=='-' && @@ -10248,6 +10268,9 @@ void readConfiguration(int argc, char **argv) exit(1); } break; + case 'x': + diffList=TRUE; + break; case 's': shortList=TRUE; break; @@ -10498,6 +10521,7 @@ void readConfiguration(int argc, char **argv) exit(1); } } + if (genConfig && g_useOutputTemplate) { generateTemplateFiles("templates"); @@ -10519,6 +10543,13 @@ void readConfiguration(int argc, char **argv) exit(1); } + if (diffList) + { + compareDoxyfile(); + cleanUpDoxygen(); + exit(0); + } + if (updateConfig) { generateConfigFile(configName,shortList,TRUE); diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index cee39f2..8c46fd5 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -171,11 +171,10 @@ void FTVHelp::decContentsDepth() /*! Add a list item to the contents file. * \param isDir TRUE if the item is a directory, FALSE if it is a text - * \param name The name of the item. + * \param name the name of the item. * \param ref the URL of to the item. * \param file the file containing the definition of the item * \param anchor the anchor within the file. - * \param name the name of the item. * \param separateIndex put the entries in a separate index file * \param addToNavIndex add this entry to the quick navigation index * \param def Definition corresponding to this entry diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index ee23fb8..8819078 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -690,6 +690,7 @@ HtmlGenerator::HtmlGenerator() : OutputGenerator() { dir=Config_getString(HTML_OUTPUT); m_emptySection=FALSE; + m_sectionCount=0; } HtmlGenerator::~HtmlGenerator() diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index c35ef11..452a481 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -1177,8 +1177,8 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c) m_t << "r|}{"; break; case DocHtmlCell::Center: - break; m_t << "c|}{"; + break; default: m_t << "l|}{"; break; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 13a88a9..50d4242 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2222,11 +2222,9 @@ void LatexGenerator::startCodeFragment() void LatexGenerator::endCodeFragment() { - //if (DoxyCodeOpen) - //{ - // t << "}\n"; - // DoxyCodeOpen = FALSE; - //} + //endCodeLine checks is there is still an open code line, if so closes it. + endCodeLine(); + t << "\\end{DoxyCode}\n"; DoxyCodeOpen = FALSE; } diff --git a/src/layout.cpp b/src/layout.cpp index 1d9a5ed..a3849b5 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -1268,7 +1268,7 @@ class LayoutParser : public QXmlDefaultHandler } private: - LayoutParser() : m_sHandler(163), m_eHandler(17), m_invalidEntry(FALSE) { } + LayoutParser() : m_sHandler(163), m_eHandler(17), m_invalidEntry(FALSE), m_part(0), m_rootNav(NULL) { } ~LayoutParser() { delete m_rootNav; } QDict<StartElementHandler> m_sHandler; diff --git a/src/layout.h b/src/layout.h index 0b9ad9e..1906a3d 100644 --- a/src/layout.h +++ b/src/layout.h @@ -119,6 +119,7 @@ struct LayoutNavEntry { public: enum Kind { + None = -1, MainPage, Pages, Modules, @@ -158,7 +159,7 @@ struct LayoutNavEntry LayoutNavEntry *find(LayoutNavEntry::Kind k,const char *file=0) const; private: - LayoutNavEntry() : m_parent(0) {} + LayoutNavEntry() : m_parent(0), m_kind(None), m_visible(FALSE) {} LayoutNavEntry *m_parent; Kind m_kind; bool m_visible; diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index d3eb0df..8e6c881 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -326,6 +326,7 @@ void NamespaceDef::writeTagFile(FTextStream &tagFile) } } } + break; case LayoutDocEntry::MemberDecl: { LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index f805383..5b4b6ea 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -428,7 +428,7 @@ private: }; PerlModDocVisitor::PerlModDocVisitor(PerlModOutput &output) - : DocVisitor(DocVisitor_Other), m_output(output), m_textmode(false) + : DocVisitor(DocVisitor_Other), m_output(output), m_textmode(false), m_textblockstart(FALSE) { m_output.openList("doc"); } diff --git a/src/pyscanner.l b/src/pyscanner.l index 2adf632..3743712 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -118,6 +118,7 @@ static bool g_packageCommentAllowed; static bool g_start_init = FALSE; static int g_search_count = 0; +static QCString g_argType = ""; //----------------------------------------------------------------------------- @@ -959,12 +960,16 @@ STARTDOCSYMS "##" ({BB}|",") { } + [\*]+ { + g_argType = yytext; + } {IDENTIFIER} { // Name of parameter lineCount(); Argument *a = new Argument; current->argList->append(a); current->argList->getLast()->name = QCString(yytext).stripWhiteSpace(); - current->argList->getLast()->type = ""; + current->argList->getLast()->type = g_argType; + g_argType = ""; } "=" { // default value // TODO: this rule is too simple, need to be able to @@ -1396,7 +1401,6 @@ STARTDOCSYMS "##" BEGIN(Search); } <<EOF>> { yyterminate(); - newEntry(); } } @@ -1425,7 +1429,7 @@ STARTDOCSYMS "##" actualDoc.prepend("\\verbatim "); actualDoc.append("\\endverbatim "); } - actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr "); + actualDoc.prepend("\\namespace "+g_moduleScope+" "); handleCommentBlock(actualDoc, FALSE); } if ((docBlockContext==ClassBody /*&& !g_hideClassDocs*/) || diff --git a/src/res2cc_cmd.py b/src/res2cc_cmd.py index 7e0322d..86d999d 100755 --- a/src/res2cc_cmd.py +++ b/src/res2cc_cmd.py @@ -98,10 +98,11 @@ def main(): directory = sys.argv[1] files = [] for dirName, subdirList, fileList in walk(directory): - for fname in sorted(fileList): + for fname in fileList: subdir = dirName[len(directory)+1:] if dirName.startswith(directory) else dirName if subdir: files.append(File.factory(directory,subdir,fname)) + files.sort(key=lambda f: f.subdir + "/" + f.fileName) outputFile = open(sys.argv[2],"w") print("#include \"resourcemgr.h\"\n",file=outputFile) for f in files: diff --git a/src/tagreader.cpp b/src/tagreader.cpp index cf64a35..82e4712 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -95,8 +95,8 @@ class TagMemberInfo class TagClassInfo { public: - enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton }; - TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; } + enum Kind { None=-1, Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton }; + TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; kind = None; } ~TagClassInfo() { delete bases; delete templateArguments; } QCString name; QCString filename; diff --git a/src/tclscanner.l b/src/tclscanner.l index 7ca5ade..ca5294b 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -1431,7 +1431,6 @@ tcl_inf("(%d) ?%s?\n",what,tcl.string_last.data()); yyless(0); tcl_inf("(.%d) ?%s?\n",what,tcl.string_last.data()); return; - myWhite=0; break; default: tcl_err("wrong state: %d\n",what); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index e68c454..be866a2 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1845,7 +1845,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) SDict<SectionInfo>::Iterator li(*sectionDict); SectionInfo *si; int level=1,l; - bool inLi[5]={ FALSE, FALSE, FALSE, FALSE }; + bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE }; int maxLevel = pd->localToc().xmlLevel(); for (li.toFirst();(si=li.current());++li) { @@ -1872,16 +1872,16 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) if (l <= maxLevel) t << " </tableofcontents>" << endl; } } - if (l <= maxLevel && inLi[nextLevel]) t << " </tocsect>" << endl; if (nextLevel <= maxLevel) { + if (inLi[nextLevel]) t << " </tocsect>" << endl; QCString titleDoc = convertToXML(si->title); t << " <tocsect>" << endl; t << " <name>" << (si->title.isEmpty()?si->label:titleDoc) << "</name>" << endl; t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si -> label) << "</reference>" << endl; + inLi[nextLevel]=TRUE; + level = nextLevel; } - inLi[nextLevel]=TRUE; - level = nextLevel; } } while (level>1 && level <= maxLevel) |