diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/definition.cpp | 2 | ||||
-rw-r--r-- | src/docbookgen.cpp | 14 | ||||
-rw-r--r-- | src/docbookgen.h | 6 | ||||
-rw-r--r-- | src/filedef.cpp | 2 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 7 | ||||
-rw-r--r-- | src/htmlgen.cpp | 97 | ||||
-rw-r--r-- | src/htmlgen.h | 12 | ||||
-rw-r--r-- | src/latexgen.cpp | 86 | ||||
-rw-r--r-- | src/latexgen.h | 14 | ||||
-rw-r--r-- | src/mangen.cpp | 268 | ||||
-rw-r--r-- | src/mangen.h | 42 | ||||
-rw-r--r-- | src/outputgen.cpp | 32 | ||||
-rw-r--r-- | src/outputgen.h | 12 | ||||
-rw-r--r-- | src/rtfgen.cpp | 54 | ||||
-rw-r--r-- | src/rtfgen.h | 10 | ||||
-rw-r--r-- | src/util.cpp | 16 | ||||
-rw-r--r-- | src/util.h | 4 |
17 files changed, 316 insertions, 362 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index 1912c46..7540eff 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -532,7 +532,7 @@ void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const { //printf("write an entry!\n"); if (definitionType()==TypeMember) tagFile << " "; - tagFile << " <docanchor file=\"" << si->fileName << (hasExtension(si->fileName) ? "" : Doxygen::htmlFileExtension) << "\""; + tagFile << " <docanchor file=\"" << addHtmlExtensionIfMissing(si->fileName) << "\""; if (!si->title.isEmpty()) { tagFile << " title=\"" << convertToXML(si->title) << "\""; diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp index 51f37db..fff9728 100644 --- a/src/docbookgen.cpp +++ b/src/docbookgen.cpp @@ -260,7 +260,7 @@ void DocbookCodeGenerator::endCodeFragment() DocbookGenerator::DocbookGenerator() : OutputGenerator() { DB_GEN_C - dir=Config_getString(DOCBOOK_OUTPUT); + m_dir=Config_getString(DOCBOOK_OUTPUT); //insideTabbing=FALSE; //firstDescItem=TRUE; //disableLinks=FALSE; @@ -917,7 +917,7 @@ DB_GEN_C t << " <imagedata width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << relPath << fileName << ".png\">" << "</imagedata>" << endl; t << " </imageobject>" << endl; - d.writeImage(t,dir,relPath,fileName,FALSE); + d.writeImage(t,m_dir,relPath,fileName,FALSE); t << " </mediaobject>" << endl; t << " </informalfigure>" << endl; t << "</para>" << endl; @@ -1108,7 +1108,7 @@ DB_GEN_C void DocbookGenerator::endGroupCollaboration(DotGroupCollaboration &g) { DB_GEN_C - g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,FALSE); + g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),m_fileName,relPath,FALSE); } void DocbookGenerator::startDotGraph() { @@ -1117,7 +1117,7 @@ DB_GEN_C void DocbookGenerator::endDotGraph(DotClassGraph &g) { DB_GEN_C - g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,TRUE,FALSE); + g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),m_fileName,relPath,TRUE,FALSE); } void DocbookGenerator::startInclDepGraph() { @@ -1126,7 +1126,7 @@ DB_GEN_C void DocbookGenerator::endInclDepGraph(DotInclDepGraph &g) { DB_GEN_C - QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), fileName,relPath,FALSE); + QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), m_fileName,relPath,FALSE); } void DocbookGenerator::startCallGraph() { @@ -1135,7 +1135,7 @@ DB_GEN_C void DocbookGenerator::endCallGraph(DotCallGraph &g) { DB_GEN_C - QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), fileName,relPath,FALSE); + QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), m_fileName,relPath,FALSE); } void DocbookGenerator::startDirDepGraph() { @@ -1144,7 +1144,7 @@ DB_GEN_C void DocbookGenerator::endDirDepGraph(DotDirDeps &g) { DB_GEN_C - QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), fileName,relPath,FALSE); + QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), m_fileName,relPath,FALSE); } void DocbookGenerator::startMemberDocList() { diff --git a/src/docbookgen.h b/src/docbookgen.h index 8f71722..64e9e67 100644 --- a/src/docbookgen.h +++ b/src/docbookgen.h @@ -104,12 +104,12 @@ class DocbookGenerator : public OutputGenerator // generic generator methods /////////////////////////////////////////////////////////////// void enable() - { if (genStack->top()) active=*genStack->top(); else active=TRUE; } - void disable() { active=FALSE; } + { if (m_genStack->top()) m_active=*m_genStack->top(); else m_active=TRUE; } + void disable() { m_active=FALSE; } void enableIf(OutputType o) { if (o==Docbook) enable(); } void disableIf(OutputType o) { if (o==Docbook) disable(); } void disableIfNot(OutputType o) { if (o!=Docbook) disable(); } - bool isEnabled(OutputType o) { return (o==Docbook && active); } + bool isEnabled(OutputType o) { return (o==Docbook && m_active); } OutputGenerator *get(OutputType o) { return (o==Docbook) ? this : 0; } // --- CodeOutputInterface diff --git a/src/filedef.cpp b/src/filedef.cpp index 6556372..fb0e290 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -349,7 +349,7 @@ void FileDefImpl::writeTagFile(FTextStream &tagFile) tagFile << " <compound kind=\"file\">" << endl; tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl; - tagFile << " <filename>" << convertToXML(getOutputFileBase()) << (hasExtension(getOutputFileBase()) ? "" : Doxygen::htmlFileExtension) << "</filename>" << endl; + tagFile << " <filename>" << convertToXML(addHtmlExtensionIfMissing(getOutputFileBase())) << "</filename>" << endl; if (m_includeList && m_includeList->count()>0) { QListIterator<IncludeInfo> ili(*m_includeList); diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 543d604..3fbbf12 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -1912,8 +1912,7 @@ void HtmlDocVisitor::visitPost(DocRef *ref) void HtmlDocVisitor::visitPre(DocSecRefItem *ref) { if (m_hide) return; - QCString refName=ref->file(); - refName+=(hasExtension(refName) ? "" : Doxygen::htmlFileExtension); + QCString refName=addHtmlExtensionIfMissing(ref->file()); m_t << "<li><a href=\"" << refName << "#" << ref->anchor() << "\">"; } @@ -2094,7 +2093,7 @@ void HtmlDocVisitor::visitPre(DocXRefItem *x) { m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(x), x->key()) << "><dt><b><a class=\"el\" href=\"" - << x->relPath() << x->file() << (hasExtension(x->file()) ? "" : Doxygen::htmlFileExtension) + << x->relPath() << addHtmlExtensionIfMissing(x->file()) << "#" << x->anchor() << "\">"; } else @@ -2260,7 +2259,7 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file, m_t << externalRef(relPath,ref,TRUE); if (!file.isEmpty()) { - m_t << file << (hasExtension(file) ? "" : Doxygen::htmlFileExtension); + m_t << addHtmlExtensionIfMissing(file); } if (!anchor.isEmpty()) m_t << "#" << anchor; m_t << "\""; diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 047eec8..bf52eed 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -752,7 +752,7 @@ void HtmlCodeGenerator::_writeCodeLink(const char *className, } m_t << "href=\""; m_t << externalRef(m_relPath,ref,TRUE); - if (f) m_t << f << (hasExtension(f) ? "" : Doxygen::htmlFileExtension); + if (f) m_t << addHtmlExtensionIfMissing(f); if (anchor) m_t << "#" << anchor; m_t << "\""; if (tooltip) m_t << " title=\"" << convertToHtml(tooltip) << "\""; @@ -773,7 +773,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo, { m_t << "<a href=\""; m_t << externalRef(m_relPath,docInfo.ref,TRUE); - m_t << docInfo.url << (hasExtension(docInfo.url) ? "" : Doxygen::htmlFileExtension); + m_t << addHtmlExtensionIfMissing(docInfo.url); if (!docInfo.anchor.isEmpty()) { m_t << "#" << docInfo.anchor; @@ -805,7 +805,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo, { m_t << "<a href=\""; m_t << externalRef(m_relPath,defInfo.ref,TRUE); - m_t << defInfo.url << (hasExtension(docInfo.url) ? "" : Doxygen::htmlFileExtension); + m_t << addHtmlExtensionIfMissing(defInfo.url); if (!defInfo.anchor.isEmpty()) { m_t << "#" << defInfo.anchor; @@ -826,7 +826,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo, { m_t << "<a href=\""; m_t << externalRef(m_relPath,declInfo.ref,TRUE); - m_t << declInfo.url << (hasExtension(docInfo.url) ? "" : Doxygen::htmlFileExtension); + m_t << addHtmlExtensionIfMissing(declInfo.url); if (!declInfo.anchor.isEmpty()) { m_t << "#" << declInfo.anchor; @@ -893,7 +893,7 @@ void HtmlCodeGenerator::writeCodeAnchor(const char *anchor) HtmlGenerator::HtmlGenerator() : OutputGenerator() { - dir=Config_getString(HTML_OUTPUT); + m_dir=Config_getString(HTML_OUTPUT); m_emptySection=FALSE; m_sectionCount=0; } @@ -1086,18 +1086,17 @@ void HtmlGenerator::startFile(const char *name,const char *, const char *title) { //printf("HtmlGenerator::startFile(%s)\n",name); - QCString fileName=name; - lastTitle=title; - relPath = relativePathToRoot(fileName); + m_relPath = relativePathToRoot(name); + QCString fileName = addHtmlExtensionIfMissing(name); + m_lastTitle=title; - fileName+=(hasExtension(fileName) ? "" : Doxygen::htmlFileExtension); startPlainFile(fileName); m_codeGen.setTextStream(t); - m_codeGen.setRelativePath(relPath); + m_codeGen.setRelativePath(m_relPath); Doxygen::indexList->addIndexFile(fileName); - lastFile = fileName; - t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),relPath); + m_lastFile = fileName; + t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),m_relPath); t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " << getVersion() << " -->" << endl; @@ -1108,7 +1107,7 @@ void HtmlGenerator::startFile(const char *name,const char *, t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n"; + << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; } @@ -1116,13 +1115,12 @@ void HtmlGenerator::startFile(const char *name,const char *, m_sectionCount=0; } -void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &relPath) +void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &) { static bool searchEngine = Config_getBool(SEARCHENGINE); static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); if (searchEngine && !serverBasedSearch) { - (void)relPath; t << "<!-- window showing the filter options -->\n"; t << "<div id=\"MSearchSelectWindow\"\n"; t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n"; @@ -1142,7 +1140,7 @@ void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &relPath) void HtmlGenerator::writeSearchInfo() { - writeSearchInfo(t,relPath); + writeSearchInfo(t,m_relPath); } @@ -1172,7 +1170,7 @@ QCString HtmlGenerator::writeLogoAsString(const char *path) void HtmlGenerator::writeLogo() { - t << writeLogoAsString(relPath); + t << writeLogoAsString(m_relPath); } void HtmlGenerator::writePageFooter(FTextStream &t,const QCString &lastTitle, @@ -1186,7 +1184,7 @@ void HtmlGenerator::writeFooter(const char *navPath) // Currently only tooltips in HTML TooltipManager::instance()->writeTooltips(m_codeGen); - writePageFooter(t,lastTitle,relPath,navPath); + writePageFooter(t,m_lastTitle,m_relPath,navPath); } void HtmlGenerator::endFile() @@ -1323,8 +1321,8 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f) t << "<a class=\"el\" "; } t << "href=\""; - t << externalRef(relPath,ref,TRUE); - if (f) t << f << (hasExtension(f) ? "" : Doxygen::htmlFileExtension); + t << externalRef(m_relPath,ref,TRUE); + if (f) t << addHtmlExtensionIfMissing(f); t << "\">"; } else @@ -1351,7 +1349,7 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f, { t << "<li>"; if (path) docify(path); - t << "<a class=\"el\" href=\"" << f << (hasExtension(f) ? "" : Doxygen::htmlFileExtension) << "\">"; + t << "<a class=\"el\" href=\"" << addHtmlExtensionIfMissing(f) << "\">"; docify(name); t << "</a> "; } @@ -1369,8 +1367,8 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, t << "<a class=\"el\" "; } t << "href=\""; - t << externalRef(relPath,ref,TRUE); - if (f) t << f << (hasExtension(f) ? "" : Doxygen::htmlFileExtension); + t << externalRef(m_relPath,ref,TRUE); + if (f) t << addHtmlExtensionIfMissing(f); if (anchor) t << "#" << anchor; t << "\">"; docify(name); @@ -1380,7 +1378,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, void HtmlGenerator::startTextLink(const char *f,const char *anchor) { t << "<a href=\""; - if (f) t << relPath << f << (hasExtension(f) ? "" : Doxygen::htmlFileExtension); + if (f) t << m_relPath << addHtmlExtensionIfMissing(f); if (anchor) t << "#" << anchor; t << "\">"; } @@ -1583,7 +1581,7 @@ static void endSectionContent(FTextStream &t) void HtmlGenerator::startClassDiagram() { - startSectionHeader(t,relPath,m_sectionCount); + startSectionHeader(t,m_relPath,m_sectionCount); } void HtmlGenerator::endClassDiagram(const ClassDiagram &d, @@ -1596,12 +1594,12 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d, startSectionSummary(t,m_sectionCount); endSectionSummary(t); startSectionContent(t,m_sectionCount); - d.writeImage(tt,dir,relPath,fileName); + d.writeImage(tt,m_dir,m_relPath,fileName); if (!result.isEmpty()) { t << " <div class=\"center\">" << endl; t << " <img src=\""; - t << relPath << fileName << ".png\" usemap=\"#" << convertToId(name); + t << m_relPath << fileName << ".png\" usemap=\"#" << convertToId(name); t << "_map\" alt=\"\"/>" << endl; t << " <map id=\"" << convertToId(name); t << "_map\" name=\"" << convertToId(name); @@ -1614,7 +1612,7 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d, { t << " <div class=\"center\">" << endl; t << " <img src=\""; - t << relPath << fileName << ".png\" alt=\"\"/>" << endl; + t << m_relPath << fileName << ".png\" alt=\"\"/>" << endl; t << " </div>"; } endSectionContent(t); @@ -1967,7 +1965,7 @@ void HtmlGenerator::endMemberDoc(bool hasArgs) void HtmlGenerator::startDotGraph() { - startSectionHeader(t,relPath,m_sectionCount); + startSectionHeader(t,m_relPath,m_sectionCount); } void HtmlGenerator::endDotGraph(DotClassGraph &g) @@ -1979,11 +1977,11 @@ void HtmlGenerator::endDotGraph(DotClassGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,TRUE,m_sectionCount); if (generateLegend && !umlLook) { t << "<center><span class=\"legend\">["; - startHtmlLink(relPath+"graph_legend"+Doxygen::htmlFileExtension); + startHtmlLink(m_relPath+"graph_legend"+Doxygen::htmlFileExtension); t << theTranslator->trLegend(); endHtmlLink(); t << "]</span></center>"; @@ -1995,7 +1993,7 @@ void HtmlGenerator::endDotGraph(DotClassGraph &g) void HtmlGenerator::startInclDepGraph() { - startSectionHeader(t,relPath,m_sectionCount); + startSectionHeader(t,m_relPath,m_sectionCount); } void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) @@ -2005,7 +2003,7 @@ void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2013,7 +2011,7 @@ void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) void HtmlGenerator::startGroupCollaboration() { - startSectionHeader(t,relPath,m_sectionCount); + startSectionHeader(t,m_relPath,m_sectionCount); } void HtmlGenerator::endGroupCollaboration(DotGroupCollaboration &g) @@ -2023,7 +2021,7 @@ void HtmlGenerator::endGroupCollaboration(DotGroupCollaboration &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2031,7 +2029,7 @@ void HtmlGenerator::endGroupCollaboration(DotGroupCollaboration &g) void HtmlGenerator::startCallGraph() { - startSectionHeader(t,relPath,m_sectionCount); + startSectionHeader(t,m_relPath,m_sectionCount); } void HtmlGenerator::endCallGraph(DotCallGraph &g) @@ -2041,7 +2039,7 @@ void HtmlGenerator::endCallGraph(DotCallGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2049,7 +2047,7 @@ void HtmlGenerator::endCallGraph(DotCallGraph &g) void HtmlGenerator::startDirDepGraph() { - startSectionHeader(t,relPath,m_sectionCount); + startSectionHeader(t,m_relPath,m_sectionCount); } void HtmlGenerator::endDirDepGraph(DotDirDeps &g) @@ -2059,7 +2057,7 @@ void HtmlGenerator::endDirDepGraph(DotDirDeps &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,dir,fileName,relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2067,7 +2065,7 @@ void HtmlGenerator::endDirDepGraph(DotDirDeps &g) void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g) { - g.writeGraph(t,dir,fileName); + g.writeGraph(t,m_dir,m_fileName); } void HtmlGenerator::startMemberGroupHeader(bool) @@ -2544,7 +2542,7 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa "<script type=\"text/javascript\">\n" "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n" "$(document).ready(function(){initNavTree('") + - QCString(name) + (hasExtension(name) ? "" : Doxygen::htmlFileExtension) + + QCString(addHtmlExtensionIfMissing(name)) + QCString("','") + relpath + QCString("'); initResizable(); });\n" "/* @license-end */\n" @@ -2556,12 +2554,12 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa void HtmlGenerator::writeSplitBar(const char *name) { - t << writeSplitBarAsString(name,relPath); + t << writeSplitBarAsString(name,m_relPath); } void HtmlGenerator::writeNavigationPath(const char *s) { - t << substitute(s,"$relpath^",relPath); + t << substitute(s,"$relpath^",m_relPath); } void HtmlGenerator::startContents() @@ -2586,7 +2584,7 @@ void HtmlGenerator::endPageDoc() void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char *file) { - writeDefaultQuickLinks(t,compact,hli,file,relPath); + writeDefaultQuickLinks(t,compact,hli,file,m_relPath); } // PHP based search script @@ -2975,18 +2973,18 @@ void HtmlGenerator::writeInheritedSectionTitle( { classLink+= externalLinkTarget(); classLink += " href=\""; - classLink+= externalRef(relPath,ref,TRUE); + classLink+= externalRef(m_relPath,ref,TRUE); } else { classLink += "href=\""; - classLink+=relPath; + classLink+=m_relPath; } - classLink=classLink+file+(hasExtension(file) ? "" : Doxygen::htmlFileExtension)+a; + classLink=classLink+addHtmlExtensionIfMissing(file)+a; classLink+=QCString("\">")+convertToHtml(name,FALSE)+"</a>"; t << "<tr class=\"inherit_header " << id << "\">" << "<td colspan=\"2\" onclick=\"javascript:toggleInherit('" << id << "')\">" - << "<img src=\"" << relPath << "closed.png\" alt=\"-\"/> " + << "<img src=\"" << m_relPath << "closed.png\" alt=\"-\"/> " << theTranslator->trInheritedFrom(convertToHtml(title,FALSE),classLink) << "</td></tr>" << endl; } @@ -3004,8 +3002,7 @@ void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const c t << "<a href=\""; if (file) { - t << relPath << file; - t << (hasExtension(file) ? "" : Doxygen::htmlFileExtension); + t << m_relPath << addHtmlExtensionIfMissing(file); } else { diff --git a/src/htmlgen.h b/src/htmlgen.h index 2db5b74..fe84061 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -86,12 +86,12 @@ class HtmlGenerator : public OutputGenerator static QCString writeSplitBarAsString(const char *name,const char *relpath); void enable() - { if (genStack->top()) active=*genStack->top(); else active=TRUE; } - void disable() { active=FALSE; } + { if (m_genStack->top()) m_active=*m_genStack->top(); else m_active=TRUE; } + void disable() { m_active=FALSE; } void enableIf(OutputType o) { if (o==Html) enable(); } void disableIf(OutputType o) { if (o==Html) disable(); } void disableIfNot(OutputType o) { if (o!=Html) disable(); } - bool isEnabled(OutputType o) { return (o==Html && active); } + bool isEnabled(OutputType o) { return (o==Html && m_active); } OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; } // ---- CodeOutputInterface @@ -339,9 +339,9 @@ class HtmlGenerator : public OutputGenerator private: static void writePageFooter(FTextStream &t,const QCString &,const QCString &,const QCString &); - QCString lastTitle; - QCString lastFile; - QCString relPath; + QCString m_lastTitle; + QCString m_lastFile; + QCString m_relPath; void docify(const char *text,bool inHtmlComment); HtmlGenerator &operator=(const HtmlGenerator &g); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 5c2beae..cdda22c 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -266,11 +266,11 @@ void LatexCodeGenerator::setDoxyCodeOpen(bool val) LatexGenerator::LatexGenerator() : OutputGenerator() { - dir=Config_getString(LATEX_OUTPUT); - //printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n"); - insideTabbing=FALSE; - firstDescItem=TRUE; - disableLinks=FALSE; + m_dir=Config_getString(LATEX_OUTPUT); + //printf("LatexGenerator::LatexGenerator() m_insideTabbing=FALSE\n"); + m_insideTabbing=FALSE; + m_firstDescItem=TRUE; + m_disableLinks=FALSE; m_indent=0; templateMemberItem = FALSE; m_prettyCode=Config_getBool(LATEX_SOURCE_CODE); @@ -886,11 +886,11 @@ void LatexGenerator::startFile(const char *name,const char *,const char *) setEncoding(Config_getString(LATEX_OUTPUT_ENCODING)); #endif QCString fileName=name; - relPath = relativePathToRoot(fileName); + m_relPath = relativePathToRoot(fileName); if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex"; startPlainFile(fileName); m_codeGen.setTextStream(t); - m_codeGen.setRelativePath(relPath); + m_codeGen.setRelativePath(m_relPath); m_codeGen.setSourceFileName(stripPath(fileName)); } @@ -1481,7 +1481,7 @@ void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/) void LatexGenerator::startTextLink(const char *f,const char *anchor) { static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); - if (!disableLinks && pdfHyperlinks) + if (!m_disableLinks && pdfHyperlinks) { t << "\\mbox{\\hyperlink{"; if (f) t << stripPath(f); @@ -1497,7 +1497,7 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor) void LatexGenerator::endTextLink() { static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); - if (!disableLinks && pdfHyperlinks) + if (!m_disableLinks && pdfHyperlinks) { t << "}"; } @@ -1508,7 +1508,7 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f, const char *anchor, const char *text) { static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); - if (!disableLinks && !ref && pdfHyperlinks) + if (!m_disableLinks && !ref && pdfHyperlinks) { t << "\\mbox{\\hyperlink{"; if (f) t << stripPath(f); @@ -1606,12 +1606,12 @@ void LatexGenerator::startGroupHeader(int extraIndentLevel) { t << "\\doxysubsection{"; } - disableLinks=TRUE; + m_disableLinks=TRUE; } void LatexGenerator::endGroupHeader(int) { - disableLinks=FALSE; + m_disableLinks=FALSE; t << "}" << endl; } @@ -1625,12 +1625,12 @@ void LatexGenerator::startMemberHeader(const char *,int) { t << "\\doxysubsection*{"; } - disableLinks=TRUE; + m_disableLinks=TRUE; } void LatexGenerator::endMemberHeader() { - disableLinks=FALSE; + m_disableLinks=FALSE; t << "}" << endl; } @@ -1696,12 +1696,12 @@ void LatexGenerator::startMemberDoc(const char *clname, } t << "}"; t << "\n{\\footnotesize\\ttfamily "; - //disableLinks=TRUE; + //m_disableLinks=TRUE; } void LatexGenerator::endMemberDoc(bool) { - disableLinks=FALSE; + m_disableLinks=FALSE; t << "}\n\n"; //if (Config_getBool(COMPACT_LATEX)) t << "\\hfill"; } @@ -1822,7 +1822,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) void LatexGenerator::docify(const char *str) { - filterLatexString(t,str,insideTabbing,FALSE,FALSE); + filterLatexString(t,str,m_insideTabbing,FALSE,FALSE); } void LatexGenerator::writeChar(char c) @@ -1842,7 +1842,7 @@ void LatexGenerator::startClassDiagram() void LatexGenerator::endClassDiagram(const ClassDiagram &d, const char *fileName,const char *) { - d.writeFigure(t,dir,fileName); + d.writeFigure(t,m_dir,fileName); } @@ -1852,7 +1852,7 @@ void LatexGenerator::startAnonTypeScope(int indent) { t << "\\begin{tabbing}" << endl; t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl; - insideTabbing=TRUE; + m_insideTabbing=TRUE; } m_indent=indent; } @@ -1862,7 +1862,7 @@ void LatexGenerator::endAnonTypeScope(int indent) if (indent==0) { t << endl << "\\end{tabbing}"; - insideTabbing=FALSE; + m_insideTabbing=FALSE; } m_indent=indent; } @@ -1886,7 +1886,7 @@ void LatexGenerator::endMemberTemplateParams(const char *,const char *) void LatexGenerator::startMemberItem(const char *,int annoType,const char *) { //printf("LatexGenerator::startMemberItem(%d)\n",annType); - if (!insideTabbing) + if (!m_insideTabbing) { t << "\\item " << endl; templateMemberItem = (annoType == 3); @@ -1895,7 +1895,7 @@ void LatexGenerator::startMemberItem(const char *,int annoType,const char *) void LatexGenerator::endMemberItem() { - if (insideTabbing) + if (m_insideTabbing) { t << "\\\\"; } @@ -1905,7 +1905,7 @@ void LatexGenerator::endMemberItem() void LatexGenerator::startMemberDescription(const char *,const char *,bool) { - if (!insideTabbing) + if (!m_insideTabbing) { t << "\\begin{DoxyCompactList}\\small\\item\\em "; } @@ -1918,7 +1918,7 @@ void LatexGenerator::startMemberDescription(const char *,const char *,bool) void LatexGenerator::endMemberDescription() { - if (!insideTabbing) + if (!m_insideTabbing) { //t << "\\item\\end{DoxyCompactList}"; t << "\\end{DoxyCompactList}"; @@ -1933,7 +1933,7 @@ void LatexGenerator::endMemberDescription() void LatexGenerator::writeNonBreakableSpace(int) { //printf("writeNonBreakableSpace()\n"); - if (insideTabbing) + if (m_insideTabbing) { t << "\\>"; } @@ -2006,7 +2006,7 @@ void LatexGenerator::lastIndexPage() void LatexGenerator::startMemberList() { - if (!insideTabbing) + if (!m_insideTabbing) { t << "\\begin{DoxyCompactItemize}" << endl; } @@ -2014,8 +2014,8 @@ void LatexGenerator::startMemberList() void LatexGenerator::endMemberList() { - //printf("LatexGenerator::endMemberList(%d)\n",insideTabbing); - if (!insideTabbing) + //printf("LatexGenerator::endMemberList(%d)\n",m_insideTabbing); + if (!m_insideTabbing) { t << "\\end{DoxyCompactItemize}" << endl; } @@ -2071,7 +2071,7 @@ void LatexGenerator::startDotGraph() void LatexGenerator::endDotGraph(DotClassGraph &g) { - g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath); + g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),m_fileName,m_relPath); } void LatexGenerator::startInclDepGraph() @@ -2080,7 +2080,7 @@ void LatexGenerator::startInclDepGraph() void LatexGenerator::endInclDepGraph(DotInclDepGraph &g) { - g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath); + g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),m_fileName,m_relPath); } void LatexGenerator::startGroupCollaboration() @@ -2089,7 +2089,7 @@ void LatexGenerator::startGroupCollaboration() void LatexGenerator::endGroupCollaboration(DotGroupCollaboration &g) { - g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath); + g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),m_fileName,m_relPath); } void LatexGenerator::startCallGraph() @@ -2098,7 +2098,7 @@ void LatexGenerator::startCallGraph() void LatexGenerator::endCallGraph(DotCallGraph &g) { - g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath); + g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),m_fileName,m_relPath); } void LatexGenerator::startDirDepGraph() @@ -2107,7 +2107,7 @@ void LatexGenerator::startDirDepGraph() void LatexGenerator::endDirDepGraph(DotDirDeps &g) { - g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath); + g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),m_fileName,m_relPath); } void LatexGenerator::startDescription() @@ -2118,21 +2118,21 @@ void LatexGenerator::startDescription() void LatexGenerator::endDescription() { t << "\\end{description}" << endl; - firstDescItem=TRUE; + m_firstDescItem=TRUE; } void LatexGenerator::startDescItem() { - firstDescItem=TRUE; + m_firstDescItem=TRUE; t << "\\item["; } void LatexGenerator::endDescItem() { - if (firstDescItem) + if (m_firstDescItem) { t << "]" << endl; - firstDescItem=FALSE; + m_firstDescItem=FALSE; } else { @@ -2213,7 +2213,7 @@ void LatexGenerator::exceptionEntry(const char* prefix,bool closeBracket) void LatexGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *) { LatexDocVisitor *visitor = - new LatexDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""),insideTabbing); + new LatexDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""),m_insideTabbing); n->accept(visitor); delete visitor; } @@ -2293,7 +2293,7 @@ void LatexGenerator::endInlineHeader() void LatexGenerator::lineBreak(const char *) { - if (insideTabbing) + if (m_insideTabbing) { t << "\\\\\n"; } @@ -2334,24 +2334,24 @@ void LatexGenerator::endMemberDocSimple(bool isEnum) void LatexGenerator::startInlineMemberType() { - insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks + m_insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks } void LatexGenerator::endInlineMemberType() { t << "&" << endl; - insideTabbing = FALSE; + m_insideTabbing = FALSE; } void LatexGenerator::startInlineMemberName() { - insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks + m_insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks } void LatexGenerator::endInlineMemberName() { t << "&" << endl; - insideTabbing = FALSE; + m_insideTabbing = FALSE; } void LatexGenerator::startInlineMemberDoc() diff --git a/src/latexgen.h b/src/latexgen.h index 6430dbc..7d4cae8 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -82,12 +82,12 @@ class LatexGenerator : public OutputGenerator //OutputGenerator *clone() { return new LatexGenerator(*this); } //void append(const OutputGenerator *o); void enable() - { if (genStack->top()) active=*genStack->top(); else active=TRUE; } - void disable() { active=FALSE; } + { if (m_genStack->top()) m_active=*m_genStack->top(); else m_active=TRUE; } + void disable() { m_active=FALSE; } void enableIf(OutputType o) { if (o==Latex) enable(); } void disableIf(OutputType o) { if (o==Latex) disable(); } void disableIfNot(OutputType o) { if (o!=Latex) disable(); } - bool isEnabled(OutputType o) { return (o==Latex && active); } + bool isEnabled(OutputType o) { return (o==Latex && m_active); } OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; } // --- CodeOutputInterface @@ -328,10 +328,10 @@ class LatexGenerator : public OutputGenerator private: LatexGenerator(const LatexGenerator &); LatexGenerator &operator=(const LatexGenerator &); - bool insideTabbing; - bool firstDescItem; - bool disableLinks; - QCString relPath; + bool m_insideTabbing; + bool m_firstDescItem; + bool m_disableLinks; + QCString m_relPath; int m_indent; bool templateMemberItem; bool m_prettyCode; diff --git a/src/mangen.cpp b/src/mangen.cpp index 832863e..5f07932 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -76,35 +76,19 @@ static QCString getSubdir() ManGenerator::ManGenerator() : OutputGenerator() { - dir=Config_getString(MAN_OUTPUT) + "/" + getSubdir(); - firstCol=TRUE; - paragraph=TRUE; - col=0; - upperCase=FALSE; - insideTabbing=FALSE; - inHeader=FALSE; + m_dir=Config_getString(MAN_OUTPUT) + "/" + getSubdir(); + m_firstCol=TRUE; + m_paragraph=TRUE; + m_col=0; + m_upperCase=FALSE; + m_insideTabbing=FALSE; + m_inHeader=FALSE; } ManGenerator::~ManGenerator() { } -//void ManGenerator::append(const OutputGenerator *g) -//{ -// QCString r=g->getContents(); -// if (upperCase) -// t << r.upper(); -// else -// t << r; -// if (!r.isEmpty()) -// firstCol = r.at(r.length()-1)=='\n'; -// else -// firstCol = ((ManGenerator *)g)->firstCol; -// col+=((ManGenerator *)g)->col; -// inHeader=((ManGenerator *)g)->inHeader; -// paragraph=FALSE; -//} - void ManGenerator::init() { QCString &manOutput = Config_getString(MAN_OUTPUT); @@ -166,7 +150,7 @@ static QCString buildFileName(const char *name) void ManGenerator::startFile(const char *,const char *manName,const char *) { startPlainFile( buildFileName( manName ) ); - firstCol=TRUE; + m_firstCol=TRUE; } void ManGenerator::endFile() @@ -190,31 +174,31 @@ void ManGenerator::endTitleHead(const char *,const char *name) t << ".nh" << endl; t << ".SH NAME" << endl; t << name; - firstCol=FALSE; - paragraph=TRUE; - inHeader=TRUE; + m_firstCol=FALSE; + m_paragraph=TRUE; + m_inHeader=TRUE; } void ManGenerator::newParagraph() { - if (!paragraph) + if (!m_paragraph) { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".PP" << endl; - firstCol=TRUE; + m_firstCol=TRUE; } - paragraph=TRUE; + m_paragraph=TRUE; } void ManGenerator::startParagraph(const char *) { - if (!paragraph) + if (!m_paragraph) { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".PP" << endl; - firstCol=TRUE; + m_firstCol=TRUE; } - paragraph=TRUE; + m_paragraph=TRUE; } void ManGenerator::endParagraph() @@ -267,31 +251,31 @@ void ManGenerator::endHtmlLink() void ManGenerator::startGroupHeader(int) { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".SH \""; - upperCase=TRUE; - firstCol=FALSE; + m_upperCase=TRUE; + m_firstCol=FALSE; } void ManGenerator::endGroupHeader(int) { t << "\"\n.PP " << endl; - firstCol=TRUE; - paragraph=TRUE; - upperCase=FALSE; + m_firstCol=TRUE; + m_paragraph=TRUE; + m_upperCase=FALSE; } void ManGenerator::startMemberHeader(const char *,int) { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".SS \""; } void ManGenerator::endMemberHeader() { t << "\"\n"; - firstCol=TRUE; - paragraph=FALSE; + m_firstCol=TRUE; + m_paragraph=FALSE; } void ManGenerator::docify(const char *str) @@ -306,16 +290,16 @@ void ManGenerator::docify(const char *str) { case '-': t << "\\-"; break; // see bug747780 case '.': t << "\\&."; break; // see bug652277 - case '\\': t << "\\\\"; col++; break; - case '\n': t << "\n"; col=0; break; + case '\\': t << "\\\\"; m_col++; break; + case '\n': t << "\n"; m_col=0; break; case '\"': c = '\''; // no break! - default: t << c; col++; break; + default: t << c; m_col++; break; } } - firstCol=(c=='\n'); + m_firstCol=(c=='\n'); //printf("%s",str);fflush(stdout); } - paragraph=FALSE; + m_paragraph=FALSE; } void ManGenerator::codify(const char *str) @@ -333,25 +317,25 @@ void ManGenerator::codify(const char *str) { case '.': t << "\\&."; break; // see bug652277 case '\t': spacesToNextTabStop = - Config_getInt(TAB_SIZE) - (col%Config_getInt(TAB_SIZE)); + Config_getInt(TAB_SIZE) - (m_col%Config_getInt(TAB_SIZE)); t << Doxygen::spaces.left(spacesToNextTabStop); - col+=spacesToNextTabStop; + m_col+=spacesToNextTabStop; break; - case '\n': t << "\n"; firstCol=TRUE; col=0; break; - case '\\': t << "\\"; col++; break; + case '\n': t << "\n"; m_firstCol=TRUE; m_col=0; break; + case '\\': t << "\\"; m_col++; break; case '\"': // no break! - default: p=writeUtf8Char(t,p-1); firstCol=FALSE; col++; break; + default: p=writeUtf8Char(t,p-1); m_firstCol=FALSE; m_col++; break; } } //printf("%s",str);fflush(stdout); } - paragraph=FALSE; + m_paragraph=FALSE; } void ManGenerator::writeChar(char c) { - firstCol=(c=='\n'); - if (firstCol) col=0; else col++; + m_firstCol=(c=='\n'); + if (m_firstCol) m_col=0; else m_col++; switch (c) { case '\\': t << "\\\\"; break; @@ -359,26 +343,26 @@ void ManGenerator::writeChar(char c) default: t << c; break; } //printf("%c",c);fflush(stdout); - paragraph=FALSE; + m_paragraph=FALSE; } void ManGenerator::startDescList(SectionTypes) { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; - firstCol=TRUE; paragraph=TRUE; - col=0; + m_firstCol=TRUE; m_paragraph=TRUE; + m_col=0; } - paragraph=FALSE; + m_paragraph=FALSE; startBold(); } void ManGenerator::startTitle() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".SH \""; - firstCol=FALSE; - paragraph=FALSE; + m_firstCol=FALSE; + m_paragraph=FALSE; } void ManGenerator::endTitle() @@ -388,11 +372,11 @@ void ManGenerator::endTitle() void ManGenerator::startItemListItem() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".TP" << endl; - firstCol=TRUE; - paragraph=FALSE; - col=0; + m_firstCol=TRUE; + m_paragraph=FALSE; + m_col=0; } void ManGenerator::endItemListItem() @@ -403,25 +387,25 @@ void ManGenerator::startCodeFragment() { newParagraph(); t << ".nf" << endl; - firstCol=TRUE; - paragraph=FALSE; + m_firstCol=TRUE; + m_paragraph=FALSE; } void ManGenerator::endCodeFragment() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".fi" << endl; - firstCol=TRUE; - paragraph=FALSE; - col=0; + m_firstCol=TRUE; + m_paragraph=FALSE; + m_col=0; } void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool) { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".SS \""; - firstCol=FALSE; - paragraph=FALSE; + m_firstCol=FALSE; + m_paragraph=FALSE; } void ManGenerator::startDoxyAnchor(const char *,const char *manName, @@ -444,7 +428,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName, // name,baseName.data(),buildFileName(baseName).data()); // - remove dangerous characters and append suffix, then add dir prefix - QCString fileName=dir+"/"+buildFileName( baseName ); + QCString fileName=m_dir+"/"+buildFileName( baseName ); QFile linkfile( fileName ); // - only create file if it doesn't exist already if ( !linkfile.open( IO_ReadOnly ) ) @@ -467,10 +451,10 @@ void ManGenerator::endMemberDoc(bool) void ManGenerator::startSubsection() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".SS \""; - firstCol=FALSE; - paragraph=FALSE; + m_firstCol=FALSE; + m_paragraph=FALSE; } void ManGenerator::endSubsection() @@ -481,10 +465,10 @@ void ManGenerator::endSubsection() void ManGenerator::startSubsubsection() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << "\n.SS \""; - firstCol=FALSE; - paragraph=FALSE; + m_firstCol=FALSE; + m_paragraph=FALSE; } void ManGenerator::endSubsubsection() @@ -494,33 +478,33 @@ void ManGenerator::endSubsubsection() void ManGenerator::writeSynopsis() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".SH SYNOPSIS\n.br\n.PP\n"; - firstCol=TRUE; - paragraph=FALSE; + m_firstCol=TRUE; + m_paragraph=FALSE; } void ManGenerator::startDescItem() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".IP \""; - firstCol=FALSE; + m_firstCol=FALSE; } //void ManGenerator::endDescTitle() //{ // endBold(); -// paragraph=TRUE; +// m_paragraph=TRUE; //} void ManGenerator::startDescForItem() { - if (!firstCol) t << endl; - if (!paragraph) t << ".in -1c" << endl; + if (!m_firstCol) t << endl; + if (!m_paragraph) t << ".in -1c" << endl; t << ".in +1c" << endl; - firstCol=TRUE; - paragraph=FALSE; - col=0; + m_firstCol=TRUE; + m_paragraph=FALSE; + m_col=0; } void ManGenerator::endDescForItem() @@ -530,14 +514,14 @@ void ManGenerator::endDescForItem() void ManGenerator::endDescItem() { t << "\" 1c" << endl; - firstCol=TRUE; + m_firstCol=TRUE; } void ManGenerator::startAnonTypeScope(int indentLevel) { if (indentLevel==0) { - insideTabbing=TRUE; + m_insideTabbing=TRUE; } } @@ -545,16 +529,16 @@ void ManGenerator::endAnonTypeScope(int indentLevel) { if (indentLevel==0) { - insideTabbing=FALSE; + m_insideTabbing=FALSE; } } void ManGenerator::startMemberItem(const char *,int,const char *) { - if (firstCol && !insideTabbing) t << ".in +1c\n"; + if (m_firstCol && !m_insideTabbing) t << ".in +1c\n"; t << "\n.ti -1c\n.RI \""; - firstCol=FALSE; + m_firstCol=FALSE; } void ManGenerator::endMemberItem() @@ -564,17 +548,17 @@ void ManGenerator::endMemberItem() void ManGenerator::startMemberList() { - if (!insideTabbing) + if (!m_insideTabbing) { - t << "\n.in +1c"; firstCol=FALSE; + t << "\n.in +1c"; m_firstCol=FALSE; } } void ManGenerator::endMemberList() { - if (!insideTabbing) + if (!m_insideTabbing) { - t << "\n.in -1c"; firstCol=FALSE; + t << "\n.in -1c"; m_firstCol=FALSE; } } @@ -586,7 +570,7 @@ void ManGenerator::startMemberGroupHeader(bool) void ManGenerator::endMemberGroupHeader() { t << "\\fP\"\n.br\n"; - firstCol=TRUE; + m_firstCol=TRUE; } void ManGenerator::startMemberGroupDocs() @@ -606,12 +590,12 @@ void ManGenerator::startMemberGroup() void ManGenerator::endMemberGroup(bool) { t << "\n.in -1c"; - firstCol=FALSE; + m_firstCol=FALSE; } void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionType type) { - if( !inHeader ) + if( !m_inHeader ) { switch(type) { @@ -627,7 +611,7 @@ void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionTy void ManGenerator::endSection(const char *,SectionInfo::SectionType type) { - if( !inHeader ) + if( !m_inHeader ) { switch(type) { @@ -642,24 +626,24 @@ void ManGenerator::endSection(const char *,SectionInfo::SectionType type) else { t << "\n"; - firstCol=TRUE; - paragraph=FALSE; - inHeader=FALSE; + m_firstCol=TRUE; + m_paragraph=FALSE; + m_inHeader=FALSE; } } void ManGenerator::startExamples() { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; - firstCol=TRUE; paragraph=TRUE; - col=0; + m_firstCol=TRUE; m_paragraph=TRUE; + m_col=0; } - paragraph=FALSE; + m_paragraph=FALSE; startBold(); docify(theTranslator->trExamples()); endBold(); - paragraph=TRUE; + m_paragraph=TRUE; } void ManGenerator::endExamples() @@ -668,16 +652,16 @@ void ManGenerator::endExamples() void ManGenerator::startDescTable(const char *title) { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; - firstCol=TRUE; paragraph=TRUE; - col=0; + m_firstCol=TRUE; m_paragraph=TRUE; + m_col=0; } - paragraph=FALSE; + m_paragraph=FALSE; startBold(); docify(title); endBold(); - paragraph=TRUE; + m_paragraph=TRUE; startDescForItem(); } @@ -688,16 +672,16 @@ void ManGenerator::endDescTable() void ManGenerator::startParamList(ParamListTypes,const char *title) { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; - firstCol=TRUE; paragraph=TRUE; - col=0; + m_firstCol=TRUE; m_paragraph=TRUE; + m_col=0; } - paragraph=FALSE; + m_paragraph=FALSE; startBold(); docify(title); endBold(); - paragraph=TRUE; + m_paragraph=TRUE; } void ManGenerator::endParamList() @@ -709,22 +693,22 @@ void ManGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *) ManDocVisitor *visitor = new ManDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString("")); n->accept(visitor); delete visitor; - firstCol=FALSE; - paragraph = FALSE; + m_firstCol=FALSE; + m_paragraph = FALSE; } void ManGenerator::startConstraintList(const char *header) { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; - firstCol=TRUE; paragraph=TRUE; - col=0; + m_firstCol=TRUE; m_paragraph=TRUE; + m_col=0; } - paragraph=FALSE; + m_paragraph=FALSE; startBold(); docify(header); endBold(); - paragraph=TRUE; + m_paragraph=TRUE; } void ManGenerator::startConstraintParam() @@ -756,7 +740,7 @@ void ManGenerator::startConstraintDocs() void ManGenerator::endConstraintDocs() { - t << endl; firstCol=TRUE; + t << endl; m_firstCol=TRUE; } void ManGenerator::endConstraintList() @@ -766,7 +750,7 @@ void ManGenerator::endConstraintList() void ManGenerator::startInlineHeader() { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl << ".in -1c" << endl; } @@ -776,12 +760,12 @@ void ManGenerator::startInlineHeader() void ManGenerator::endInlineHeader() { t << "\\fP\"" << endl << ".in +1c" << endl; - firstCol = FALSE; + m_firstCol = FALSE; } void ManGenerator::startMemberDocSimple(bool isEnum) { - if (!firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; } @@ -800,10 +784,10 @@ void ManGenerator::startMemberDocSimple(bool isEnum) void ManGenerator::endMemberDocSimple(bool) { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".RE" << endl; t << ".PP" << endl; - firstCol=TRUE; + m_firstCol=TRUE; } void ManGenerator::startInlineMemberType() @@ -831,10 +815,10 @@ void ManGenerator::startInlineMemberDoc() void ManGenerator::endInlineMemberDoc() { - if (!firstCol) t << endl; + if (!m_firstCol) t << endl; t << ".br" << endl; t << ".PP" << endl; - firstCol=TRUE; + m_firstCol=TRUE; } void ManGenerator::startLabels() diff --git a/src/mangen.h b/src/mangen.h index 192be6d..eba6c8d 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -33,12 +33,12 @@ class ManGenerator : public OutputGenerator //OutputGenerator *clone() { return new ManGenerator(*this); } //void append(const OutputGenerator *o); void enable() - { if (genStack->top()) active=*genStack->top(); else active=TRUE; } - void disable() { active=FALSE; } + { if (m_genStack->top()) m_active=*m_genStack->top(); else m_active=TRUE; } + void disable() { m_active=FALSE; } void enableIf(OutputType o) { if (o==Man) enable(); } void disableIf(OutputType o) { if (o==Man) disable(); } void disableIfNot(OutputType o) { if (o!=Man) disable(); } - bool isEnabled(OutputType o) { return (o==Man && active); } + bool isEnabled(OutputType o) { return (o==Man && m_active); } OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; } void writeDoc(DocNode *,const Definition *,const MemberDef *); @@ -91,8 +91,8 @@ class ManGenerator : public OutputGenerator void endTextLink() {} void startHtmlLink(const char *url); void endHtmlLink(); - void startTypewriter() { t << "\\fC"; firstCol=FALSE; } - void endTypewriter() { t << "\\fP"; firstCol=FALSE; } + void startTypewriter() { t << "\\fC"; m_firstCol=FALSE; } + void endTypewriter() { t << "\\fP"; m_firstCol=FALSE; } void startGroupHeader(int); void endGroupHeader(int); void startMemberSections() {} @@ -132,13 +132,13 @@ class ManGenerator : public OutputGenerator void writeAnchor(const char *,const char *) {} void startCodeFragment(); void endCodeFragment(); - void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; col=0; } + void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; m_col=0; } void startCodeLine(bool) {} - void endCodeLine() { codify("\n"); col=0; } - void startEmphasis() { t << "\\fI"; firstCol=FALSE; } - void endEmphasis() { t << "\\fP"; firstCol=FALSE; } - void startBold() { t << "\\fB"; firstCol=FALSE; } - void endBold() { t << "\\fP"; firstCol=FALSE; } + void endCodeLine() { codify("\n"); m_col=0; } + void startEmphasis() { t << "\\fI"; m_firstCol=FALSE; } + void endEmphasis() { t << "\\fP"; m_firstCol=FALSE; } + void startBold() { t << "\\fB"; m_firstCol=FALSE; } + void endBold() { t << "\\fP"; m_firstCol=FALSE; } void startDescription() {} void endDescription() {} void startDescItem(); @@ -152,7 +152,7 @@ class ManGenerator : public OutputGenerator void writeLatexSpacing() {} void writeStartAnnoItem(const char *type,const char *file, const char *path,const char *name); - void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; } + void writeEndAnnoItem(const char *) { t << endl; m_firstCol=TRUE; } void startSubsection(); void endSubsection(); void startSubsubsection(); @@ -161,8 +161,8 @@ class ManGenerator : public OutputGenerator void endCenter() {} void startSmall() {} void endSmall() {} - void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; firstCol=FALSE; } - void endMemberDescription() { t << "\""; firstCol=FALSE; } + void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; m_firstCol=FALSE; } + void endMemberDescription() { t << "\""; m_firstCol=FALSE; } void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} void writeInheritedSectionTitle(const char *,const char *,const char *, @@ -203,7 +203,7 @@ class ManGenerator : public OutputGenerator void endDescTableRow() {} void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); } void endDescTableTitle() { endEmphasis(); endBold(); } - void startDescTableData() { t << endl; firstCol=TRUE; } + void startDescTableData() { t << endl; m_firstCol=TRUE; } void endDescTableData() {} void startDotGraph() {} @@ -264,12 +264,12 @@ class ManGenerator : public OutputGenerator void addWord(const char *,bool) {} private: - bool firstCol; - bool paragraph; - int col; - bool upperCase; - bool insideTabbing; - bool inHeader; + bool m_firstCol; + bool m_paragraph; + int m_col; + bool m_upperCase; + bool m_insideTabbing; + bool m_inHeader; ManGenerator(const ManGenerator &g); ManGenerator &operator=(const ManGenerator &g); diff --git a/src/outputgen.cpp b/src/outputgen.cpp index f54eaf1..b9f24fa 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -26,49 +26,49 @@ OutputGenerator::OutputGenerator() { //printf("OutputGenerator::OutputGenerator()\n"); - file=0; - active=TRUE; - genStack = new QStack<bool>; - genStack->setAutoDelete(TRUE); + m_file=0; + m_active=TRUE; + m_genStack = new QStack<bool>; + m_genStack->setAutoDelete(TRUE); } OutputGenerator::~OutputGenerator() { //printf("OutputGenerator::~OutputGenerator()\n"); - delete file; - delete genStack; + delete m_file; + delete m_genStack; } void OutputGenerator::startPlainFile(const char *name) { //printf("startPlainFile(%s)\n",name); - fileName=dir+"/"+name; - file = new QFile(fileName); - if (!file->open(IO_WriteOnly)) + m_fileName=m_dir+"/"+name; + m_file = new QFile(m_fileName); + if (!m_file->open(IO_WriteOnly)) { - term("Could not open file %s for writing\n",fileName.data()); + term("Could not open file %s for writing\n",m_fileName.data()); } - t.setDevice(file); + t.setDevice(m_file); } void OutputGenerator::endPlainFile() { t.unsetDevice(); - delete file; - file=0; - fileName.resize(0); + delete m_file; + m_file=0; + m_fileName.resize(0); } void OutputGenerator::pushGeneratorState() { - genStack->push(new bool(isEnabled())); + m_genStack->push(new bool(isEnabled())); //printf("%p:pushGeneratorState(%d) enabled=%d\n",this,genStack->count(),isEnabled()); } void OutputGenerator::popGeneratorState() { //printf("%p:popGeneratorState(%d) enabled=%d\n",this,genStack->count(),isEnabled()); - bool *lb = genStack->pop(); + bool *lb = m_genStack->pop(); ASSERT(lb!=0); if (lb==0) return; // for some robustness against superfluous \endhtmlonly commands. if (*lb) enable(); else disable(); diff --git a/src/outputgen.h b/src/outputgen.h index 322f4b7..576e950 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -340,7 +340,7 @@ class OutputGenerator : public BaseOutputDocInterface void startPlainFile(const char *name); void endPlainFile(); //QCString getContents() const; - bool isEnabled() const { return active; } + bool isEnabled() const { return m_active; } void pushGeneratorState(); void popGeneratorState(); //void setEncoding(const QCString &enc) { encoding = enc; } @@ -489,11 +489,11 @@ class OutputGenerator : public BaseOutputDocInterface protected: FTextStream t; - QFile *file; - QCString fileName; - QCString dir; - bool active; - QStack<bool> *genStack; + QFile *m_file; + QCString m_fileName; + QCString m_dir; + bool m_active; + QStack<bool> *m_genStack; private: OutputGenerator(const OutputGenerator &o); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index efc0f63..79411c6 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -65,8 +65,8 @@ static QCString dateToRTFDateString() RTFGenerator::RTFGenerator() : OutputGenerator() { - dir=Config_getString(RTF_OUTPUT); - col=0; + m_dir=Config_getString(RTF_OUTPUT); + m_col=0; //insideTabbing=FALSE; m_listLevel = 0; m_bstartedBody = FALSE; @@ -79,26 +79,6 @@ RTFGenerator::~RTFGenerator() { } -//void RTFGenerator::append(const OutputGenerator *g) -//{ -// t << g->getContents(); -// col+=((RTFGenerator *)g)->col; -// //insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing; -// m_listLevel=((RTFGenerator *)g)->m_listLevel; -// m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph; -// //printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), -// // insideTabbing ? "TRUE" : "FALSE" ); -//} - -//OutputGenerator *RTFGenerator::copy() -//{ -// RTFGenerator *result = new RTFGenerator; -// //result->insideTabbing=insideTabbing; -// result->m_listLevel=m_listLevel; -// result->m_omitParagraph=m_omitParagraph; -// return result; -//} - void RTFGenerator::writeStyleSheetFile(QFile &file) { FTextStream t(&file); @@ -375,7 +355,7 @@ void RTFGenerator::startFile(const char *name,const char *,const char *) { //setEncoding(QCString().sprintf("CP%s",theTranslator->trRTFansicp())); QCString fileName=name; - relPath = relativePathToRoot(fileName); + m_relPath = relativePathToRoot(fileName); if (fileName.right(4)!=".rtf" ) fileName+=".rtf"; startPlainFile(fileName); @@ -1847,17 +1827,17 @@ void RTFGenerator::codify(const char *str) switch(c) { - case '\t': spacesToNextTabStop = Config_getInt(TAB_SIZE) - (col%Config_getInt(TAB_SIZE)); + case '\t': spacesToNextTabStop = Config_getInt(TAB_SIZE) - (m_col%Config_getInt(TAB_SIZE)); t << Doxygen::spaces.left(spacesToNextTabStop); - col+=spacesToNextTabStop; + m_col+=spacesToNextTabStop; break; case '\n': newParagraph(); - t << '\n'; col=0; + t << '\n'; m_col=0; break; - case '{': t << "\\{"; col++; break; - case '}': t << "\\}"; col++; break; - case '\\': t << "\\\\"; col++; break; - default: p=(const unsigned char *)writeUtf8Char(t,(const char *)p-1); col++; break; + case '{': t << "\\{"; m_col++; break; + case '}': t << "\\}"; m_col++; break; + case '\\': t << "\\\\"; m_col++; break; + default: p=(const unsigned char *)writeUtf8Char(t,(const char *)p-1); m_col++; break; } } } @@ -1882,7 +1862,7 @@ void RTFGenerator::endClassDiagram(const ClassDiagram &d, newParagraph(); // create a png file - d.writeImage(t,dir,relPath,fileName,FALSE); + d.writeImage(t,m_dir,m_relPath,fileName,FALSE); // display the file t << "{" << endl; @@ -2510,7 +2490,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) newParagraph(); QCString fn = - g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT),fileName,relPath,TRUE,FALSE); + g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT),m_fileName,m_relPath,TRUE,FALSE); // display the file t << "{" << endl; @@ -2534,7 +2514,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) newParagraph(); QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT), - fileName,relPath,FALSE); + m_fileName,m_relPath,FALSE); // display the file t << "{" << endl; @@ -2565,7 +2545,7 @@ void RTFGenerator::endCallGraph(DotCallGraph &g) newParagraph(); QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT), - fileName,relPath,FALSE); + m_fileName,m_relPath,FALSE); // display the file t << "{" << endl; @@ -2588,7 +2568,7 @@ void RTFGenerator::endDirDepGraph(DotDirDeps &g) newParagraph(); QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT), - fileName,relPath,FALSE); + m_fileName,m_relPath,FALSE); // display the file t << "{" << endl; @@ -3051,12 +3031,12 @@ void RTFGenerator::writeLineNumber(const char *,const char *,const char *,int l) QCString lineNumber; lineNumber.sprintf("%05d",l); t << lineNumber << " "; - col=0; + m_col=0; } void RTFGenerator::startCodeLine(bool) { DoxyCodeLineOpen = TRUE; - col=0; + m_col=0; } void RTFGenerator::endCodeLine() { diff --git a/src/rtfgen.h b/src/rtfgen.h index 575b9a3..c6cb76b 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -33,12 +33,12 @@ class RTFGenerator : public OutputGenerator static void writeExtensionsFile(QFile &file); void enable() - { if (genStack->top()) active=*genStack->top(); else active=TRUE; } - void disable() { active=FALSE; } + { if (m_genStack->top()) m_active=*m_genStack->top(); else m_active=TRUE; } + void disable() { m_active=FALSE; } void enableIf(OutputType o) { if (o==RTF) enable(); } void disableIf(OutputType o) { if (o==RTF) disable(); } void disableIfNot(OutputType o) { if (o!=RTF) disable(); } - bool isEnabled(OutputType o) { return (o==RTF && active); } + bool isEnabled(OutputType o) { return (o==RTF && m_active); } OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; } void writeDoc(DocNode *,const Definition *,const MemberDef *); @@ -279,14 +279,14 @@ class RTFGenerator : public OutputGenerator const char *rtf_Code_DepthStyle(); void incrementIndentLevel(); void decrementIndentLevel(); - int col; + int m_col; bool m_prettyCode; bool m_bstartedBody; // has startbody been called yet? int m_listLevel; // // RTF does not really have a additive indent...manually set list level. bool m_omitParagraph; // should a the next paragraph command be ignored? int m_numCols; // number of columns in a table - QCString relPath; + QCString m_relPath; void beginRTFDocument(); void beginRTFChapter(); diff --git a/src/util.cpp b/src/util.cpp index d68ff52..abcd910 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7089,17 +7089,13 @@ bool checkExtension(const char *fName, const char *ext) return (QCString(fName).right(QCString(ext).length())==ext); } -bool hasExtension(const char *fName) +QCString addHtmlExtensionIfMissing(const char *fName) { - return !(QFileInfo(fName).extension(FALSE).isEmpty()); -} -bool hasExtension(QCString fName) -{ - return !(QFileInfo(fName).extension(FALSE).isEmpty()); -} -bool hasExtension(QString fName) -{ - return !(QFileInfo(fName).extension(FALSE).isEmpty()); + if (QFileInfo(fName).extension(FALSE).isEmpty()) + { + return QCString(fName)+Doxygen::htmlFileExtension; + } + return fName; } QCString stripExtensionGeneral(const char *fName, const char *ext) @@ -364,9 +364,7 @@ QCString linkToText(SrcLangExt lang,const char *link,bool isFileName); bool checkExtension(const char *fName, const char *ext); -bool hasExtension(const char *fName); -bool hasExtension(QCString fName); -bool hasExtension(QString fName); +QCString addHtmlExtensionIfMissing(const char *fName); QCString stripExtensionGeneral(const char *fName, const char *ext); |