summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-04-07 17:23:32 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-04-07 17:23:32 (GMT)
commit63962ead8b355c4c93d5e442ab0a26005e1b863f (patch)
treec38e1a43019260d8c13223b0bab64424c575dfcb /src
parentde20cde3d47c58a69c25afe75e4c476d61dbe631 (diff)
downloadDoxygen-63962ead8b355c4c93d5e442ab0a26005e1b863f.zip
Doxygen-63962ead8b355c4c93d5e442ab0a26005e1b863f.tar.gz
Doxygen-63962ead8b355c4c93d5e442ab0a26005e1b863f.tar.bz2
Release-1.2.15-20020407
Diffstat (limited to 'src')
-rw-r--r--src/doc.l2
-rw-r--r--src/doxygen.cpp52
-rw-r--r--src/filedef.cpp1
-rw-r--r--src/pngenc.cpp2
-rw-r--r--src/scanner.l48
-rw-r--r--src/util.cpp47
6 files changed, 118 insertions, 34 deletions
diff --git a/src/doc.l b/src/doc.l
index bafc73f..982f273 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -957,7 +957,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+
ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
-URLCHAR [a-z_A-Z0-9\~\:\?\@\&\%\#\.\-\+\/\=]
+URLCHAR [a-z_A-Z0-9\!\~\:\;\'\$\?\@\&\%\#\.\-\+\/\=\(\)]
URLMASK ([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+)
NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff]
WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]*"\"")
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 0bbe32e..3132baf 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2213,6 +2213,28 @@ static void transferFunctionDocumentation()
}
mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
+
+ ArgumentList *decAl = mdec->argumentList();
+ ArgumentList *defAl = mdef->argumentList();
+ if (decAl && defAl)
+ {
+ ArgumentListIterator decAli(*decAl);
+ ArgumentListIterator defAli(*defAl);
+ Argument *decA,*defA;
+ for (decAli.toFirst(),defAli.toFirst();
+ (decA=decAli.current()) && (defA=defAli.current());
+ ++decAli,++defAli)
+ {
+ if (decA->docs.isEmpty() && !defA->docs.isEmpty())
+ {
+ decA->docs = defA->docs.copy();
+ }
+ else if (!defA->docs.isEmpty() && defA->docs.isEmpty())
+ {
+ defA->docs = decA->docs.copy();
+ }
+ }
+ }
// copy group info.
//if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0)
@@ -2686,6 +2708,18 @@ static bool findTemplateInstanceRelation(Entry *root,
return TRUE;
}
+static bool isRecursiveBaseClass(const QCString &scope,const QCString &name)
+{
+ QCString n=name;
+ int index=n.find('<');
+ if (index!=-1)
+ {
+ n=n.left(index);
+ }
+ bool result = rightScopeMatch(scope,n);
+ return result;
+}
+
static bool findClassRelation(
Entry *root,
ClassDef *cd,
@@ -2732,16 +2766,18 @@ static bool findClassRelation(
QCString templSpec;
ClassDef *baseClass=getResolvedClass(cd,baseClassName,&baseClassIsTypeDef,&templSpec);
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd);
- //printf(" baseClassName=`%s' baseClass=%s templSpec=%s\n",
+ //printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
+ // root->name.data(),
// baseClassName.data(),
- // baseClass?baseClass->name().data():"<none>",
- // templSpec.data()
+ // baseClass?baseClass->name().data():"<none>",
+ // templSpec.data()
// );
- if (baseClassName.left(root->name.length())!=root->name ||
- baseClassName.at(root->name.length())!='<'
- ) // Check for base class with the same name.
- // If found then look in the outer scope for a match
- // and prevent recursion.
+ //if (baseClassName.left(root->name.length())!=root->name ||
+ // baseClassName.at(root->name.length())!='<'
+ // ) // Check for base class with the same name.
+ // // If found then look in the outer scope for a match
+ // // and prevent recursion.
+ if (!isRecursiveBaseClass(root->name,baseClassName))
{
Debug::print(
Debug::Classes,0," class relation %s inherited by %s found (%s and %s)\n",
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 4c669e6..7e4a2c1 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -89,6 +89,7 @@ void FileDef::computeAnchors()
void FileDef::distributeMemberGroupDocumentation()
{
+ //printf("FileDef::distributeMemberGroupDocumentation()\n");
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
diff --git a/src/pngenc.cpp b/src/pngenc.cpp
index b7e54f4..5fb20d5 100644
--- a/src/pngenc.cpp
+++ b/src/pngenc.cpp
@@ -26,7 +26,7 @@
#include <png.h>
#include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
#include "pngenc.h"
#include "message.h"
diff --git a/src/scanner.l b/src/scanner.l
index 049dc9b..be548f3 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -586,6 +586,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x NSAliasArg
%x PackageName
%x GetCallType
+%x JavaImport
%%
@@ -992,6 +993,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<NSAliasArg>";" {
BEGIN( FindMembers );
}
+<JavaImport>({ID}{BN}*"."{BN}*)+"*" { // package import => add as a using directive
+ lineCount();
+ QCString scope=yytext;
+ current->name=removeRedundantWhiteSpace(substitute(scope.left(scope.length()-2),".","::"));
+ current->fileName = yyFileName;
+ current->section=Entry::USINGDIR_SEC;
+ current_root->addSubEntry(current);
+ current = new Entry ;
+ initEntry();
+ BEGIN(Using);
+ }
+<JavaImport>({ID}{BN}*"."{BN}*)+{ID} { // class import => add as a using declaration
+ lineCount();
+ QCString scope=yytext;
+ current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
+ printf("import name = %s -> %s\n",yytext,current->name.data());
+ current->fileName = yyFileName;
+ current->section=Entry::USINGDECL_SEC;
+ current_root->addSubEntry(current);
+ current = new Entry ;
+ initEntry();
+ BEGIN(Using);
+ }
<FindMembers>"using"{BN}+ {
current->startLine=yyLineNr;
lineCount();
@@ -999,6 +1023,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); }
<Using>{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* {
+ lineCount();
current->name=yytext;
current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC;
@@ -1109,7 +1134,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
else if ((insideIDL || insideJava) && yyleng==6 && strcmp(yytext,"import")==0)
{
- BEGIN(NextSemi);
+ if (insideIDL)
+ BEGIN(NextSemi);
+ else // insideJava
+ BEGIN(JavaImport);
}
else if (insideIDL && strcmp(yytext,"case")==0)
{
@@ -2108,7 +2136,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<CopyArgComment>^{B}*"*"+/{BN}+
-<CopyArgComment>[^\n\*]+ { fullArgString+=yytext; }
+<CopyArgComment>[^\n\\\@\*]+ { fullArgString+=yytext; }
<CopyArgComment>"*/" { fullArgString+=yytext;
if (lastCopyArgChar!=0)
unput(lastCopyArgChar);
@@ -2120,7 +2148,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
unput(lastCopyArgChar);
BEGIN( ReadFuncArgType );
}
-<CopyArgCommentLine>[^\n]+ { fullArgString+=yytext; }
+<CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; }
<CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; }
<CopyArgComment>. { fullArgString+=*yytext; }
<ReadTempArgs>"<" {
@@ -4092,7 +4120,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->doc+=yytext;
}
-<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
+<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue)
{
@@ -4104,13 +4132,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
else
{
- current->doc+=yytext;
+ if (YY_START==CopyArgComment)
+ fullArgString+=yytext;
+ else
+ current->doc+=yytext;
}
}
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->brief+=yytext;
}
-<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>{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)
{
@@ -4122,7 +4153,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
else
{
- current->brief+=yytext;
+ if (YY_START==CopyArgCommentLine)
+ fullArgString+=yytext;
+ else
+ current->brief+=yytext;
}
}
<DefLineDoc,LineDoc,ClassDoc,PageDoc,ExampleDoc,Doc>"/*"|"//" { current->doc += yytext; }
diff --git a/src/util.cpp b/src/util.cpp
index d15cbff..66d87bf 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -3137,11 +3137,41 @@ const char *getOverloadDocs()
void addMembersToMemberGroup(MemberList *ml,
MemberGroupSDict *memberGroupSDict,Definition *context)
{
+ //printf("addMemberToMemberGroup()\n");
MemberListIterator mli(*ml);
MemberDef *md;
uint index;
for (index=0;(md=mli.current());)
{
+ if (md->isEnumerate()) // insert enum value of this enum into groups
+ {
+ QList<MemberDef> *fmdl=md->enumFieldList();
+ if (fmdl)
+ {
+ MemberDef *fmd=fmdl->first();
+ while (fmd)
+ {
+ int groupId=fmd->getMemberGroupId();
+ if (groupId!=-1)
+ {
+ QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
+ QCString *pDocs = Doxygen::memberDocDict[groupId];
+ if (pGrpHeader)
+ {
+ MemberGroup *mg = memberGroupSDict->find(groupId);
+ if (mg==0)
+ {
+ mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
+ memberGroupSDict->append(groupId,mg);
+ }
+ mg->insertMember(context,fmd); // insert in member group
+ fmd->setMemberGroup(mg);
+ }
+ }
+ fmd=fmdl->next();
+ }
+ }
+ }
int groupId=md->getMemberGroupId();
if (groupId!=-1)
{
@@ -3156,23 +3186,6 @@ void addMembersToMemberGroup(MemberList *ml,
memberGroupSDict->append(groupId,mg);
}
md = ml->take(index); // remove from member list
- //if (allMembers) // remove from all member list as well
- //{
- // MemberNameInfo *mni = allMembers->find(md->name());
- // if (mni)
- // {
- // QListIterator<MemberInfo> mii(*mni);
- // MemberInfo *mi;
- // for (;(mi=mii.current());++mii)
- // {
- // if (mi->memberDef==md)
- // {
- // mni->remove(mi);
- // break;
- // }
- // }
- // }
- //}
mg->insertMember(context,md); // insert in member group
md->setMemberGroup(mg);
continue;