From 8013b5fe71402e6c6bfd867e348b6cad73bd7386 Mon Sep 17 00:00:00 2001 From: dimitri Date: Sun, 14 May 2000 18:44:15 +0000 Subject: Release-1.1.3-20000514 --- INSTALL | 8 +-- Makefile.in | 2 +- README | 4 +- VERSION | 2 +- configure | 8 ++- doc/config.doc | 14 +++-- doc/starting.doc | 20 +++++- packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 2 +- src/code.l | 91 +++++++++++++++++++++------ src/doxygen.cpp | 119 +++++++++++++++++++++++------------- src/htmlgen.cpp | 95 ++++++++++++++++++++-------- src/htmlgen.h | 4 ++ src/latexgen.h | 5 ++ src/mangen.h | 5 ++ src/memberdef.cpp | 29 ++++++--- src/outputgen.h | 4 ++ src/outputlist.h | 8 +++ src/rtfgen.h | 4 ++ src/scanner.l | 56 +++++++++++++---- src/util.cpp | 61 +++++++++++++++--- tmake/lib/aix-g++/tmake.conf | 2 +- tmake/lib/aix-xlc/tmake.conf | 2 +- tmake/lib/bsdi-g++/tmake.conf | 2 +- tmake/lib/dgux-g++/tmake.conf | 2 +- tmake/lib/freebsd-g++/tmake.conf | 2 +- tmake/lib/gnu-g++/tmake.conf | 2 +- tmake/lib/hpux-acc/tmake.conf | 2 +- tmake/lib/hpux-cc/tmake.conf | 2 +- tmake/lib/hpux-g++/tmake.conf | 2 +- tmake/lib/irix-64/tmake.conf | 2 +- tmake/lib/irix-dcc/tmake.conf | 2 +- tmake/lib/irix-g++/tmake.conf | 2 +- tmake/lib/irix-n32/tmake.conf | 2 +- tmake/lib/irix-o32/tmake.conf | 2 +- tmake/lib/linux-g++/tmake.conf | 2 +- tmake/lib/netbsd-g++/tmake.conf | 2 +- tmake/lib/openbsd-g++/tmake.conf | 2 +- tmake/lib/osf1-cxx/tmake.conf | 2 +- tmake/lib/osf1-g++/tmake.conf | 2 +- tmake/lib/qnx-g++/tmake.conf | 2 +- tmake/lib/sco-g++/tmake.conf | 2 +- tmake/lib/solaris-cc-gcc/tmake.conf | 2 +- tmake/lib/solaris-cc/tmake.conf | 2 +- tmake/lib/solaris-g++/tmake.conf | 2 +- tmake/lib/sunos-g++/tmake.conf | 2 +- tmake/lib/ultrix-g++/tmake.conf | 2 +- tmake/lib/unixware-g++/tmake.conf | 2 +- tmake/lib/unixware7-cc/tmake.conf | 2 +- tmake/lib/unixware7-g++/tmake.conf | 2 +- tmake/lib/win32-borland/tmake.conf | 2 +- tmake/lib/win32-g++/tmake.conf | 2 +- tmake/lib/win32-msvc/tmake.conf | 2 +- tmake/lib/win32-symantec/tmake.conf | 2 +- tmake/lib/win32-visage/tmake.conf | 2 +- tmake/lib/win32-watcom/tmake.conf | 2 +- 56 files changed, 450 insertions(+), 163 deletions(-) diff --git a/INSTALL b/INSTALL index e260373..7a7d9d7 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -DOXYGEN Version 1.1.3 +DOXYGEN Version 1.1.3-20000514 CONTENTS -------- @@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: 1. Unpack the archive, unless you already have: - gunzip doxygen-1.1.3.src.tar.gz # uncompress the archive - tar xf doxygen-1.1.3.src.tar # unpack it + gunzip doxygen-1.1.3-20000514.src.tar.gz # uncompress the archive + tar xf doxygen-1.1.3-20000514.src.tar # unpack it 2. Run the configure script: @@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (08 May 2000) +Dimitri van Heesch (14 May 2000) diff --git a/Makefile.in b/Makefile.in index defb3a4..da9f543 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,7 +21,7 @@ distclean: clean -rm -f html -rm -f objects/*.o -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 src/doxygen.pro src/doxytag.pro src/doxysearch.pro -rm -f src/version.cpp diff --git a/README b/README index c3245b6..9edb9be 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.1.3 +DOXYGEN Version 1.1.3-20000514 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (08 May 2000) +Dimitri van Heesch (14 May 2000) diff --git a/VERSION b/VERSION index 781dcb0..e537034 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.3 +1.1.3-20000514 diff --git a/configure b/configure index d5389ec..f70bf48 100755 --- a/configure +++ b/configure @@ -349,9 +349,15 @@ fi touch .tmakeconfig if test "$f_shared" = NO; then + if test "$f_platform" = "osf1-cxx"; then cat >> .tmakeconfig <> .tmakeconfig <isLinkable()) { @@ -374,7 +374,7 @@ static ClassDef *stripClassName(const char *s) int p=0,i,l; 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; p=i+l; } @@ -579,8 +579,10 @@ B [ \t] BN [ \t\n\r] ID [a-z_A-Z][a-z_A-Z0-9]* 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") -TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t") +SCOPEPREFIX {ID}{B}*"::"({B}*{ID}{B}*"::")* +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 @@ -603,7 +605,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u %% <*>\x0d -^([ \t]*"#"[ \t]"include"[ \t]*)("<"|"\"") { +^([ \t]*"#"[ \t]*"include"[ \t]*)("<"|"\"") { startFontClass("preprocessor"); g_code->codify(yytext); BEGIN( ReadInclude ); @@ -728,22 +730,54 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u } -{KEYWORD}/([^a-z_A-Z0-9]) { +{SCOPEPREFIX}*{B}*"operator"{B}*"()"{B}*/"(" { + addType(); + generateFunctionLink(*g_code,yytext); + g_bracketCount=1; + g_args.resize(0); + g_name+=yytext; + BEGIN( FuncCall ); + } +{SCOPEPREFIX}*{B}*"operator"{B}*[^\(\n]+/"(" { + addType(); + generateFunctionLink(*g_code,yytext); + g_bracketCount=1; + g_args.resize(0); + g_name+=yytext; + BEGIN( FuncCall ); + } +{KEYWORD}/([^a-z_A-Z0-9]) { startFontClass("keyword"); codifyLines(yytext); endFontClass(); } -{KEYWORD}/{B}* { +{KEYWORD}/{B}* { startFontClass("keyword"); codifyLines(yytext); endFontClass(); } -{KEYWORD}/{B}*"(" { +{KEYWORD}/{B}*"(" { startFontClass("keyword"); codifyLines(yytext); endFontClass(); g_name.resize(0);g_type.resize(0); } +{FLOWKW}/([^a-z_A-Z0-9]) { + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + } +{FLOWKW}/{B}* { + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + } +{FLOWKW}/{B}*"(" { + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + g_name.resize(0);g_type.resize(0); + } [\\|\)\+\-\/\%\~\!] { g_code->codify(yytext); g_name.resize(0);g_type.resize(0); @@ -756,13 +790,13 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u } */ {TYPEKW}/{B}* { - startFontClass("keyword"); + startFontClass("keywordtype"); g_code->codify(yytext); endFontClass(); addType(); g_name+=yytext; } -{SCOPENAME}{B}*"<"[^\}\{\(\)\/\n\>]*">"/{B}* { +{SCOPENAME}{B}*"<"[^\"\}\{\(\)\/\n\>]*">"/{B}* { int i; generateClassLink(*g_code,yytext,&i); addType(); @@ -771,23 +805,19 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u } {SCOPENAME}/{B}* { generateClassLink(*g_code,yytext); - //codifyLines(yytext); addType(); g_name+=yytext; } {SCOPENAME}/{B}*"(" { addType(); - //if (type.isEmpty()) - QCString tmp=yytext; generateFunctionLink(*g_code,yytext); - //else - // g_code->codify(yytext); g_bracketCount=1; g_args.resize(0); g_name+=yytext; BEGIN( FuncCall ); } \" { + startFontClass("stringliteral"); g_code->codify(yytext); g_lastStringContext=YY_START; BEGIN( SkipString ); @@ -800,6 +830,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u } \" { g_code->codify(yytext); + endFontClass(); BEGIN( g_lastStringContext ); } \\. { @@ -809,8 +840,10 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u g_code->codify(yytext); g_name.resize(0);g_type.resize(0); } -"'"((\\.)|(.))"'" { +"'"((\\0[Xx0-9]+)|(\\.)|(.))"'" { + startFontClass("charliteral"); g_code->codify(yytext); + endFontClass(); } "this->" { g_code->codify(yytext); } "."|"->" { @@ -843,13 +876,27 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u [0-9]+ { g_code->codify(yytext); } -({KEYWORD}|{TYPEKW})/([^a-z_A-Z0-9]) { +{KEYWORD}/([^a-z_A-Z0-9]) { addParmType(); g_parmName=yytext; startFontClass("keyword"); g_code->codify(yytext); endFontClass(); } +{TYPEKW}/([^a-z_A-Z0-9]) { + addParmType(); + g_parmName=yytext; + startFontClass("keywordtype"); + g_code->codify(yytext); + endFontClass(); + } +{FLOWKW}/([^a-z_A-Z0-9]) { + addParmType(); + g_parmName=yytext; + startFontClass("keywordflow"); + g_code->codify(yytext); + endFontClass(); + } [a-z_A-Z][:a-z_A-Z0-9]* { addParmType(); g_parmName=yytext; @@ -943,7 +990,7 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u endFontClass(); BEGIN( g_lastCContext ) ; } -[^\r\n]* { +[^\r\n]+ { g_code->codify(yytext); } \r @@ -1038,7 +1085,11 @@ TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"u } 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"); codifyLines(yytext); BEGIN(SkipComment); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index c40a4da..40a21f8 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -154,7 +154,7 @@ int documentedIncludeFiles; QTextStream tagFile; 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]*"; QCString spaces; @@ -782,9 +782,16 @@ void findUsingDirectives(Entry *root) //---------------------------------------------------------------------- -static MemberDef *addVariableToClass(Entry *root,ClassDef *cd, - MemberDef::MemberType mtype,const QCString &scope,const QCString &name, - bool fromAnnScope,int indentDepth,MemberDef *fromAnnMemb,Protection prot) +static MemberDef *addVariableToClass( + Entry *root, + ClassDef *cd, + MemberDef::MemberType mtype, + const QCString &scope, + const QCString &name, + bool fromAnnScope, + int indentDepth, + MemberDef *fromAnnMemb, + Protection prot) { Debug::print(Debug::Variables,0, " class variable:\n" @@ -832,7 +839,7 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd, if (md->memberClass()==cd && root->type==md->typeString()) // member already in the scope { - addMemberDocs(root,md,def,FALSE); + addMemberDocs(root,md,def,0,FALSE); return md; } md=mn->next(); @@ -885,9 +892,14 @@ static MemberDef *addVariableToClass(Entry *root,ClassDef *cd, //---------------------------------------------------------------------- -static MemberDef *addVariableToFile(Entry *root,MemberDef::MemberType mtype, - const QCString &scope,const QCString &name, - bool fromAnnScope,int indentDepth,MemberDef *fromAnnMemb) +static MemberDef *addVariableToFile( + Entry *root, + MemberDef::MemberType mtype, + const QCString &scope, + const QCString &name, + bool fromAnnScope, + int indentDepth, + MemberDef *fromAnnMemb) { Debug::print(Debug::Variables,0, " global variable:\n" @@ -1134,7 +1146,8 @@ void buildVarList(Entry *root) else // annonymous scope inside namespace or file => put variable in the global scope { //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, { // TODO: here we should try to find the correct template specialization // but for now, we only look for the unspecializated base class. - int e = baseClassName.find('>'); - if (e!=-1) + // locate end of template + int e=i+1; + int brCount=1; + int typeLen = baseClassName.length(); + while (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); //printf("baseClass=%p baseClass=%s templSpec=%s\n", // baseClass,baseClassName.data(),templSpec.data()); @@ -1796,7 +1818,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, } 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); // add base class to this class cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec); @@ -1947,8 +1969,12 @@ void computeMemberReferences() // set the function declaration of the member to `funcDecl'. If the boolean // over_load is set the standard overload text is added. -void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, - bool over_load,NamespaceList *nl) +void addMemberDocs(Entry *root, + MemberDef *md, const char *funcDecl, + ArgumentList *al, + bool over_load, + NamespaceList *nl + ) { //printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s'\n", // root->parent->name.data(),md->name().data(),md->argsString(),funcDecl); @@ -1958,15 +1984,22 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, md->setDefinition(fDecl); ClassDef *cd=md->memberClass(); NamespaceDef *nd=md->getNamespace(); - if (matchArguments(md->argumentList(),root->argList, - cd ? cd->name().data() : 0, - nd ? nd->name().data() : 0, - TRUE, - nl - ) - ) + if (al) { - 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 { @@ -2133,20 +2166,19 @@ static bool findUnrelatedFunction(Entry *root, { Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n", md->name().data(),namespaceName.data()); - //printf("Searching for match between %s and %s\n", - // argListToString(md->argumentList()).data(), - // argListToString(root->argList).data()); + //ArgumentList *al = new ArgumentList; + //stringToArgumentList(funcArgs,al); QCString nsName = nd ? nd->name().data() : ""; bool matching= - /*matchArguments(md->argsString(),args);*/ (md->argumentList()==0 && root->argList->count()==0) || matchArguments(md->argumentList(),root->argList,0,nsName); if (matching) // add docs to the member { Debug::print(Debug::FindMembers,0,"5. Match found\n"); - addMemberDocs(root,md,decl,FALSE); + addMemberDocs(root,md,decl,root->argList,FALSE); found=TRUE; } + //delete al; } md=mn->next(); } @@ -2468,7 +2500,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, } } - if (root->tArgList==0 && !classTempList.isEmpty()) { // no template specifiers found during parsing (because \fn was used), @@ -2542,13 +2573,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, QCString fullFuncDecl=funcDecl.copy(); 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, "findMember() Parse results:\n" " namespaceName=`%s'\n" @@ -2693,7 +2717,9 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, argList /* dest argument list */ ); if (substDone) // delete old argument list + { delete oldArgList; + } substDone=TRUE; } @@ -2731,13 +2757,15 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, md->setArgumentList(argList); } else // no match -> delete argument list + { delete argList; + } } if (matching) { //printf("addMemberDocs root->inLine=%d md->isInline()=%d\n", // root->inLine,md->isInline()); - addMemberDocs(root,md,funcDecl,overloaded,nl); + addMemberDocs(root,md,funcDecl,0,overloaded,nl); count++; } } @@ -2865,7 +2893,7 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded, if (!newMember && rmd) // member already exists as rmd -> add docs { //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) } else { - config=fileToString(argv[optind]); - configName=argv[optind]; + QFileInfo fi(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); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index b71f7a0..0b58044 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -207,9 +207,13 @@ void HtmlGenerator::writeStyleInfo(int part) 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.groupText { margin-left: 16; font-style: italic; font-size: smaller }" << endl; - t << "FONT.keyword { color: #008000 }" << endl; - t << "FONT.comment { color: #800000 }" << endl; - t << "FONT.preprocessor { color: #806020 }" << endl; + t << "FONT.keyword { color: #008000 }" << endl; + t << "FONT.keywordtype { color: #604020 }" << 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 << endl; endPlainFile(); @@ -603,24 +607,6 @@ void HtmlGenerator::endMemberItem(bool) t << endl; } -void HtmlGenerator::startParameter(bool first) -{ - if (first) - { - t << endl << "" << endl; - t << "" << endl; - } - else - { - t << "" << endl; - } -} - -void HtmlGenerator::endParameter(bool) -{ - t << "" << endl; -} - void HtmlGenerator::insertMemberAlign() { @@ -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 *) { + DBG_HTML(t << "" << endl;) t << "

