summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-11-18 21:50:39 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-11-18 21:50:39 (GMT)
commitdd7602fdd31d8f3e0f88be553da084a1e3fdec45 (patch)
treea6d2454b4e6d53003fa829bb7134fe373461ed97 /src
parentbe602ee76006d9b8b0f6e5e75114f2ce34f7773e (diff)
downloadDoxygen-dd7602fdd31d8f3e0f88be553da084a1e3fdec45.zip
Doxygen-dd7602fdd31d8f3e0f88be553da084a1e3fdec45.tar.gz
Doxygen-dd7602fdd31d8f3e0f88be553da084a1e3fdec45.tar.bz2
Release-1.7.2-20101118
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp1
-rw-r--r--src/cmdmapper.cpp1
-rw-r--r--src/cmdmapper.h3
-rw-r--r--src/code.l10
-rw-r--r--src/commentcnv.l63
-rw-r--r--src/commentscan.l2
-rw-r--r--src/compound.xsd6
-rw-r--r--src/compound_xsd.h6
-rw-r--r--src/config.xml19
-rw-r--r--src/configoptions.cpp23
-rw-r--r--src/declinfo.l4
-rw-r--r--src/definition.cpp2
-rw-r--r--src/docparser.cpp17
-rw-r--r--src/docparser.h2
-rw-r--r--src/docsets.cpp12
-rw-r--r--src/doctokenizer.l4
-rw-r--r--src/dot.cpp4
-rw-r--r--src/doxygen.cpp37
-rw-r--r--src/filedef.cpp7
-rw-r--r--src/fortranscanner.l11
-rw-r--r--src/groupdef.cpp1
-rw-r--r--src/htmldocvisitor.cpp3
-rw-r--r--src/index.cpp111
-rw-r--r--src/latexdocvisitor.cpp1
-rw-r--r--src/mandocvisitor.cpp1
-rw-r--r--src/membergroup.cpp2
-rw-r--r--src/membergroup.h4
-rw-r--r--src/namespacedef.cpp1
-rw-r--r--src/perlmodgen.cpp1
-rw-r--r--src/pre.l7
-rw-r--r--src/rtfdocvisitor.cpp1
-rw-r--r--src/scanner.l16
-rw-r--r--src/textdocvisitor.cpp1
-rw-r--r--src/util.cpp101
-rw-r--r--src/util.h6
-rw-r--r--src/xmldocvisitor.cpp1
36 files changed, 369 insertions, 123 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index e38a251..a924dd6 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1315,6 +1315,7 @@ void ClassDef::writeMemberGroups(OutputList &ol)
// write user defined member groups
if (m_impl->memberGroupSDict)
{
+ m_impl->memberGroupSDict->sort();
MemberGroupSDict::Iterator mgli(*m_impl->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 1e5cc17..1682a95 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -102,6 +102,7 @@ CommandMap cmdMap[] =
{ "$", CMD_DOLLAR },
{ "#", CMD_HASH },
{ "%", CMD_PERCENT },
+ { "::", CMD_DCOLON },
{ "\"", CMD_QUOTE },
{ "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index 1f4bd02..30e5b68 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -114,7 +114,8 @@ enum CommandType
CMD_COPYBRIEF = 80,
CMD_COPYDETAILS = 81,
CMD_QUOTE = 82,
- CMD_MSCFILE = 83
+ CMD_MSCFILE = 83,
+ CMD_DCOLON = 84
};
enum HtmlTagType
diff --git a/src/code.l b/src/code.l
index e973bf9..82f807e 100644
--- a/src/code.l
+++ b/src/code.l
@@ -621,7 +621,7 @@ static void addParmType()
static void addUsingDirective(const char *name)
{
- if (g_exampleBlock && g_sourceFileDef && name)
+ if (g_sourceFileDef && name)
{
NamespaceDef *nd = Doxygen::namespaceSDict->find(name);
if (nd)
@@ -3394,10 +3394,12 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
g_exampleName = exName;
g_sourceFileDef = fd;
g_lineNumbers = fd!=0 && showLineNumbers;
- if (exBlock && fd==0)
+ bool cleanupSourceDef = FALSE;
+ if (/* exBlock */ fd==0)
{
// create a dummy filedef for the example
- g_sourceFileDef = new FileDef("",exName);
+ g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
+ cleanupSourceDef = TRUE;
}
if (g_sourceFileDef)
{
@@ -3433,7 +3435,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
endFontClass();
g_code->endCodeLine();
}
- if (exBlock && fd==0)
+ if (cleanupSourceDef)
{
// delete the temporary file definition used for this example
delete g_sourceFileDef;
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 660dae6..d3a7a92 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -25,6 +25,7 @@
#include <qstack.h>
#include <qregexp.h>
#include <qtextstream.h>
+#include <qglobal.h>
#include "bufstr.h"
#include "debug.h"
@@ -33,6 +34,7 @@
#include "doxygen.h"
#include "util.h"
+#include <assert.h>
#define ADDCHAR(c) g_outBuf->addChar(c)
#define ADDARRAY(a,s) g_outBuf->addArray(a,s)
@@ -134,7 +136,7 @@ static inline void copyToOutput(const char *s,int len)
}
}
}
- else
+ else if (len>0)
{
ADDARRAY(s,len);
static int tabSize=Config_getInt("TAB_SIZE");
@@ -318,17 +320,23 @@ void replaceComment(int offset);
copyToOutput(yytext,yyleng);
}
<Scan>("//!"|"///").*/\n[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */
- if (g_mlBrief) REJECT; // bail out if we do not need to convert
- int i=3;
- if (yytext[2]=='/')
+ if (g_mlBrief)
{
- while (i<(int)yyleng && yytext[i]=='/') i++;
+ REJECT; // bail out if we do not need to convert
+ }
+ else
+ {
+ int i=3;
+ if (yytext[2]=='/')
+ {
+ while (i<(int)yyleng && yytext[i]=='/') i++;
+ }
+ g_blockHeadCol=g_col;
+ copyToOutput("/**",3);
+ replaceAliases(yytext+i);
+ g_inSpecialComment=TRUE;
+ BEGIN(SComment);
}
- g_blockHeadCol=g_col;
- copyToOutput("/**",3);
- replaceAliases(yytext+i);
- g_inSpecialComment=TRUE;
- BEGIN(SComment);
}
<Scan>"//##Documentation".*/\n { /* Start of Rational Rose ANSI C++ comment block */
if (g_mlBrief) REJECT;
@@ -602,7 +610,7 @@ void replaceComment(int offset);
}
<SComment>\n[ \t]*"//!" |
<SComment>\n[ \t]*"//!<"/.*\n |
-<SComment>\n[ \t]*"//!"[^<\n]/.*\n {
+<SComment>\n[ \t]*"//!"[^<\n]/.*\n {
replaceComment(1);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
@@ -752,24 +760,25 @@ void replaceComment(int offset);
%%
-void replaceComment(int offset)
+void replaceComment(int offset)
{
- if (g_mlBrief)
- {
- copyToOutput(yytext,yyleng);
- }
- else
- {
+ if (g_mlBrief)
+ {
+ copyToOutput(yytext,yyleng);
+ }
+ else
+ {
//printf("replaceComment(%s)\n",yytext);
- int i=computeIndent(&yytext[offset]);
- if (i==g_blockHeadCol)
- {
- replaceCommentMarker(yytext,yyleng);
- }
- else
- {
- copyToOutput(" */",3);
- int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ int i=computeIndent(&yytext[offset]);
+ if (i==g_blockHeadCol)
+ {
+ replaceCommentMarker(yytext,yyleng);
+ }
+ else
+ {
+ copyToOutput(" */",3);
+ int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
+ g_inSpecialComment=FALSE;
BEGIN(Scan);
}
}
diff --git a/src/commentscan.l b/src/commentscan.l
index 5926d7c..c51431b 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -2661,7 +2661,7 @@ void openGroup(Entry *e,const char *,int)
}
else // start of a member group
{
- //printf(" membergroup id=%d\n",g_memberGroupId);
+ //printf(" membergroup id=%d %s\n",g_memberGroupId,g_memberGroupHeader.data());
if (g_memberGroupId==DOX_NOGROUP) // no group started yet
{
static int curGroupId=0;
diff --git a/src/compound.xsd b/src/compound.xsd
index 7f67a2c..0b2ed4d 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -586,12 +586,6 @@
<xsd:sequence>
<xsd:element name="ref" type="refTextType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="docParamName" mixed="true">
- <xsd:sequence>
- <xsd:element name="ref" type="refTextType" minOccurs="0" maxOccurs="1" />
- </xsd:sequence>
<xsd:attribute name="direction" type="DoxParamDir" use="optional" />
</xsd:complexType>
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 0404b78..1961b07 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -586,12 +586,6 @@
" <xsd:sequence>\n"
" <xsd:element name=\"ref\" type=\"refTextType\" minOccurs=\"0\" maxOccurs=\"1\" />\n"
" </xsd:sequence>\n"
-" </xsd:complexType>\n"
-"\n"
-" <xsd:complexType name=\"docParamName\" mixed=\"true\">\n"
-" <xsd:sequence>\n"
-" <xsd:element name=\"ref\" type=\"refTextType\" minOccurs=\"0\" maxOccurs=\"1\" />\n"
-" </xsd:sequence>\n"
" <xsd:attribute name=\"direction\" type=\"DoxParamDir\" use=\"optional\" />\n"
" </xsd:complexType>\n"
"\n"
diff --git a/src/config.xml b/src/config.xml
index be324a4..d7d4669 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -420,6 +420,14 @@ Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
Note: This option applies only to the class list, not to the
alphabetical list.
' defval='0'/>
+ <option type='bool' id='STRICT_PROTO_MATCHING' docs='
+If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+do proper type resolution of all parameters of a function it will reject a
+match between the prototype and the implementation of a member function even
+if there is only one candidate or it is obvious which candidate to choose
+by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+will still accept a match between prototype and implementation in such cases.
+' defval='0'/>
<option type='bool' id='GENERATE_TODOLIST' docs='
The GENERATE_TODOLIST tag can be used to enable (YES) or
disable (NO) the todo list. This list is created by putting \todo
@@ -663,8 +671,8 @@ The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
basis. Doxygen will compare the file name with each pattern and apply the
filter if there is a match. The filters are a list of the form:
pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-is applied to all files.
+info on how filters are used. If FILTER_PATTERNS is empty or if
+non of the patterns match the file name, INPUT_FILTER is applied.
'>
</option>
<option type='bool' id='FILTER_SOURCE_FILES' docs='
@@ -672,6 +680,13 @@ If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
INPUT_FILTER) will be used to filter the input files when producing source
files to browse (i.e. when SOURCE_BROWSER is set to YES).
' defval='0'/>
+ <option type='list' id='FILTER_SOURCE_PATTERNS' format='file' docs='
+The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+and it is also possible to disable source filtering for a specific pattern
+using *.ext= (so without naming a filter). This option only has effect when
+FILTER_SOURCE_FILES is enabled.
+' depends='FILTER_SOURCE_FILES'/>
</group>
<group name='Source Browser' docs='configuration options related to source browsing'>
<option type='bool' id='SOURCE_BROWSER' docs='
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index 38f7ed8..d3d4aa4 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -601,6 +601,14 @@ void addConfigOptions(Config *cfg)
);
//----
cb = cfg->addBool(
+ "STRICT_PROTO_MATCHING",
+ "If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a\n"
+ "match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen\n"
+ "will still accept a match between prototype and implementation in such cases.",
+ FALSE
+ );
+ //----
+ cb = cfg->addBool(
"GENERATE_TODOLIST",
"The GENERATE_TODOLIST tag can be used to enable (YES) or\n"
"disable (NO) the todo list. This list is created by putting \\todo\n"
@@ -934,8 +942,8 @@ void addConfigOptions(Config *cfg)
"filter if there is a match.\n"
"The filters are a list of the form:\n"
"pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further\n"
- "info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER\n"
- "is applied to all files."
+ "info on how filters are used. If FILTER_PATTERNS is empty or if\n"
+ "non of the patterns match the file name, INPUT_FILTER is applied."
);
cl->setWidgetType(ConfigList::File);
//----
@@ -946,6 +954,17 @@ void addConfigOptions(Config *cfg)
"files to browse (i.e. when SOURCE_BROWSER is set to YES).",
FALSE
);
+ //----
+ cl = cfg->addList(
+ "FILTER_SOURCE_PATTERNS",
+ "The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n"
+ "pattern. A pattern will override the setting for FILTER_PATTERN (if any)\n"
+ "and it is also possible to disable source filtering for a specific pattern\n"
+ "using *.ext= (so without naming a filter). This option only has effect when\n"
+ "FILTER_SOURCE_FILES is enabled."
+ );
+ cl->addDependency("FILTER_SOURCE_FILES");
+ cl->setWidgetType(ConfigList::File);
//---------------------------------------------------------------------------
cfg->addInfo("Source Browser","configuration options related to source browsing");
//---------------------------------------------------------------------------
diff --git a/src/declinfo.l b/src/declinfo.l
index 3affce2..13c0715 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -128,9 +128,11 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
name += yytext;
}
}
-<Start>(~{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
+<Start>([~!]{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
// the / was add to deal with multi-
// dimensional C++ arrays like A[][15]
+ // the leading ~ is for a destructor
+ // the leading ! is for a C++/CLI finalizer (see bug 456475 and 635198)
addTypeName();
name += yytext;
}
diff --git a/src/definition.cpp b/src/definition.cpp
index 6cec012..e4cf2c8 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -544,7 +544,7 @@ static bool readCodeFragment(const char *fileName,
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
//printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine);
if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name
- QCString filter = getFileFilter(fileName);
+ QCString filter = getFileFilter(fileName,TRUE);
FILE *f=0;
bool usePipe = !filter.isEmpty() && filterSourceFiles;
if (!usePipe) // no filter given or wanted
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 1b51d0a..55c1f0f 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -540,6 +540,7 @@ static void detectNoDocumentedParams()
g_memberDef->hasDocumentedReturnType() ||
returnType.isEmpty() || // empty return type
returnType.find("void")!=-1 || // void return type
+ returnType.find("subroutine")!=-1 || // fortran subroutine
g_memberDef->isConstructor() || // a constructor
g_memberDef->isDestructor() // or destructor
)
@@ -1107,8 +1108,12 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
if (g_token->name.left(1)=="#" || g_token->name.left(2)=="::")
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: explicit link request to '%s' could not be resolved",qPrint(name));
+ children.append(new DocWord(parent,g_token->name));
+ }
+ else
+ {
+ children.append(new DocWord(parent,name));
}
- children.append(new DocWord(parent,name));
}
}
@@ -1179,6 +1184,9 @@ reparsetoken:
case CMD_HASH:
children.append(new DocSymbol(parent,DocSymbol::Hash));
break;
+ case CMD_DCOLON:
+ children.append(new DocSymbol(parent,DocSymbol::DoubleColon));
+ break;
case CMD_PERCENT:
children.append(new DocSymbol(parent,DocSymbol::Percent));
break;
@@ -3018,6 +3026,7 @@ int DocIndexEntry::parse()
case CMD_AMP: m_entry+='&'; break;
case CMD_DOLLAR: m_entry+='$'; break;
case CMD_HASH: m_entry+='#'; break;
+ case CMD_DCOLON: m_entry+="::"; break;
case CMD_PERCENT: m_entry+='%'; break;
case CMD_QUOTE: m_entry+='"'; break;
default:
@@ -4772,6 +4781,9 @@ int DocPara::handleCommand(const QCString &cmdName)
case CMD_HASH:
m_children.append(new DocSymbol(this,DocSymbol::Hash));
break;
+ case CMD_DCOLON:
+ m_children.append(new DocSymbol(this,DocSymbol::DoubleColon));
+ break;
case CMD_PERCENT:
m_children.append(new DocSymbol(this,DocSymbol::Percent));
break;
@@ -6197,6 +6209,9 @@ void DocText::parse()
case CMD_HASH:
m_children.append(new DocSymbol(this,DocSymbol::Hash));
break;
+ case CMD_DCOLON:
+ m_children.append(new DocSymbol(this,DocSymbol::DoubleColon));
+ break;
case CMD_PERCENT:
m_children.append(new DocSymbol(this,DocSymbol::Percent));
break;
diff --git a/src/docparser.h b/src/docparser.h
index 6b2a863..6494d08 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -313,7 +313,7 @@ class DocSymbol : public DocNode
{
public:
enum SymType { Unknown=0, BSlash, At, Less, Greater, Amp, Dollar, Hash,
- Percent, Copy, Tm, Reg, Apos, Quot, Uml, Acute,
+ DoubleColon, Percent, Copy, Tm, Reg, Apos, Quot, Uml, Acute,
Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Slash,
Lsquo, Rsquo, Ldquo, Rdquo, Ndash, Mdash, Aelig, AElig
};
diff --git a/src/docsets.cpp b/src/docsets.cpp
index fa14cfa..17fbd7d 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -343,6 +343,16 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,const char *)
case MemberDef::Event:
type="event"; break;
}
+ cd = md->getClassDef();
+ nd = md->getNamespaceDef();
+ if (cd)
+ {
+ scope = cd->qualifiedName();
+ }
+ else if (nd)
+ {
+ scope = nd->name();
+ }
writeToken(m_tts,md,type,lang,scope,md->anchor());
}
else if (context && context->isLinkable())
@@ -404,7 +414,7 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,const char *)
}
if (m_scopes.find(context->getOutputFileBase())==0)
{
- writeToken(m_tts,context,type,lang,0,0,decl);
+ writeToken(m_tts,context,type,lang,scope,0,decl);
m_scopes.append(context->getOutputFileBase(),(void*)0x8);
}
}
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 5cec5d7..a463c34 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -310,6 +310,7 @@ VERBATIM "verbatim"{BLANK}*
SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM})
SPCMD2 {CMD}[\\@<>&$#%~"]
SPCMD3 {CMD}form#[0-9]+
+SPCMD4 {CMD}"::"
INOUT "in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in")
PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
TEMPCHAR [a-z_A-Z0-9,: \t\*\&]
@@ -429,7 +430,8 @@ REFWORD {LABELID}|{REFWORD2}
return TK_COMMAND;
}
<St_Para>{SPCMD1} |
-<St_Para>{SPCMD2} { /* special command */
+<St_Para>{SPCMD2} |
+<St_Para>{SPCMD4} { /* special command */
g_token->name = yytext+1;
g_token->name = g_token->name.stripWhiteSpace();
g_token->paramDir=TokenInfo::Unspecified;
diff --git a/src/dot.cpp b/src/dot.cpp
index 523d515..423e45d 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -997,9 +997,9 @@ bool DotManager::run()
{
uint numDotRuns = m_dotRuns.count();
uint numDotMaps = m_dotMaps.count();
- if (numDotRuns+numDotMaps>0)
+ if (numDotRuns+numDotMaps>1)
{
- msg("Generating dot graphs using %d parallel threads...\n",m_workers.count());
+ msg("Generating dot graphs using %d parallel threads...\n",QMIN(numDotRuns+numDotMaps,m_workers.count()));
}
int i=1;
QListIterator<DotRunner> li(m_dotRuns);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 7ff5c89..f229ded 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -3921,7 +3921,7 @@ static bool findTemplateInstanceRelation(Entry *root,
// int *tempArgIndex;
// for (;(tempArgIndex=qdi.current());++qdi)
// {
- // printf("(%s->%d) ",qdi.currentKey().data(),*tempArgIndex);
+ // printf("(%s->%d) ",qdi.currentKey(),*tempArgIndex);
// }
//}
//printf("\n");
@@ -5651,26 +5651,53 @@ static void findMember(EntryNav *rootNav,
if (count==0 && !(isFriend && funcType=="class"))
{
int candidates=0;
+ ClassDef *ccd = 0, *ecd = 0;
+ MemberDef *cmd = 0, *emd = 0;
if (mn->count()>0)
{
//printf("Assume template class\n");
for (mni.toFirst();(md=mni.current());++mni)
{
- ClassDef *cd=md->getClassDef();
- //printf("cd->name()==%s className=%s\n",cd->name().data(),className.data());
- if (cd!=0 && rightScopeMatch(cd->name(),className))
+ ccd=md->getClassDef();
+ cmd=md;
+ //printf("ccd->name()==%s className=%s\n",ccd->name().data(),className.data());
+ if (ccd!=0 && rightScopeMatch(ccd->name(),className))
{
LockingPtr<ArgumentList> templAl = md->templateArguments();
if (root->tArgLists && templAl!=0 &&
root->tArgLists->getLast()->count()<=templAl->count())
{
- addMethodToClass(rootNav,cd,md->name(),isFriend);
+ addMethodToClass(rootNav,ccd,md->name(),isFriend);
return;
}
+ if (md->argsString()==argListToString(root->argList,TRUE,FALSE))
+ { // exact argument list match -> remember
+ ecd = ccd;
+ emd = cmd;
+ }
candidates++;
}
}
}
+ static bool strictProtoMatching = Config_getBool("STRICT_PROTO_MATCHING");
+ if (!strictProtoMatching)
+ {
+ if (candidates==1 && ccd && cmd)
+ {
+ // we didn't find an actual match on argument lists, but there is only 1 member with this
+ // name in the same scope, so that has to be the one.
+ addMemberDocs(rootNav,cmd,funcDecl,0,overloaded,0);
+ return;
+ }
+ else if (candidates>1 && ecd && emd)
+ {
+ // we didn't find a unique match using type resolution,
+ // but one of the matches has the exact same signature so
+ // we take that one.
+ addMemberDocs(rootNav,emd,funcDecl,0,overloaded,0);
+ return;
+ }
+ }
QCString warnMsg = "warning: no ";
if (noMatchCount>1) warnMsg+="uniquely ";
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 786fcf1..1cc840b 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -61,7 +61,7 @@ class DevNullCodeDocInterface : public CodeOutputInterface
//---------------------------------------------------------------------------
/*! create a new file definition, where \a p is the file path,
- \a nm the file name, and \a ref is an HTML anchor name if the
+ \a nm the file name, and \a lref is an HTML anchor name if the
file was read from a tag file or 0 otherwise
*/
FileDef::FileDef(const char *p,const char *nm,
@@ -431,6 +431,7 @@ void FileDef::writeMemberGroups(OutputList &ol)
/* write user defined member groups */
if (memberGroupSDict)
{
+ memberGroupSDict->sort();
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
@@ -789,7 +790,7 @@ void FileDef::writeSource(OutputList &ol)
pIntf->resetCodeParserState();
ol.startCodeFragment();
pIntf->parseCode(ol,0,
- fileToString(absFilePath(),filterSourceFiles),
+ fileToString(absFilePath(),filterSourceFiles,TRUE),
FALSE,0,this
);
ol.endCodeFragment();
@@ -806,7 +807,7 @@ void FileDef::parseSource()
pIntf->resetCodeParserState();
pIntf->parseCode(
devNullIntf,0,
- fileToString(absFilePath(),filterSourceFiles),
+ fileToString(absFilePath(),filterSourceFiles,TRUE),
FALSE,0,this
);
}
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index cb6a9f9..3156eb1 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -527,7 +527,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
/*------- module/global/typedef variable ---------------------------------------------------*/
-<SubprogBody,SubprogBodyContains>^{BS}"end"({BS}{SUBPROG}({BS_}{ID})?)?{BS}/(\n|!) {
+<SubprogBody,SubprogBodyContains>^{BS}[0-9]*{BS}"end"({BS}{SUBPROG}({BS_}{ID})?)?{BS}/(\n|!) {
//fprintf(stderr,"1e=========> got end subprog: %s\n", yytext);
/* args is used for parameters in list of functions, argList for
@@ -696,7 +696,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
// TYPE_SPEC is for old function style function result
result= yytext;
result= result.stripWhiteSpace();
- extractPrefix(result);
+ //extractPrefix(result);
//fprintf(stderr, "===%s\n", (const char*)result);
current->type = result;
yy_push_state(SubprogPrefix);
@@ -712,7 +712,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
// Fortran subroutine or function found
result= yytext;
result= result.stripWhiteSpace();
- extractPrefix(result);
+ //extractPrefix(result);
addSubprogram(result);
yy_push_state(Subprog);
}
@@ -841,7 +841,9 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
%%
//----------------------------------------------------------------------------
-static void extractPrefix(QCString &text) {
+#if 0
+static void extractPrefix(QCString &text)
+{
int prefixIndex = 0;
int curIndex = 0;
bool cont = TRUE;
@@ -860,6 +862,7 @@ static void extractPrefix(QCString &text) {
}
}
}
+#endif
static int getAmpersandAtTheStart(const char *buf, int length)
{
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index aaf4d1b..7d7ea6c 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -753,6 +753,7 @@ void GroupDef::writeMemberGroups(OutputList &ol)
/* write user defined member groups */
if (memberGroupSDict)
{
+ memberGroupSDict->sort();
/* write user defined member groups */
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 81dc753..081dcc9 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -179,6 +179,7 @@ void HtmlDocVisitor::visit(DocSymbol *s)
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "&copy;"; break;
case DocSymbol::Tm: m_t << "&trade;"; break;
@@ -304,7 +305,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
if (m_hide) return;
switch(s->type())
{
- case DocVerbatim::Code: // fall though
+ case DocVerbatim::Code:
forceEndParagraph(s);
m_t << PREFRAG_START;
Doxygen::parserManager->getParser(m_langExt)
diff --git a/src/index.cpp b/src/index.cpp
index 8031f56..a049a3f 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -42,6 +42,7 @@
#include "pagedef.h"
#include "dirdef.h"
#include "vhdldocgen.h"
+#include "layout.h"
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
#define MAX_ITEMS_BEFORE_QUICK_INDEX 30
@@ -1879,6 +1880,35 @@ void writeQuickMemberIndex(OutputList &ol,
//----------------------------------------------------------------------------
+struct CmhlInfo
+{
+ CmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ const char *fname;
+ QCString title;
+};
+
+static const CmhlInfo *getCmhlInfo(int hl)
+{
+ static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static CmhlInfo cmhlInfo[] =
+ {
+ CmhlInfo("functions", theTranslator->trAll()),
+ CmhlInfo("functions_func",
+ fortranOpt ? theTranslator->trSubprograms() :
+ vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
+ theTranslator->trFunctions()),
+ CmhlInfo("functions_vars",theTranslator->trVariables()),
+ CmhlInfo("functions_type",theTranslator->trTypedefs()),
+ CmhlInfo("functions_enum",theTranslator->trEnumerations()),
+ CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
+ CmhlInfo("functions_prop",theTranslator->trProperties()),
+ CmhlInfo("functions_evnt",theTranslator->trEvents()),
+ CmhlInfo("functions_rela",theTranslator->trRelatedFunctions())
+ };
+ return &cmhlInfo[hl];
+}
+
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight hl)
{
if (documentedClassMembers[hl]==0) return;
@@ -1894,6 +1924,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
numPages=127;
}
+#if 0
struct CmhlInfo
{
CmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
@@ -1914,6 +1945,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
CmhlInfo("functions_evnt",theTranslator->trEvents()),
CmhlInfo("functions_rela",theTranslator->trRelatedFunctions())
};
+#endif
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
@@ -1922,7 +1954,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
QCString title = fortranOpt ? theTranslator->trCompoundMembersFortran() :
vhdlOpt ? VhdlDocGen::trDesignUnitMembers() :
theTranslator->trCompoundMembers() ;
- if (hl!=CMHL_All) title+=(QCString)" - "+cmhlInfo[hl].title;
+ if (hl!=CMHL_All) title+=(QCString)" - "+getCmhlInfo(hl)->title;
int page;
bool first=TRUE;
@@ -1930,7 +1962,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
{
if (!multiPageIndex || g_memberIndexLetterUsed[hl][page].count()>0)
{
- QCString fileName = cmhlInfo[hl].fname;
+ QCString fileName = getCmhlInfo(hl)->fname;
if (multiPageIndex && !first)
{
fileName+=QCString().sprintf("_0x%02x",page);
@@ -1942,8 +1974,8 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
// index item for global member list
startQuickIndexItem(ol,
- cmhlInfo[0].fname+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first);
- ol.writeString(fixSpaces(cmhlInfo[0].title));
+ getCmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first);
+ ol.writeString(fixSpaces(getCmhlInfo(0)->title));
endQuickIndexItem(ol);
// index items per category member lists
@@ -1952,10 +1984,10 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
{
if (documentedClassMembers[i]>0)
{
- startQuickIndexItem(ol,cmhlInfo[i].fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
- ol.writeString(fixSpaces(cmhlInfo[i].title));
+ startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
+ ol.writeString(fixSpaces(getCmhlInfo(i)->title));
//printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
- // multiPageIndex,first,fileName.data(),cmhlInfo[i].fname,cmhlInfo[i].title.data());
+ // multiPageIndex,first,fileName.data(),getCmhlInfo(i)->fname,getCmhlInfo(i)->title.data());
endQuickIndexItem(ol);
}
}
@@ -1967,7 +1999,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
if (quickIndex)
{
writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl],page,
- cmhlInfo[hl].fname,multiPageIndex);
+ getCmhlInfo(hl)->fname,multiPageIndex);
}
ol.endQuickIndices();
@@ -2978,6 +3010,57 @@ void writeExampleIndex(OutputList &ol)
ol.popGeneratorState();
}
+
+//----------------------------------------------------------------------------
+
+void writeFullNavIndex(QTextStream &t, LayoutNavEntry *root,int indent)
+{
+ QCString indentStr;
+ indentStr.fill(' ',indent*2);
+ if (root->children().count()>0)
+ {
+ t << indentStr << "<ul>" << endl;
+ QListIterator<LayoutNavEntry> li(root->children());
+ LayoutNavEntry *entry;
+ for (li.toFirst();(entry=li.current());++li)
+ {
+ t << indentStr << "<li>";
+ t << "<a href=\"" << entry->baseFile() << Doxygen::htmlFileExtension << "\">";
+ t << fixSpaces(entry->title());
+ t << "</a>";
+ t << "</li>" << endl;
+ writeFullNavIndex(t,entry,indent+1);
+ if (entry->kind()==LayoutNavEntry::ClassMembers)
+ {
+ t << indentStr << " <ul>" << endl;
+ // index items per category member lists
+ int i;
+ for (i=0;i<CMHL_Total;i++)
+ {
+ if (documentedClassMembers[i]>0)
+ {
+ t << indentStr << " <li>";
+ t << "<a href=\"" << getCmhlInfo(i)->fname << Doxygen::htmlFileExtension << "\">";
+ t << fixSpaces(getCmhlInfo(i)->title);
+ t << "</a>";
+ t << "</li>" << endl;
+ }
+ }
+ t << indentStr << " </ul>" << endl;
+ }
+ else if (entry->kind()==LayoutNavEntry::NamespaceMembers)
+ {
+ t << indentStr << " <namespacemembers>" << endl;
+ }
+ else if (entry->kind()==LayoutNavEntry::FileGlobals)
+ {
+ t << indentStr << " <fileglobals>" << endl;
+ }
+ }
+ t << indentStr << "</ul>" << endl;
+ }
+}
+
//----------------------------------------------------------------------------
void countRelatedPages(int &docPages,int &indexPages)
@@ -3619,6 +3702,18 @@ void writeIndex(OutputList &ol)
projPrefix=Config_getString("PROJECT_NAME")+" ";
}
+#if 0
+ {
+ QFile f("navindex.html");
+ if (f.open(IO_WriteOnly))
+ {
+ QTextStream t(&f);
+ LayoutNavEntry *layout = LayoutDocManager::instance().rootNavEntry();
+ writeFullNavIndex(t,layout,0);
+ }
+ }
+#endif
+
//--------------------------------------------------------------------
// write HTML index
//--------------------------------------------------------------------
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 46b9299..3c2e6f6 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -148,6 +148,7 @@ void LatexDocVisitor::visit(DocSymbol *s)
case DocSymbol::Amp: m_t << "\\&"; break;
case DocSymbol::Dollar: m_t << "\\$"; break;
case DocSymbol::Hash: m_t << "\\#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "\\%"; break;
case DocSymbol::Copy: m_t << "\\copyright"; break;
case DocSymbol::Tm: m_t << "\\texttrademark"; break;
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index d1ec0d3..5dd9f5e 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -82,6 +82,7 @@ void ManDocVisitor::visit(DocSymbol *s)
case DocSymbol::Amp: m_t << "&"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "(C)"; break;
case DocSymbol::Tm: m_t << "(TM)"; break;
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index d44a481..3e0f4e0 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -107,7 +107,7 @@ void MemberGroup::setAnchors(ClassDef *context)
void MemberGroup::writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd)
{
- //printf("MemberGroup::writeDeclarations() memberList->count()=%d\n",memberList->count());
+ printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data());
QCString ldoc = doc;
if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\"></a>");
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc/*,TRUE,TRUE*/);
diff --git a/src/membergroup.h b/src/membergroup.h
index cedad1e..496a95d 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -115,6 +115,10 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
public:
MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {}
~MemberGroupSDict() {}
+ int compareItems(GCI item1,GCI item2)
+ {
+ return ((MemberGroup *)item1)->groupId() - ((MemberGroup*)item2)->groupId();
+ }
};
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 98b4831..337403d 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -348,6 +348,7 @@ void NamespaceDef::writeMemberGroups(OutputList &ol)
/* write user defined member groups */
if (memberGroupSDict)
{
+ memberGroupSDict->sort();
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 2b57f6c..a274ba9 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -532,6 +532,7 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
case DocSymbol::Amp: c = '&'; break;
case DocSymbol::Dollar: c = '$'; break;
case DocSymbol::Hash: c = '#'; break;
+ case DocSymbol::DoubleColon: s = "::"; break;
case DocSymbol::Percent: c = '%'; break;
case DocSymbol::Quot: c = '"'; break;
case DocSymbol::Lsquo: s = "\\\'"; break;
diff --git a/src/pre.l b/src/pre.l
index 7bb5c1d..0c9adee 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1300,10 +1300,10 @@ static void readIncludeFile(const QCString &inc)
QCString absPath = incFileName;
if (QDir::isRelativePath(incFileName))
{
- QString absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName);
+ absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName);
//printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data());
}
- FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig);
+ FileDef *fd = findFileDef(Doxygen::inputNameDict,absPath,ambig);
//printf("%s::findFileDef(%s)=%p\n",oldFileDef->name().data(),incFileName.data(),fd);
// add include dependency to the file in which the #include was found
oldFileDef->addIncludeDependency(fd,incFileName,localInclude,g_isImported);
@@ -2130,8 +2130,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<SkipCComment,SkipCPPComment>[\\@]"cond"[ \t\r]*\n |
<CondLine>. {
- outputArray(yytext,yyleng);
- g_yyLineNr+=QCString(yytext).contains('\n');
+ unput(*yytext);
startCondSection(" ");
if (YY_START==CondLine) BEGIN(g_condCtx);
}
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 4886b8d..c0a4019 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -110,6 +110,7 @@ void RTFDocVisitor::visit(DocSymbol *s)
case DocSymbol::Amp: m_t << "&"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "(C)"; break;
case DocSymbol::Tm: m_t << "(TM)"; break;
diff --git a/src/scanner.l b/src/scanner.l
index be8f716..2fdf0f2 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -2099,7 +2099,12 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
yyLineNr = atoi(&yytext[1]);
//printf("setting line number to %d\n",yyLineNr);
lastPreLineCtrlContext = YY_START;
- current->program+=yytext;
+ if (YY_START==ReadBody ||
+ YY_START==ReadNSBody ||
+ YY_START==ReadBodyIntf)
+ {
+ current->program+=yytext;
+ }
BEGIN( PreLineCtrl );
}
<PreLineCtrl>"\""[^\n\"]*"\"" {
@@ -5553,6 +5558,15 @@ static void handleCommentBlock(const QCString &doc,bool brief)
if (docBlockInBody && hideInBodyDocs) return;
//printf("parseCommentBlock [%s] brief=%d\n",doc.data(),brief);
int lineNr = brief ? current->briefLine : current->docLine; // line of block start
+
+ // fill in inbodyFile && inbodyLine the first time, see bug 633891
+ Entry *docEntry = docBlockInBody && previous ? previous : current;
+ if (docBlockInBody && docEntry && docEntry->inbodyLine==-1)
+ {
+ docEntry->inbodyFile = yyFileName;
+ docEntry->inbodyLine = lineNr;
+ }
+
while (parseCommentBlock(
g_thisParser,
docBlockInBody && previous ? previous : current,
diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp
index a39e16a..bddd436 100644
--- a/src/textdocvisitor.cpp
+++ b/src/textdocvisitor.cpp
@@ -33,6 +33,7 @@ void TextDocVisitor::visit(DocSymbol *s)
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "&copy;"; break;
case DocSymbol::Tm: m_t << "&tm;"; break;
diff --git a/src/util.cpp b/src/util.cpp
index c9967ae..e22df70 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1959,7 +1959,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed)
}
-QCString argListToString(ArgumentList *al,bool useCanonicalType)
+QCString argListToString(ArgumentList *al,bool useCanonicalType,bool showDefVals)
{
QCString result;
if (al==0) return result;
@@ -1988,7 +1988,7 @@ QCString argListToString(ArgumentList *al,bool useCanonicalType)
{
result+= type1+type2;
}
- if (!a->defval.isEmpty())
+ if (!a->defval.isEmpty() && showDefVals)
{
result+="="+a->defval;
}
@@ -2089,24 +2089,9 @@ int filterCRLF(char *buf,int len)
return dest; // length of the valid part of the buf
}
-
-/*! looks for a filter for the file \a name. Returns the name of the filter
- * if there is a match for the file name, otherwise an empty string.
- */
-QCString getFileFilter(const char* name)
+static QCString getFilterFromList(const char *name,const QStrList &filterList,bool &found)
{
- // sanity check
- if (name==0) return "";
-
- // first look for filter pattern list
- QStrList& filterList = Config_getList("FILTER_PATTERNS");
-
- if (filterList.isEmpty())
- {
- // use INPUT_FILTER instead (For all files)
- return Config_getString("INPUT_FILTER");
- }
-
+ found=FALSE;
// compare the file name to the filter pattern list
QStrListIterator sli(filterList);
char* filterStr;
@@ -2127,6 +2112,7 @@ QCString getFileFilter(const char* name)
{ // add quotes if the name has spaces
filterName="\""+filterName+"\"";
}
+ found=TRUE;
return filterName;
}
}
@@ -2136,6 +2122,39 @@ QCString getFileFilter(const char* name)
return "";
}
+/*! looks for a filter for the file \a name. Returns the name of the filter
+ * if there is a match for the file name, otherwise an empty string.
+ * In case \a inSourceCode is TRUE then first the source filter list is
+ * considered.
+ */
+QCString getFileFilter(const char* name,bool isSourceCode)
+{
+ // sanity check
+ if (name==0) return "";
+
+ QStrList& filterSrcList = Config_getList("FILTER_SOURCE_PATTERNS");
+ QStrList& filterList = Config_getList("FILTER_PATTERNS");
+
+ QCString filterName;
+ bool found=FALSE;
+ if (isSourceCode && !filterSrcList.isEmpty())
+ { // first look for source filter pattern list
+ filterName = getFilterFromList(name,filterSrcList,found);
+ }
+ if (!found && !filterName.isEmpty())
+ { // then look for filter pattern list
+ filterName = getFilterFromList(name,filterList,found);
+ }
+ if (!found)
+ { // then use the generic input filter
+ return Config_getString("INPUT_FILTER");
+ }
+ else
+ {
+ return filterName;
+ }
+}
+
#if 0
QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding)
{
@@ -2220,7 +2239,7 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
* is TRUE the file will be filtered by any user specified input filter.
* If \a name is "-" the string will be read from standard input.
*/
-QCString fileToString(const char *name,bool filter)
+QCString fileToString(const char *name,bool filter,bool isSourceCode)
{
if (name==0 || name[0]==0) return 0;
QFile f;
@@ -2255,7 +2274,7 @@ QCString fileToString(const char *name,bool filter)
err("error: file `%s' not found\n",name);
return "";
}
- QCString filterName = getFileFilter(name);
+ QCString filterName = getFileFilter(name,isSourceCode);
if (filterName.isEmpty() || !filter)
{
f.setName(name);
@@ -2870,13 +2889,13 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
(srcAType+" "+srcAName)==dstAType)
{
MATCH
- return TRUE;
+ return TRUE;
}
else if (!dstAName.isEmpty() && !srcA->type.isEmpty() &&
(dstAType+" "+dstAName)==srcAType)
{
MATCH
- return TRUE;
+ return TRUE;
}
@@ -2993,7 +3012,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
}
}
MATCH
- return TRUE;
+ return TRUE;
}
@@ -3033,12 +3052,12 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
if (match)
{
MATCH
- return TRUE;
+ return TRUE;
}
else
{
NOMATCH
- return FALSE;
+ return FALSE;
}
}
@@ -3050,7 +3069,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
a->type = "void";
srcAl->append(a);
MATCH
- return TRUE;
+ return TRUE;
}
if ( dstAl->count()==0 && srcAl->count()==1 &&
srcAl->getFirst()->type=="void" )
@@ -3059,13 +3078,13 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
a->type = "void";
dstAl->append(a);
MATCH
- return TRUE;
+ return TRUE;
}
if (srcAl->count() != dstAl->count())
{
NOMATCH
- return FALSE; // different number of arguments -> no match
+ return FALSE; // different number of arguments -> no match
}
if (checkCV)
@@ -3073,12 +3092,12 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
if (srcAl->constSpecifier != dstAl->constSpecifier)
{
NOMATCH
- return FALSE; // one member is const, the other not -> no match
+ return FALSE; // one member is const, the other not -> no match
}
if (srcAl->volatileSpecifier != dstAl->volatileSpecifier)
{
NOMATCH
- return FALSE; // one member is volatile, the other not -> no match
+ return FALSE; // one member is volatile, the other not -> no match
}
}
@@ -3092,11 +3111,11 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
usingNamespaces,usingClasses))
{
NOMATCH
- return FALSE;
+ return FALSE;
}
}
MATCH
- return TRUE; // all arguments match
+ return TRUE; // all arguments match
}
#endif
@@ -3162,8 +3181,10 @@ QCString getCanonicalTemplateSpec(Definition *d,FileDef *fs,const QCString& spec
static QCString getCanonicalTypeForIdentifier(
Definition *d,FileDef *fs,const QCString &word,
- QCString *tSpec)
+ QCString *tSpec,int count=0)
{
+ if (count>10) return word; // oops recursion
+
QCString symName,scope,result,templSpec,tmpName;
//DefinitionList *defList=0;
if (tSpec && !tSpec->isEmpty()) templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,*tSpec));
@@ -3266,7 +3287,15 @@ static QCString getCanonicalTypeForIdentifier(
else if (mType && mType->isTypedef()) // a typedef
{
//result = mType->qualifiedName(); // changed after 1.7.2
- result = mType->typeString();
+ //result = mType->typeString();
+ if (word!=mType->typeString())
+ {
+ result = getCanonicalTypeForIdentifier(d,fs,mType->typeString(),tSpec,count++);
+ }
+ else
+ {
+ result = mType->typeString();
+ }
}
else // fallback
{
@@ -6927,7 +6956,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf)
QFileInfo fi(fileName);
if (!fi.exists()) return FALSE;
- QCString filterName = getFileFilter(fileName);
+ QCString filterName = getFileFilter(fileName,FALSE);
if (filterName.isEmpty())
{
QFile f(fileName);
diff --git a/src/util.h b/src/util.h
index 8ca889c..ed3750a 100644
--- a/src/util.h
+++ b/src/util.h
@@ -118,7 +118,7 @@ void linkifyText(const TextGeneratorIntf &ol,
void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1);
-QCString fileToString(const char *name,bool filter=FALSE);
+QCString fileToString(const char *name,bool filter=FALSE,bool isSourceCode=FALSE);
QCString dateToString(bool);
@@ -135,7 +135,7 @@ bool getDefs(const QCString &scopeName,
bool checkCV=FALSE
);
-QCString getFileFilter(const char* name);
+QCString getFileFilter(const char* name,bool isSourceCode);
bool resolveRef(/* in */ const char *scName,
/* in */ const char *name,
@@ -207,7 +207,7 @@ inline bool isId(int c)
QCString removeRedundantWhiteSpace(const QCString &s);
-QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE);
+QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE,bool showDefVals=TRUE);
QCString tempArgListToString(ArgumentList *al);
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 5dfa052..5ebc070 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -76,6 +76,7 @@ void XmlDocVisitor::visit(DocSymbol *s)
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "<copy/>"; break;
case DocSymbol::Tm: m_t << "<trademark/>"; break;