diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-08-06 11:48:27 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-08-06 11:48:27 (GMT) |
commit | 624a187c926b69bdfc11fca8e929b71938b28eff (patch) | |
tree | 340cca67808f566b0c458391835834e717e26a61 /src | |
parent | e2bafacf8c0f6ef0dd7f9f4958a125761bda31ec (diff) | |
download | Doxygen-624a187c926b69bdfc11fca8e929b71938b28eff.zip Doxygen-624a187c926b69bdfc11fca8e929b71938b28eff.tar.gz Doxygen-624a187c926b69bdfc11fca8e929b71938b28eff.tar.bz2 |
Release-1.4.4-20050806
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 3 | ||||
-rw-r--r-- | src/commentcnv.l | 8 | ||||
-rw-r--r-- | src/commentscan.l | 10 | ||||
-rw-r--r-- | src/compound.xsd | 1 | ||||
-rw-r--r-- | src/compound_xsd.h | 1 | ||||
-rw-r--r-- | src/config.l | 32 | ||||
-rw-r--r-- | src/definition.cpp | 6 | ||||
-rw-r--r-- | src/definition.h | 5 | ||||
-rw-r--r-- | src/docparser.cpp | 19 | ||||
-rw-r--r-- | src/docparser.h | 6 | ||||
-rw-r--r-- | src/dot.cpp | 24 | ||||
-rw-r--r-- | src/doxygen.cpp | 223 | ||||
-rw-r--r-- | src/entry.cpp | 72 | ||||
-rw-r--r-- | src/entry.h | 1 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/index.cpp | 30 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/mandocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/memberdef.cpp | 29 | ||||
-rw-r--r-- | src/outputlist.cpp | 2 | ||||
-rw-r--r-- | src/pycode.l | 4 | ||||
-rw-r--r-- | src/pyscanner.l | 220 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/scanner.l | 23 | ||||
-rw-r--r-- | src/translator_tw.h | 68 | ||||
-rw-r--r-- | src/util.cpp | 59 | ||||
-rw-r--r-- | src/xmldocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/xmlgen.cpp | 2 |
28 files changed, 600 insertions, 268 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index acf2233..8bc3f38 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1883,7 +1883,7 @@ void ClassDef::setTemplateArguments(ArgumentList *al) */ bool ClassDef::hasNonReferenceSuperClass() { - bool found=!isReference() && isLinkableInProject(); + bool found=!isReference() && isLinkableInProject() && !isHidden(); if (found) { return TRUE; // we're done if this class is not a reference @@ -2778,6 +2778,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName, fileName,startLine,name()+templSpec,ClassDef::Class); templateClass->setTemplateMaster(this); templateClass->setOuterScope(getOuterScope()); + templateClass->setHidden(isHidden()); m_templateInstances->insert(templSpec,templateClass); freshInstance=TRUE; } diff --git a/src/commentcnv.l b/src/commentcnv.l index fa72e3f..a3d62a4 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -320,12 +320,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) copyToOutput(yytext,yyleng); BEGIN(CComment); } -<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f$"|"f[")/[ \r\t\n] { /* start of a verbatim block */ +<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f$"|"f["|"f{")/[^a-z_A-Z0-9] { /* start of a verbatim block */ copyToOutput(yytext,yyleng); if (yytext[2]=='[') { g_blockName="f]"; } + else if (yytext[2]=='{') + { + g_blockName="f}"; + } else { g_blockName=&yytext[1]; @@ -336,7 +340,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) <Scan>. { /* any other character */ copyToOutput(yytext,yyleng); } -<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]") { /* end of verbatim block */ +<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */ copyToOutput(yytext,yyleng); if (yytext[1]=='f') // end of formula { diff --git a/src/commentscan.l b/src/commentscan.l index 10222d2..13489f5 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -105,7 +105,6 @@ static bool handlePublic(const QCString &s); static bool handlePublicSection(const QCString &s); static bool handleInherit(const QCString &); - typedef bool (*DocCmdFunc)(const QCString &name); struct DocCmdMap @@ -811,7 +810,11 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] addOutput(yytext); } <Comment>{DETAILEDCMD}/[^a-z_A-Z]* { // command that can end a brief description - if (inContext!=OutputXRef) setOutput(OutputDoc); + if (inContext!=OutputXRef) + { + briefEndsAtDot=FALSE; + setOutput(OutputDoc); + } // continue with the same input REJECT; } @@ -924,6 +927,7 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] if (briefEndsAtDot) { setOutput(OutputDoc); + briefEndsAtDot=FALSE; } } <Comment>\n { // newline @@ -1434,8 +1438,10 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] } <FormatBlock>"/*" { // start of a C-comment g_commentCount++; + addOutput(yytext); } <FormatBlock>"*/" { // end of a C-comment + addOutput(yytext); g_commentCount--; if (g_commentCount<0 && blockName!="verbatim") { diff --git a/src/compound.xsd b/src/compound.xsd index 561ab94..2e3ec01 100644 --- a/src/compound.xsd +++ b/src/compound.xsd @@ -151,6 +151,7 @@ <xsd:complexType name="descriptionType" mixed="true"> <xsd:sequence> + <xsd:element name="title" type="xsd:string" minOccurs="0"/> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalType" minOccurs="0" /> diff --git a/src/compound_xsd.h b/src/compound_xsd.h index 2d93a57..d2ba0bf 100644 --- a/src/compound_xsd.h +++ b/src/compound_xsd.h @@ -151,6 +151,7 @@ "\n" " <xsd:complexType name=\"descriptionType\" mixed=\"true\">\n" " <xsd:sequence>\n" +" <xsd:element name=\"title\" type=\"xsd:string\" minOccurs=\"0\"/> \n" " <xsd:element name=\"para\" type=\"docParaType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"sect1\" type=\"docSect1Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"internal\" type=\"docInternalType\" minOccurs=\"0\" />\n" diff --git a/src/config.l b/src/config.l index a9ca7c0..bc09280 100644 --- a/src/config.l +++ b/src/config.l @@ -1472,14 +1472,6 @@ void Config::create() "re-implements. \n", TRUE ); - cb = addBool( - "DISTRIBUTE_GROUP_DOC", - "If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \n" - "tag is set to YES, then doxygen will reuse the documentation of the first \n" - "member in the group (if any) for the other members of the group. By default \n" - "all members of a group must be documented explicitly.\n", - FALSE - ); cb = addBool( "SEPARATE_MEMBER_PAGES", "If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce \n" @@ -1512,12 +1504,30 @@ void Config::create() ); cb = addBool( "OPTIMIZE_OUTPUT_JAVA", - "Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources \n" - "only. Doxygen will then generate output that is more tailored for Java. \n" + "Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java \n" + "sources only. Doxygen will then generate output that is more tailored for Java. \n" "For instance, namespaces will be presented as packages, qualified scopes \n" "will look different, etc. \n", FALSE ); + cb = addBool( + "BUILTIN_STL_SUPPORT", + "If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to \n" + "include (a tag file for) the STL sources as input, then you should \n" + "set this tag to YES in order to let doxygen match functions declarations and \n" + "definitions whose arguments contain STL classes (e.g. func(std::string); v.s. \n" + "func(std::string) {}). This also make the inheritance and collaboration \n" + "diagrams that involve STL classes more complete and accurate. \n", + FALSE + ); + cb = addBool( + "DISTRIBUTE_GROUP_DOC", + "If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \n" + "tag is set to YES, then doxygen will reuse the documentation of the first \n" + "member in the group (if any) for the other members of the group. By default \n" + "all members of a group must be documented explicitly.\n", + FALSE + ); cb = addBool( "SUBGROUPING", "Set the SUBGROUPING tag to YES (the default) to allow class member groups of \n" @@ -1731,7 +1741,7 @@ void Config::create() "version control system). Doxygen will invoke the program by executing (via \n" "popen()) the command <command> <input-file>, where <command> is the value of \n" "the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file \n" - "provided by doxygen. Whatever the progam writes to standard output \n" + "provided by doxygen. Whatever the program writes to standard output \n" "is used as the file version. See the manual for examples. \n" ); cs->setWidgetType(ConfigString::File); diff --git a/src/definition.cpp b/src/definition.cpp index 9b0ee16..9114e9d 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -52,7 +52,7 @@ static void addToMap(const char *name,Definition *d) dl = new DefinitionList; Doxygen::symbolMap->append(symbolName,dl); } - //printf("******* adding symbol `%s'\n",symbolName.data()); + //printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d); dl->append(d); d->setSymbolName(symbolName); } @@ -65,7 +65,7 @@ static void removeFromMap(Definition *d) if (index!=-1) symbolName=symbolName.mid(index+2); if (!symbolName.isEmpty()) { - //printf("******* removing symbol `%s'\n",symbolName.data()); + //printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d); DefinitionList *dl=Doxygen::symbolMap->find(symbolName); if (dl) { @@ -81,6 +81,7 @@ Definition::Definition(const char *df,int dl, const char *d,bool isSymbol) { //QCString ns; + //printf("Definition(%s) %p\n",name,this); m_defFileName = df; int lastDot = m_defFileName.findRev('.'); if (lastDot!=-1) @@ -118,6 +119,7 @@ Definition::Definition(const char *df,int dl, m_docLine=1; m_docFile=(QCString)"<"+name+">"; m_isSymbol = isSymbol; + m_hidden = FALSE; if (m_isSymbol) addToMap(name,this); } diff --git a/src/definition.h b/src/definition.h index 496b368..394bc79 100644 --- a/src/definition.h +++ b/src/definition.h @@ -167,6 +167,8 @@ class Definition */ void writeDocAnchorsToTagFile(); + bool isHidden() const { return m_hidden; } + // source references void setBodySegment(int bls,int ble); void setBodyDef(FileDef *fd) { m_bodyDef=fd; } @@ -200,6 +202,8 @@ class Definition void writeNavigationPath(OutputList &ol) const; virtual void writeQuickMemberLinks(OutputList &,MemberDef *) const {} + void setHidden(bool b) { m_hidden = b; } + protected: void setLocalName(const QCString name) { m_localName=name; } @@ -243,6 +247,7 @@ class Definition QList<ListItemInfo> *m_xrefListItems; QCString m_symbolName; bool m_isSymbol; + bool m_hidden; QCString m_qualifiedName; diff --git a/src/docparser.cpp b/src/docparser.cpp index 1399788..a88ca05 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -543,10 +543,12 @@ static bool insideOL(DocNode *n) */ static bool findDocsForMemberOrCompound(const char *commandName, QString *pDoc, + QString *pBrief, Definition **pDef) { //printf("findDocsForMemberOrCompound(%s)\n",commandName); *pDoc=""; + *pBrief=""; *pDef=0; QString cmdArg=substitute(commandName,"#","::"); int l=cmdArg.length(); @@ -574,6 +576,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, if (found && md) { *pDoc=md->documentation(); + *pBrief=md->briefDescription(); *pDef=md; return TRUE; } @@ -594,6 +597,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, if (cd) // class { *pDoc=cd->documentation(); + *pBrief=cd->briefDescription(); *pDef=cd; return TRUE; } @@ -601,6 +605,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, if (nd) // namespace { *pDoc=nd->documentation(); + *pBrief=nd->briefDescription(); *pDef=nd; return TRUE; } @@ -608,6 +613,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, if (gd) // group { *pDoc=gd->documentation(); + *pBrief=gd->briefDescription(); *pDef=gd; return TRUE; } @@ -615,6 +621,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, if (pd) // page { *pDoc=pd->documentation(); + *pBrief=pd->briefDescription(); *pDef=pd; return TRUE; } @@ -623,6 +630,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, if (fd && !ambig) // file { *pDoc=fd->documentation(); + *pBrief=fd->briefDescription(); *pDef=fd; return TRUE; } @@ -1336,6 +1344,11 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, // first parse any number of paragraphs bool isFirst=TRUE; DocPara *lastPar=0; + if (!children.isEmpty() && children.last()->kind()==DocNode::Kind_Para) + { // last child item was a paragraph + lastPar = (DocPara*)children.last(); + isFirst=FALSE; + } do { DocPara *par = new DocPara(parent); @@ -1344,6 +1357,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, if (!par->isEmpty()) { children.append(par); + if (lastPar) lastPar->markLast(FALSE); lastPar=par; } else @@ -1604,9 +1618,9 @@ void DocIncOperator::parse() void DocCopy::parse() { - QString doc; + QString doc,brief; Definition *def; - if (findDocsForMemberOrCompound(m_link,&doc,&def)) + if (findDocsForMemberOrCompound(m_link,&doc,&brief,&def)) { if (g_copyStack.findRef(def)==-1) // definition not parsed earlier { @@ -1622,6 +1636,7 @@ void DocCopy::parse() g_styleStack.clear(); g_nodeStack.clear(); g_copyStack.append(def); + internalValidatingParseDoc(this,m_children,brief); internalValidatingParseDoc(this,m_children,doc); g_copyStack.remove(def); ASSERT(g_styleStack.isEmpty()); diff --git a/src/docparser.h b/src/docparser.h index e7fefa2..8befd6a 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -394,6 +394,12 @@ class DocInclude : public DocNode m_isExample(isExample), m_exampleFile(exampleFile) {} Kind kind() const { return Kind_Include; } QString file() const { return m_file; } + QString extension() const { int i=m_file.findRev('.'); + if (i!=-1) + return m_file.right(m_file.length()-i); + else + return ""; + } Type type() const { return m_type; } QString text() const { return m_text; } QString context() const { return m_context; } diff --git a/src/dot.cpp b/src/dot.cpp index 7a1ec72..c501a39 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -287,6 +287,7 @@ static bool readBoundingBoxEPS(const char *fileName,int *width,int *height) return FALSE; } +#if 0 /*! returns TRUE if class cd is a leaf (i.e. has no visible children) */ static bool isLeaf(ClassDef *cd) @@ -311,6 +312,7 @@ static bool isLeaf(ClassDef *cd) } return TRUE; } +#endif // since dot silently reproduces the input file when it does not // support the PNG format, we need to check the result. @@ -1151,7 +1153,7 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper) for ( ; (bcd=bcli.current()) ; ++bcli ) { ClassDef *bClass=bcd->classDef; - //printf(" Trying super class=`%s' usedNodes=%d\n",bClass->name().data(),m_usedNodes->count()); + //printf(" Trying sub class=`%s' usedNodes=%d\n",bClass->name().data(),m_usedNodes->count()); if (bClass->isVisibleInHierarchy() && hasVisibleRoot(bClass->baseClasses())) { DotNode *bn; @@ -1178,8 +1180,10 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper) else { QCString tmp_url=""; - if (bClass->isLinkable()) + if (bClass->isLinkable() && !bClass->isHidden()) + { tmp_url=bClass->getReference()+"$"+bClass->getOutputFileBase(); + } bn = new DotNode(m_curNodeNumber++, bClass->displayName(), tmp_url.data() @@ -1218,8 +1222,10 @@ void DotGfxHierarchyTable::addClassList(ClassSDict *cl) ) // root node in the forest { QCString tmp_url=""; - if (cd->isLinkable()) + if (cd->isLinkable() && !cd->isHidden()) + { tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); + } //printf("Inserting root class %s\n",cd->name().data()); DotNode *n = new DotNode(m_curNodeNumber++, cd->displayName(), @@ -1353,7 +1359,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, QCString displayName=className; if (Config_getBool("HIDE_SCOPE_NAMES")) displayName=stripScope(displayName); QCString tmp_url; - if (cd->isLinkable()) + if (cd->isLinkable() && !cd->isHidden()) { tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); } @@ -1376,7 +1382,8 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, n->addParent(bn); } m_usedNodes->insert(className,bn); - //printf(" add new child node `%s' to %s\n",className.data(),n->m_label.data()); + //printf(" add new child node `%s' to %s hidden=%d url=%s\n", + // className.data(),n->m_label.data(),cd->isHidden(),tmp_url.data()); // we use <=, i.s.o < to cause one more level than intended which is used to // detect truncated nodes @@ -1492,7 +1499,10 @@ DotClassGraph::DotClassGraph(ClassDef *cd,DotNode::GraphType t,int maxRecursionD m_maxDistance = 0; m_recDepth = maxRecursionDepth; QCString tmp_url=""; - if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); + if (cd->isLinkable() && !cd->isHidden()) + { + tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); + } QCString className = cd->displayName(); //if (cd->templateArguments()) //{ @@ -1948,7 +1958,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) if (bfd) { in = bfd->absFilePath(); - doc = bfd->isLinkable(); + doc = bfd->isLinkable() && bfd->isHidden(); src = bfd->generateSourceFile(); } if (doc || src || !Config_getBool("HIDE_UNDOC_RELATIONS")) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 1035776..2c9b6ca 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -205,6 +205,154 @@ const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*"; QCString spaces; QCString Doxygen::htmlFileExtension; +struct STLInfo +{ + const char *className; + const char *baseClass1; + const char *baseClass2; + const char *templType1; + const char *templName1; + const char *templType2; + const char *templName2; + bool virtualInheritance; + bool iterators; +}; + +static STLInfo g_stlinfo[] = +{ + // className baseClass1 baseClass2 templType1 templName1 templType2 templName2 virtInheritance // iterators + { "allocator", 0, 0, "T", "elements", 0, 0, FALSE, FALSE }, + { "auto_ptr", 0, 0, "T", "ptr", 0, 0, FALSE, FALSE }, + { "ios_base", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, + { "basic_ios", "ios_base", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_istream", "basic_ios<Char>", 0, "Char", 0, 0, 0, TRUE, FALSE }, + { "basic_ostream", "basic_ios<Char>", 0, "Char", 0, 0, 0, TRUE, FALSE }, + { "basic_iostream", "basic_istream<Char>", "basic_ostream<Char>", "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_ifstream", "basic_istream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_ofstream", "basic_ostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_fstream", "basic_iostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_istringstream", "basic_istream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_ostringstream", "basic_ostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "basic_stringstream", "basic_iostream<Char>", 0, "Char", 0, 0, 0, FALSE, FALSE }, + { "ios", "basic_ios<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wios", "basic_ios<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "istream", "basic_istream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wistream", "basic_istream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "ostream", "basic_ostream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wostream", "basic_ostream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "ifstream", "basic_ifstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wifstream", "basic_ifstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "ofstream", "basic_ofstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wofstream", "basic_ofstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "fstream", "basic_fstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wfstream", "basic_wfstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "istringstream", "basic_istringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wistringstream", "basic_istringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "ostringstream", "basic_ostringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wostringstream", "basic_ostringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "stringstream", "basic_stringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "wstringstream", "basic_stringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE }, + { "basic_string", 0, 0, "Char", 0, 0, 0, FALSE, TRUE }, + { "string", "basic_string<char>", 0, 0, 0, 0, 0, FALSE, TRUE }, + { "wstring", "basic_string<wchar_t>", 0, 0, 0, 0, 0, FALSE, TRUE }, + { "complex", 0, 0, 0, 0, 0, 0, FALSE, FALSE }, + { "bitset", 0, 0, "Bits", 0, 0, 0, FALSE, FALSE }, + { "deque", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, + { "list", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, + { "map", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE }, + { "multimap", 0, 0, "K", "keys", "T", "elements", FALSE, TRUE }, + { "set", 0, 0, "K", "keys", 0, 0, FALSE, TRUE }, + { "multiset", 0, 0, "K", "keys", 0, 0, FALSE, TRUE }, + { "vector", 0, 0, "T", "elements", 0, 0, FALSE, TRUE }, + { "queue", 0, 0, "T", "elements", 0, 0, FALSE, FALSE }, + { "priority_queue", 0, 0, "T", "elements", 0, 0, FALSE, FALSE }, + { "stack", 0, 0, "T", "elements", 0, 0, FALSE, FALSE }, + { "valarray", 0, 0, "T", "elements", 0, 0, FALSE, FALSE }, + { 0, 0, 0, 0, 0, 0, 0, FALSE, FALSE } +}; + +static void addSTLMember(Entry *root,const char *type,const char *name) +{ + Entry *memEntry = new Entry; + memEntry->name = name; + memEntry->type = type; + memEntry->protection = Private; + memEntry->section = Entry::VARIABLE_SEC; + memEntry->brief = "STL member"; + memEntry->hidden = TRUE; + root->addSubEntry(memEntry); +} + +static void addSTLClasses(Entry *root) +{ + Entry *namespaceEntry = new Entry; + namespaceEntry->fileName = "[STL]"; + namespaceEntry->startLine = 1; + namespaceEntry->parent = root; + namespaceEntry->name = "std"; + namespaceEntry->section = Entry::NAMESPACE_SEC; + namespaceEntry->brief = "STL namespace"; + namespaceEntry->hidden = TRUE; + root->addSubEntry(namespaceEntry); + + STLInfo *info = g_stlinfo; + while (info->className) + { + //printf("Adding STL class %s\n",info->className); + QCString fullName = info->className; + fullName.prepend("std::"); + + // add fake Entry for the class + Entry *classEntry = new Entry; + classEntry->fileName = "[STL]"; + classEntry->startLine = 1; + classEntry->name = fullName; + classEntry->parent = namespaceEntry; + classEntry->section = Entry::CLASS_SEC; + classEntry->brief = "STL class"; + classEntry->hidden = TRUE; + namespaceEntry->addSubEntry(classEntry); + + // add template arguments to class + if (info->templType1) + { + ArgumentList *al = new ArgumentList; + Argument *a=new Argument; + a->type="typename"; + a->name=info->templType1; + al->append(a); + if (info->templType2) // another template argument + { + a=new Argument; + a->type="typename"; + a->name=info->templType2; + al->append(a); + } + classEntry->tArgLists = new QList<ArgumentList>; + classEntry->tArgLists->setAutoDelete(TRUE); + classEntry->tArgLists->append(al); + } + // add member variables + if (info->templName1) + { + addSTLMember(classEntry,info->templType1,info->templName1); + } + if (info->templName2) + { + addSTLMember(classEntry,info->templType2,info->templName2); + } + if (info->baseClass1) + { + classEntry->extends->append(new BaseInfo(info->baseClass1,Public,info->virtualInheritance?Virtual:Normal)); + } + if (info->baseClass2) + { + classEntry->extends->append(new BaseInfo(info->baseClass2,Public,info->virtualInheritance?Virtual:Normal)); + } + info++; + } +} + //---------------------------------------------------------------------------- static void addRelatedPage(Entry *root) @@ -801,6 +949,7 @@ static void addClassToContext(Entry *root) cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); cd->setIsObjectiveC(root->objc); + cd->setHidden(root->hidden); //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data()); ArgumentList *tArgList = @@ -823,7 +972,6 @@ static void addClassToContext(Entry *root) cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); cd->insertUsedFile(root->fileName); - // add class to the list //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data()); Doxygen::classSDict.append(fullName,cd); @@ -1045,6 +1193,7 @@ static void buildNamespaceList(Entry *root) nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->addSectionsToDefinition(root->anchors); + nd->setHidden(root->hidden); //printf("Adding namespace to group\n"); addNamespaceToGroups(root,nd); @@ -1163,6 +1312,7 @@ static void findUsingDirectives(Entry *root) nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->addSectionsToDefinition(root->anchors); + nd->setHidden(root->hidden); QListIterator<Grouping> gli(*root->groups); Grouping *g; @@ -1509,6 +1659,7 @@ static MemberDef *addVariableToClass( md->setReadAccessor(root->read); md->setWriteAccessor(root->write); md->enableCallGraph(root->callGraph); + md->setHidden(root->hidden); addMemberToGroups(root,md); //if (root->mGrpId!=-1) //{ @@ -2261,7 +2412,7 @@ static void buildFunctionList(Entry *root) { int ts=rname.find('<'); int te=rname.find('>'); - if (ts==-1 || te==-1) + if (memIndex>0 && (ts==-1 || te==-1)) { nd = Doxygen::namespaceSDict.find(rname.left(memIndex)); isMember = nd==0; @@ -2360,7 +2511,7 @@ static void buildFunctionList(Entry *root) if (found) { // merge argument lists - //mergeArguments(root->argList,md->argumentList()); + mergeArguments(md->argumentList(),root->argList,!root->doc.isEmpty()); // merge documentation if (md->documentation().isEmpty() && !root->doc.isEmpty()) { @@ -3224,7 +3375,7 @@ static void findUsedClassesForClass(Entry *root, if (arg->name==usedName) // type is a template argument { found=TRUE; - Debug::print(Debug::Classes,0," New used class `%s'\n", usedName.data()); + Debug::print(Debug::Classes,0," New used class `%s'\n", usedName.data()); ClassDef *usedCd = Doxygen::hiddenClasses.find(usedName); if (usedCd==0) @@ -3237,7 +3388,7 @@ static void findUsedClassesForClass(Entry *root, if (usedCd) { if (isArtificial) usedCd->setClassIsArtificial(); - Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", usedCd->name().data()); + Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", usedCd->name().data()); instanceCd->addUsedClass(usedCd,md->name()); usedCd->addUsedByClass(instanceCd,md->name()); } @@ -4026,14 +4177,11 @@ static void addMemberDocs(Entry *root, if (al) { //printf("merging arguments (1) docs=%d\n",root->doc.isEmpty()); - if ((!root->doc.isEmpty() || !root->proto)) - { - mergeArguments(md->argumentList(),al,TRUE); - } + mergeArguments(md->argumentList(),al,!root->doc.isEmpty()); } else { - if ( (!root->doc.isEmpty() || !root->proto) && + if ( matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(), rscope,rfd,root->argList, TRUE @@ -4041,7 +4189,7 @@ static void addMemberDocs(Entry *root, ) { //printf("merging arguments (2)\n"); - mergeArguments(md->argumentList(),root->argList,TRUE); + mergeArguments(md->argumentList(),root->argList,!root->doc.isEmpty()); } } if (over_load) // the \overload keyword was used @@ -6085,8 +6233,9 @@ static void generateClassList(ClassSDict &classSDict) ClassDef *cd=cli.current(); //printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope); - if (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file - cd->getOuterScope()==Doxygen::globalScope // only look at global classes + if ((cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file + cd->getOuterScope()==Doxygen::globalScope // only look at global classes + ) && !cd->isHidden() ) { // skip external references, anonymous compounds and @@ -6927,10 +7076,12 @@ static void generateNamespaceDocs() for ( ; cli.current() ; ++cli ) { ClassDef *cd=cli.current(); - if ( cd->isLinkableInProject() && - cd->templateMaster()==0 - ) // skip external references, anonymous compounds and - // template instances and nested classes + if ( ( cd->isLinkableInProject() && + cd->templateMaster()==0 + ) // skip external references, anonymous compounds and + // template instances and nested classes + && !cd->isHidden() + ) { msg("Generating docs for compound %s...\n",cd->name().data()); @@ -8083,7 +8234,9 @@ void readConfiguration(int argc, char **argv) Config::instance()->substituteEnvironmentVars(); Config::instance()->convertStrToVal(); Config::instance()->check(); + initWarningFormat(); + QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); if (!setTranslator(outputLanguage)) { @@ -8400,37 +8553,6 @@ void parseInput() readFormulaRepository(); } - /************************************************************************** - * Read Input Files * - **************************************************************************/ - -#if 0 - QCString tmpName = Config_getString("OUTPUT_DIRECTORY")+ - "/doxygen_scratchfile.tmp"; - - // read and preprocess all input files - readFiles(tmpName); - - QFileInfo fi(tmpName); - if (fi.size()==0) - { - err("No input read, no output generated!\n"); - QDir().remove(tmpName); - delete root; - cleanUpDoxygen(); - exit(1); - } - else - { - msg("Read %d bytes\n",fi.size()); - } - - msg("Parsing input...\n"); - parseMain(root,tmpName); // build a tree of entries - - // remove temp file - QDir().remove(tmpName); -#endif parseFiles(root); /************************************************************************** @@ -8445,6 +8567,11 @@ void parseInput() buildDirectories(); findDirDocumentation(root); + if (Config_getBool("BUILTIN_STL_SUPPORT")) + { + addSTLClasses(root); + } + msg("Building namespace list...\n"); buildNamespaceList(root); findUsingDirectives(root); diff --git a/src/entry.cpp b/src/entry.cpp index f2ef0c7..5ce3239 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -42,6 +42,7 @@ Entry::Entry() tagInfo = 0; sli = 0; relatesDup = FALSE; + hidden = FALSE; groupDocType = GROUPDOC_NORMAL; reset(); } @@ -90,6 +91,7 @@ Entry::Entry(const Entry &e) callGraph = e.callGraph; objc = e.objc; tagInfo = e.tagInfo; + hidden = e.hidden; sublist = new QList<Entry>; sublist->setAutoDelete(TRUE); extends = new QList<BaseInfo>; @@ -231,6 +233,7 @@ void Entry::reset() explicitExternal = FALSE; memSpec = 0; objc = FALSE; + hidden = FALSE; subGrouping = TRUE; protection = Public; groupDocType = GROUPDOC_NORMAL; @@ -248,74 +251,7 @@ void Entry::reset() int Entry::getSize() { - int size=sizeof(Entry); - size+=type.length()+1; - size+=name.length()+1; - size+=args.length()+1; - size+=bitfields.length()+1; - size+=exception.length()+1; - size+=program.length()+1; - size+=includeFile.length()+1; - size+=includeName.length()+1; - size+=doc.length()+1; - size+=docFile.length()+1; - size+=relates.length()+1; - size+=brief.length()+1; - size+=briefFile.length()+1; - size+=inbodyDocs.length()+1; - size+=inbodyFile.length()+1; - size+=inside.length()+1; - size+=fileName.length()+1; - size+=initializer.length()+1; - BaseInfo *bi=extends->first(); - while (bi) - { - size+=sizeof(QLNode); - size+=bi->name.length()+1+sizeof(bi->prot)+sizeof(bi->virt); - bi=extends->next(); - } - Grouping *g=groups->first(); - while (g) - { - size+=sizeof(QLNode); - size+=g->groupname.length()+1; - size+=sizeof(g->pri); - g=groups->next(); - } - Entry *e=sublist->first(); - while (e) - { - size+=e->getSize(); - e=sublist->next(); - } - Argument *a=argList->first(); - while (a) - { - size+=sizeof(Argument); - size+=a->type.length()+1 - +a->name.length()+1 - +a->defval.length()+1; - a=argList->next(); - } - if (tArgLists) - { - ArgumentList *al=tArgLists->first(); - while (al) - { - size+=sizeof(ArgumentList); - a=al->first(); - while (a) - { - size+=sizeof(Argument); - size+=a->type.length()+1 - +a->name.length()+1 - +a->defval.length()+1; - a=al->next(); - } - al=tArgLists->next(); - } - } - return size; + return sizeof(Entry); } /*! the argument list is documented if one of its diff --git a/src/entry.h b/src/entry.h index 74ddfed..b10315b 100644 --- a/src/entry.h +++ b/src/entry.h @@ -310,6 +310,7 @@ class Entry TagInfo *tagInfo; //!< tag file info static int num; //!< counts the total number of entries bool objc; //!< Objective-C construct + bool hidden; //!< does this represent an entity this is hidden from the output enum { GROUPDOC_NORMAL, //!< defgroup diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index a560dc3..3a2f222 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -257,7 +257,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) { case DocInclude::Include: m_t << PREFRAG_START; - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(),inc->text().latin1(), inc->isExample(),inc->exampleFile()); m_t << PREFRAG_END; @@ -267,7 +267,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) m_t << PREFRAG_START; QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath(), cfi.fileName() ); - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(), inc->isExample(), diff --git a/src/index.cpp b/src/index.cpp index 10560f5..bad0cc2 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -284,7 +284,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level) //printf("Passed...\n"); bool hasChildren = !cd->visited && !hideSuper && classHasVisibleChildren(cd); //printf("tree4: Has children %s: %d\n",cd->name().data(),hasChildren); - if (cd->isLinkable()) + if (cd->isLinkable() && !cd->isHidden()) { //printf("Writing class %s\n",cd->displayName().data()); ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName()); @@ -367,7 +367,7 @@ void writeClassTree(BaseClassList *cl,int level) } bool hasChildren = !cd->visited && classHasVisibleChildren(cd); //printf("tree2: Has children %s: %d\n",cd->name().data(),hasChildren); - if (cd->isLinkable()) + if (cd->isLinkable() && !cd->isHidden()) { if (hasHtmlHelp) { @@ -406,7 +406,7 @@ void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &star } bool hasChildren = classHasVisibleChildren(cd); //printf("node: Has children %s: %d\n",cd->name().data(),hasChildren); - if (cd->isLinkable()) + if (cd->isLinkable() && !cd->isHidden()) { if (hasHtmlHelp) { @@ -499,7 +499,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) } bool hasChildren = !cd->visited && classHasVisibleChildren(cd); //printf("list: Has children %s: %d\n",cd->name().data(),hasChildren); - if (cd->isLinkable()) + if (cd->isLinkable() && !cd->isHidden()) { //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->templateMaster()=%p\n", // cd->displayName().data(),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster()); @@ -914,7 +914,7 @@ int countNamespaces() NamespaceDef *nd; for (;(nd=nli.current());++nli) { - if (nd->isLinkableInProject()) count++; + if (nd->isLinkableInProject() && !nd->isHidden()) count++; } return count; } @@ -979,7 +979,7 @@ void writeNamespaceIndex(OutputList &ol) NamespaceDef *nd; for (nli.toFirst();(nd=nli.current());++nli) { - if (nd->isLinkableInProject()) + if (nd->isLinkableInProject() && !nd->isHidden()) { if (first) { @@ -1042,7 +1042,7 @@ int countAnnotatedClasses() ClassDef *cd; for (;(cd=cli.current());++cli) { - if (cd->isLinkableInProject() && cd->templateMaster()==0) + if (cd->isLinkableInProject() && cd->templateMaster()==0 && !cd->isHidden()) { //printf("Annotated class %s\n",cd->name().data()); count++; @@ -1074,7 +1074,7 @@ void writeAnnotatedClassList(OutputList &ol) // see which elements are in use for (cli.toFirst();(cd=cli.current());++cli) { - if (cd->isLinkableInProject() && cd->templateMaster()==0) + if (cd->isLinkableInProject() && cd->templateMaster()==0 && !cd->isHidden()) { int c = cd->displayName().at(0); g_classIndexLetterUsed[CHL_All][c]=TRUE; @@ -1108,7 +1108,7 @@ void writeAnnotatedClassList(OutputList &ol) for (cli.toFirst();(cd=cli.current());++cli) { - if (cd->isLinkableInProject() && cd->templateMaster()==0) + if (cd->isLinkableInProject() && cd->templateMaster()==0 && !cd->isHidden()) { QCString type=cd->compoundTypeString(); ol.startIndexKey(); @@ -1159,7 +1159,7 @@ void writeAlphabeticalClassList(OutputList &ol) QCString alphaLinks = "<p><div class=\"qindex\">"; for (;(cd=cli.current());++cli) { - if (cd->isLinkableInProject() && cd->templateMaster()==0) + if (cd->isLinkableInProject() && cd->templateMaster()==0 && !cd->isHidden()) { int index = getPrefixIndex(cd->className()); //printf("name=%s index=%d\n",cd->className().data(),index); @@ -1201,7 +1201,7 @@ void writeAlphabeticalClassList(OutputList &ol) startLetter=0; for (cli.toFirst();(cd=cli.current());++cli) { - if (cd->isLinkableInProject() && cd->templateMaster()==0) + if (cd->isLinkableInProject() && cd->templateMaster()==0 && !cd->isHidden()) { int index = getPrefixIndex(cd->className()); if (toupper(cd->className().at(index))!=startLetter) @@ -1424,7 +1424,7 @@ void writeMemberList(OutputList &ol,bool useSections, if ( md->isLinkableInProject() && (cd=md->getClassDef()) && - cd->isLinkableInProject() && cd->templateMaster()==0 && + cd->isLinkableInProject() && cd->templateMaster()==0 && !cd->isHidden() && ( (filter==CMHL_All && !(md->isFriend() && isFriendToHide)) || (filter==CMHL_Functions && (md->isFunction() || md->isSlot() || md->isSignal())) || (filter==CMHL_Variables && md->isVariable()) || @@ -1481,7 +1481,7 @@ void writeMemberList(OutputList &ol,bool useSections, if ( md->isLinkableInProject() && prevName!=cd->displayName() && - cd->templateMaster()==0 + cd->templateMaster()==0 && !cd->isHidden() ) { if (count==0) @@ -2512,7 +2512,7 @@ void writeGraphInfo(OutputList &ol) //---------------------------------------------------------------------------- /*! - * write groups as hierarchial trees + * write groups as hierarchical trees * \author KPW */ @@ -3144,7 +3144,7 @@ void writeIndex(OutputList &ol) { if (Doxygen::mainPage->title().lower()!="notitle") { - ol.parseDoc(defFileName,defLine,Doxygen::mainPage,0,Doxygen::mainPage->title(),TRUE,FALSE); + ol.docify(Doxygen::mainPage->title()); } } else diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 9afde53..c8a172c 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -319,7 +319,7 @@ void LatexDocVisitor::visit(DocInclude *inc) m_t << "\n\n\\footnotesize\\begin{verbatim}"; QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath(), cfi.fileName() ); - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(), inc->isExample(), @@ -329,7 +329,7 @@ void LatexDocVisitor::visit(DocInclude *inc) break; case DocInclude::Include: m_t << "\n\n\\footnotesize\\begin{verbatim}"; - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(),inc->isExample(), inc->exampleFile()); diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 93c5ec5..706a4eb 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -235,7 +235,7 @@ void ManDocVisitor::visit(DocInclude *inc) m_t << ".nf" << endl; QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath(), cfi.fileName() ); - Doxygen::parserManager->getParser(0/*TODO*/) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(), inc->isExample(), @@ -250,7 +250,7 @@ void ManDocVisitor::visit(DocInclude *inc) if (!m_firstCol) m_t << endl; m_t << ".PP" << endl; m_t << ".nf" << endl; - Doxygen::parserManager->getParser(0/*TODO*/) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(),inc->isExample(), inc->exampleFile()); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 3e9becf..3bfb93d 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2006,9 +2006,36 @@ QCString MemberDef::getScopeString() const return result; } +static QCString escapeAnchor(const QCString &anchor) +{ + QCString result; + int l = anchor.length(),i; + for (i=0;i<l;i++) + { + char c = anchor.at(i); + if ((c>='a' && c<='z') || (c>='A' && c<='Z')) + { + result+=c; + } + else + { + static char hexStr[]="0123456789ABCDEF"; + char escChar[]={ '_', 0, 0, 0 }; + escChar[1]=hexStr[c>>4]; + escChar[2]=hexStr[c&0xf]; + result+=escChar; + } + } + return result; +} + void MemberDef::setAnchor(const char *a) { - anc=a; + //anc=a; + a=a; + QCString memAnchor = name(); + if (!args.isEmpty()) memAnchor+=args; + anc = escapeAnchor(memAnchor); } void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri, diff --git a/src/outputlist.cpp b/src/outputlist.cpp index b6e5e75..297ddca 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -166,7 +166,7 @@ void OutputList::parseDoc(const char *fileName,int startLine, { //printf("og->printDoc(extension=%s)\n", // ctx?ctx->getDefFileExtension().data():"<null>"); - if (og->isEnabled()) og->printDoc(root,ctx?ctx->getDefFileExtension():0); + if (og->isEnabled()) og->printDoc(root,ctx?ctx->getDefFileExtension():QCString("")); og=outputs->next(); } diff --git a/src/pycode.l b/src/pycode.l index 175556a..5e66693 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -710,7 +710,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName) return; } -static void findMemberLink(CodeOutputInterface &ol,const char *symName) +static void findMemberLink(CodeOutputInterface &ol,char *symName) { //printf("Member reference: %s scope=%s member=%s\n", // yytext, @@ -757,7 +757,7 @@ static void findMemberLink(CodeOutputInterface &ol,const char *symName) } } //printf("sym %s not found\n",&yytext[5]); - codify(yytext); + codify(symName); } static void startFontClass(const char *s) diff --git a/src/pyscanner.l b/src/pyscanner.l index 650e51e..64d7585 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -67,6 +67,7 @@ static Protection protection; static Entry* current_root = 0 ; static Entry* current = 0 ; static Entry* previous = 0 ; +static Entry* bodyEntry = 0 ; static int yyLineNr = 1 ; static QCString yyFileName; static MethodTypes mtype; @@ -86,6 +87,7 @@ static bool g_expectModuleDocs; static int g_stringContext; static QCString * g_copyString; static int g_indent = 0; +static int g_curIndent = 0; static QDict<QCString> g_packageNameCache(257); static QCString g_packageScope; @@ -95,7 +97,8 @@ static char g_atomEnd; static int g_atomCount; static bool g_insideConstructor; -static Entry * g_constructorEntry = 0; + +static QCString g_moduleScope; //----------------------------------------------------------------------------- @@ -302,17 +305,11 @@ static void handleCommentBlock(const QCString &doc,bool brief) static void endOfDef() { - if (g_insideConstructor) - { - g_constructorEntry->endBodyLine = yyLineNr; - } - else - { - current->endBodyLine = yyLineNr; - newEntry(); - } + current = bodyEntry; + bodyEntry->endBodyLine = yyLineNr; + bodyEntry = 0; + newEntry(); g_insideConstructor = FALSE; - g_constructorEntry = 0; } static inline void addToString(const char *s) @@ -417,6 +414,7 @@ STARTDOCSYMS ^{B}"##"/[^#] /* Main start state */ %x Search +%x SearchMemVars /* Mid-comment states */ @@ -456,7 +454,8 @@ STARTDOCSYMS ^{B}"##"/[^#] <Search>{ - ^{B}"def"{BB} { // start of a function/method definition + ^{B}"def"{BB} | + "def"{BB} { // start of a function/method definition g_indent=computeIndent(yytext); g_expectModuleDocs = FALSE; current->fileName = yyFileName; @@ -475,7 +474,8 @@ STARTDOCSYMS ^{B}"##"/[^#] BEGIN( FunctionDec ); } - ^{B}"class"{BB} { // start of a class definition + ^{B}"class"{BB} | + "class"{BB} { // start of a class definition g_indent=computeIndent(yytext); g_expectModuleDocs = FALSE; current->section = Entry::CLASS_SEC; @@ -511,7 +511,9 @@ STARTDOCSYMS ^{B}"##"/[^#] } {IDENTIFIER} { // some other identifier } - + ^{BB} { + g_curIndent=computeIndent(yytext); + } [^\n] { // any other character... // This is the major default // that should catch everything @@ -538,6 +540,53 @@ STARTDOCSYMS ^{B}"##"/[^#] } } +<SearchMemVars>{ + "self."{IDENTIFIER}/{B}"=" { + //printf("Found member variable %s\n",&yytext[5]); + current->name=&yytext[5]; + current->section=Entry::VARIABLE_SEC; + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->bodyLine = yyLineNr; + current->type.resize(0); + if (current->name.at(0)=='_') // mark as private + { + current->protection=Private; + } + else + { + current->protection=Public; + } + newEntry(); + } + {TRIDOUBLEQUOTE} { // start of a comment block + initTriDoubleQuoteBlock(); + BEGIN(TripleComment); + } + + {TRISINGLEQUOTE} { // start of a comment block + initTriSingleQuoteBlock(); + BEGIN(TripleComment); + } + + {STARTDOCSYMS} { // start of a special comment + initSpecialBlock(); + BEGIN(SpecialComment); + } + "'" { // start of a single quoted string + g_stringContext=YY_START; + g_copyString=0; + BEGIN( SingleQuoteString ); + } + "\"" { // start of a double quoted string + g_stringContext=YY_START; + g_copyString=0; + BEGIN( DoubleQuoteString ); + } + . + \n { yyLineNr++; } +} + <FunctionBody>{ \n{B}/{IDENTIFIER}{BB} { //fprintf(stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),g_indent); @@ -549,47 +598,45 @@ STARTDOCSYMS ^{B}"##"/[^#] unput(yytext[i]); } endOfDef(); + YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } else { yyLineNr++; + current->program+=yytext; } } - \n/{B}"##" { - unput('\n'); - endOfDef(); - BEGIN(Search); + \n{B}/"##" { + if (computeIndent(&yytext[1])<=g_indent) + { + int i; + for (i=yyleng-1;i>=0;i--) + { + unput(yytext[i]); + } + endOfDef(); + YY_CURRENT_BUFFER->yy_at_bol=TRUE; + BEGIN(Search); + } + else + { + yyLineNr++; + current->program+=yytext; + } } <<EOF>> { endOfDef(); yyterminate(); } - "self."{IDENTIFIER}/{B}"=" { - if (g_insideConstructor) - { - current->name=&yytext[5]; - current->section=Entry::VARIABLE_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - current->bodyLine = yyLineNr; - current->type.resize(0); - if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private - { - current->protection=Private; - } - else - { - current->protection=Public; - } - newEntry(); - } - } ^{BB}\n { // skip empty line + current->program+=yytext; yyLineNr++; } ^{BB} { // something at indent >0 - if (computeIndent(yytext)<=g_indent) + current->program+=yytext; + g_curIndent = computeIndent(yytext); + if (g_curIndent<=g_indent) // jumped out of the function { endOfDef(); @@ -597,26 +644,34 @@ STARTDOCSYMS ^{B}"##"/[^#] } } "'" { // start of a single quoted string + current->program+=yytext; g_stringContext=YY_START; g_specialBlock = FALSE; - g_copyString=0; + g_copyString=¤t->program; BEGIN( SingleQuoteString ); } "\"" { // start of a double quoted string + current->program+=yytext; g_stringContext=YY_START; g_specialBlock = FALSE; - g_copyString=0; + g_copyString=¤t->program; BEGIN( DoubleQuoteString ); } [^ \t\n#'".]+ { // non-special stuff + current->program+=yytext; g_specialBlock = FALSE; } ^{POUNDCOMMENT} { // normal comment + current->program+=yytext; } "#".* { // comment half way + current->program+=yytext; } - {NEWLINE} { yyLineNr++; } + {NEWLINE} { yyLineNr++; + current->program+=yytext; + } . { // any character + current->program+=*yytext; g_specialBlock = FALSE; } @@ -651,13 +706,13 @@ STARTDOCSYMS ^{B}"##"/[^#] { current->protection = Private; } - if ((current_root->section&Entry::SCOPE_MASK) && - current->name=="__init__") // constructor - { + //if ((current_root->section&Entry::SCOPE_MASK) && + // current->name=="__init__") // constructor + //{ g_insideConstructor = TRUE; - g_constructorEntry = current; - newEntry(); - } + // g_constructorEntry = current; + // newEntry(); + //} } {B}"(" { @@ -692,7 +747,7 @@ STARTDOCSYMS ^{B}"##"/[^#] ":" { lineCount(); g_specialBlock = TRUE; // expecting a docstring - + bodyEntry = current; BEGIN( FunctionBody ); } @@ -717,11 +772,15 @@ STARTDOCSYMS ^{B}"##"/[^#] yyterminate(); } ^{BB} { // something at indent >0 - if (computeIndent(yytext)<=g_indent) + g_curIndent=computeIndent(yytext); + //fprintf(stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent); + if (g_curIndent<=g_indent) // jumped out of the class { endOfDef(); - g_indent=computeIndent(yytext); + g_indent=g_curIndent; + // make sure the next rule matches ^... + YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } else @@ -832,9 +891,11 @@ STARTDOCSYMS ^{B}"##"/[^#] } ^{BB} { - // Remember indentation level for later funcs current->program=yytext; current->startLine = yyLineNr; + g_curIndent=computeIndent(yytext); + bodyEntry = current; + //fprintf(stderr,"setting indent %d\n",g_curIndent); //printf("current->program=[%s]\n",current->program.data()); BEGIN( ClassBody ); } @@ -982,7 +1043,7 @@ STARTDOCSYMS ^{B}"##"/[^#] <TripleComment>{ {TRIDOUBLEQUOTE} | {TRISINGLEQUOTE} { - //printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock); + // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock); if (g_doubleQuote==(yytext[0]=='"')) { if (g_specialBlock || g_expectModuleDocs) @@ -992,12 +1053,13 @@ STARTDOCSYMS ^{B}"##"/[^#] actualDoc.append("\\endverbatim "); if (g_expectModuleDocs) { - actualDoc.prepend("\\file \\_linebr "); + actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr "); } handleCommentBlock(actualDoc, FALSE); } g_expectModuleDocs=FALSE; - if (docBlockContext==ClassBody) + if (docBlockContext==ClassBody || + docBlockContext==FunctionBody) { current->program+=docBlock; current->program+=yytext; @@ -1011,8 +1073,21 @@ STARTDOCSYMS ^{B}"##"/[^#] } - ({LONGSTRINGBLOCK}) { - lineCount(); + ^{BB} { // leading whitespace + int indent = computeIndent(yytext); + if (indent>=g_curIndent) + { // strip g_curIndent amount of whitespace + int i; + for (i=0;i<indent-g_curIndent;i++) docBlock+=' '; + //fprintf(stderr,"stripping indent %d\n",g_curIndent); + } + else + { + //fprintf(stderr,"not stripping: %d<%d\n",indent,g_curIndent); + docBlock += yytext; + } + } + [^"\n \t]+ { docBlock += yytext; } \n { @@ -1037,6 +1112,11 @@ STARTDOCSYMS ^{B}"##"/[^#] docBlock+=yytext; } \n { // new line that ends the comment + if (g_expectModuleDocs) + { + docBlock.prepend("\\namespace "+g_moduleScope+"\\_linebr "); + } + g_expectModuleDocs=FALSE; handleCommentBlock(docBlock, docBrief); yyLineNr++; BEGIN(docBlockContext); @@ -1160,8 +1240,18 @@ static void parseCompounds(Entry *rt) inputString = ce->program; inputPosition = 0; pyscanYYrestart( pyscanYYin ) ; - BEGIN( Search ) ; - current_root = ce ; + if (ce->section&Entry::COMPOUND_MASK) + { + current_root = ce ; + BEGIN( Search ); + } + else if (ce->parent) + { + current_root = ce->parent; + //printf("Searching for member variables in %s parent=%s\n", + // ce->name.data(),ce->parent->name.data()); + BEGIN( SearchMemVars ); + } yyFileName = ce->fileName; yyLineNr = ce->startLine ; if (current) delete current; @@ -1209,15 +1299,15 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt) msg("Parsing file %s...\n",yyFileName.data()); QFileInfo fi(fileName); - QCString moduleScope = findPackageScope(fileName); - if (!moduleScope.isEmpty()) + g_moduleScope = findPackageScope(fileName); + if (!g_moduleScope.isEmpty()) { - moduleScope+="::"; + g_moduleScope+="::"; } - moduleScope+=fi.baseName(); + g_moduleScope+=fi.baseName(); current = new Entry; - current->name = moduleScope; + current->name = g_moduleScope; current->section = Entry::NAMESPACE_SEC; current->type = "namespace"; current->fileName = yyFileName; @@ -1278,7 +1368,7 @@ static void parsePrototype(const QCString &text) inputPosition = 0; pyscanYYrestart( pyscanYYin ); - BEGIN( Search ); + BEGIN( FunctionDec ); pyscanYYlex(); diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index ab2b6ac..1989800 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -404,7 +404,7 @@ void RTFDocVisitor::visit(DocInclude *inc) m_t << rtf_Style_Reset << getStyle("CodeExample"); QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath(), cfi.fileName() ); - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(), inc->isExample(), @@ -417,7 +417,7 @@ void RTFDocVisitor::visit(DocInclude *inc) m_t << "{" << endl; m_t << "\\par" << endl; m_t << rtf_Style_Reset << getStyle("CodeExample"); - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(),inc->isExample(), inc->exampleFile()); diff --git a/src/scanner.l b/src/scanner.l index 54a7060..edb1253 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4040,9 +4040,20 @@ IDLATTR ("["[^\]]*"]"){BN}* <DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command docBlock+=yytext; } -<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"dot"|"code")/[^a-z_A-Z0-9] { // verbatim command (which could contain nested comments!) +<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code"|"f$"|"f["|"f{")/[^a-z_A-Z0-9] { // verbatim command (which could contain nested comments!) docBlock+=yytext; - docBlockName=&yytext[1]; + if (yytext[2]=='[') + { + docBlockName="f]"; + } + else if (yytext[2]=='}') + { + docBlockName="f}"; + } + else + { + docBlockName=&yytext[1]; + } BEGIN(DocCopyBlock); } <DocBlock>[^@*\/\\\n]+ { // any character that isn't special @@ -4058,8 +4069,12 @@ IDLATTR ("["[^\]]*"]"){BN}* /* ---- Copy verbatim sections ------ */ -<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block +<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9] { // end of verbatim block docBlock+=yytext; + if (yytext[1]=='f') // end of formula + { + BEGIN(DocBlock); + } if (&yytext[4]==docBlockName) { BEGIN(DocBlock); @@ -4561,7 +4576,9 @@ static void parsePrototype(const QCString &text) current->section = Entry::VARIABLEDOC_SEC; // restore original scanner state + YY_BUFFER_STATE tmpState = YY_CURRENT_BUFFER; yy_switch_to_buffer(orgState); + yy_delete_buffer(tmpState); inputString = orgInputString; inputPosition = orgInputPosition; g_inputFromFile = orgInputFromFile; diff --git a/src/translator_tw.h b/src/translator_tw.h index 520bef1..1ee6523 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -41,7 +41,7 @@ // Translator class (by the local maintainer) when the localized // translator is made up-to-date again. -class TranslatorChinesetraditional : public TranslatorAdapter_1_3_8 +class TranslatorChinesetraditional : public Translator { public: @@ -1527,6 +1527,72 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_3_8 return "符合:"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + " 原始程式檔"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "目錄階層"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "目錄說明文件"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of a HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "目錄"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "這個目錄階層經過簡略的字母排序: "; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result=dirName; result+=" 目錄參考文件"; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool /*first_capital*/, bool /*singular*/) + { + return QCString("目錄"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "這是一個為了便利性所提供 overload 成員函數," + "只有在接受的參數上,與前一個函數不同."; + } }; #endif diff --git a/src/util.cpp b/src/util.cpp index 637a45d..09dee55 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1120,8 +1120,8 @@ ClassDef *getResolvedClassRec(Definition *scope, int count=0; for (dli.toFirst();(d=dli.current());++dli,++count) // foreach definition { - //printf(" found type %x name=%s (%d/%d)\n", - // d->definitionType(),d->name().data(),count,dl->count()); + //printf(" found type %x name=%s (%d/%d) d=%p\n", + // d->definitionType(),d->name().data(),count,dl->count(),d); // only look at classes and members if (d->definitionType()==Definition::TypeClass || @@ -1136,6 +1136,8 @@ ClassDef *getResolvedClassRec(Definition *scope, // see if we are dealing with a class or a typedef if (d->definitionType()==Definition::TypeClass) // d is a class { + if (!((ClassDef*)d)->isArtificial()) + { if (distance<minDistance) // found a definition that is "closer" { minDistance=distance; @@ -1163,6 +1165,7 @@ ClassDef *getResolvedClassRec(Definition *scope, bestTypedef = 0; bestTemplSpec.resize(0); } + } } else if (d->definitionType()==Definition::TypeMember) { @@ -2766,7 +2769,10 @@ static QCString getCanonicalTypeForIdentifier( // fs?fs->name().data():"<none>" // ); - //printf(">>>> word '%s' => '%s' templSpec=%s ts=%s\n",(word+templSpec).data(),cd?cd->qualifiedNameWithTemplateParameters().data():"<none>",templSpec.data(),ts.data()); + //printf(">>>> word '%s' => '%s' templSpec=%s ts=%s\n", + // (word+templSpec).data(), + // cd?cd->qualifiedNameWithTemplateParameters().data():"<none>", + // templSpec.data(),ts.data()); if (cd) // known type { //result = cd->qualifiedNameWithTemplateParameters(); @@ -5148,7 +5154,7 @@ static void latin1ToLatex(QTextStream &t,unsigned char c) case 252: t << "\\\"{u}"; break; case 253: t << "\\'{y}"; break; case 255: t << "\\\"{y}"; break; - default: t << c; + default: t << (char)c; } } @@ -5161,35 +5167,35 @@ static void latin2ToLatex(QTextStream &t,unsigned char c) switch (c) { case 0xA1: t << "\\k{A}"; break; - case 0xA2: t << c; break; + case 0xA2: t << (char)c; break; case 0xA3: t << "\\L{}"; break; - case 0xA4: t << c; break; - case 0xA5: t << c; break; + case 0xA4: t << (char)c; break; + case 0xA5: t << (char)c; break; case 0xA6: t << "\\'{S}"; break; - case 0xA7: t << c; break; - case 0xA8: t << c; break; + case 0xA7: t << (char)c; break; + case 0xA8: t << (char)c; break; case 0xA9: t << "\\v{S}"; break; case 0xAA: t << "\\c{S}"; break; case 0xAB: t << "\\v{T}"; break; case 0xAC: t << "\\'{Z}"; break; - case 0xAD: t << c; break; + case 0xAD: t << (char)c; break; case 0xAE: t << "\\v{Z}"; break; case 0xAF: t << "\\.{Z}"; break; - case 0xB0: t << c; break; + case 0xB0: t << (char)c; break; case 0xB1: t << "\\k{a}"; break; - case 0xB2: t << c; break; + case 0xB2: t << (char)c; break; case 0xB3: t << "\\l{}"; break; - case 0xB4: t << c; break; - case 0xB5: t << c; break; + case 0xB4: t << (char)c; break; + case 0xB5: t << (char)c; break; case 0xB6: t << "\\'{s}"; break; - case 0xB7: t << c; break; - case 0xB8: t << c; break; + case 0xB7: t << (char)c; break; + case 0xB8: t << (char)c; break; case 0xB9: t << "\\v{s}"; break; case 0xBA: t << "\\c{s}"; break; case 0xBB: t << "\\v{t}"; break; case 0xBC: t << "\\'{z}"; break; - case 0xBD: t << c; break; + case 0xBD: t << (char)c; break; case 0xBE: t << "\\v{z}"; break; case 0xBF: t << "\\.{z}"; break; @@ -5217,9 +5223,9 @@ static void latin2ToLatex(QTextStream &t,unsigned char c) case 0xD4: t << "\\^{O}"; break; case 0xD5: t << "\\H{O}"; break; case 0xD6: t << "\\\"{O}"; break; - case 0xD7: t << c; break; + case 0xD7: t << (char)c; break; case 0xD8: t << "\\v{R}"; break; - case 0xD9: t << c; break; + case 0xD9: t << (char)c; break; case 0xDA: t << "\\'{U}"; break; case 0xDB: t << "\\H{U}"; break; case 0xDC: t << "\\\"{U}"; break; @@ -5230,7 +5236,7 @@ static void latin2ToLatex(QTextStream &t,unsigned char c) case 0xE0: t << "\\'{r}"; break; case 0xE1: t << "\\'{a}"; break; case 0xE2: t << "\\^{a}"; break; - case 0xE3: t << c; break; + case 0xE3: t << (char)c; break; case 0xE4: t << "\\\"{a}"; break; case 0xE5: t << "\\'{l}"; break; case 0xE6: t << "\\'{c}"; break; @@ -5251,17 +5257,17 @@ static void latin2ToLatex(QTextStream &t,unsigned char c) case 0xF4: t << "\\^{o}"; break; case 0xF5: t << "\\H{o}"; break; case 0xF6: t << "\\\"{o}"; break; - case 0xF7: t << c; break; + case 0xF7: t << (char)c; break; case 0xF8: t << "\\v{r}"; break; - case 0xF9: t << c; break; + case 0xF9: t << (char)c; break; case 0xFA: t << "\\'{u}"; break; case 0xFB: t << "\\H{u}"; break; case 0xFC: t << "\\\"{u}"; break; case 0xFD: t << "\\'{y}"; break; - case 0xFE: t << c; break; - case 0xFF: t << c; break; + case 0xFE: t << (char)c; break; + case 0xFF: t << (char)c; break; - default: t << c; + default: t << (char)c; } } @@ -5275,6 +5281,7 @@ void filterLatexString(QTextStream &t,const char *str, theTranslator->idLanguage()=="korean-en"; static bool isRussian = theTranslator->idLanguage()=="russian"; static bool isUkrainian = theTranslator->idLanguage()=="ukrainian"; + static bool isSlovene = theTranslator->idLanguage()=="solvene"; static bool isChinese = theTranslator->idLanguage()=="chinese" || theTranslator->idLanguage()=="chinese-traditional"; static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2"; @@ -5382,7 +5389,7 @@ void filterLatexString(QTextStream &t,const char *str, t << (char)c; } } - else if (isCzech || isRussian || isUkrainian) + else if (isCzech || isRussian || isUkrainian || isSlovene) { if (c>=128) { diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 01e5a06..04bfbe3 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -221,7 +221,7 @@ void XmlDocVisitor::visit(DocInclude *inc) m_t << "<programlisting>"; QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath(), cfi.fileName() ); - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(), inc->isExample(), @@ -231,7 +231,7 @@ void XmlDocVisitor::visit(DocInclude *inc) break; case DocInclude::Include: m_t << "<programlisting>"; - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text().latin1(), inc->isExample(), diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 63a5f44..0126cc6 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1588,7 +1588,7 @@ static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample) t << " <compoundname>" << convertToXML(pd->name()) << "</compoundname>" << endl; - SectionInfo *si = Doxygen::sectionDict.find(pageName); + SectionInfo *si = Doxygen::sectionDict.find(pd->name()); if (si) { t << " <title>" << convertToXML(si->title) << "</title>" << endl; |