Commit 94f3e728 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.5.9

parent 2ae3ed65
DOXYGEN Version 1.5.8-20090304 DOXYGEN Version 1.5.9
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (04 March 2009) Dimitri van Heesch (30 April 2009)
DOXYGEN Version 1.5.8_20090304 DOXYGEN Version 1.5.9
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (04 March 2009) Dimitri van Heesch (dimitri@stack.nl) (30 April 2009)
...@@ -1711,7 +1711,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">" ...@@ -1711,7 +1711,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME ((({ID}{TEMPLIST}?){BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPETNAME ((({ID}{TEMPLIST}?){BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*"::"{BN}*)+ SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*"::"{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize") KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize")
KEYWORD ("add"|"asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC}) KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally") FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string") TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string")
CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast") CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast")
......
...@@ -844,6 +844,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) ...@@ -844,6 +844,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool /*funcOnly*/) const QCString &text,MemberSDict *members,bool /*funcOnly*/)
{ {
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
ol.pushGeneratorState(); ol.pushGeneratorState();
if (/*Config_getBool("SOURCE_BROWSER") &&*/ members) if (/*Config_getBool("SOURCE_BROWSER") &&*/ members)
{ {
...@@ -890,7 +891,14 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -890,7 +891,14 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
//printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope); //printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope);
// for HTML write a real link // for HTML write a real link
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); //ol.disableAllBut(OutputGenerator::Html);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
QCString lineStr,anchorStr; QCString lineStr,anchorStr;
anchorStr.sprintf("l%05d",md->getStartBodyLine()); anchorStr.sprintf("l%05d",md->getStartBodyLine());
//printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data()); //printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
...@@ -900,6 +908,10 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -900,6 +908,10 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
// for the other output formats just mention the name // for the other output formats just mention the name
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Html); ol.disable(OutputGenerator::Html);
if (latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
ol.docify(name); ol.docify(name);
ol.popGeneratorState(); ol.popGeneratorState();
} }
...@@ -907,7 +919,14 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -907,7 +919,14 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
{ {
// for HTML write a real link // for HTML write a real link
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); //ol.disableAllBut(OutputGenerator::Html);
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
if (!latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
ol.writeObjectLink(md->getReference(), ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(), md->getOutputFileBase(),
md->anchor(),name); md->anchor(),name);
...@@ -916,6 +935,10 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -916,6 +935,10 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
// for the other output formats just mention the name // for the other output formats just mention the name
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Html); ol.disable(OutputGenerator::Html);
if (latexSourceCode)
{
ol.disable(OutputGenerator::Latex);
}
ol.docify(name); ol.docify(name);
ol.popGeneratorState(); ol.popGeneratorState();
} }
......
...@@ -978,9 +978,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -978,9 +978,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
QString name = linkToText(g_token->name,TRUE); QString name = linkToText(g_token->name,TRUE);
int len = g_token->name.length(); int len = g_token->name.length();
ClassDef *cd=0; ClassDef *cd=0;
bool ambig;
FileDef *fd = findFileDef(Doxygen::inputNameDict,g_fileName,ambig);
//printf("handleLinkedWord(%s) g_context=%s\n",name.data(),g_context.data()); //printf("handleLinkedWord(%s) g_context=%s\n",name.data(),g_context.data());
if (!g_insideHtmlLink && if (!g_insideHtmlLink &&
(resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member) (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member,TRUE,fd)
|| (!g_context.isEmpty() && // also try with global scope || (!g_context.isEmpty() && // also try with global scope
resolveRef("",g_token->name,g_inSeeBlock,&compound,&member)) resolveRef("",g_token->name,g_inSeeBlock,&compound,&member))
) )
...@@ -1412,7 +1414,7 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter) ...@@ -1412,7 +1414,7 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
DBG(("decodeSymbol(%s) l=%d\n",symName.data(),l)); DBG(("decodeSymbol(%s) l=%d\n",symName.data(),l));
if (symName=="&copy;") return DocSymbol::Copy; if (symName=="&copy;") return DocSymbol::Copy;
else if (symName=="&trade;") return DocSymbol::Tm; else if (symName=="&trade;") return DocSymbol::Tm;
else if (symName=="&tm;") return DocSymbol::Tm; // alias for &trace; else if (symName=="&tm;") return DocSymbol::Tm; // alias for &trade;
else if (symName=="&reg;") return DocSymbol::Reg; else if (symName=="&reg;") return DocSymbol::Reg;
else if (symName=="&lt;") return DocSymbol::Less; else if (symName=="&lt;") return DocSymbol::Less;
else if (symName=="&gt;") return DocSymbol::Greater; else if (symName=="&gt;") return DocSymbol::Greater;
...@@ -1427,6 +1429,8 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter) ...@@ -1427,6 +1429,8 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
else if (symName=="&mdash;") return DocSymbol::Mdash; else if (symName=="&mdash;") return DocSymbol::Mdash;
else if (symName=="&szlig;") return DocSymbol::Szlig; else if (symName=="&szlig;") return DocSymbol::Szlig;
else if (symName=="&nbsp;") return DocSymbol::Nbsp; else if (symName=="&nbsp;") return DocSymbol::Nbsp;
else if (symName=="&AElig;") return DocSymbol::AElig;
else if (symName=="&aelig;") return DocSymbol::Aelig;
else if (l==6 && symName.right(4)=="uml;") else if (l==6 && symName.right(4)=="uml;")
{ {
*letter=symName.at(1); *letter=symName.at(1);
......
...@@ -326,7 +326,7 @@ class DocSymbol : public DocNode ...@@ -326,7 +326,7 @@ class DocSymbol : public DocNode
enum SymType { Unknown=0, BSlash,At,Less,Greater,Amp,Dollar,Hash,Percent, enum SymType { Unknown=0, BSlash,At,Less,Greater,Amp,Dollar,Hash,Percent,
Copy, Tm, Reg, Apos, Quot, Uml, Acute, Grave, Circ, Tilde, Copy, Tm, Reg, Apos, Quot, Uml, Acute, Grave, Circ, Tilde,
Szlig, Cedil, Ring, Nbsp, Slash, Lsquo, Rsquo, Ldquo, Rdquo, Szlig, Cedil, Ring, Nbsp, Slash, Lsquo, Rsquo, Ldquo, Rdquo,
Ndash, Mdash Ndash, Mdash, Aelig, AElig
}; };
DocSymbol(DocNode *parent,SymType s,char letter='\0') : DocSymbol(DocNode *parent,SymType s,char letter='\0') :
m_parent(parent), m_symbol(s), m_letter(letter) {} m_parent(parent), m_symbol(s), m_letter(letter) {}
......
...@@ -123,6 +123,8 @@ void HtmlDocVisitor::visit(DocSymbol *s) ...@@ -123,6 +123,8 @@ void HtmlDocVisitor::visit(DocSymbol *s)
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break; case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break;
case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break; case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break;
case DocSymbol::Nbsp: m_t << "&nbsp;"; break; case DocSymbol::Nbsp: m_t << "&nbsp;"; break;
case DocSymbol::AElig: m_t << "&AElig;"; break;
case DocSymbol::Aelig: m_t << "&aelig;"; break;
default: default:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
} }
...@@ -1009,13 +1011,13 @@ void HtmlDocVisitor::visitPre(DocXRefItem *x) ...@@ -1009,13 +1011,13 @@ void HtmlDocVisitor::visitPre(DocXRefItem *x)
bool anonymousEnum = x->file()=="@"; bool anonymousEnum = x->file()=="@";
if (!anonymousEnum) if (!anonymousEnum)
{ {
m_t << "<dl compact><dt><b><a class=\"el\" href=\"" m_t << "<dl class=\"" << x->key() << "\" compact><dt><b><a class=\"el\" href=\""
<< x->relPath() << x->file() << Doxygen::htmlFileExtension << x->relPath() << x->file() << Doxygen::htmlFileExtension
<< "#" << x->anchor() << "\">"; << "#" << x->anchor() << "\">";
} }
else else
{ {
m_t << "<dl compact><dt><b>"; m_t << "<dl class=\"" << x->key() << "\" compact><dt><b>";
} }
filter(x->title()); filter(x->title());
m_t << ":"; m_t << ":";
......
...@@ -194,6 +194,8 @@ void LatexDocVisitor::visit(DocSymbol *s) ...@@ -194,6 +194,8 @@ void LatexDocVisitor::visit(DocSymbol *s)
case DocSymbol::Cedil: m_t << "\\c{" << s->letter() << "}"; break; case DocSymbol::Cedil: m_t << "\\c{" << s->letter() << "}"; break;
case DocSymbol::Ring: m_t << "\\" << s->letter() << s->letter(); break; case DocSymbol::Ring: m_t << "\\" << s->letter() << s->letter(); break;
case DocSymbol::Nbsp: m_t << "~"; break; case DocSymbol::Nbsp: m_t << "~"; break;
case DocSymbol::AElig: m_t << "{\\AE}"; break;
case DocSymbol::Aelig: m_t << "{\\ae}"; break;
default: default:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
} }
......
...@@ -304,6 +304,7 @@ static void writeDefaultStyleSheetPart1(QTextStream &t) ...@@ -304,6 +304,7 @@ static void writeDefaultStyleSheetPart1(QTextStream &t)
t << "\\ProvidesPackage{doxygen}\n"; t << "\\ProvidesPackage{doxygen}\n";
t << "\\RequirePackage{calc}\n"; t << "\\RequirePackage{calc}\n";
t << "\\RequirePackage{array}\n"; t << "\\RequirePackage{array}\n";
t << "\\RequirePackage{color}\n";
t << "\\pagestyle{fancyplain}\n"; t << "\\pagestyle{fancyplain}\n";
//t << "\\addtolength{\\headwidth}{\\marginparsep}\n"; //t << "\\addtolength{\\headwidth}{\\marginparsep}\n";
//t << "\\addtolength{\\headwidth}{\\marginparwidth}\n"; //t << "\\addtolength{\\headwidth}{\\marginparwidth}\n";
......
...@@ -561,6 +561,8 @@ void PerlModDocVisitor::visit(DocSymbol *sy) ...@@ -561,6 +561,8 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
case DocSymbol::Reg: symbol = "registered"; break; case DocSymbol::Reg: symbol = "registered"; break;
case DocSymbol::Szlig: symbol = "szlig"; break; case DocSymbol::Szlig: symbol = "szlig"; break;
case DocSymbol::Apos: s = "\\\'"; break; case DocSymbol::Apos: s = "\\\'"; break;
case DocSymbol::Aelig: symbol = "aelig"; break;
case DocSymbol::AElig: symbol = "AElig"; break;
case DocSymbol::Unknown: case DocSymbol::Unknown:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
break; break;
......
...@@ -83,6 +83,8 @@ class PrintDocVisitor : public DocVisitor ...@@ -83,6 +83,8 @@ class PrintDocVisitor : public DocVisitor
case DocSymbol::Cedil: printf("&%ccedul;",s->letter()); break; case DocSymbol::Cedil: printf("&%ccedul;",s->letter()); break;
case DocSymbol::Ring: printf("&%cring;",s->letter()); break; case DocSymbol::Ring: printf("&%cring;",s->letter()); break;
case DocSymbol::Nbsp: printf("&nbsp;"); break; case DocSymbol::Nbsp: printf("&nbsp;"); break;
case DocSymbol::Aelig: printf("&aelig;"); break;
case DocSymbol::AElig: printf("&AElig;"); break;
default: default:
printf("Error: unknown symbol found\n"); printf("Error: unknown symbol found\n");
} }
......
...@@ -219,6 +219,8 @@ void RTFDocVisitor::visit(DocSymbol *s) ...@@ -219,6 +219,8 @@ void RTFDocVisitor::visit(DocSymbol *s)
break; break;
case DocSymbol::Szlig: m_t << "\337"; break; case DocSymbol::Szlig: m_t << "\337"; break;
case DocSymbol::Nbsp: m_t << "\\~ "; break; case DocSymbol::Nbsp: m_t << "\\~ "; break;
case DocSymbol::Aelig: m_t << "\346"; break;
case DocSymbol::AElig: m_t << "\306"; break;
default: default:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
} }
......
...@@ -554,7 +554,7 @@ static int yyread(char *buf,int max_size) ...@@ -554,7 +554,7 @@ static int yyread(char *buf,int max_size)
/* start command character */ /* start command character */
CMD ("\\"|"@") CMD ("\\"|"@")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"callergraph"|"latexonly"|"htmlonly"|"xmlonly"|"{"|"verbatim"|"dotfile"|"dot"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"details"|"typedef"|"def"|"overload")|("<"{PRE}">") SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"callergraph"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"{"|"verbatim"|"dotfile"|"dot"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"details"|"typedef"|"def"|"overload")|("<"{PRE}">")
BN [ \t\n\r] BN [ \t\n\r]
BL [ \t\r]*"\n" BL [ \t\r]*"\n"
B [ \t] B [ \t]
...@@ -3623,7 +3623,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -3623,7 +3623,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
fullArgString+=yytext; fullArgString+=yytext;
BEGIN(CopyArgVerbatim); BEGIN(CopyArgVerbatim);
} }
<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9] { // end of verbatim block <CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9] { // end of verbatim block
fullArgString+=yytext; fullArgString+=yytext;
if (yytext[1]=='f') // end of formula if (yytext[1]=='f') // end of formula
{ {
...@@ -5144,7 +5144,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -5144,7 +5144,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
docBlock+=yytext; docBlock+=yytext;
BEGIN(DocBlock); BEGIN(DocBlock);
} }
<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block <DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endmanonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
docBlock+=yytext; docBlock+=yytext;
if (&yytext[4]==docBlockName) if (&yytext[4]==docBlockName)
{ {
......
...@@ -55,6 +55,8 @@ void TextDocVisitor::visit(DocSymbol *s) ...@@ -55,6 +55,8 @@ void TextDocVisitor::visit(DocSymbol *s)
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break; case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break;
case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break; case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break;
case DocSymbol::Nbsp: m_t << "&nbsp;"; break; case DocSymbol::Nbsp: m_t << "&nbsp;"; break;
case DocSymbol::Aelig: m_t << "&aelig;"; break;
case DocSymbol::AElig: m_t << "&AElig;"; break;
default: default:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
} }
......
This diff is collapsed.
...@@ -3551,6 +3551,51 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr ...@@ -3551,6 +3551,51 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
} }
} }
static void findMembersWithSpecificName(MemberName *mn,
const char *args,
bool checkStatics,
FileDef *currentFile,
bool checkCV,
QList<MemberDef> &members)
{
//printf(" Function with global scope name `%s' args=`%s'\n",memberName.data(),args);
MemberListIterator mli(*mn);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
FileDef *fd=md->getFileDef();
GroupDef *gd=md->getGroupDef();
//printf(" md->name()=`%s' md->args=`%s' fd=%p gd=%p\n",
// md->name().data(),args,fd,gd);
if (
((gd && gd->isLinkable()) || (fd && fd->isLinkable())) &&
md->getNamespaceDef()==0 && md->isLinkable() &&
(!checkStatics || !md->isStatic() || currentFile==0 || fd==currentFile) // statics must appear in the same file
)
{
//printf(" fd=%p gd=%p args=`%s'\n",fd,gd,args);
bool match=TRUE;
ArgumentList *argList=0;
if (args && !md->isDefine() && strcmp(args,"()")!=0)
{
argList=new ArgumentList;
LockingPtr<ArgumentList> mdAl = md->argumentList();
stringToArgumentList(args,argList);
match=matchArguments2(
md->getOuterScope(),fd,mdAl.pointer(),
Doxygen::globalScope,fd,argList,
checkCV);
delete argList; argList=0;
}
if (match)
{
//printf("Found match!\n");
members.append(md);
}
}
}
}
/*! /*!
* Searches for a member definition given its name `memberName' as a string. * Searches for a member definition given its name `memberName' as a string.
* memberName may also include a (partial) scope to indicate the scope * memberName may also include a (partial) scope to indicate the scope
...@@ -3886,7 +3931,15 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -3886,7 +3931,15 @@ bool getDefs(const QCString &scName,const QCString &memberName,
//else // no scope => global function //else // no scope => global function
{ {
QList<MemberDef> members; QList<MemberDef> members;
// search for matches with strict static checking
findMembersWithSpecificName(mn,args,TRUE,currentFile,checkCV,members);
if (members.count()==0) // nothing found
{
// search again without strict static checking
findMembersWithSpecificName(mn,args,FALSE,currentFile,checkCV,members);
}
#if 0
//printf(" Function with global scope name `%s' args=`%s'\n",memberName.data(),args); //printf(" Function with global scope name `%s' args=`%s'\n",memberName.data(),args);
MemberListIterator mli(*mn); MemberListIterator mli(*mn);
for (mli.toFirst();(md=mli.current());++mli) for (mli.toFirst();(md=mli.current());++mli)
...@@ -3897,7 +3950,8 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -3897,7 +3950,8 @@ bool getDefs(const QCString &scName,const QCString &memberName,
// md->name().data(),args,fd,gd); // md->name().data(),args,fd,gd);
if ( if (
((gd && gd->isLinkable()) || (fd && fd->isLinkable())) && ((gd && gd->isLinkable()) || (fd && fd->isLinkable())) &&
md->getNamespaceDef()==0 && md->isLinkable() md->getNamespaceDef()==0 && md->isLinkable() &&
(!md->isStatic() || fd==currentFile) // statics must appear in the same file
) )
{ {
//printf(" fd=%p gd=%p args=`%s'\n",fd,gd,args); //printf(" fd=%p gd=%p args=`%s'\n",fd,gd,args);
...@@ -3921,6 +3975,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -3921,6 +3975,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
} }
} }
} }
#endif
if (members.count()!=1 && args && !strcmp(args,"()")) if (members.count()!=1 && args && !strcmp(args,"()"))
{ {
// no exact match found, but if args="()" an arbitrary // no exact match found, but if args="()" an arbitrary
...@@ -3942,32 +3997,9 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -3942,32 +3997,9 @@ bool getDefs(const QCString &scName,const QCString &memberName,
} }
} }
//printf("found %d candidate members\n",members.count()); //printf("found %d candidate members\n",members.count());
if (members.count()==1 || currentFile!=0) if (members.count()>0) // at least one match
{
md=members.first();
}
else if (members.count()>1)
{
//printf("Found more than one matching member!\n");
// use some C scoping rules to determine the correct link
// 1. member in current file
// 2. non-static member in different file
if (currentFile==0)
{
bool ambig;
currentFile = findFileDef(Doxygen::inputNameDict,0/*namespaceName*/,ambig);
}
MemberDef *bmd = 0;
for (md=members.first(); md; md=members.next())
{
if (currentFile && md->getBodyDef()==currentFile)
{ {
bmd = 0; md=members.last();
break;
}
if (!md->isStatic() || Config_getBool("EXTRACT_STATIC")) bmd = md;
}
if (bmd) md=bmd;
} }
if (md) // found a matching global member if (md) // found a matching global member
{ {
...@@ -4062,7 +4094,8 @@ bool resolveRef(/* in */ const char *scName, ...@@ -4062,7 +4094,8 @@ bool resolveRef(/* in */ const char *scName,
/* in */ bool inSeeBlock, /* in */ bool inSeeBlock,
/* out */ Definition **resContext, /* out */ Definition **resContext,
/* out */ MemberDef **resMember, /* out */ MemberDef **resMember,
bool lookForSpecialization bool lookForSpecialization,
FileDef *currentFile
) )
{ {
QCString tsName = name; QCString tsName = name;
...@@ -4155,7 +4188,7 @@ bool resolveRef(/* in */ const char *scName, ...@@ -4155,7 +4188,7 @@ bool resolveRef(/* in */ const char *scName,
if (getDefs(scopeStr,nameStr,argsStr, if (getDefs(scopeStr,nameStr,argsStr,
md,cd,fd,nd,gd, md,cd,fd,nd,gd,
scopePos==0 && !memberScopeFirst, scopePos==0 && !memberScopeFirst,
0, currentFile,
TRUE TRUE
) )
) )
......
...@@ -136,7 +136,8 @@ bool resolveRef(/* in */ const char *scName, ...@@ -136,7 +136,8 @@ bool resolveRef(/* in */ const char *scName,
/* in */ bool inSeeBlock, /* in */ bool inSeeBlock,
/* out */ Definition **resContext, /* out */ Definition **resContext,
/* out */ MemberDef **resMember, /* out */ MemberDef **resMember,
/* in */ bool lookForSpecializations = TRUE /* in */ bool lookForSpecializations = TRUE,
/* in */ FileDef *currentFile = 0
); );
bool resolveLink(/* in */ const char *scName, bool resolveLink(/* in */ const char *scName,
......
...@@ -75,7 +75,7 @@ static const char* g_vhdlKeyWordMap0[] = ...@@ -75,7 +75,7 @@ static const char* g_vhdlKeyWordMap0[] =
"range", "record", "register", "reject", "report", "return","select", "range", "record", "register", "reject", "report", "return","select",
"severity", "shared", "signal", "subtype", "then", "to", "transport", "severity", "shared", "signal", "subtype", "then", "to", "transport",
"type","unaffected", "units", "until", "use","variable", "wait", "when", "type","unaffected", "units", "until", "use","variable", "wait", "when",
"while", "with","true","false",0 "while", "with","true","false","protected",0
}; };
// type // type
......
...@@ -417,6 +417,7 @@ static void parseFunctionProto() ...@@ -417,6 +417,7 @@ static void parseFunctionProto()
VhdlDocGen::parseFuncProto(qcs.data(),ql,name,ret); VhdlDocGen::parseFuncProto(qcs.data(),ql,name,ret);
//printf("parseFuncProto(%s)=%s,%s\n",qcs.data(),name.data(),ret.data()); //printf("parseFuncProto(%s)=%s,%s\n",qcs.data(),name.data(),ret.data());
VhdlDocGen::deleteAllChars(name,';');
current->name=name; current->name=name;
current->startLine=iFuncLine; current->startLine=iFuncLine;
current->bodyLine=iFuncLine; current->bodyLine=iFuncLine;
...@@ -639,6 +640,11 @@ BRACECLOSE [)]{1} ...@@ -639,6 +640,11 @@ BRACECLOSE [)]{1}
ALLID [^;()\t ] ALLID [^;()\t ]
/* VHDL 2001 */
ENDPROTECTED ("end"{BR}+"protected"{BR}+{NAME}{BR}*";")|("end"{BR}+"protected"{BR}*";")
ENDPROTECEDBODY "end"{BR}+"protected"{BR}+"body"{BR}+{NAME}
%option noyywrap %option noyywrap
/* language parsing states */ /* language parsing states */
...@@ -661,6 +667,12 @@ ALLID [^;()\t ] ...@@ -661,6 +667,12 @@ ALLID [^;()\t ]
%% %%
<Start>{ENDPROTECTED}|{ENDPROTECEDBODY} {
lineCount();
}
<Start>{CONFIG} { // found configuration <Start>{CONFIG} { // found configuration
QCString qcs(vhdlscanYYtext); QCString qcs(vhdlscanYYtext);
...@@ -986,6 +998,21 @@ ALLID [^;()\t ] ...@@ -986,6 +998,21 @@ ALLID [^;()\t ]
BEGIN(ParseType); BEGIN(ParseType);
} }
<ParseType>("is"){BR}+("protected"){BR}+("body") {lineCount(); BEGIN(Start); }
<ParseType>("is"){BR}+("protected"){BR}+ {
lineCount();
current->section=Entry::VARIABLE_SEC;
current->spec=VhdlDocGen::TYPE;
current->type="protected";
newEntry();
BEGIN(Start);
}
<ParseType>("is"){BR}*("record") { // find record <ParseType>("is"){BR}*("record") { // find record
lineCount(); lineCount();
if (isFunc) if (isFunc)
......
...@@ -98,6 +98,8 @@ void XmlDocVisitor::visit(DocSymbol *s) ...@@ -98,6 +98,8 @@ void XmlDocVisitor::visit(DocSymbol *s)
case DocSymbol::Ring: m_t << "<ring char=\"" << s->letter() << "\"/>"; break; case DocSymbol::Ring: m_t << "<ring char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Slash: m_t << "<slash char=\"" << s->letter() << "\"/>"; break; case DocSymbol::Slash: m_t << "<slash char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Nbsp: m_t << "<nonbreakablespace/>"; break; case DocSymbol::Nbsp: m_t << "<nonbreakablespace/>"; break;
case DocSymbol::Aelig: m_t << "<aelig/>"; break;
case DocSymbol::AElig: m_t << "<AElig/>"; break;
default: default:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
} }
......
...@@ -1556,6 +1556,10 @@ ...@@ -1556,6 +1556,10 @@
RelativePath="..\src\portable.cpp" RelativePath="..\src\portable.cpp"
> >
</File> </File>
<File
RelativePath="..\src\portable_c.c"
>
</File>
<File <File
RelativePath="..\src\pre.cpp" RelativePath="..\src\pre.cpp"
> >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment