Commit f1dfb258 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.3.9.1-20041221

parent a17029cb
DOXYGEN Version 1.3.9.1-20041213 DOXYGEN Version 1.3.9.1-20041221
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 (13 December 2004) Dimitri van Heesch (21 December 2004)
DOXYGEN Version 1.3.9.1_20041213 DOXYGEN Version 1.3.9.1_20041221
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) (13 December 2004) Dimitri van Heesch (dimitri@stack.nl) (21 December 2004)
1.3.9.1-20041213 1.3.9.1-20041221
...@@ -180,7 +180,7 @@ if test -z "$f_platform"; then ...@@ -180,7 +180,7 @@ if test -z "$f_platform"; then
f_platform=sunos-g++ f_platform=sunos-g++
;; ;;
SunOS:5*) SunOS:5*)
f_platform=solaris-cc f_platform=solaris-g++
;; ;;
ULTRIX:*) ULTRIX:*)
f_platform=ultrix-g++ f_platform=ultrix-g++
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.9.1_20041213 Version: 1.3.9.1_20041221
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -117,7 +117,9 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) ...@@ -117,7 +117,9 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
name += yytext; name += yytext;
BEGIN(Operator); BEGIN(Operator);
} }
<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]
addTypeName(); addTypeName();
name += yytext; name += yytext;
} }
...@@ -331,3 +333,11 @@ int main() ...@@ -331,3 +333,11 @@ int main()
dumpDecl("void ( * Name < T > :: bla ) ( int, char * )"); dumpDecl("void ( * Name < T > :: bla ) ( int, char * )");
} }
#endif #endif
#if !defined(YY_FLEX_SUBMINOR_VERSION)
//----------------------------------------------------------------------------
extern "C" { // some bogus code to keep the compiler happy
void declinfoYYdummy() { yy_flex_realloc(0,0); }
}
#endif
...@@ -563,12 +563,18 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -563,12 +563,18 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName) void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName)
{ {
if (Config_getBool("REFERENCED_BY_RELATION"))
{
writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_sourceRefByDict,FALSE); writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_sourceRefByDict,FALSE);
}
} }
void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
{ {
if (Config_getBool("REFERENCES_RELATION"))
{
writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_sourceRefsDict,TRUE); writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_sourceRefsDict,TRUE);
}
} }
bool Definition::hasDocumentation() const bool Definition::hasDocumentation() const
...@@ -758,7 +764,6 @@ void Definition::writePathFragment(OutputList &ol) const ...@@ -758,7 +764,6 @@ void Definition::writePathFragment(OutputList &ol) const
if (m_outerScope && m_outerScope!=Doxygen::globalScope) if (m_outerScope && m_outerScope!=Doxygen::globalScope)
{ {
m_outerScope->writePathFragment(ol); m_outerScope->writePathFragment(ol);
ol.writeString("&nbsp;");
if (m_outerScope->definitionType()==Definition::TypeClass || if (m_outerScope->definitionType()==Definition::TypeClass ||
m_outerScope->definitionType()==Definition::TypeNamespace) m_outerScope->definitionType()==Definition::TypeNamespace)
{ {
...@@ -773,11 +778,21 @@ void Definition::writePathFragment(OutputList &ol) const ...@@ -773,11 +778,21 @@ void Definition::writePathFragment(OutputList &ol) const
} }
else else
{ {
ol.writeString("&nbsp;");
ol.writeString("/"); ol.writeString("/");
}
ol.writeString("&nbsp;"); ol.writeString("&nbsp;");
} }
}
if (isLinkable())
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName); ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
}
else
{
ol.startBold();
ol.docify(m_localName);
ol.endBold();
}
} }
void Definition::writeNavigationPath(OutputList &ol) const void Definition::writeNavigationPath(OutputList &ol) const
......
...@@ -222,7 +222,7 @@ void DirDef::writeDocumentation(OutputList &ol) ...@@ -222,7 +222,7 @@ void DirDef::writeDocumentation(OutputList &ol)
else else
{ {
ol.startBold(); ol.startBold();
ol.writeString(fd->name()); ol.docify(fd->name());
ol.endBold(); ol.endBold();
} }
if (fd->generateSourceFile()) if (fd->generateSourceFile())
......
...@@ -279,11 +279,24 @@ static void checkArgumentName(const QString &name,bool isParam) ...@@ -279,11 +279,24 @@ static void checkArgumentName(const QString &name,bool isParam)
//printf("member type=%d\n",memberDef->memberType()); //printf("member type=%d\n",memberDef->memberType());
QString scope=g_memberDef->getScopeString(); QString scope=g_memberDef->getScopeString();
if (!scope.isEmpty()) scope+="::"; else scope=""; if (!scope.isEmpty()) scope+="::"; else scope="";
warn_doc_error(g_memberDef->docFile(),g_memberDef->docLine(), QString inheritedFrom = "";
QString docFile = g_memberDef->docFile();
int docLine = g_memberDef->docLine();
MemberDef *inheritedMd = g_memberDef->inheritsDocsFrom();
if (inheritedMd) // documentation was inherited
{
inheritedFrom.sprintf(" inherited from member %s at line "
"%d in file %s",inheritedMd->name().data(),
inheritedMd->docLine(),inheritedMd->docFile().data());
docFile = g_memberDef->getDefFileName();
docLine = g_memberDef->getDefLine();
}
warn_doc_error(docFile,docLine,
"Warning: argument `%s' of command @param " "Warning: argument `%s' of command @param "
"is not found in the argument list of %s%s%s", "is not found in the argument list of %s%s%s%s",
aName.data(),scope.data(),g_memberDef->name().data(), aName.data(),scope.data(),g_memberDef->name().data(),
argListToString(al).data()); argListToString(al).data(),inheritedFrom.data());
} }
p=i+l; p=i+l;
} }
...@@ -331,10 +344,17 @@ static void checkUndocumentedParams() ...@@ -331,10 +344,17 @@ static void checkUndocumentedParams()
errMsg+=" parameter "+argName+"\n"; errMsg+=" parameter "+argName+"\n";
} }
} }
if (g_memberDef->inheritsDocsFrom())
{
warn_doc_error(g_memberDef->getDefFileName(),g_memberDef->getDefLine(),errMsg);
}
else
{
warn_doc_error(g_memberDef->docFile(),g_memberDef->docLine(),errMsg); warn_doc_error(g_memberDef->docFile(),g_memberDef->docLine(),errMsg);
} }
} }
} }
}
} }
/*! Check if a member has documentation for its parameter and or return /*! Check if a member has documentation for its parameter and or return
...@@ -1596,9 +1616,17 @@ bool DocXRefItem::parse() ...@@ -1596,9 +1616,17 @@ bool DocXRefItem::parse()
RefItem *item = refList->getRefItem(m_id); RefItem *item = refList->getRefItem(m_id);
ASSERT(item!=0); ASSERT(item!=0);
if (item) if (item)
{
if (g_memberDef && g_memberDef->name().at(0)=='@')
{
m_file = "@"; // can't cross reference anonymous enum
m_anchor = "@";
}
else
{ {
m_file = refList->listName(); m_file = refList->listName();
m_anchor = item->listAnchor; m_anchor = item->listAnchor;
}
m_title = refList->sectionTitle(); m_title = refList->sectionTitle();
//printf("DocXRefItem: file=%s anchor=%s title=%s\n", //printf("DocXRefItem: file=%s anchor=%s title=%s\n",
// m_file.data(),m_anchor.data(),m_title.data()); // m_file.data(),m_anchor.data(),m_title.data());
......
...@@ -317,6 +317,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|" ...@@ -317,6 +317,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU} HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]* LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
%option noyywrap %option noyywrap
%option yylineno %option yylineno
...@@ -666,7 +667,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -666,7 +667,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
return 0; return 0;
} }
<St_Ref>("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID} { <St_Ref>{REFWORD} {
g_token->name=yytext; g_token->name=yytext;
return TK_WORD; return TK_WORD;
} }
......
...@@ -543,6 +543,20 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList &ml,ClassDef ...@@ -543,6 +543,20 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList &ml,ClassDef
t << "\\l"; t << "\\l";
} }
} }
// write member groups within the memberlist
MemberGroupList *mgl = ml.getMemberGroupList();
if (mgl)
{
MemberGroupListIterator mgli(*mgl);
MemberGroup *mg;
for (mgli.toFirst();(mg=mgli.current());++mgli)
{
if (mg->members())
{
writeBoxMemberList(t,prot,*mg->members(),scope);
}
}
}
} }
void DotNode::writeBox(QTextStream &t, void DotNode::writeBox(QTextStream &t,
...@@ -582,6 +596,18 @@ void DotNode::writeBox(QTextStream &t, ...@@ -582,6 +596,18 @@ void DotNode::writeBox(QTextStream &t,
writeBoxMemberList(t,'-',m_classDef->priMethods,m_classDef); writeBoxMemberList(t,'-',m_classDef->priMethods,m_classDef);
writeBoxMemberList(t,'-',m_classDef->priStaticMethods,m_classDef); writeBoxMemberList(t,'-',m_classDef->priStaticMethods,m_classDef);
writeBoxMemberList(t,'-',m_classDef->priSlots,m_classDef); writeBoxMemberList(t,'-',m_classDef->priSlots,m_classDef);
if (m_classDef->memberGroupSDict)
{
MemberGroupSDict::Iterator mgdi(*m_classDef->memberGroupSDict);
MemberGroup *mg;
for (mgdi.toFirst();(mg=mgdi.current());++mgdi)
{
if (mg->members())
{
writeBoxMemberList(t,'*',*mg->members(),m_classDef);
}
}
}
t << "}"; t << "}";
} }
else // old look else // old look
...@@ -2851,7 +2877,7 @@ void DotGroupCollaboration::addCollaborationMember( ...@@ -2851,7 +2877,7 @@ void DotGroupCollaboration::addCollaborationMember(
QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat format, QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat format,
const char *path, const char *, const char *path, const char *relPath,
bool writeImageMap) bool writeImageMap)
{ {
QDir d(path); QDir d(path);
...@@ -2922,11 +2948,11 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo ...@@ -2922,11 +2948,11 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo
if (writeImageMap) if (writeImageMap)
{ {
QCString mapLabel = convertNameToFile(baseName); QCString mapLabel = convertNameToFile(baseName);
t << "<center><table><tr><td><img src=\"" << imgName t << "<center><table><tr><td><img src=\"" << relPath << imgName
<< "\" border=\"0\" alt=\"\" usemap=\"#" << "\" border=\"0\" alt=\"\" usemap=\"#"
<< mapLabel << "_map\">" << endl; << mapLabel << "_map\">" << endl;
t << "<map name=\"" << mapLabel << "_map\">" << endl; t << "<map name=\"" << mapLabel << "_map\">" << endl;
convertMapFile(t,mapName,""); convertMapFile(t,mapName,relPath);
t << "</map></td></tr></table></center>" << endl; t << "</map></td></tr></table></center>" << endl;
thisDir.remove(mapName); thisDir.remove(mapName);
} }
......
...@@ -3431,8 +3431,11 @@ static bool findClassRelation( ...@@ -3431,8 +3431,11 @@ static bool findClassRelation(
cd->getFileDef(), // todo: is this ok? cd->getFileDef(), // todo: is this ok?
baseClassName, baseClassName,
&baseClassTypeDef, &baseClassTypeDef,
&templSpec); &templSpec,
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd); mode==Undocumented
);
//printf("baseClassName=%s baseClass=%p cd=%p explicitGlobalScope=%d\n",
// baseClassName.data(),baseClass,cd,explicitGlobalScope);
//printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n", //printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
// root->name.data(), // root->name.data(),
// baseClassName.data(), // baseClassName.data(),
...@@ -3530,7 +3533,7 @@ static bool findClassRelation( ...@@ -3530,7 +3533,7 @@ static bool findClassRelation(
{ {
findTemplateInstanceRelation(root,context,baseClass,templSpec,templateNames,isArtificial); findTemplateInstanceRelation(root,context,baseClass,templSpec,templateNames,isArtificial);
} }
else if (mode==DocumentedOnly) else if (mode==DocumentedOnly || mode==Undocumented)
{ {
QCString usedName; QCString usedName;
if (baseClassTypeDef) if (baseClassTypeDef)
...@@ -4243,7 +4246,8 @@ static bool findGlobalMember(Entry *root, ...@@ -4243,7 +4246,8 @@ static bool findGlobalMember(Entry *root,
} }
else // got docs for an undefined member! else // got docs for an undefined member!
{ {
if (root->type!="friend class" && root->type!="friend struct" && if (root->type!="friend class" &&
root->type!="friend struct" &&
root->type!="friend union") root->type!="friend union")
{ {
warn(root->fileName,root->startLine, warn(root->fileName,root->startLine,
...@@ -4879,10 +4883,12 @@ static void findMember(Entry *root, ...@@ -4879,10 +4883,12 @@ static void findMember(Entry *root,
int candidates=0; int candidates=0;
if (mn->count()>0) if (mn->count()>0)
{ {
//printf("Assume template class\n");
for (mni.toFirst();(md=mni.current());++mni) for (mni.toFirst();(md=mni.current());++mni)
{ {
ClassDef *cd=md->getClassDef(); ClassDef *cd=md->getClassDef();
if (cd!=0 && cd->name()==className) //printf("cd->name()==%s className=%s\n",cd->name().data(),className.data());
if (cd!=0 && rightScopeMatch(cd->name(),className))
{ {
if (root->tArgLists && md->templateArguments() && if (root->tArgLists && md->templateArguments() &&
root->tArgLists->getLast()->count()<=md->templateArguments()->count()) root->tArgLists->getLast()->count()<=md->templateArguments()->count())
...@@ -6175,6 +6181,7 @@ static void inheritDocumentation() ...@@ -6175,6 +6181,7 @@ static void inheritDocumentation()
} }
if (bmd) // copy the documentation from the reimplemented member if (bmd) // copy the documentation from the reimplemented member
{ {
md->setInheritsDocsFrom(bmd);
md->setDocumentation(bmd->documentation(),bmd->docFile(),bmd->docLine()); md->setDocumentation(bmd->documentation(),bmd->docFile(),bmd->docLine());
md->setDocsForDefinition(bmd->isDocsForDefinition()); md->setDocsForDefinition(bmd->isDocsForDefinition());
md->setBriefDescription(bmd->briefDescription(),bmd->briefFile(),bmd->briefLine()); md->setBriefDescription(bmd->briefDescription(),bmd->briefFile(),bmd->briefLine());
......
...@@ -630,7 +630,7 @@ void FTVHelp::generateTreeView() ...@@ -630,7 +630,7 @@ void FTVHelp::generateTreeView()
#endif #endif
t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"; t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
t << " <head>\n"; t << " <head>\n";
t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=\"" t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset="
<< theTranslator->idLanguageCharset() << "\" />\n"; << theTranslator->idLanguageCharset() << "\" />\n";
t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n"; t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n";
t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n"; t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n";
......
...@@ -923,10 +923,21 @@ void HtmlDocVisitor::visitPost(DocParamList *) ...@@ -923,10 +923,21 @@ void HtmlDocVisitor::visitPost(DocParamList *)
void HtmlDocVisitor::visitPre(DocXRefItem *x) void HtmlDocVisitor::visitPre(DocXRefItem *x)
{ {
if (m_hide) return; if (m_hide) return;
bool anonymousEnum = x->file()=="@";
if (!anonymousEnum)
{
m_t << "<dl compact><dt><b><a class=\"el\" href=\"" m_t << "<dl compact><dt><b><a class=\"el\" href=\""
<< x->relPath() << x->file() << Doxygen::htmlFileExtension << "#" << x->anchor() << "\">"; << x->relPath() << x->file() << Doxygen::htmlFileExtension
<< "#" << x->anchor() << "\">";
}
else
{
m_t << "<dl compact><dt><b>";
}
filter(x->title()); filter(x->title());
m_t << ":</a></b></dt><dd>"; m_t << ":";
if (!anonymousEnum) m_t << "</a>";
m_t << "</b></dt><dd>";
} }
void HtmlDocVisitor::visitPost(DocXRefItem *) void HtmlDocVisitor::visitPost(DocXRefItem *)
......
...@@ -1108,7 +1108,7 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const ...@@ -1108,7 +1108,7 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const
{ {
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;) DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
t << "<p>" << endl; t << "<p>" << endl;
t << "<table class=\"mdTable\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\">" << endl; t << "<table class=\"mdTable\" cellpadding=\"2\" cellspacing=\"0\">" << endl;
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td class=\"mdRow\">" << endl; t << " <td class=\"mdRow\">" << endl;
t << " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl; t << " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
......
...@@ -603,6 +603,7 @@ int countClassHierarchy() ...@@ -603,6 +603,7 @@ int countClassHierarchy()
void writeHierarchicalIndex(OutputList &ol) void writeHierarchicalIndex(OutputList &ol)
{ {
//printf("writeHierarchicalIndex: %d classes\n",hierarchyClasses);
if (hierarchyClasses==0) return; if (hierarchyClasses==0) return;
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
......
...@@ -930,8 +930,9 @@ void LatexDocVisitor::visitPre(DocXRefItem *x) ...@@ -930,8 +930,9 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\\begin{Desc}" << endl; m_t << "\\begin{Desc}" << endl;
bool anonymousEnum = x->file()=="@";
m_t << "\\item["; m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS") && !anonymousEnum)
{ {
m_t << "\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{"; m_t << "\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
} }
......
...@@ -425,6 +425,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -425,6 +425,7 @@ MemberDef::MemberDef(const char *df,int dl,
groupMember = 0; groupMember = 0;
m_hasDocumentedParams = FALSE; m_hasDocumentedParams = FALSE;
m_hasDocumentedReturnType = FALSE; m_hasDocumentedReturnType = FALSE;
m_docProvider = 0;
} }
/*! Destroys the member definition. */ /*! Destroys the member definition. */
......
...@@ -181,8 +181,9 @@ class MemberDef : public Definition ...@@ -181,8 +181,9 @@ class MemberDef : public Definition
void makeRelated() { related=TRUE; } void makeRelated() { related=TRUE; }
void setHasDocumentedParams(bool b) { m_hasDocumentedParams = b; } void setHasDocumentedParams(bool b) { m_hasDocumentedParams = b; }
void setHasDocumentedReturnType(bool b) { m_hasDocumentedReturnType = b; } void setHasDocumentedReturnType(bool b) { m_hasDocumentedReturnType = b; }
void setInheritsDocsFrom(MemberDef *md) { m_docProvider = md; }
// output generatation // output generation
void writeLink(OutputList &ol, void writeLink(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
void writeDeclaration(OutputList &ol, void writeDeclaration(OutputList &ol,
...@@ -276,6 +277,8 @@ class MemberDef : public Definition ...@@ -276,6 +277,8 @@ class MemberDef : public Definition
void setTemplateMaster(MemberDef *mt) { m_templateMaster=mt; } void setTemplateMaster(MemberDef *mt) { m_templateMaster=mt; }
void addListReference(Definition *d); void addListReference(Definition *d);
MemberDef *inheritsDocsFrom() const { return m_docProvider; }
//QCString getBodyAnchor() const //QCString getBodyAnchor() const
//{ //{
// return bodyMemb ? bodyMemb->anchor() : anchor(); // return bodyMemb ? bodyMemb->anchor() : anchor();
...@@ -397,6 +400,9 @@ class MemberDef : public Definition ...@@ -397,6 +400,9 @@ class MemberDef : public Definition
bool m_hasDocumentedParams; bool m_hasDocumentedParams;
bool m_hasDocumentedReturnType; bool m_hasDocumentedReturnType;
// documentation inheritance
MemberDef *m_docProvider;
}; };
#endif #endif
...@@ -58,6 +58,7 @@ class MemberList : public QList<MemberDef> ...@@ -58,6 +58,7 @@ class MemberList : public QList<MemberDef>
void setInGroup(bool group) { m_inGroup=group; } void setInGroup(bool group) { m_inGroup=group; }
void addListReferences(Definition *def); void addListReferences(Definition *def);
void findSectionsInDocumentation(); void findSectionsInDocumentation();
MemberGroupList *getMemberGroupList() const { return memberGroupList; }
private: private:
int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt; int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt;
......
...@@ -1173,11 +1173,12 @@ void RTFDocVisitor::visitPost(DocParamList *) ...@@ -1173,11 +1173,12 @@ void RTFDocVisitor::visitPost(DocParamList *)
void RTFDocVisitor::visitPre(DocXRefItem *x) void RTFDocVisitor::visitPre(DocXRefItem *x)
{ {
if (m_hide) return; if (m_hide) return;
bool anonymousEnum = x->file()=="@";
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n"); DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n");
m_t << "{"; // start param list m_t << "{"; // start param list
//m_t << "{\\b "; // start bold //m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"]->reference << endl; m_t << "{" << rtf_Style["Heading5"]->reference << endl;
if (Config_getBool("RTF_HYPERLINKS")) if (Config_getBool("RTF_HYPERLINKS") && !anonymousEnum)
{ {
QString refName; QString refName;
if (!x->file().isEmpty()) if (!x->file().isEmpty())
......
...@@ -83,6 +83,7 @@ static int lastInternalDocContext; ...@@ -83,6 +83,7 @@ static int lastInternalDocContext;
static int lastPreLineCtrlContext; static int lastPreLineCtrlContext;
static int lastSkipVerbStringContext; static int lastSkipVerbStringContext;
static int lastCommentInArgContext; static int lastCommentInArgContext;
static int lastFileDocContext;
static int nextDefContext; static int nextDefContext;
static int overloadContext; static int overloadContext;
static Protection protection; static Protection protection;
...@@ -299,34 +300,14 @@ static QCString stripQuotes(const char *s) ...@@ -299,34 +300,14 @@ static QCString stripQuotes(const char *s)
return name; return name;
} }
//static QCString stripCComments(const QCString &s)
//{
// int p=0,i;
// QCString result;
// while ((i=s.find("/*",p))!=-1)
// {
// result+=s.mid(p,i-p);
// int ei = s.find("*/",i+1);
// if (ei!=-1)
// {
// p=ei+2;
// }
// else
// {
// return result;
// }
// }
// result+=s.right(s.length()-p);
// printf("stripCComments: input=%s output=%s\n",s.data(),result.data());
// return result;
//}
static void newDocState(); static void newDocState();
//----------------------------------------------------------------- //-----------------------------------------------------------------
static void addXRefItem(const char *listName,const char *itemTitle,const char *listTitle) static void addXRefItem(bool inBody,const char *listName,const char *itemTitle,const char *listTitle)
{ {
Entry *docEntry = inBody && previous ? previous : current;
//printf("docEntry=%p\n",docEntry);
if (listName==0) return; if (listName==0) return;
//printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle); //printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle);
...@@ -338,9 +319,9 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -338,9 +319,9 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
Doxygen::xrefLists->insert(listName,refList); Doxygen::xrefLists->insert(listName,refList);
//printf("new list!\n"); //printf("new list!\n");
} }
if (current->sli) if (docEntry->sli)
{ {
QListIterator<ListItemInfo> slii(*current->sli); QListIterator<ListItemInfo> slii(*docEntry->sli);
for (slii.toFirst();(lii=slii.current());++slii) for (slii.toFirst();(lii=slii.current());++slii)
{ {
if (strcmp(lii->type,listName)==0) if (strcmp(lii->type,listName)==0)
...@@ -350,9 +331,11 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -350,9 +331,11 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
} }
} }
} }
#if 0 // with this code multiple @todo items can be put under the same
// heading, I removed it because it changes the text flow.
if (lii) // already found item of same type before if (lii) // already found item of same type before
{ {
//printf("listName=%s item id = %d\n",listName,lii->itemId); //printf("listName=%s item id = %d existing\n",listName,lii->itemId);
RefItem *item = refList->getRefItem(lii->itemId); RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0); ASSERT(item!=0);
item->text += " <p>"; item->text += " <p>";
...@@ -360,25 +343,29 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -360,25 +343,29 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
//printf("%s: text +=%s\n",listName,item->text.data()); //printf("%s: text +=%s\n",listName,item->text.data());
} }
else // new item else // new item
#endif
{ {
int itemId = refList->addRefItem(); int itemId = refList->addRefItem();
//printf("listName=%s item id = %d\n",listName,itemId); //printf("listName=%s item id = %d new current=%p\n",listName,itemId,current);
// if we have already an item from the same list type (e.g. a second @todo)
// in the same Entry (i.e. lii!=0) then we reuse its link anchor.
char anchorLabel[1024]; char anchorLabel[1024];
sprintf(anchorLabel,"_%s%06d",listName,itemId); sprintf(anchorLabel,"_%s%06d",listName,lii ? lii->itemId : itemId);
RefItem *item = refList->getRefItem(itemId); RefItem *item = refList->getRefItem(itemId);
ASSERT(item!=0); ASSERT(item!=0);
item->text = current->brief.copy(); item->text = current->brief;
item->listAnchor = anchorLabel; item->listAnchor = anchorLabel;
current->addSpecialListItem(listName,itemId); docEntry->addSpecialListItem(listName,itemId);
QCString cmdString; QCString cmdString;
cmdString.sprintf("\\xrefitem %s %d\n",listName,itemId); cmdString.sprintf("\\xrefitem %s %d\n",listName,itemId);
current->doc += cmdString; docEntry->doc += cmdString;
SectionInfo *si=new SectionInfo(listName,anchorLabel, SectionInfo *si=new SectionInfo(listName,anchorLabel,
sectionTitle,SectionInfo::Anchor); sectionTitle,SectionInfo::Anchor);
Doxygen::sectionDict.insert(anchorLabel,si); Doxygen::sectionDict.insert(anchorLabel,si);
current->anchors->append(si); docEntry->anchors->append(si);
} }
current->brief = slString.copy(); // restore orginial brief desc. current->brief = slString; // restore orginial brief desc.
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -405,6 +392,8 @@ static QCString addFormula() ...@@ -405,6 +392,8 @@ static QCString addFormula()
return formLabel; return formLabel;
} }
//-----------------------------------------------------------------------------
static bool nameIsOperator(QCString &name) static bool nameIsOperator(QCString &name)
{ {
int i=name.find("operator"); int i=name.find("operator");
...@@ -414,6 +403,8 @@ static bool nameIsOperator(QCString &name) ...@@ -414,6 +403,8 @@ static bool nameIsOperator(QCString &name)
return FALSE; // case TEXToperatorTEXT return FALSE; // case TEXToperatorTEXT
} }
//-----------------------------------------------------------------------------
static void checkFormula() static void checkFormula()
{ {
if (insideFormula) if (insideFormula)
...@@ -422,6 +413,8 @@ static void checkFormula() ...@@ -422,6 +413,8 @@ static void checkFormula()
} }
} }
//-----------------------------------------------------------------------------
static void checkDocs() static void checkDocs()
{ {
checkFormula(); checkFormula();
...@@ -436,33 +429,7 @@ static void checkDocs() ...@@ -436,33 +429,7 @@ static void checkDocs()
} }
} }
#if 0 //-----------------------------------------------------------------------------
static QCString extractName(const QCString &s)
{
//static const QRegExp id("[a-z_A-Z][a-z_A-Z0-9]*");
//int i,p=0,l;
//while ((i=id.match(s,p,&l))!=-1)
//{
// QCString idstr=s.mid(i,l);
// if (idstr!="struct" && idstr!="class" && idstr!="union")
// {
//
// return idstr;
// }
// p=i+l;
//}
//return "";
QCString result=s;
if (result.left(7)=="struct ") result=result.right(result.length()-7);
if (result.left(6)=="class " ) result=result.right(result.length()-6);
if (result.left(6)=="union " ) result=result.right(result.length()-6);
int l=result.length()-1;
while (l>=0 &&
(result.at(l)=='*' || result.at(l)==' ' || isspace(result.at(l)))
) l--;
return removeRedundantWhiteSpace(result.left(l+1));
}
#endif
static void setContext() static void setContext()
{ {
...@@ -483,6 +450,8 @@ static void setContext() ...@@ -483,6 +450,8 @@ static void setContext()
//printf("setContext(%s) insideIDL=%d\n",yyFileName,insideIDL); //printf("setContext(%s) insideIDL=%d\n",yyFileName,insideIDL);
} }
//-----------------------------------------------------------------------------
static void prependScope() static void prependScope()
{ {
if (current_root->section & Entry::SCOPE_MASK) if (current_root->section & Entry::SCOPE_MASK)
...@@ -516,6 +485,8 @@ static void prependScope() ...@@ -516,6 +485,8 @@ static void prependScope()
} }
} }
//-----------------------------------------------------------------------------
/*! Returns TRUE iff the current entry could be a K&R style C function */ /*! Returns TRUE iff the current entry could be a K&R style C function */
static bool checkForKnRstyleC() static bool checkForKnRstyleC()
{ {
...@@ -532,6 +503,8 @@ static bool checkForKnRstyleC() ...@@ -532,6 +503,8 @@ static bool checkForKnRstyleC()
return TRUE; return TRUE;
} }
//-----------------------------------------------------------------------------
static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName) static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
{ {
int si = current->args.length(); int si = current->args.length();
...@@ -605,6 +578,8 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName) ...@@ -605,6 +578,8 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
//fprintf(stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data()); //fprintf(stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data());
} }
//-----------------------------------------------------------------------------
/*! Update the argument \a name with additional \a type info. For K&R style /*! Update the argument \a name with additional \a type info. For K&R style
* function the type is found \e after the argument list, so this routine * function the type is found \e after the argument list, so this routine
* in needed to fix up. * in needed to fix up.
...@@ -930,6 +905,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -930,6 +905,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
} }
<NextSemi>\' {
if (insidePHP)
{
lastStringContext=NextSemi;
BEGIN(SkipPHPString);
}
}
<NextSemi>{CHARLIT} { if (insidePHP) REJECT; } <NextSemi>{CHARLIT} { if (insidePHP) REJECT; }
<NextSemi>\" { <NextSemi>\" {
lastStringContext=NextSemi; lastStringContext=NextSemi;
...@@ -965,7 +947,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -965,7 +947,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
else else
REJECT; REJECT;
} }
<FindMembers>{B}*("properties"|"__property"){BN}*":"{BN}* { // IDL or Borland C++ builder property <FindMembers>{B}*("properties"){BN}*":"{BN}* { // IDL or Borland C++ builder property
current->mtype = mtype = Property; current->mtype = mtype = Property;
current->protection = protection = Public ; current->protection = protection = Public ;
current->type.resize(0); current->type.resize(0);
...@@ -1441,6 +1423,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -1441,6 +1423,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
if (yytext[yyleng-1]=='{') unput('{'); if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BN}*/"(" { // A::operator()<int>(int arg)
lineCount();
current->name += "()";
BEGIN( FindMembers );
}
<Operator>"("{BN}*")"{BN}*/"(" { <Operator>"("{BN}*")"{BN}*/"(" {
lineCount(); lineCount();
current->name += yytext ; current->name += yytext ;
...@@ -2125,6 +2112,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2125,6 +2112,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
initBracketCount--; initBracketCount--;
current->initializer+=*yytext; current->initializer+=*yytext;
} }
<ReadInitializer>\' {
if (insidePHP)
{
current->initializer+=yytext;
pCopyQuotedString = &current->initializer;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
else
{
current->initializer+=yytext;
}
}
<ReadInitializer>{CHARLIT} { <ReadInitializer>{CHARLIT} {
if (insidePHP) if (insidePHP)
{ {
...@@ -2218,6 +2218,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2218,6 +2218,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
yyLineNr++; yyLineNr++;
*pCopyRoundString+=*yytext; *pCopyRoundString+=*yytext;
} }
<CopyRound>\' {
if (insidePHP)
{
current->initializer+=yytext;
pCopyQuotedString = pCopyRoundString;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
else
{
*pCopyRoundString+=yytext;
}
}
<CopyRound>{CHARLIT} { <CopyRound>{CHARLIT} {
if (insidePHP) if (insidePHP)
{ {
...@@ -2242,6 +2255,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2242,6 +2255,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastStringContext=YY_START; lastStringContext=YY_START;
BEGIN(CopyString); BEGIN(CopyString);
} }
<CopyCurly>\' {
*pCopyCurlyString+=*yytext;
if (insidePHP)
{
pCopyQuotedString=pCopyCurlyString;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<CopyCurly>"{" { <CopyCurly>"{" {
*pCopyCurlyString+=*yytext; *pCopyCurlyString+=*yytext;
curlyCount++; curlyCount++;
...@@ -2439,6 +2461,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2439,6 +2461,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastContext = YY_START ; lastContext = YY_START ;
BEGIN( Comment ) ; BEGIN( Comment ) ;
} }
<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
if (!insidePHP)
{
current->program += yytext;
}
else
{ // begin of single quoted string
current->program += yytext;
pCopyQuotedString = &current->program;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} { <ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
if (insidePHP) if (insidePHP)
{ {
...@@ -2699,19 +2734,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2699,19 +2734,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
insideObjC=FALSE; insideObjC=FALSE;
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
if (!insidePHP)
{
current->program += yytext;
}
else
{ // begin of single quoted string
current->program += yytext;
pCopyQuotedString = &current->program;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; } <ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; }
<FindMembers>"("/({BN}*{TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */ <FindMembers>"("/({BN}*{TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */
...@@ -3155,6 +3177,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3155,6 +3177,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastStringContext=FuncPtrInit; lastStringContext=FuncPtrInit;
BEGIN(CopyString); BEGIN(CopyString);
} }
<FuncPtrInit>\' {
current->args += *yytext;
if (insidePHP)
{
pCopyQuotedString=&current->args;
lastStringContext=FuncPtrInit;
BEGIN(CopyPHPString);
}
}
<FuncPtrInit>{CHARLIT} { <FuncPtrInit>{CHARLIT} {
if (insidePHP) if (insidePHP)
{ {
...@@ -3459,10 +3490,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3459,10 +3490,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current = tempEntry; current = tempEntry;
BEGIN( lastCurlyContext ); BEGIN( lastCurlyContext );
} }
<SkipCurly>{CHARLIT} {
//addToBody(yytext);
if (insidePHP) REJECT;
}
<SkipCurly>\" { <SkipCurly>\" {
//addToBody(yytext); //addToBody(yytext);
lastStringContext=SkipCurly; lastStringContext=SkipCurly;
...@@ -3526,6 +3553,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3526,6 +3553,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
pSkipVerbString=&current->initializer; pSkipVerbString=&current->initializer;
BEGIN(SkipVerbString); BEGIN(SkipVerbString);
} }
<SkipInits,SkipCurly,SkipCurlyCpp>\' {
if (insidePHP)
{
lastStringContext=YY_START;
BEGIN(SkipPHPString);
}
}
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} { <SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
if (insidePHP) REJECT; if (insidePHP) REJECT;
} }
...@@ -4319,6 +4353,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4319,6 +4353,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->section = Entry::FILEDOC_SEC; current->section = Entry::FILEDOC_SEC;
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
lastFileDocContext = YY_START;
BEGIN( FileDocArg1 ); BEGIN( FileDocArg1 );
} }
<Doc,LineDoc,JavaDoc>{B}*{CMD}"dir"{B}* { <Doc,LineDoc,JavaDoc>{B}*{CMD}"dir"{B}* {
...@@ -4406,7 +4441,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4406,7 +4441,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<TodoParam>"//" | <TodoParam>"//" |
<TodoParam>"/*" | <TodoParam>"/*" |
<TodoParam>. { <TodoParam>. {
addXRefItem("todo",theTranslator->trTodo(),theTranslator->trTodoList()); addXRefItem(lastDocContext==SkipCurly,
"todo",theTranslator->trTodo(),theTranslator->trTodoList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext); BEGIN(slStartContext);
} }
...@@ -4414,7 +4450,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4414,7 +4450,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<TestParam>"//" | <TestParam>"//" |
<TestParam>"/*" | <TestParam>"/*" |
<TestParam>. { <TestParam>. {
addXRefItem("test",theTranslator->trTest(),theTranslator->trTestList()); addXRefItem(lastDocContext==SkipCurly,
"test",theTranslator->trTest(),theTranslator->trTestList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext); BEGIN(slStartContext);
} }
...@@ -4422,7 +4459,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4422,7 +4459,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<BugParam>"//" | <BugParam>"//" |
<BugParam>"/*" | <BugParam>"/*" |
<BugParam>. { <BugParam>. {
addXRefItem("bug",theTranslator->trBug(),theTranslator->trBugList()); addXRefItem(lastDocContext==SkipCurly,
"bug",theTranslator->trBug(),theTranslator->trBugList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext); BEGIN(slStartContext);
} }
...@@ -4430,7 +4468,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4430,7 +4468,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<DeprecatedParam>"//" | <DeprecatedParam>"//" |
<DeprecatedParam>"/*" | <DeprecatedParam>"/*" |
<DeprecatedParam>. { <DeprecatedParam>. {
addXRefItem("deprecated",theTranslator->trDeprecated(),theTranslator->trDeprecatedList()); addXRefItem(lastDocContext==SkipCurly,
"deprecated",theTranslator->trDeprecated(),theTranslator->trDeprecatedList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext); BEGIN(slStartContext);
} }
...@@ -4469,7 +4508,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4469,7 +4508,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<XRefItemParam4>"//" | <XRefItemParam4>"//" |
<XRefItemParam4>"/*" | <XRefItemParam4>"/*" |
<XRefItemParam4>. { <XRefItemParam4>. {
addXRefItem(xrefItemKey,xrefItemTitle,xrefListTitle); addXRefItem(lastDocContext==SkipCurly,
xrefItemKey,xrefItemTitle,xrefListTitle);
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext); BEGIN(slStartContext);
} }
...@@ -4649,6 +4689,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4649,6 +4689,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name = yyFileName; current->name = yyFileName;
yyLineNr++; yyLineNr++;
newDocState(); newDocState();
if (lastFileDocContext==LineDoc)
{
current->doc += "\n\n";
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
BEGIN( FindMembers );
}
} }
<PageDocArg1>{FILE} { <PageDocArg1>{FILE} {
current->name = stripQuotes(yytext); current->name = stripQuotes(yytext);
...@@ -5734,25 +5782,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5734,25 +5782,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
if (!handled) if (!handled)
{ {
//QCString *pValue=Doxygen::aliasDict[yytext+1];
//if (pValue)
//{
// int i,l=pValue->length();
// char c;
// for (i=l-1;i>=0;i--)
// {
// c=pValue->at(i);
// unput(c);
// if (c=='\n') yyLineNr--;
// }
//}
//else
//{
if (YY_START==CopyArgComment) if (YY_START==CopyArgComment)
fullArgString+=yytext; fullArgString+=yytext;
else else
current->doc+=yytext; current->doc+=yytext;
//}
} }
} }
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
...@@ -5766,22 +5799,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5766,22 +5799,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->brief+=yytext; current->brief+=yytext;
} }
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
//QCString *pValue=Doxygen::aliasDict[yytext+1];
//if (pValue)
//{
// int i,l=pValue->length();
// for (i=l-1;i>=0;i--)
// {
// unput(pValue->at(i));
// }
//}
//else
//{
if (YY_START==CopyArgCommentLine) if (YY_START==CopyArgCommentLine)
fullArgString+=yytext; fullArgString+=yytext;
else else
current->brief+=yytext; current->brief+=yytext;
//}
} }
<DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; } <DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; }
<SkipCxxComment>.*/\n { <SkipCxxComment>.*/\n {
......
...@@ -3561,6 +3561,7 @@ bool resolveLink(/* in */ const char *scName, ...@@ -3561,6 +3561,7 @@ bool resolveLink(/* in */ const char *scName,
*resContext=0; *resContext=0;
QCString linkRef=lr; QCString linkRef=lr;
printf("ResolveLink linkRef=%s\n",lr);
FileDef *fd; FileDef *fd;
GroupDef *gd; GroupDef *gd;
PageDef *pd; PageDef *pd;
...@@ -4704,7 +4705,7 @@ void addRefItem(const QList<ListItemInfo> *sli, ...@@ -4704,7 +4705,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
const char *prefix, const char *prefix,
const char *name,const char *title,const char *args) const char *name,const char *title,const char *args)
{ {
//printf("addRefItem(prefix=%s,name=%s,title=%s,args=%s)\n",prefix,name,title,args); //printf("addRefItem(sli=%p,prefix=%s,name=%s,title=%s,args=%s)\n",sli,prefix,name,title,args);
if (sli) if (sli)
{ {
QListIterator<ListItemInfo> slii(*sli); QListIterator<ListItemInfo> slii(*sli);
...@@ -4724,7 +4725,7 @@ void addRefItem(const QList<ListItemInfo> *sli, ...@@ -4724,7 +4725,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
{ {
RefItem *item = refList->getRefItem(lii->itemId); RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0); ASSERT(item!=0);
//printf("anchor=%s\n",item->listAnchor.data()); //printf("anchor=%s written=%d\n",item->listAnchor.data(),item->written);
if (item->written) return; if (item->written) return;
QCString doc(1000); QCString doc(1000);
......
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