Commit 8013b5fe authored by dimitri's avatar dimitri

Release-1.1.3-20000514

parent 6c268019
DOXYGEN Version 1.1.3 DOXYGEN Version 1.1.3-20000514
CONTENTS CONTENTS
-------- --------
...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: ...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.3.src.tar.gz # uncompress the archive gunzip doxygen-1.1.3-20000514.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.3.src.tar # unpack it tar xf doxygen-1.1.3-20000514.src.tar # unpack it
2. Run the configure script: 2. Run the configure script:
...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at ...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (08 May 2000) Dimitri van Heesch (14 May 2000)
...@@ -21,7 +21,7 @@ distclean: clean ...@@ -21,7 +21,7 @@ distclean: clean
-rm -f html -rm -f html
-rm -f objects/*.o -rm -f objects/*.o
-rm -f src/Makefile.doxygen src/Makefile.doxytag src/Makefile.doxysearch -rm -f src/Makefile.doxygen src/Makefile.doxytag src/Makefile.doxysearch
-rm -f Makefile src/Makefile examples/Makefile doc/Makefile -rm -f Makefile src/Makefile examples/Makefile doc/Makefile
-rm -f .makeconfig .tmakeconfig -rm -f .makeconfig .tmakeconfig
-rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro -rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro
-rm -f src/version.cpp -rm -f src/version.cpp
......
DOXYGEN Version 1.1.3 DOXYGEN Version 1.1.3-20000514
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (08 May 2000) Dimitri van Heesch (14 May 2000)
1.1.3 1.1.3-20000514
...@@ -349,9 +349,15 @@ fi ...@@ -349,9 +349,15 @@ fi
touch .tmakeconfig touch .tmakeconfig
if test "$f_shared" = NO; then if test "$f_shared" = NO; then
if test "$f_platform" = "osf1-cxx"; then
cat >> .tmakeconfig <<EOF cat >> .tmakeconfig <<EOF
TMAKE_LFLAGS = -static TMAKE_LFLAGS = -non_shared
EOF EOF
else
cat >> .tmakeconfig <<EOF
TMAKE_LFLAGS = -static
EOF
fi
fi fi
if test "$f_english" = YES; then if test "$f_english" = YES; then
......
...@@ -538,21 +538,27 @@ description. ...@@ -538,21 +538,27 @@ description.
that doxygen normally generates: that doxygen normally generates:
\verbatim \verbatim
H1 { text-align: center } H1 { text-align: center; }
A.qindex {} A.qindex {}
A.qindexRef {} A.qindexRef {}
A.el { text-decoration: none; font-weight: bold } A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold } A.elRef { font-weight: bold }
A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.code { text-decoration: none; font-weight: normal; color: #4444ee }
A.codeRef { font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee }
A.gl:link { color: #ffffff }
A.gl:visited { color: #ffffff }
A.gl { text-decoration: none; font-weight: bold; background-color: #ff8080 }
DL.el { margin-left: -1cm } DL.el { margin-left: -1cm }
DIV.fragment { width: 100%; border: none; background-color: #eeeeee } DIV.fragment { width: 100%; border: none; background-color: #eeeeee }
DIV.in { margin-left: 16 } DIV.in { margin-left: 16 }
DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }
TD.md { background-color: #f2f2ff } TD.md { background-color: #f2f2ff }
DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight
DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }
FONT.keyword { color: #008000 }
FONT.keywordtype { color: #008060 }
FONT.keywordflow { color: #e08000 }
FONT.comment { color: #800000 }
FONT.preprocessor { color: #806020 }
FONT.stringliteral { color: #002080 }
FONT.charliteral { color: #008080 }
\endverbatim \endverbatim
\anchor cfg_html_align_members \anchor cfg_html_align_members
......
...@@ -742,7 +742,7 @@ Then by default doxygen will feed the following to its parser: ...@@ -742,7 +742,7 @@ Then by default doxygen will feed the following to its parser:
You can disable all preprocessing by setting You can disable all preprocessing by setting
\ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" to \c \ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" to \c
NO in the configuation file. In the case above doxygen will then read NO in the configuation file. In the case above doxygen will then reads
both statements! both statements!
In case you want to expand the \c CONST_STRING macro, you should set the In case you want to expand the \c CONST_STRING macro, you should set the
...@@ -847,6 +847,24 @@ for class QList is to define: ...@@ -847,6 +847,24 @@ for class QList is to define:
PREDEFINED = QListT:=QList PREDEFINED = QListT:=QList
\endverbatim \endverbatim
Here is example provided by Valter Minute that helps doxygen to
wade through the boilerplate code in Microsoft's ATL library:
\verbatim
PREDEFINED = DECLARE_REGISTRY_RESOURCEID=// \
DECLARE_PROTECT_FINAL_CONSTRUCT=// \
BEGIN_COM_MAP=/* \
END_COM_MAP=*/// \
BEGIN_PROP_MAP=/* \
END_PROP_MAP=*/// \
BEGIN_MSG_MAP=/* \
END_MSG_MAP=*/// \
DECLARE_VIEW_STATUS=// \
"STDMETHOD(a)=HRESULT a" \
"ATL_NO_VTABLE= "\
"__declspec(a)= "\
\endverbatim
As you can see doxygen's preprocessor is quite powerful, but if you want As you can see doxygen's preprocessor is quite powerful, but if you want
even more flexibility you can always write an input filter and specify it even more flexibility you can always write an input filter and specify it
after the \ref cfg_input_filter "INPUT_FILTER" tag. after the \ref cfg_input_filter "INPUT_FILTER" tag.
......
Name: doxygen Name: doxygen
Version: 1.1.3 Version: 1.1.3-20000514
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -1637,7 +1637,7 @@ void ClassDef::determineImplUsageRelation() ...@@ -1637,7 +1637,7 @@ void ClassDef::determineImplUsageRelation()
bool found=FALSE; bool found=FALSE;
while ((i=re.match(type,p,&l))!=-1 && !found) // for each class name in the type while ((i=re.match(type,p,&l))!=-1 && !found) // for each class name in the type
{ {
int ts=p+l; int ts=i+l;
int te=ts; int te=ts;
while (type.at(ts)==' ' && ts<typeLen) ts++; // skip any whitespace while (type.at(ts)==' ' && ts<typeLen) ts++; // skip any whitespace
if (type.at(ts)=='<') // assume template instance if (type.at(ts)=='<') // assume template instance
......
...@@ -284,10 +284,10 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0) ...@@ -284,10 +284,10 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0)
QCString className=clName; QCString className=clName;
if (clNameLen) *clNameLen=0; if (clNameLen) *clNameLen=0;
if (className.isEmpty()) return; if (className.isEmpty()) return;
ClassDef *cd=getClass(className); ClassDef *cd=getResolvedClass(className);
if (cd==0 && (i=className.find('<'))!=-1) if (cd==0 && (i=className.find('<'))!=-1)
{ {
cd=getClass(className.left(i)); cd=getResolvedClass(className.left(i));
} }
if (cd && cd->isLinkable()) if (cd && cd->isLinkable())
{ {
...@@ -374,7 +374,7 @@ static ClassDef *stripClassName(const char *s) ...@@ -374,7 +374,7 @@ static ClassDef *stripClassName(const char *s)
int p=0,i,l; int p=0,i,l;
while ((i=re.match(tmp,p,&l))!=-1) while ((i=re.match(tmp,p,&l))!=-1)
{ {
ClassDef *cd=getClass(tmp.mid(i,l)); ClassDef *cd=getResolvedClass(tmp.mid(i,l));
if (cd) return cd; if (cd) return cd;
p=i+l; p=i+l;
} }
...@@ -579,8 +579,10 @@ B [ \t] ...@@ -579,8 +579,10 @@ B [ \t]
BN [ \t\n\r] BN [ \t\n\r]
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
KEYWORD ("asm"|"auto"|"break"|"case"|"catch"|"class"|"const_cast"|"continue"|"default"|"delete"|"do"|"dynamic_cast"|"else"|"enum"|"explicit"|"extern"|"false"|"for"|"friend"|"goto"|"if"|"inline"|"mutable"|"namespace"|"new"|"operator"|"private"|"protected"|"public"|"register"|"reinterpret_cast"|"return"|"sizeof"|"static"|"static_cast"|"struct"|"switch"|"template"|"this"|"throw"|"true"|"try"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"while") SCOPEPREFIX {ID}{B}*"::"({B}*{ID}{B}*"::")*
TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t") KEYWORD ("asm"|"auto"|"class"|"const"|"const_cast"|"delete"|"dynamic_cast"|"enum"|"explicit"|"extern"|"false"|"friend"|"inline"|"mutable"|"namespace"|"new"|"operator"|"private"|"protected"|"public"|"register"|"reinterpret_cast"|"sizeof"|"static"|"static_cast"|"struct"|"template"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile")
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"for"|"goto"|"if"|"return"|"switch"|"throw"|"try"|"while")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t")
%option noyywrap %option noyywrap
...@@ -603,7 +605,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -603,7 +605,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
%% %%
<*>\x0d <*>\x0d
<Body>^([ \t]*"#"[ \t]"include"[ \t]*)("<"|"\"") { <Body>^([ \t]*"#"[ \t]*"include"[ \t]*)("<"|"\"") {
startFontClass("preprocessor"); startFontClass("preprocessor");
g_code->codify(yytext); g_code->codify(yytext);
BEGIN( ReadInclude ); BEGIN( ReadInclude );
...@@ -728,22 +730,54 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -728,22 +730,54 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
} }
<Body>{KEYWORD}/([^a-z_A-Z0-9]) { <Body>{SCOPEPREFIX}*{B}*"operator"{B}*"()"{B}*/"(" {
addType();
generateFunctionLink(*g_code,yytext);
g_bracketCount=1;
g_args.resize(0);
g_name+=yytext;
BEGIN( FuncCall );
}
<Body>{SCOPEPREFIX}*{B}*"operator"{B}*[^\(\n]+/"(" {
addType();
generateFunctionLink(*g_code,yytext);
g_bracketCount=1;
g_args.resize(0);
g_name+=yytext;
BEGIN( FuncCall );
}
<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
startFontClass("keyword"); startFontClass("keyword");
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
} }
<Body>{KEYWORD}/{B}* { <Body>{KEYWORD}/{B}* {
startFontClass("keyword"); startFontClass("keyword");
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
} }
<Body>{KEYWORD}/{B}*"(" { <Body>{KEYWORD}/{B}*"(" {
startFontClass("keyword"); startFontClass("keyword");
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
g_name.resize(0);g_type.resize(0); g_name.resize(0);g_type.resize(0);
} }
<Body>{FLOWKW}/([^a-z_A-Z0-9]) {
startFontClass("keywordflow");
codifyLines(yytext);
endFontClass();
}
<Body>{FLOWKW}/{B}* {
startFontClass("keywordflow");
codifyLines(yytext);
endFontClass();
}
<Body>{FLOWKW}/{B}*"(" {
startFontClass("keywordflow");
codifyLines(yytext);
endFontClass();
g_name.resize(0);g_type.resize(0);
}
<Body>[\\|\)\+\-\/\%\~\!] { <Body>[\\|\)\+\-\/\%\~\!] {
g_code->codify(yytext); g_code->codify(yytext);
g_name.resize(0);g_type.resize(0); g_name.resize(0);g_type.resize(0);
...@@ -756,13 +790,13 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -756,13 +790,13 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
} }
*/ */
<Body>{TYPEKW}/{B}* { <Body>{TYPEKW}/{B}* {
startFontClass("keyword"); startFontClass("keywordtype");
g_code->codify(yytext); g_code->codify(yytext);
endFontClass(); endFontClass();
addType(); addType();
g_name+=yytext; g_name+=yytext;
} }
<Body>{SCOPENAME}{B}*"<"[^\}\{\(\)\/\n\>]*">"/{B}* { <Body>{SCOPENAME}{B}*"<"[^\"\}\{\(\)\/\n\>]*">"/{B}* {
int i; int i;
generateClassLink(*g_code,yytext,&i); generateClassLink(*g_code,yytext,&i);
addType(); addType();
...@@ -771,23 +805,19 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -771,23 +805,19 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
} }
<Body>{SCOPENAME}/{B}* { <Body>{SCOPENAME}/{B}* {
generateClassLink(*g_code,yytext); generateClassLink(*g_code,yytext);
//codifyLines(yytext);
addType(); addType();
g_name+=yytext; g_name+=yytext;
} }
<Body>{SCOPENAME}/{B}*"(" { <Body>{SCOPENAME}/{B}*"(" {
addType(); addType();
//if (type.isEmpty())
QCString tmp=yytext;
generateFunctionLink(*g_code,yytext); generateFunctionLink(*g_code,yytext);
//else
// g_code->codify(yytext);
g_bracketCount=1; g_bracketCount=1;
g_args.resize(0); g_args.resize(0);
g_name+=yytext; g_name+=yytext;
BEGIN( FuncCall ); BEGIN( FuncCall );
} }
<FuncCall,Body,MemberCall>\" { <FuncCall,Body,MemberCall>\" {
startFontClass("stringliteral");
g_code->codify(yytext); g_code->codify(yytext);
g_lastStringContext=YY_START; g_lastStringContext=YY_START;
BEGIN( SkipString ); BEGIN( SkipString );
...@@ -800,6 +830,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -800,6 +830,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
} }
<SkipString>\" { <SkipString>\" {
g_code->codify(yytext); g_code->codify(yytext);
endFontClass();
BEGIN( g_lastStringContext ); BEGIN( g_lastStringContext );
} }
<SkipString>\\. { <SkipString>\\. {
...@@ -809,8 +840,10 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -809,8 +840,10 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
g_code->codify(yytext); g_code->codify(yytext);
g_name.resize(0);g_type.resize(0); g_name.resize(0);g_type.resize(0);
} }
<Body,MemberCall,MemberCall2,FuncCall>"'"((\\.)|(.))"'" { <Body,MemberCall,MemberCall2,FuncCall>"'"((\\0[Xx0-9]+)|(\\.)|(.))"'" {
startFontClass("charliteral");
g_code->codify(yytext); g_code->codify(yytext);
endFontClass();
} }
<Body>"this->" { g_code->codify(yytext); } <Body>"this->" { g_code->codify(yytext); }
<Body>"."|"->" { <Body>"."|"->" {
...@@ -843,13 +876,27 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -843,13 +876,27 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
<Body>[0-9]+ { <Body>[0-9]+ {
g_code->codify(yytext); g_code->codify(yytext);
} }
<MemberCall2,FuncCall>({KEYWORD}|{TYPEKW})/([^a-z_A-Z0-9]) { <MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) {
addParmType(); addParmType();
g_parmName=yytext; g_parmName=yytext;
startFontClass("keyword"); startFontClass("keyword");
g_code->codify(yytext); g_code->codify(yytext);
endFontClass(); endFontClass();
} }
<MemberCall2,FuncCall>{TYPEKW}/([^a-z_A-Z0-9]) {
addParmType();
g_parmName=yytext;
startFontClass("keywordtype");
g_code->codify(yytext);
endFontClass();
}
<MemberCall2,FuncCall>{FLOWKW}/([^a-z_A-Z0-9]) {
addParmType();
g_parmName=yytext;
startFontClass("keywordflow");
g_code->codify(yytext);
endFontClass();
}
<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]* { <MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]* {
addParmType(); addParmType();
g_parmName=yytext; g_parmName=yytext;
...@@ -943,7 +990,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -943,7 +990,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
endFontClass(); endFontClass();
BEGIN( g_lastCContext ) ; BEGIN( g_lastCContext ) ;
} }
<SkipCxxComment>[^\r\n]* { <SkipCxxComment>[^\r\n]+ {
g_code->codify(yytext); g_code->codify(yytext);
} }
<SkipCxxComment>\r <SkipCxxComment>\r
...@@ -1038,7 +1085,11 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u ...@@ -1038,7 +1085,11 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u
} }
else else
{ {
g_lastCContext = YY_START ; // check is to prevent getting stuck in skipping C++ comments
if (YY_START != SkipCxxComment)
{
g_lastCContext = YY_START ;
}
startFontClass("comment"); startFontClass("comment");
codifyLines(yytext); codifyLines(yytext);
BEGIN(SkipComment); BEGIN(SkipComment);
......
...@@ -154,7 +154,7 @@ int documentedIncludeFiles; ...@@ -154,7 +154,7 @@ int documentedIncludeFiles;
QTextStream tagFile; QTextStream tagFile;
void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
bool over_load,NamespaceList *nl=0); ArgumentList *al,bool over_load,NamespaceList *nl=0);
const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*"; const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*";
QCString spaces; QCString spaces;
...@@ -782,9 +782,16 @@ void findUsingDirectives(Entry *root) ...@@ -782,9 +782,16 @@ void findUsingDirectives(Entry *root)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static MemberDef *addVariableToClass(Entry *root,ClassDef *cd, static MemberDef *addVariableToClass(
MemberDef::MemberType mtype,const QCString &scope,const QCString &name, Entry *root,
bool fromAnnScope,int indentDepth,MemberDef *fromAnnMemb,Protection prot) ClassDef *cd,
MemberDef::MemberType mtype,
const QCString &scope,
const QCString &name,
bool fromAnnScope,
int indentDepth,
MemberDef *fromAnnMemb,
Protection prot)
{ {
Debug::print(Debug::Variables,0, Debug::print(Debug::Variables,0,
" class variable:\n" " class variable:\n"
...@@ -832,7 +839,7 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd, ...@@ -832,7 +839,7 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd,
if (md->memberClass()==cd && root->type==md->typeString()) if (md->memberClass()==cd && root->type==md->typeString())
// member already in the scope // member already in the scope
{ {
addMemberDocs(root,md,def,FALSE); addMemberDocs(root,md,def,0,FALSE);
return md; return md;
} }
md=mn->next(); md=mn->next();
...@@ -885,9 +892,14 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd, ...@@ -885,9 +892,14 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd,
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static MemberDef *addVariableToFile(Entry *root,MemberDef::MemberType mtype, static MemberDef *addVariableToFile(
const QCString &scope,const QCString &name, Entry *root,
bool fromAnnScope,int indentDepth,MemberDef *fromAnnMemb) MemberDef::MemberType mtype,
const QCString &scope,
const QCString &name,
bool fromAnnScope,
int indentDepth,
MemberDef *fromAnnMemb)
{ {
Debug::print(Debug::Variables,0, Debug::print(Debug::Variables,0,
" global variable:\n" " global variable:\n"
...@@ -1134,7 +1146,8 @@ void buildVarList(Entry *root) ...@@ -1134,7 +1146,8 @@ void buildVarList(Entry *root)
else // annonymous scope inside namespace or file => put variable in the global scope else // annonymous scope inside namespace or file => put variable in the global scope
{ {
//printf("Inserting member in global scope %s!\n",pScope.data()); //printf("Inserting member in global scope %s!\n",pScope.data());
md=addVariableToFile(root,mtype,pScope,name,!pScope.isEmpty(),indentDepth,0); //md=addVariableToFile(root,mtype,pScope,name,!pScope.isEmpty(),indentDepth,0);
md=addVariableToFile(root,mtype,pScope,name,TRUE,indentDepth,0);
} }
} }
} }
...@@ -1734,11 +1747,20 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1734,11 +1747,20 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
{ {
// TODO: here we should try to find the correct template specialization // TODO: here we should try to find the correct template specialization
// but for now, we only look for the unspecializated base class. // but for now, we only look for the unspecializated base class.
int e = baseClassName.find('>'); // locate end of template
if (e!=-1) int e=i+1;
int brCount=1;
int typeLen = baseClassName.length();
while (e<typeLen && brCount!=0)
{ {
templSpec=baseClassName.mid(i,e-i+1); if (baseClassName.at(e)=='<') brCount++;
baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e-1); if (baseClassName.at(e)=='>') brCount--;
e++;
}
if (brCount==0) // end of template was found at e
{
templSpec=baseClassName.mid(i,e-i);
baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e);
baseClass=getResolvedClass(baseClassName); baseClass=getResolvedClass(baseClassName);
//printf("baseClass=%p baseClass=%s templSpec=%s\n", //printf("baseClass=%p baseClass=%s templSpec=%s\n",
// baseClass,baseClassName.data(),templSpec.data()); // baseClass,baseClassName.data(),templSpec.data());
...@@ -1796,7 +1818,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1796,7 +1818,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
} }
else if (insertUndocumented) else if (insertUndocumented)
{ {
Debug::print(Debug::Classes,0," Undocumented base class `%s'\n",bi->name.data()); Debug::print(Debug::Classes,0," Undocumented base class `%s' baseClassName=%s\n",bi->name.data(),baseClassName.data());
baseClass=new ClassDef(baseClassName,ClassDef::Class); baseClass=new ClassDef(baseClassName,ClassDef::Class);
// add base class to this class // add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec); cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
...@@ -1947,8 +1969,12 @@ void computeMemberReferences() ...@@ -1947,8 +1969,12 @@ void computeMemberReferences()
// set the function declaration of the member to `funcDecl'. If the boolean // set the function declaration of the member to `funcDecl'. If the boolean
// over_load is set the standard overload text is added. // over_load is set the standard overload text is added.
void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, void addMemberDocs(Entry *root,
bool over_load,NamespaceList *nl) MemberDef *md, const char *funcDecl,
ArgumentList *al,
bool over_load,
NamespaceList *nl
)
{ {
//printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s'\n", //printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s'\n",
// root->parent->name.data(),md->name().data(),md->argsString(),funcDecl); // root->parent->name.data(),md->name().data(),md->argsString(),funcDecl);
...@@ -1958,15 +1984,22 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -1958,15 +1984,22 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
md->setDefinition(fDecl); md->setDefinition(fDecl);
ClassDef *cd=md->memberClass(); ClassDef *cd=md->memberClass();
NamespaceDef *nd=md->getNamespace(); NamespaceDef *nd=md->getNamespace();
if (matchArguments(md->argumentList(),root->argList, if (al)
cd ? cd->name().data() : 0,
nd ? nd->name().data() : 0,
TRUE,
nl
)
)
{ {
mergeArguments(md->argumentList(),root->argList); mergeArguments(md->argumentList(),al);
}
else
{
if (matchArguments(md->argumentList(),root->argList,
cd ? cd->name().data() : 0,
nd ? nd->name().data() : 0,
TRUE,
nl
)
)
{
mergeArguments(md->argumentList(),root->argList);
}
} }
if (over_load) // the \overload keyword was used if (over_load) // the \overload keyword was used
{ {
...@@ -2133,20 +2166,19 @@ static bool findUnrelatedFunction(Entry *root, ...@@ -2133,20 +2166,19 @@ static bool findUnrelatedFunction(Entry *root,
{ {
Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n", Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n",
md->name().data(),namespaceName.data()); md->name().data(),namespaceName.data());
//printf("Searching for match between %s and %s\n", //ArgumentList *al = new ArgumentList;
// argListToString(md->argumentList()).data(), //stringToArgumentList(funcArgs,al);
// argListToString(root->argList).data());
QCString nsName = nd ? nd->name().data() : ""; QCString nsName = nd ? nd->name().data() : "";
bool matching= bool matching=
/*matchArguments(md->argsString(),args);*/
(md->argumentList()==0 && root->argList->count()==0) || (md->argumentList()==0 && root->argList->count()==0) ||
matchArguments(md->argumentList(),root->argList,0,nsName); matchArguments(md->argumentList(),root->argList,0,nsName);
if (matching) // add docs to the member if (matching) // add docs to the member
{ {
Debug::print(Debug::FindMembers,0,"5. Match found\n"); Debug::print(Debug::FindMembers,0,"5. Match found\n");
addMemberDocs(root,md,decl,FALSE); addMemberDocs(root,md,decl,root->argList,FALSE);
found=TRUE; found=TRUE;
} }
//delete al;
} }
md=mn->next(); md=mn->next();
} }
...@@ -2468,7 +2500,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, ...@@ -2468,7 +2500,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
} }
} }
if (root->tArgList==0 && !classTempList.isEmpty()) if (root->tArgList==0 && !classTempList.isEmpty())
{ {
// no template specifiers found during parsing (because \fn was used), // no template specifiers found during parsing (because \fn was used),
...@@ -2542,13 +2573,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, ...@@ -2542,13 +2573,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
QCString fullFuncDecl=funcDecl.copy(); QCString fullFuncDecl=funcDecl.copy();
if (isFunc) fullFuncDecl+=argListToString(root->argList); if (isFunc) fullFuncDecl+=argListToString(root->argList);
// destructor => do backward class name substitution if needed
//if (!funcName.isEmpty() && funcName[0]=='~')
// funcName="~"+resolveDefines(className);
// constructor => do backward class name substitution if needed
//if (funcName==className) funcName=resolveDefines(className);
//if (funcDecl.left(7)=="inline ") funcDecl=funcDecl.right(funcDecl.length()-7);
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"findMember() Parse results:\n" "findMember() Parse results:\n"
" namespaceName=`%s'\n" " namespaceName=`%s'\n"
...@@ -2693,7 +2717,9 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, ...@@ -2693,7 +2717,9 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
argList /* dest argument list */ argList /* dest argument list */
); );
if (substDone) // delete old argument list if (substDone) // delete old argument list
{
delete oldArgList; delete oldArgList;
}
substDone=TRUE; substDone=TRUE;
} }
...@@ -2731,13 +2757,15 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, ...@@ -2731,13 +2757,15 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
md->setArgumentList(argList); md->setArgumentList(argList);
} }
else // no match -> delete argument list else // no match -> delete argument list
{
delete argList; delete argList;
}
} }
if (matching) if (matching)
{ {
//printf("addMemberDocs root->inLine=%d md->isInline()=%d\n", //printf("addMemberDocs root->inLine=%d md->isInline()=%d\n",
// root->inLine,md->isInline()); // root->inLine,md->isInline());
addMemberDocs(root,md,funcDecl,overloaded,nl); addMemberDocs(root,md,funcDecl,0,overloaded,nl);
count++; count++;
} }
} }
...@@ -2865,7 +2893,7 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, ...@@ -2865,7 +2893,7 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
if (!newMember && rmd) // member already exists as rmd -> add docs if (!newMember && rmd) // member already exists as rmd -> add docs
{ {
//printf("addMemberDocs for related member %s\n",root->name.data()); //printf("addMemberDocs for related member %s\n",root->name.data());
addMemberDocs(root,rmd,funcDecl,overloaded); addMemberDocs(root,rmd,funcDecl,0,overloaded);
} }
} }
...@@ -4817,8 +4845,17 @@ int main(int argc,char **argv) ...@@ -4817,8 +4845,17 @@ int main(int argc,char **argv)
} }
else else
{ {
config=fileToString(argv[optind]); QFileInfo fi(argv[optind]);
configName=argv[optind]; if (fi.exists())
{
config=fileToString(argv[optind]);
configName=argv[optind];
}
else
{
err("Error: configuration file %s not found!\n",argv[optind]);
usage(argv[0]);
}
} }
parseConfig(config); parseConfig(config);
......
...@@ -207,9 +207,13 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -207,9 +207,13 @@ void HtmlGenerator::writeStyleInfo(int part)
t << "TD.md { background-color: #f2f2ff }" << endl; t << "TD.md { background-color: #f2f2ff }" << endl;
t << "DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }" << endl; t << "DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }" << endl;
t << "DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }" << endl; t << "DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }" << endl;
t << "FONT.keyword { color: #008000 }" << endl; t << "FONT.keyword { color: #008000 }" << endl;
t << "FONT.comment { color: #800000 }" << endl; t << "FONT.keywordtype { color: #604020 }" << endl;
t << "FONT.preprocessor { color: #806020 }" << endl; t << "FONT.keywordflow { color: #e08000 }" << endl;
t << "FONT.comment { color: #800000 }" << endl;
t << "FONT.preprocessor { color: #806020 }" << endl;
t << "FONT.stringliteral { color: #002080 }" << endl;
t << "FONT.charliteral { color: #008080 }" << endl;
//t << "TD.groupLine { background-color: #3080ff }" << endl; //t << "TD.groupLine { background-color: #3080ff }" << endl;
t << endl; t << endl;
endPlainFile(); endPlainFile();
...@@ -603,24 +607,6 @@ void HtmlGenerator::endMemberItem(bool) ...@@ -603,24 +607,6 @@ void HtmlGenerator::endMemberItem(bool)
t << endl; t << endl;
} }
void HtmlGenerator::startParameter(bool first)
{
if (first)
{
t << endl << "</b></td>" << endl;
t << "<td valign=bottom><b>" << endl;
}
else
{
t << "<tr><td></td><td><b>" << endl;
}
}
void HtmlGenerator::endParameter(bool)
{
t << "</b></td></tr>" << endl;
}
void HtmlGenerator::insertMemberAlign() void HtmlGenerator::insertMemberAlign()
{ {
...@@ -764,20 +750,81 @@ void HtmlGenerator::writeImage(const char *name,const char *,const char *) ...@@ -764,20 +750,81 @@ void HtmlGenerator::writeImage(const char *name,const char *,const char *)
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *) void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
{ {
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
t << "<p>" << endl; t << "<p>" << endl;
t << "<table width=100% cellpadding=2 cellspacing=0 border=0>" << endl; t << "<table width=100% cellpadding=2 cellspacing=0 border=0>" << endl;
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td class=\"md\"><b>" << endl; t << " <td class=\"md\"><b>" << endl;
t << " <table cellspadding=0 cellspacing=0 border=0>" << endl; t << " <table cellspadding=0 cellspacing=0 border=0>" << endl;
}
void HtmlGenerator::startMemberDocPrefixItem()
{
DBG_HTML(t << "<!-- startMemberDocPrefixItem -->" << endl;)
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td valign=top><b>" << endl; t << " <td colspan=\"2\"><b>" << endl;
}
void HtmlGenerator::endMemberDocPrefixItem()
{
DBG_HTML(t << "<!-- endMemberDocPrefixItem -->" << endl;)
t << " </b></td>" << endl;
t << " </tr>" << endl;
}
void HtmlGenerator::startMemberDocName()
{
DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
t << " <tr>" << endl;
t << " <td nowrap valign=\"top\"><b> " << endl;
}
void HtmlGenerator::endMemberDocName()
{
DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
t << endl;
t << " </b></td>" << endl;
}
void HtmlGenerator::startParameter(bool first)
{
if (first)
{
DBG_HTML(t << "<!-- startFirstParameter -->" << endl;)
t << " <td valign=\"bottom\"><b>" << endl;
}
else
{
DBG_HTML(t << "<!-- startParameter -->" << endl;)
t << " <tr>" << endl;
t << " <td></td>" << endl;
t << " <td><b>" << endl;
}
}
void HtmlGenerator::endParameter(bool first)
{
if (first)
{
DBG_HTML(t << "<!-- endFirstParameter -->" << endl;)
t << endl;
t << " </b></td>" << endl;
//t << " <td width=\"300\"><img src=\"null.gif\"></td>" << endl;
t << " </tr>" << endl;
}
else
{
DBG_HTML(t << "<!-- endParameter -->" << endl;)
t << endl;
t << " </b></td>" << endl;
t << " </tr>" << endl;
}
} }
void HtmlGenerator::endMemberDoc() void HtmlGenerator::endMemberDoc()
{ {
DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
t << endl; t << endl;
t << " </b></td>" << endl;
t << " </tr>" << endl;
t << " </table>" << endl; t << " </table>" << endl;
t << " </td>" << endl; t << " </td>" << endl;
t << " </tr>" << endl; t << " </tr>" << endl;
......
...@@ -224,6 +224,10 @@ class HtmlGenerator : public OutputGenerator ...@@ -224,6 +224,10 @@ class HtmlGenerator : public OutputGenerator
void endTextBlock() {} void endTextBlock() {}
void lastIndexPage() {} void lastIndexPage() {}
void startMemberDocPrefixItem();
void endMemberDocPrefixItem();
void startMemberDocName();
void endMemberDocName();
void startParameter(bool first); void startParameter(bool first);
void endParameter(bool last); void endParameter(bool last);
......
...@@ -219,6 +219,11 @@ class LatexGenerator : public OutputGenerator ...@@ -219,6 +219,11 @@ class LatexGenerator : public OutputGenerator
void startTextBlock(bool) {} void startTextBlock(bool) {}
void endTextBlock() {} void endTextBlock() {}
void startMemberDocPrefixItem() {}
void endMemberDocPrefixItem() {}
void startMemberDocName() {}
void endMemberDocName() {}
void startParameter(bool) {} void startParameter(bool) {}
void endParameter(bool) {} void endParameter(bool) {}
......
...@@ -206,6 +206,11 @@ class ManGenerator : public OutputGenerator ...@@ -206,6 +206,11 @@ class ManGenerator : public OutputGenerator
void startTextBlock(bool) {} void startTextBlock(bool) {}
void endTextBlock() {} void endTextBlock() {}
void lastIndexPage() {} void lastIndexPage() {}
void startMemberDocPrefixItem() {}
void endMemberDocPrefixItem() {}
void startMemberDocName() {}
void endMemberDocName() {}
void startParameter(bool) {} void startParameter(bool) {}
void endParameter(bool) {} void endParameter(bool) {}
......
...@@ -73,6 +73,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -73,6 +73,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
if (argList==0) return; // member has no function like argument list if (argList==0) return; // member has no function like argument list
if (!md->isDefine()) ol.docify(" "); if (!md->isDefine()) ol.docify(" ");
ol.docify("("); // start argument list ol.docify("("); // start argument list
ol.endMemberDocName();
Argument *a=argList->first(); Argument *a=argList->first();
QCString cName; QCString cName;
if (md->scopeDefTemplateArguments()) if (md->scopeDefTemplateArguments())
...@@ -101,11 +102,11 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -101,11 +102,11 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
} }
//printf("~~~ %s cName=%s\n",md->name().data(),cName.data()); //printf("~~~ %s cName=%s\n",md->name().data(),cName.data());
//if (!md->isDefine()) ol.startParameter(TRUE); else ol.docify(" ");
ol.startParameter(TRUE);
bool first=TRUE; bool first=TRUE;
while (a) while (a)
{ {
if (!md->isDefine()) ol.startParameter(first); else ol.docify(" ");
first=FALSE;
QRegExp re(")("); QRegExp re(")(");
int vp; int vp;
if (!a->attrib.isEmpty()) // argument has an IDL attribute if (!a->attrib.isEmpty()) // argument has an IDL attribute
...@@ -155,12 +156,17 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -155,12 +156,17 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
if (a) if (a)
{ {
ol.docify(", "); // there are more arguments ol.docify(", "); // there are more arguments
if (!md->isDefine()) ol.endParameter(FALSE); if (!md->isDefine())
{
ol.endParameter(first);
ol.startParameter(FALSE);
}
} }
first=FALSE;
} }
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.writeString("&nbsp;"); if (!first) ol.writeString("&nbsp;");
ol.popGeneratorState(); ol.popGeneratorState();
ol.docify(")"); // end argument list ol.docify(")"); // end argument list
if (argList->constSpecifier) if (argList->constSpecifier)
...@@ -192,11 +198,11 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE) ...@@ -192,11 +198,11 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE)
ol.docify("> "); ol.docify("> ");
if (br) if (br)
{ {
ol.pushGeneratorState(); // ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); // ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::Latex); // ol.disable(OutputGenerator::Latex);
ol.lineBreak(); // ol.lineBreak();
ol.popGeneratorState(); // ol.popGeneratorState();
} }
} }
...@@ -914,13 +920,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -914,13 +920,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// ) // )
if (scopeAl && !related) // class template prefix if (scopeAl && !related) // class template prefix
{ {
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,scopeAl); writeTemplatePrefix(ol,scopeAl);
ol.endMemberDocPrefixItem();
} }
if (scopeAl && membAl) ol.docify(" "); if (scopeAl && membAl) ol.docify(" ");
if (membAl) // function template prefix if (membAl) // function template prefix
{ {
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,membAl); writeTemplatePrefix(ol,membAl);
ol.endMemberDocPrefixItem();
} }
if (cd) if (cd)
{ {
...@@ -940,6 +950,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -940,6 +950,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
def=addTemplateNames(def,cName,tempArgListToString(scopeAl)); def=addTemplateNames(def,cName,tempArgListToString(scopeAl));
} }
} }
ol.startMemberDocName();
linkifyText(ol,scopeName,name(),def); linkifyText(ol,scopeName,name(),def);
writeDefArgumentList(ol,cd,scopeName,this); writeDefArgumentList(ol,cd,scopeName,this);
if (!init.isEmpty() && initLines==0) // add initializer if (!init.isEmpty() && initLines==0) // add initializer
......
...@@ -210,6 +210,10 @@ class OutputGenerator ...@@ -210,6 +210,10 @@ class OutputGenerator
virtual void endTextBlock() = 0; virtual void endTextBlock() = 0;
virtual void lastIndexPage() = 0; virtual void lastIndexPage() = 0;
virtual void startMemberDocPrefixItem() = 0;
virtual void endMemberDocPrefixItem() = 0;
virtual void startMemberDocName() = 0;
virtual void endMemberDocName() = 0;
virtual void startParameter(bool) = 0; virtual void startParameter(bool) = 0;
virtual void endParameter(bool) = 0; virtual void endParameter(bool) = 0;
......
...@@ -364,6 +364,14 @@ class OutputList ...@@ -364,6 +364,14 @@ class OutputList
void lastIndexPage() void lastIndexPage()
{ forall(&OutputGenerator::lastIndexPage); } { forall(&OutputGenerator::lastIndexPage); }
void startMemberDocPrefixItem()
{ forall(&OutputGenerator::startMemberDocPrefixItem); }
void endMemberDocPrefixItem()
{ forall(&OutputGenerator::endMemberDocPrefixItem); }
void startMemberDocName()
{ forall(&OutputGenerator::startMemberDocName); }
void endMemberDocName()
{ forall(&OutputGenerator::endMemberDocName); }
void startParameter(bool first) void startParameter(bool first)
{ forall(&OutputGenerator::startParameter,first); } { forall(&OutputGenerator::startParameter,first); }
void endParameter(bool last) void endParameter(bool last)
......
...@@ -208,6 +208,10 @@ class RTFGenerator : public OutputGenerator ...@@ -208,6 +208,10 @@ class RTFGenerator : public OutputGenerator
void endTextBlock(); void endTextBlock();
void lastIndexPage(); void lastIndexPage();
void startMemberDocPrefixItem() {}
void endMemberDocPrefixItem() {}
void startMemberDocName() {}
void endMemberDocName() {}
void startParameter(bool) {} void startParameter(bool) {}
void endParameter(bool) {} void endParameter(bool) {}
......
...@@ -151,6 +151,7 @@ static QCString formulaText; ...@@ -151,6 +151,7 @@ static QCString formulaText;
static QCString sectionRef; static QCString sectionRef;
static bool insideIDL = FALSE; static bool insideIDL = FALSE;
static bool insideCppQuote = FALSE; static bool insideCppQuote = FALSE;
static bool insideVerbatim = FALSE;
static int depthIf; static int depthIf;
// state variable for reading the argument list of a function // state variable for reading the argument list of a function
...@@ -778,7 +779,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) ...@@ -778,7 +779,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
FileDef *fd; FileDef *fd;
if ((fd=findFileDef(&imageNameDict,fileName,ambig))) if ((fd=findFileDef(&imageNameDict,fileName,ambig)))
{ {
QFile inImage(fd->absFilePath()); QFile inImage(fd->absFilePath().data());
if (inImage.open(IO_ReadOnly)) if (inImage.open(IO_ReadOnly))
{ {
result = fileName; result = fileName;
...@@ -798,7 +799,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) ...@@ -798,7 +799,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
break; break;
} }
QCString outputFile = outputDir+"/"+result; QCString outputFile = outputDir+"/"+result;
QFile outImage(outputFile); QFile outImage(outputFile.data());
if (outImage.open(IO_WriteOnly)) // copy the image if (outImage.open(IO_WriteOnly)) // copy the image
{ {
char *buffer = new char[inImage.size()]; char *buffer = new char[inImage.size()];
...@@ -1125,7 +1126,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1125,7 +1126,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<DocScan>^{B}*(("//"{B}*)?)"*"*{B}*"-"{B}+ { /* found list item marker */ <DocScan>^{B}*(("//"{B}*)?)"*"*{B}*"-"{B}+ { /* found list item marker */
addListItemMarker(yytext); addListItemMarker(yytext);
} }
<DocScan>\n{B}*"-" { <DocScan>\n{B}*(("//"{B}*)?)"*"*{B}*"-"{B}+ {
addListItemMarker(yytext+1); addListItemMarker(yytext+1);
} }
<DocScan>"<!--" { BEGIN(DocSkipHtmlComment); } <DocScan>"<!--" { BEGIN(DocSkipHtmlComment); }
...@@ -1188,10 +1189,12 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1188,10 +1189,12 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
} }
<DocScan>{CMD}"verbatim"/[^a-z_A-Z0-9] { <DocScan>{CMD}"verbatim"/[^a-z_A-Z0-9] {
outDoc->startCodeFragment(); outDoc->startCodeFragment();
insideVerbatim=TRUE;
BEGIN(DocVerbatim); BEGIN(DocVerbatim);
} }
<DocVerbatim>{CMD}"endverbatim"/[^a-z_A-Z0-9] { <DocVerbatim>{CMD}"endverbatim"/[^a-z_A-Z0-9] {
outDoc->endCodeFragment(); outDoc->endCodeFragment();
insideVerbatim=FALSE;
BEGIN(DocScan); BEGIN(DocScan);
} }
<DocVerbatim>[^\n\\\@]*"\n" { <DocVerbatim>[^\n\\\@]*"\n" {
...@@ -1939,14 +1942,30 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1939,14 +1942,30 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<DocScan>"<"{OL}{ATTR}">" { outDoc->startEnumList(); <DocScan>"<"{OL}{ATTR}">" { outDoc->startEnumList();
currentListIndentLevel++; currentListIndentLevel++;
} }
<DocScan>"</"{OL}{ATTR}">" { outDoc->endEnumList(); <DocScan>"</"{OL}{ATTR}">" {
currentListIndentLevel--; if (currentListIndentLevel<=0)
{
warn("Warning: more </ol> tags than <ol> tags in the documentation of %s\n",yyFileName);
}
else
{
outDoc->endEnumList();
currentListIndentLevel--;
}
} }
<DocScan>"<"{UL}{ATTR}">" { outDoc->startItemList(); <DocScan>"<"{UL}{ATTR}">" { outDoc->startItemList();
currentListIndentLevel++; currentListIndentLevel++;
} }
<DocScan>"</"{UL}{ATTR}">" { outDoc->endItemList(); <DocScan>"</"{UL}{ATTR}">" {
currentListIndentLevel--; if (currentListIndentLevel<=0)
{
warn("Warning: more </ul> tags than <ul> tags in the documentation of %s\n",yyFileName);
}
else
{
outDoc->endItemList();
currentListIndentLevel--;
}
} }
<DocScan>"<"{LI}{ATTR}">" { outDoc->writeListItem(); } <DocScan>"<"{LI}{ATTR}">" { outDoc->writeListItem(); }
<DocScan>"</"{LI}{ATTR}">" <DocScan>"</"{LI}{ATTR}">"
...@@ -1958,8 +1977,16 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -1958,8 +1977,16 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<DocScan>"<"{DL}{ATTR}">" { outDoc->startDescription(); <DocScan>"<"{DL}{ATTR}">" { outDoc->startDescription();
currentListIndentLevel++; currentListIndentLevel++;
} }
<DocScan>"</"{DL}{ATTR}">" { outDoc->endDescription(); <DocScan>"</"{DL}{ATTR}">" {
currentListIndentLevel--; if (currentListIndentLevel<=0)
{
warn("Warning: more </dl> tags than <dl> tags in the documentation of %s\n",yyFileName);
}
else
{
outDoc->endDescription();
currentListIndentLevel--;
}
} }
<DocScan>"<"{DT}{ATTR}">" { outDoc->startDescItem(); } <DocScan>"<"{DT}{ATTR}">" { outDoc->startDescItem(); }
<DocScan>"</"{DT}{ATTR}">" <DocScan>"</"{DT}{ATTR}">"
...@@ -2813,7 +2840,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -2813,7 +2840,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<CopyCurly>"'"\\[0-7]{1,3}"'" { *pCopyCurlyString+=yytext; } <CopyCurly>"'"\\[0-7]{1,3}"'" { *pCopyCurlyString+=yytext; }
<CopyCurly>"'"\\."'" { *pCopyCurlyString+=yytext; } <CopyCurly>"'"\\."'" { *pCopyCurlyString+=yytext; }
<CopyCurly>"'"."'" { *pCopyCurlyString+=yytext; } <CopyCurly>"'"."'" { *pCopyCurlyString+=yytext; }
<CopyCurly>[^"'{}\n]+ { <CopyCurly>[^"'{}\/\n]+ {
*pCopyCurlyString+=yytext; *pCopyCurlyString+=yytext;
} }
<CopyCurly>\n { <CopyCurly>\n {
...@@ -3316,6 +3343,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -3316,6 +3343,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
BEGIN( ReadFuncArgType ); BEGIN( ReadFuncArgType );
} }
<CopyArgCommentLine>\n { fullArgString+=yytext; <CopyArgCommentLine>\n { fullArgString+=yytext;
yyLineNr++;
if (lastCopyArgChar!=0) if (lastCopyArgChar!=0)
unput(lastCopyArgChar); unput(lastCopyArgChar);
BEGIN( ReadFuncArgType ); BEGIN( ReadFuncArgType );
...@@ -4870,11 +4898,12 @@ void parseDocument(OutputList &ol,const QCString &docString) ...@@ -4870,11 +4898,12 @@ void parseDocument(OutputList &ol,const QCString &docString)
scanYYrestart( scanYYin ); scanYYrestart( scanYYin );
BEGIN( DocScan ); BEGIN( DocScan );
insideArgumentList = FALSE; insideArgumentList = FALSE;
insideVerbatim = FALSE;
scanYYlex(); scanYYlex();
if (insideArgumentList) { insideArgumentList=FALSE; outDoc->endItemList(); } if (insideArgumentList) { insideArgumentList=FALSE; outDoc->endItemList(); }
if (insideItemList) { forceEndItemList(); } if (insideItemList) { forceEndItemList(); }
if (inBlock()) endBlock(); if (inBlock()) endBlock();
if (currentListIndentLevel!=0) if (currentListIndentLevel>0)
{ {
if (!refName.isEmpty()) if (!refName.isEmpty())
{ {
...@@ -4902,6 +4931,10 @@ void parseDocument(OutputList &ol,const QCString &docString) ...@@ -4902,6 +4931,10 @@ void parseDocument(OutputList &ol,const QCString &docString)
{ {
forceEndTable(); forceEndTable();
} }
if (insideVerbatim)
{
warn("Warning: file ended inside a \\verbatim block!\n");
}
ol+=*outDoc; ol+=*outDoc;
delete outDoc; outDoc=0; delete outDoc; outDoc=0;
return; return;
...@@ -4931,6 +4964,7 @@ void parseDoc(OutputList &ol,const char *clName, ...@@ -4931,6 +4964,7 @@ void parseDoc(OutputList &ol,const char *clName,
refName="<unknown>"; refName="<unknown>";
} }
parseDocument(ol,docString); parseDocument(ol,docString);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -455,7 +455,14 @@ QCString argListToString(ArgumentList *al) ...@@ -455,7 +455,14 @@ QCString argListToString(ArgumentList *al)
result+="("; result+="(";
while (a) while (a)
{ {
result+= a->type+" "+a->name+a->array; if (!a->name.isEmpty() || !a->array.isEmpty())
{
result+= a->type+" "+a->name+a->array;
}
else
{
result+= a->type;
}
a = al->next(); a = al->next();
if (a) result+=","; if (a) result+=",";
} }
...@@ -877,7 +884,7 @@ static QCString trimScope(const QCString &name,const QCString &s) ...@@ -877,7 +884,7 @@ static QCString trimScope(const QCString &name,const QCString &s)
return result; return result;
} }
static QCString trimBaseClassScope(BaseClassList *bcl,const QCString &s,int level=0) void trimBaseClassScope(BaseClassList *bcl,QCString &s,int level=0)
{ {
//printf("trimBaseClassScope level=%d `%s'\n",level,s.data()); //printf("trimBaseClassScope level=%d `%s'\n",level,s.data());
BaseClassListIterator bcli(*bcl); BaseClassListIterator bcli(*bcl);
...@@ -885,18 +892,18 @@ static QCString trimBaseClassScope(BaseClassList *bcl,const QCString &s,int leve ...@@ -885,18 +892,18 @@ static QCString trimBaseClassScope(BaseClassList *bcl,const QCString &s,int leve
for (;(bcd=bcli.current());++bcli) for (;(bcd=bcli.current());++bcli)
{ {
ClassDef *cd=bcd->classDef; ClassDef *cd=bcd->classDef;
//printf("Trying class %s\n",cd->name().data());
int spos=s.find(cd->name()+"::"); int spos=s.find(cd->name()+"::");
if (spos!=-1) if (spos!=-1)
{ {
return s.left(spos)+s.right( s = s.left(spos)+s.right(
s.length()-spos-cd->name().length()-2 s.length()-spos-cd->name().length()-2
); );
} }
//printf("base class `%s'\n",cd->name().data()); //printf("base class `%s'\n",cd->name().data());
if (cd->baseClasses()->count()>0) if (cd->baseClasses()->count()>0)
trimBaseClassScope(cd->baseClasses(),s,level+1); trimBaseClassScope(cd->baseClasses(),s,level+1);
} }
return s;
} }
/*! if either t1 or t2 contains a namespace scope, then remove that /*! if either t1 or t2 contains a namespace scope, then remove that
...@@ -938,6 +945,44 @@ static void trimNamespaceScope(QCString &t1,QCString &t2) ...@@ -938,6 +945,44 @@ static void trimNamespaceScope(QCString &t1,QCString &t2)
} }
} }
/*! According to the C++ spec and Ivan Vecerina:
Parameter declarations that differ only in the presence or absence
of const and/or volatile are equivalent.
So the following example, show what is stripped by this routine
for const. The same is done for volatile.
\code
const T param -> T param // not relevant
const T& param -> const T& param // const needed
T* const param -> T* param // not relevant
const T* param -> const T* param // const needed
\endcode
*/
void stripIrrelevantConstVolatile(QCString &s)
{
int i,j;
i = s.find("const ");
if (i!=-1)
{
// no & or * after the const
if ((j=s.find('*',i+6))==-1 && (j=s.find('&',i+6))==-1)
{
s=s.left(i)+s.right(s.length()-i-6);
}
}
i = s.find("volatile ");
if (i!=-1)
{
// no & or * after the volatile
if ((j=s.find('*',i+9))==-1 && (j=s.find('&',i+9))==-1)
{
s=s.left(i)+s.right(s.length()-i-9);
}
}
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Matches the arguments list srcAl with the argument list dstAl // Matches the arguments list srcAl with the argument list dstAl
// Returns TRUE if the argument lists are equal. Two argument list are // Returns TRUE if the argument lists are equal. Two argument list are
...@@ -1014,6 +1059,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -1014,6 +1059,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
QCString dstAType=trimTemplateSpecifiers(className,dstA->type); QCString dstAType=trimTemplateSpecifiers(className,dstA->type);
if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6); if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6); if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
stripIrrelevantConstVolatile(srcAType);
stripIrrelevantConstVolatile(dstAType);
if (srcAType!=dstAType) // check if the argument only differs on name if (srcAType!=dstAType) // check if the argument only differs on name
{ {
...@@ -1039,8 +1086,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -1039,8 +1086,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
cd=getClass(className); cd=getClass(className);
if (cd && cd->baseClasses()->count()>0) if (cd && cd->baseClasses()->count()>0)
{ {
srcAType=trimBaseClassScope(cd->baseClasses(),srcAType); trimBaseClassScope(cd->baseClasses(),srcAType);
dstAType=trimBaseClassScope(cd->baseClasses(),dstAType); trimBaseClassScope(cd->baseClasses(),dstAType);
} }
//printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data()); //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
} }
......
# #
# $Id$ #
# #
# tmake configuration for aix-g++ # tmake configuration for aix-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for aix-xlc # tmake configuration for aix-xlc
# #
......
# #
# $Id$ #
# #
# tmake configuration for bsdi-shlicc++, bsdi 4.0 # tmake configuration for bsdi-shlicc++, bsdi 4.0
# #
......
# #
# $Id$ #
# #
# tmake configuration for linux-g++ # tmake configuration for linux-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for freebsd-g++ # tmake configuration for freebsd-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for linux-g++ # tmake configuration for linux-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for hpux-acc # tmake configuration for hpux-acc
# #
......
# #
# $Id$ #
# #
# tmake configuration for hpux-cc # tmake configuration for hpux-cc
# #
......
# #
# $Id$ #
# #
# tmake configuration for hpux-g++ # tmake configuration for hpux-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for irix-64 # tmake configuration for irix-64
# #
......
# #
# $Id$ #
# #
# tmake configuration for irix-dcc # tmake configuration for irix-dcc
# #
......
# #
# $Id$ #
# #
# tmake configuration for irix-g++ # tmake configuration for irix-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for irix-n32 # tmake configuration for irix-n32
# #
......
# #
# $Id$ #
# #
# tmake configuration for irix-o32 # tmake configuration for irix-o32
# #
......
# #
# $Id$ #
# #
# tmake configuration for linux-g++ # tmake configuration for linux-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for netbsd-g++ # tmake configuration for netbsd-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for netbsd-g++ # tmake configuration for netbsd-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for osf1-cxx (a.k.a. DEC Unix) # tmake configuration for osf1-cxx (a.k.a. DEC Unix)
# #
......
# #
# $Id$ #
# #
# tmake configuration for osf1-g++ (a.k.a. DEC Unix) # tmake configuration for osf1-g++ (a.k.a. DEC Unix)
# #
......
# #
# $Id$ #
# #
# tmake configuration for qnx-g++ # tmake configuration for qnx-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for sco-g++ # tmake configuration for sco-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for solaris-cc-gcc # tmake configuration for solaris-cc-gcc
# (Using SunPro CC for C++ code and gcc for C code.) # (Using SunPro CC for C++ code and gcc for C code.)
......
# #
# $Id$ #
# #
# tmake configuration for solaris-cc # tmake configuration for solaris-cc
# #
......
# #
# $Id$ #
# #
# tmake configuration for solaris-g++ # tmake configuration for solaris-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for sunos-g++ # tmake configuration for sunos-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for ultrix-g++ # tmake configuration for ultrix-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for sco-g++ # tmake configuration for sco-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for sco-g++ # tmake configuration for sco-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for sco-g++ # tmake configuration for sco-g++
# #
......
# #
# $Id$ #
# #
# tmake configuration for Win32/Borland C++ # tmake configuration for Win32/Borland C++
# #
......
# #
# $Id$ #
# #
# tmake configuration for Win32/g++ (Cygnus gnu-win32) # tmake configuration for Win32/g++ (Cygnus gnu-win32)
# #
......
# #
# $Id$ #
# #
# tmake configuration for Win32/Microsoft C++ # tmake configuration for Win32/Microsoft C++
# #
......
# #
# $Id$ #
# #
# tmake configuration for Win32/Symantec C++ # tmake configuration for Win32/Symantec C++
# #
......
# #
# $Id$ #
# #
# tmake configuration for Win32/IBM Visual Age # tmake configuration for Win32/IBM Visual Age
# #
......
# #
# $Id$ #
# #
# tmake configuration for Win32/Watcom C++ # tmake configuration for Win32/Watcom C++
# #
......
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