From 7d9d4320f5d183c4e1ebc87a316589c36f0afeed Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 14 Aug 2014 19:29:15 +0200 Subject: Bug 734727 - GENERATE_TAGFILE no longer includes any @*section links --- src/commentscan.l | 8 ++++---- src/definition.cpp | 2 +- src/doxygen.cpp | 4 ++-- src/tagreader.cpp | 24 +++++++++++++----------- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 369349b..168907f 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -665,11 +665,11 @@ static void addSection() { if (si->lineNr != -1) { - warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",g_sectionLabel.data(),si->fileName.data(),si->lineNr); + warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",g_sectionLabel.data(),si->fileName.data(),si->lineNr); } else { - warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s)",g_sectionLabel.data(),si->fileName.data()); + warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",g_sectionLabel.data(),si->fileName.data()); } } else @@ -1745,11 +1745,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$" { if (si->lineNr != -1) { - warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",yytext,si->fileName.data(),si->lineNr); + warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",yytext,si->fileName.data(),si->lineNr); } else { - warn(yyFileName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s)",yytext,si->fileName.data()); + warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",yytext,si->fileName.data()); } } else diff --git a/src/definition.cpp b/src/definition.cpp index 2fb753f..4a6a728 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -515,7 +515,7 @@ void Definition::writeDocAnchorsToTagFile() { if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_impl->sectionDict) { - //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_sectionDict->count()); + //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionDict->count()); SDict::Iterator sdi(*m_impl->sectionDict); SectionInfo *si; for (;(si=sdi.current());++sdi) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 13475a2..9260571 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -8653,11 +8653,11 @@ static void findMainPage(EntryNav *rootNav) { if (si->lineNr != -1) { - warn(root->fileName,root->startLine,"multiple use of section label '%s', (first occurrence: %s, line %d)",Doxygen::mainPage->name().data(),si->fileName.data(),si->lineNr); + warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s, line %d)",Doxygen::mainPage->name().data(),si->fileName.data(),si->lineNr); } else { - warn(root->fileName,root->startLine,"multiple use of section label '%s', (first occurrence: %s)",Doxygen::mainPage->name().data(),si->fileName.data()); + warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s)",Doxygen::mainPage->name().data(),si->fileName.data()); } } else diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 036e24f..b4fc9ed 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -1431,17 +1431,19 @@ void TagFileParser::buildLists(Entry *root) TagPageInfo *tpi; for (pgit.toFirst();(tpi=pgit.current());++pgit) { - Entry *pe = new Entry; - pe->section = Entry::PAGEDOC_SEC; - pe->name = tpi->name; - pe->args = tpi->title; - addDocAnchors(pe,tpi->docAnchors); - TagInfo *ti = new TagInfo; - ti->tagName = m_tagName; - ti->fileName = tpi->filename; - pe->tagInfo = ti; - - root->addSubEntry(pe); + if (tpi->filename!="index") // skip mainpage, there can be only one (see bug734727) + { + Entry *pe = new Entry; + pe->section = Entry::PAGEDOC_SEC; + pe->name = tpi->name; + pe->args = tpi->title; + addDocAnchors(pe,tpi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tpi->filename; + pe->tagInfo = ti; + root->addSubEntry(pe); + } } } -- cgit v0.12