" << endl; t << "" << endl; t << " " << endl; t << " " << endl; t << " " << endl; diff --git a/src/htmlgen.h b/src/htmlgen.h index 3fdc67c..7dc63e0 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -224,6 +224,10 @@ class HtmlGenerator : public OutputGenerator void endTextBlock() {} void lastIndexPage() {} + void startMemberDocPrefixItem(); + void endMemberDocPrefixItem(); + void startMemberDocName(); + void endMemberDocName(); void startParameter(bool first); void endParameter(bool last); diff --git a/src/latexgen.h b/src/latexgen.h index 8945723..a3e10c3 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -219,6 +219,11 @@ class LatexGenerator : public OutputGenerator void startTextBlock(bool) {} void endTextBlock() {} + + void startMemberDocPrefixItem() {} + void endMemberDocPrefixItem() {} + void startMemberDocName() {} + void endMemberDocName() {} void startParameter(bool) {} void endParameter(bool) {} diff --git a/src/mangen.h b/src/mangen.h index c68ec5c..cb3b0a4 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -206,6 +206,11 @@ class ManGenerator : public OutputGenerator void startTextBlock(bool) {} void endTextBlock() {} void lastIndexPage() {} + + void startMemberDocPrefixItem() {} + void endMemberDocPrefixItem() {} + void startMemberDocName() {} + void endMemberDocName() {} void startParameter(bool) {} void endParameter(bool) {} diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 1980587..dab56ea 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -73,6 +73,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, if (argList==0) return; // member has no function like argument list if (!md->isDefine()) ol.docify(" "); ol.docify("("); // start argument list + ol.endMemberDocName(); Argument *a=argList->first(); QCString cName; if (md->scopeDefTemplateArguments()) @@ -101,11 +102,11 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, } //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; while (a) { - if (!md->isDefine()) ol.startParameter(first); else ol.docify(" "); - first=FALSE; QRegExp re(")("); int vp; if (!a->attrib.isEmpty()) // argument has an IDL attribute @@ -155,12 +156,17 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, if (a) { 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.disableAllBut(OutputGenerator::Html); - ol.writeString(" "); + if (!first) ol.writeString(" "); ol.popGeneratorState(); ol.docify(")"); // end argument list if (argList->constSpecifier) @@ -192,11 +198,11 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE) ol.docify("> "); if (br) { - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Man); - ol.disable(OutputGenerator::Latex); - ol.lineBreak(); - ol.popGeneratorState(); + // ol.pushGeneratorState(); + // ol.disable(OutputGenerator::Man); + // ol.disable(OutputGenerator::Latex); + // ol.lineBreak(); + // ol.popGeneratorState(); } } @@ -914,13 +920,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, // ) if (scopeAl && !related) // class template prefix { + ol.startMemberDocPrefixItem(); writeTemplatePrefix(ol,scopeAl); + ol.endMemberDocPrefixItem(); } if (scopeAl && membAl) ol.docify(" "); if (membAl) // function template prefix { + ol.startMemberDocPrefixItem(); writeTemplatePrefix(ol,membAl); + ol.endMemberDocPrefixItem(); } if (cd) { @@ -940,6 +950,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, def=addTemplateNames(def,cName,tempArgListToString(scopeAl)); } } + ol.startMemberDocName(); linkifyText(ol,scopeName,name(),def); writeDefArgumentList(ol,cd,scopeName,this); if (!init.isEmpty() && initLines==0) // add initializer diff --git a/src/outputgen.h b/src/outputgen.h index add49b5..d7d30a1 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -210,6 +210,10 @@ class OutputGenerator virtual void endTextBlock() = 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 endParameter(bool) = 0; diff --git a/src/outputlist.h b/src/outputlist.h index 7ae0827..d59320c 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -364,6 +364,14 @@ class OutputList void 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) { forall(&OutputGenerator::startParameter,first); } void endParameter(bool last) diff --git a/src/rtfgen.h b/src/rtfgen.h index f40c71e..634cfd3 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -208,6 +208,10 @@ class RTFGenerator : public OutputGenerator void endTextBlock(); void lastIndexPage(); + void startMemberDocPrefixItem() {} + void endMemberDocPrefixItem() {} + void startMemberDocName() {} + void endMemberDocName() {} void startParameter(bool) {} void endParameter(bool) {} diff --git a/src/scanner.l b/src/scanner.l index 24047ea..6f2fea7 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -151,6 +151,7 @@ static QCString formulaText; static QCString sectionRef; static bool insideIDL = FALSE; static bool insideCppQuote = FALSE; +static bool insideVerbatim = FALSE; static int depthIf; // state variable for reading the argument list of a function @@ -778,7 +779,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) FileDef *fd; if ((fd=findFileDef(&imageNameDict,fileName,ambig))) { - QFile inImage(fd->absFilePath()); + QFile inImage(fd->absFilePath().data()); if (inImage.open(IO_ReadOnly)) { result = fileName; @@ -798,7 +799,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) break; } QCString outputFile = outputDir+"/"+result; - QFile outImage(outputFile); + QFile outImage(outputFile.data()); if (outImage.open(IO_WriteOnly)) // copy the image { char *buffer = new char[inImage.size()]; @@ -1125,7 +1126,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ^{B}*(("//"{B}*)?)"*"*{B}*"-"{B}+ { /* found list item marker */ addListItemMarker(yytext); } -\n{B}*"-" { +\n{B}*(("//"{B}*)?)"*"*{B}*"-"{B}+ { addListItemMarker(yytext+1); } "
" << endl; t << " " << endl; +} + +void HtmlGenerator::startMemberDocPrefixItem() +{ + DBG_HTML(t << "" << endl;) t << " " << endl; - t << " " << endl; + t << " " << endl; +} + +void HtmlGenerator::startMemberDocName() +{ + DBG_HTML(t << "" << endl;) + t << " " << endl; + t << " " << endl; +} + +void HtmlGenerator::startParameter(bool first) +{ + if (first) + { + DBG_HTML(t << "" << endl;) + t << " " << endl; + t << " " << endl; + t << " " << endl; + //t << " " << endl; + t << " " << endl; + } + else + { + DBG_HTML(t << "" << endl;) + t << endl; + t << " " << endl; + t << " " << endl; + } } void HtmlGenerator::endMemberDoc() { + DBG_HTML(t << "" << endl;) t << endl; - t << " " << endl; - t << " " << endl; t << "
" << endl; + t << " " << endl; +} + +void HtmlGenerator::endMemberDocPrefixItem() +{ + DBG_HTML(t << "" << endl;) + t << "
" << endl; +} + +void HtmlGenerator::endMemberDocName() +{ + DBG_HTML(t << "" << endl;) + t << endl; + t << " " << endl; + } + else + { + DBG_HTML(t << "" << endl;) + t << "
" << endl; + } +} + +void HtmlGenerator::endParameter(bool first) +{ + if (first) + { + DBG_HTML(t << "" << endl;) + t << endl; + t << "
" << endl; t << "