diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-05-30 19:35:30 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-05-30 19:35:30 (GMT) |
commit | ad65c6e23de430b2c4f0ef732b95834c87a28c20 (patch) | |
tree | 3ef766a4fc3d6b5bf1987b9041d5046e2362c52e | |
parent | 44904635bc78fae2ce60fc942cc5b7cba9958a34 (diff) | |
download | Doxygen-ad65c6e23de430b2c4f0ef732b95834c87a28c20.zip Doxygen-ad65c6e23de430b2c4f0ef732b95834c87a28c20.tar.gz Doxygen-ad65c6e23de430b2c4f0ef732b95834c87a28c20.tar.bz2 |
Release-1.4.3-20050530
-rw-r--r-- | Doxyfile | 15 | ||||
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | Makefile.in | 6 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | src/classdef.cpp | 13 | ||||
-rw-r--r-- | src/commentscan.l | 31 | ||||
-rw-r--r-- | src/definition.cpp | 2 | ||||
-rw-r--r-- | src/docparser.cpp | 14 | ||||
-rw-r--r-- | src/doctokenizer.l | 4 | ||||
-rw-r--r-- | src/dot.cpp | 172 | ||||
-rw-r--r-- | src/doxygen.cpp | 203 | ||||
-rw-r--r-- | src/doxytag.l | 100 | ||||
-rw-r--r-- | src/filedef.cpp | 12 | ||||
-rw-r--r-- | src/groupdef.cpp | 4 | ||||
-rw-r--r-- | src/htmlgen.cpp | 9 | ||||
-rw-r--r-- | src/index.cpp | 2 | ||||
-rw-r--r-- | src/index.h | 2 | ||||
-rw-r--r-- | src/memberlist.cpp | 4 | ||||
-rw-r--r-- | src/pre.l | 4 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/scanner.l | 3 | ||||
-rw-r--r-- | src/util.cpp | 203 | ||||
-rw-r--r-- | src/util.h | 4 | ||||
-rw-r--r-- | src/xmlgen.cpp | 26 |
25 files changed, 335 insertions, 510 deletions
@@ -1,4 +1,4 @@ -# Doxyfile 1.3.7 +# Doxyfile 1.4.3 #--------------------------------------------------------------------------- # Project related configuration options @@ -23,6 +23,7 @@ MULTILINE_CPP_IS_BRIEF = NO DETAILS_AT_TOP = NO INHERIT_DOCS = YES DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO @@ -55,6 +56,8 @@ GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- @@ -62,6 +65,7 @@ QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- @@ -87,7 +91,8 @@ EXCLUDE = src/code.cpp \ src/suffixtree.h \ src/searchindex.cpp \ src/searchindex.h \ - src/commentcnv.cpp + src/commentcnv.cpp \ + src/commentscan.cpp EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = @@ -95,6 +100,7 @@ EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = +FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing @@ -104,6 +110,7 @@ INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES +USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index @@ -209,18 +216,22 @@ HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES CLASS_GRAPH = YES COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES UML_LOOK = NO TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = NO CALL_GRAPH = NO GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- @@ -1,7 +1,7 @@ -DOXYGEN Version 1.4.3 +DOXYGEN Version 1.4.3-20050530 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (16 May 2005) +Dimitri van Heesch (30 May 2005) diff --git a/Makefile.in b/Makefile.in index 4b89e6d..84783ea 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,9 +53,9 @@ install: doxywizard_install $(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin $(INSTTOOL) -m 755 bin/doxytag $(INSTALL)/bin $(INSTTOOL) -d $(INSTALL)/$(MAN1DIR) - cat doc/doxygen.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxygen.1 ; \ - cat doc/doxytag.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxytag.1 ; \ - cat doc/doxywizard.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxywizard.1 ; + cat doc/doxygen.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxygen.1 ; \ + cat doc/doxytag.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxytag.1 ; \ + cat doc/doxywizard.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxywizard.1 ; install_docs: $(INSTTOOL) -d $(DOCDIR) @@ -1,4 +1,4 @@ -DOXYGEN Version 1.4.3 +DOXYGEN Version 1.4.3_20050530 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (16 May 2005) +Dimitri van Heesch (dimitri@stack.nl) (30 May 2005) @@ -1 +1 @@ -1.4.3 +1.4.3-20050530 diff --git a/src/classdef.cpp b/src/classdef.cpp index dd419bb..6a80aca 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1037,13 +1037,13 @@ void ClassDef::writeDocumentation(OutputList &ol) { ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - ol.writeString("<!-- doxytag: class=<"); + ol.writeString("<!-- doxytag: class=\""); ol.docify(name()); - ol.writeString("> -->"); + ol.writeString("\" -->"); if (m_inherits->count()>0) { BaseClassListIterator bli(*m_inherits); - ol.writeString("<!-- doxytag: inherits=<"); + ol.writeString("<!-- doxytag: inherits=\""); BaseClassDef *bcd=0; bool first=TRUE; for (bli.toFirst();(bcd=bli.current());++bli) @@ -1052,7 +1052,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.docify(bcd->classDef->name()); first=FALSE; } - ol.writeString("> -->"); + ol.writeString("\" -->"); } ol.popGeneratorState(); } @@ -2168,16 +2168,11 @@ void ClassDef::mergeMembers() if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE)) // member is in the same or a base class { -#ifdef NEWMATCH found=matchArguments2( srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->argumentList(), dstMd->getOuterScope(),dstMd->getFileDef(),dstMd->argumentList(), TRUE ); -#else - found=matchArguments(srcMd->argumentList(), - dstMd->argumentList()); -#endif //printf(" Yes, matching (%s<->%s): %d\n", // argListToString(srcMd->argumentList()).data(), // argListToString(dstMd->argumentList()).data(), diff --git a/src/commentscan.l b/src/commentscan.l index 31a7c52..859cc1b 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -327,6 +327,7 @@ static Protection protection; static bool xrefAppendFlag; static bool inGroupParamFound; +static int braceCount; //----------------------------------------------------------------------------- @@ -855,14 +856,11 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) addOutput(yytext[2]); } <Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command) - if (inContext==OutputBrief) - { - setOutput(OutputDoc); - } - else + if (inContext!=OutputBrief) { addOutput(yytext); } + setOutput(OutputDoc); lineCount(); } <Comment>"." { // potential end of a JavaDoc style comment @@ -1557,18 +1555,30 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) /* ----- handle argument of fn command ------- */ <FnParam>{DOCNL} { // end of argument - if (*yytext=='\n') yyLineNr++; - addOutput('\n'); - langParser->parsePrototype(functionProto); - BEGIN( Comment ); + if (braceCount==0) + { + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + //printf("functionProto=%s\n",functionProto.data()); + langParser->parsePrototype(functionProto); + BEGIN( Comment ); + } } <FnParam>{LC} { // line continuation yyLineNr++; functionProto+=' '; } -<FnParam>[^@\\\n]+ { // non-special characters +<FnParam>[^@\\\n()]+ { // non-special characters functionProto+=yytext; } +<FnParam>"(" { + functionProto+=yytext; + braceCount++; + } +<FnParam>")" { + functionProto+=yytext; + braceCount--; + } <FnParam>. { // add other stuff functionProto+=*yytext; } @@ -1655,6 +1665,7 @@ static void handleFn(const QCString &) { makeStructuralIndicator(Entry::MEMBERDOC_SEC); functionProto.resize(0); + braceCount=0; BEGIN(FnParam); } diff --git a/src/definition.cpp b/src/definition.cpp index b9d7104..dd0fa5c 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -253,7 +253,7 @@ static bool readCodeFragment(const char *fileName, { //printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine); if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name - QCString cmd="\"" + getFileFilter(fileName)+"\" \""+fileName+"\""; + QCString cmd=getFileFilter(fileName)+" \""+fileName+"\""; FILE *f = Config_getBool("FILTER_SOURCE_FILES") ? popen(cmd,"r") : fopen(fileName,"r"); bool found=FALSE; if (f) diff --git a/src/docparser.cpp b/src/docparser.cpp index 99def6e..740eba6 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -555,7 +555,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, int funcStart=cmdArg.find('('); if (funcStart==-1) funcStart=l; - QString name=cmdArg.left(funcStart); + QString name=removeRedundantWhiteSpace(cmdArg.left(funcStart).latin1()); QString args=cmdArg.right(l-funcStart); // try if the link is to a member @@ -2684,6 +2684,18 @@ int DocHtmlCell::parse() if (isFirst) { par->markFirst(); isFirst=FALSE; } m_children.append(par); retval=par->parse(); + if (retval==TK_HTMLTAG) + { + int tagId=HtmlTagMapper::map(g_token->name); + if (tagId==HTML_TD && g_token->endTag) // found </dt> tag + { + retval=TK_NEWPARA; // ignore the tag + } + else if (tagId==HTML_TH && g_token->endTag) // found </th> tag + { + retval=TK_NEWPARA; // ignore the tag + } + } } while (retval==TK_NEWPARA); if (par) par->markLast(); diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 7cca73b..640c562 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -297,7 +297,7 @@ FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+] FILEECHAR [a-z_A-Z0-9\-\+] HFILEMASK ("."{FILESCHAR}*{FILEECHAR}+)* FILEMASK ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK} -LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))? +LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)? SPCMD1 {CMD}[a-z_A-Z0-9]+ SPCMD2 {CMD}[\\@<>&$#%~] SPCMD3 {CMD}form#[0-9]+ @@ -316,7 +316,7 @@ OPNEW {BLANK}+"new"({BLANK}*"[]")? OPDEL {BLANK}+"delete"({BLANK}*"[]")? OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()" OPCAST {BLANK}+[^(\r\n.,]+ -OPMASK ({BLANK}*{OPNORM}{FUNCARG})|({OPCAST}{FUNCARG}) +OPMASK ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG}) LNKWORD1 ("::"|"#")?{SCOPEMASK} CVSPEC {BLANK}*("const"|"volatile") LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} diff --git a/src/dot.cpp b/src/dot.cpp index f26b82a..2adeeb6 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -566,6 +566,7 @@ static QCString convertLabel(const QCString &l) switch(c) { case '\\': result+="\\\\"; break; + case '\n': result+="\\n"; break; case '<': result+="\\<"; break; case '>': result+="\\>"; break; case '|': result+="\\|"; break; @@ -1126,14 +1127,6 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) return; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("\"%s\" -T%s -o \"%s\" -Timap -o \"%s\"", - // dotName.data(), imgExt.data(), imgName.data(), mapName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // return; - //} checkDotResult(imgName); if (Config_getBool("DOT_CLEANUP")) thisDir.remove(dotName); } @@ -1446,7 +1439,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) } else { - label+=QCString("\\n")+s; + label+=QCString("\n")+s; } } addClass(ucd->classDef,n,EdgeInfo::Purple,label,distance,0, @@ -1689,15 +1682,6 @@ static bool findMaximalDotGraph(DotNode *root, return FALSE; } - //QCString dotArgs(maxCmdLine); - //// create annotated dot file - //dotArgs.sprintf("-Tdot \"%s.dot\" -o \"%s_tmp.dot\"",baseName.data(),baseName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - // { - // err("Problems running dot. Check your installation!\n"); - // return FALSE; - //} - // extract bounding box from the result readBoundingBoxDot(baseName+"_tmp.dot",&width,&height); width = width *96/72; // 96 pixels/inch, 72 points/inch @@ -1842,20 +1826,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, return baseName; } - //dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", - // baseName.data(),imgExt.data(),imgName.data()); - //if (generateImageMap) - //{ - // // run dot also to create an image map - // dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", - // baseName.data()); - //} - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Error: Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} checkDotResult(imgName); } else if (format==EPS) // run dot to create a .eps image @@ -1868,14 +1838,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, return baseName; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"",baseName.data(),baseName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Error: Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); @@ -2122,20 +2084,6 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - //dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", - // baseName.data(),imgExt.data(),imgName.data()); - //if (generateImageMap) - //{ - // // run dot also to create an image map - // dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", - // baseName.data()); - //} - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} checkDotResult(imgName); } else if (format==EPS) @@ -2148,15 +2096,6 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"", - // baseName.data(),baseName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); @@ -2323,20 +2262,6 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QDir::setCurrent(oldDir); return baseName; } - //dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", - // baseName.data(),imgExt.data(),imgName.data()); - //if (generateImageMap) - //{ - // // run dot also to create an image map - // dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", - // baseName.data()); - //} - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} checkDotResult(imgName); } else if (format==EPS) @@ -2349,15 +2274,6 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QDir::setCurrent(oldDir); return baseName; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"", - // baseName.data(),baseName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); @@ -2530,20 +2446,6 @@ QCString DotDirDeps::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - //dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", - // baseName.data(),imgExt.data(),imgName.data()); - //if (generateImageMap) - //{ - // // run dot also to create an image map - // dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", - // baseName.data()); - //} - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} checkDotResult(imgName); } else if (format==EPS) @@ -2556,15 +2458,6 @@ QCString DotDirDeps::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"", - // baseName.data(),baseName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); @@ -2690,14 +2583,6 @@ void generateGraphLegend(const char *path) QDir::setCurrent(oldDir); return; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-T%s graph_legend.dot -o %s",imgExt.data(),imgName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return; - //} checkDotResult(imgName); QDir::setCurrent(oldDir); } @@ -2743,24 +2628,6 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, QDir::setCurrent(oldDir); return; } - //QCString dotArgs(maxCmdLine); - //if (format==BITMAP) - //{ - // dotArgs.sprintf("-T%s \"%s\" -o \"%s\"", - // imgExt.data(), - // inFile, - // imgName.data()); - //} - //else // format==EPS - //{ - // dotArgs.sprintf("-Tps \"%s\" -o \"%s.eps\"",inFile,outFile); - //} - //QCString dotExe = Config_getString("DOT_PATH")+"dot"; - ////printf("Running: %s %s\n",dotExe.data(),dotArgs.data()); - //if (iSystem(dotExe,dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - //} // Added by Nils Strom if ( (format==EPS) && (Config_getBool("USE_PDFLATEX")) ) { @@ -2805,16 +2672,6 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir, return ""; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-Timap \"%s\" -o \"%s\"", inFile.data(), outFile.data()); - //QCString dotExe = Config_getString("DOT_PATH") + "dot"; - ////printf("Running: %s %s\n",dotExe.data(),dotArgs.data()); - //if (iSystem(dotExe,dotArgs)!=0) - //{ - // err("Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return ""; - //} QString result; QTextOStream tmpout(&result); convertMapFile(tmpout, outFile, relPath ,TRUE); @@ -3091,21 +2948,6 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo QDir::setCurrent(oldDir); return baseName; } - //dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", - // baseName.data(), imgExt.data(), imgName.data()); - // - //if (writeImageMap) - //{ - // // run dot also to create an image map - // dotArgs+=" -Timap -o \""+mapName+"\""; - //} - // - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Error: Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} if (writeImageMap) { @@ -3128,15 +2970,7 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo QDir::setCurrent(oldDir); return baseName; } - //QCString dotArgs(maxCmdLine); - //dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"", - // baseName.data(),baseName.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - //{ - // err("Error: Problems running dot. Check your installation!\n"); - // QDir::setCurrent(oldDir); - // return baseName; - //} + if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 9b493d4..2a073bf 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -900,7 +900,7 @@ Definition *buildScopeFromQualifiedName(const QCString name,int level) // introduce bogus namespace //printf("adding dummy namespace %s to %s\n",nsName.data(),prevScope->name().data()); nd=new NamespaceDef( - "<generated>",1,fullScope); + "[generated]",1,fullScope); // add namespace to the list Doxygen::namespaceSDict.inSort(fullScope,nd); @@ -1950,7 +1950,6 @@ static void buildVarList(Entry *root) else mtype=MemberDef::Variable; - QCString classScope=stripAnonymousNamespaceScope(scope); classScope=stripTemplateSpecifiersFromScope(classScope,FALSE); QCString annScopePrefix=scope.left(scope.length()-classScope.length()); @@ -2315,23 +2314,14 @@ static void buildFunctionList(Entry *root) QCString nsName,rnsName; if (mnd) nsName = mnd->name().copy(); if (rnd) rnsName = rnd->name().copy(); -#ifdef NEWMATCH bool ambig; FileDef *rfd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); -#else - NamespaceSDict *unl = mfd ? mfd->getUsedNamespaces() : 0; - SDict<Definition> *ucl = mfd ? mfd->getUsedClasses() : 0; -#endif //printf("matching arguments for %s%s %s%s\n", // md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data()); if ( -#ifdef NEWMATCH matchArguments2(md->getOuterScope(),mfd,md->argumentList(), rnd ? rnd : Doxygen::globalScope,rfd,root->argList, FALSE) -#else - matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,unl,ucl) -#endif ) { GroupDef *gd=0; @@ -2604,23 +2594,12 @@ static void findFriends() //printf("Checking for matching arguments // mmd->isRelated()=%d mmd->isFriend()=%d mmd->isFunction()=%d\n", // mmd->isRelated(),mmd->isFriend(),mmd->isFunction()); -#ifndef NEWMATCH - NamespaceDef *nd=mmd->getNamespaceDef(); -#endif if ((mmd->isFriend() || (mmd->isRelated() && mmd->isFunction())) && -#ifdef NEWMATCH matchArguments2(mmd->getOuterScope(), mmd->getFileDef(), mmd->argumentList(), fmd->getOuterScope(), fmd->getFileDef(), fmd->argumentList(), TRUE ) -#else - matchArguments(mmd->argumentList(), - fmd->argumentList(), - mmd->getClassDef()->name(), - nd ? nd->name().data() : 0 - ) -#endif ) // if the member is related and the arguments match then the // function is actually a friend. { @@ -2733,14 +2712,10 @@ static void transferFunctionDocumentation() // mdef, mdef ? mdef->name().data() : "", // mdec, mdec ? mdec->name().data() : ""); if (mdef && mdec && -#ifdef NEWMATCH matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdef->argumentList(), mdec->getOuterScope(),mdec->getFileDef(),mdec->argumentList(), TRUE ) -#else - matchArguments(mdef->argumentList(),mdec->argumentList()) -#endif ) /* match found */ { //printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n", @@ -2875,14 +2850,10 @@ static void transferFunctionReferences() mdef=md; } if (mdef && mdec && -#ifdef NEWMATCH matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdef->argumentList(), mdec->getOuterScope(),mdec->getFileDef(),mdec->argumentList(), TRUE ) -#else - matchArguments(mdef->argumentList(),mdec->argumentList()) -#endif ) /* match found */ { MemberSDict *defDict = mdef->getReferencesMembers(); @@ -2968,14 +2939,10 @@ static void transferRelatedFunctionDocumentation() { //printf(" Member found: related=`%d'\n",rmd->isRelated()); if (rmd->isRelated() && // related function -#ifdef NEWMATCH matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(), rmd->getOuterScope(),rmd->getFileDef(),rmd->argumentList(), TRUE ) -#else - matchArguments(md->argumentList(),rmd->argumentList()) // match argument lists -#endif ) { //printf(" Found related member `%s'\n",md->name().data()); @@ -4015,9 +3982,6 @@ static void addMemberDocs(Entry *root, ArgumentList *al, bool over_load, NamespaceSDict * -#ifndef NEWMATCH - nl -#endif ) { //printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s' memSpec=%d\n", @@ -4040,10 +4004,8 @@ static void addMemberDocs(Entry *root, bool ambig; FileDef *rfd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); -#ifdef NEWMATCH // TODO determine scope based on root not md Definition *rscope = md->getOuterScope(); -#endif if (al) { @@ -4053,19 +4015,10 @@ static void addMemberDocs(Entry *root, else { if ( -#ifdef NEWMATCH matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(), rscope,rfd,root->argList, TRUE ) -#else - matchArguments(md->argumentList(),root->argList, - cd ? cd->name().data() : 0, - nd ? nd->name().data() : 0, - TRUE, - nl - ) -#endif ) { //printf("merging arguments (2)\n"); @@ -4233,7 +4186,7 @@ static bool findGlobalMember(Entry *root, FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); //printf("File %s\n",fd ? fd->name().data() : "<none>"); NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0; - SDict<Definition> *cl = fd ? fd->getUsedClasses() : 0; + //SDict<Definition> *cl = fd ? fd->getUsedClasses() : 0; //printf("NamespaceList %p\n",nl); // search in the list of namespaces that are imported via a @@ -4249,21 +4202,15 @@ static bool findGlobalMember(Entry *root, md->name().data(),namespaceName.data()); QCString nsName = nd ? nd->name().data() : ""; -#ifdef NEW_MATCH NamespaceDef *rnd = 0; if (!namespaceName.isEmpty()) rnd = Doxygen::namespaceSDict[namespaceName]; -#endif bool matching= (md->argumentList()==0 && root->argList->count()==0) || md->isVariable() || md->isTypedef() || /* in case of function pointers */ -#ifdef NEW_MATCH matchArguments2(md->getOuterScope(),md->getFileDef(),md->argumentList(), rnd ? rnd : Doxygen::globalScope,fd,root->argList, FALSE); -#else - matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,nl,cl); -#endif // for static members we also check if the comment block was found in // the same file. This is needed because static members with the same @@ -4287,7 +4234,7 @@ static bool findGlobalMember(Entry *root, if (!found && !root->relatesDup) // no match { QCString fullFuncDecl=decl; - if (root->argList) fullFuncDecl+=argListToString(root->argList); + if (root->argList) fullFuncDecl+=argListToString(root->argList,TRUE); warn(root->fileName,root->startLine, "Warning: no matching file member found for \n%s",fullFuncDecl.data()); if (mn->count()>0) @@ -4590,10 +4537,14 @@ static void findMember(Entry *root, { scopeName=namespaceName; } - else + else if (!getClass(className)) // class name only exists in a namespace { scopeName=namespaceName+"::"+className; } + else + { + scopeName=className; + } } else if (!className.isEmpty()) { @@ -4671,9 +4622,6 @@ static void findMember(Entry *root, } } - QCString fullFuncDecl=funcDecl.copy(); - if (isFunc) fullFuncDecl+=argListToString(root->argList); - if (funcType=="template class" && !funcTempList.isEmpty()) return; // ignore explicit template instantiations @@ -4809,12 +4757,10 @@ static void findMember(Entry *root, Debug::print(Debug::FindMembers,0, "5. matching `%s'<=>`%s' className=%s namespaceName=%s\n", - argListToString(argList).data(),argListToString(root->argList).data(), + argListToString(argList,TRUE).data(),argListToString(root->argList,TRUE).data(), className.data(),namespaceName.data() ); -#ifdef NEWMATCH - bool matching= md->isVariable() || md->isTypedef() || // needed for function pointers (md->argumentList()==0 && root->argList->count()==0) || @@ -4846,113 +4792,6 @@ static void findMember(Entry *root, count++; memFound=TRUE; } -#else // old matching routine - - // TODO: match loop for all possible scopes - - // list of namespaces using in the file/namespace that this - // member definition is part of - NamespaceSDict *nl = new NamespaceSDict; - if (nd) - { - NamespaceSDict *nnl = nd->getUsedNamespaces(); - if (nnl) - { - NamespaceDef *nnd; - NamespaceSDict::Iterator nsdi(*nnl); - for (nsdi.toFirst();(nnd=nsdi.current());++nsdi) - { - Debug::print(Debug::FindMembers,0," adding used namespace %s\n",nnd->qualifiedName().data()); - nl->append(nnd->qualifiedName(),nnd); - } - } - } - if (fd) - { - NamespaceSDict *fnl = fd->getUsedNamespaces(); - if (fnl) - { - NamespaceDef *fnd; - NamespaceSDict::Iterator nsdi(*fnl); - for (nsdi.toFirst();(fnd=nsdi.current());++nsdi) - { - Debug::print(Debug::FindMembers,0," adding used namespace %s\n",fnd->qualifiedName().data()); - nl->append(fnd->qualifiedName(),fnd); - } - } - } - - SDict<Definition> *cl = new SDict<Definition>(17); - if (nd) - { - SDict<Definition> *ncl = nd->getUsedClasses(); - if (ncl) - { - SDict<Definition>::Iterator csdi(*ncl); - Definition *ncd; - for (csdi.toFirst();(ncd=csdi.current());++csdi) - { - Debug::print(Debug::FindMembers,0," adding used class %s\n",ncd->qualifiedName().data()); - cl->append(ncd->qualifiedName(),ncd); - } - } - } - if (fd) - { - SDict<Definition> *fcl = fd->getUsedClasses(); - if (fcl) - { - SDict<Definition>::Iterator csdi(*fcl); - Definition *fcd; - for (csdi.toFirst();(fcd=csdi.current());++csdi) - { - Debug::print(Debug::FindMembers,0," adding used class %s\n",fcd->qualifiedName().data()); - cl->append(fcd->qualifiedName(),fcd); - } - } - } - - bool matching= - md->isVariable() || md->isTypedef() || // needed for function pointers - (md->argumentList()==0 && root->argList->count()==0) || - matchArguments(argList, root->argList,className,namespaceName, - TRUE,nl,cl); - - - Debug::print(Debug::FindMembers,0, - "6. match results = %d\n",matching); - - if (substDone) // found a new argument list - { - //printf("root->tArgList=`%s'\n",argListToString(root->tArgList).data()); - if (matching) // replace member's argument list - { - //printf("Setting scope template argument of member %s to %s\n", - // md->name().data(), argListToString(root->tArgList).data() - // ); - //printf("Setting member template argument of member %s to %s\n", - // md->name().data(), argListToString(root->mtArgList).data() - // ); - - md->setDefinitionTemplateParameterLists(root->tArgLists); - 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,0,overloaded,nl); - count++; - memFound=TRUE; - } - delete cl; - delete nl; -#endif } } if (count==0 && root->parent && root->parent->section==Entry::OBJCIMPL_SEC) @@ -4998,6 +4837,9 @@ static void findMember(Entry *root, warn_cont(" template %s\n",tempArgListToString(al).data()); } } + QCString fullFuncDecl=funcDecl.copy(); + if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); + warn_cont(" %s\n",fullFuncDecl.data()); if (candidates>0) @@ -5126,6 +4968,8 @@ static void findMember(Entry *root, { if (!findGlobalMember(root,namespaceName,funcName,funcTempList,funcArgs,funcDecl)) { + QCString fullFuncDecl=funcDecl.copy(); + if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); warn(root->fileName,root->startLine, "Warning: Cannot determine class for function\n%s", fullFuncDecl.data() @@ -5173,13 +5017,9 @@ static void findMember(Entry *root, { newMember=newMember && -#ifdef NEWMATCH !matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),rmd->argumentList(), cd,fd,root->argList, TRUE); -#else - !matchArguments(rmd->argumentList(),root->argList,className,namespaceName); -#endif if (newMember) rmd=mn->next(); } if (!newMember && rmd) // member already exists as rmd -> add docs @@ -5232,16 +5072,9 @@ static void findMember(Entry *root, { // check for matching argument lists if ( -#ifdef NEWMATCH matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),rmd->argumentList(), cd,fd,root->argList, TRUE) -#else - matchArguments(rmd->argumentList(), - root->argList, - className, - namespaceName) -#endif ) { found=TRUE; @@ -5297,6 +5130,8 @@ static void findMember(Entry *root, { if (!findGlobalMember(root,namespaceName,funcName,funcTempList,funcArgs,funcDecl)) { + QCString fullFuncDecl=funcDecl.copy(); + if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); warn(root->fileName,root->startLine, "Warning: Cannot determine file/namespace for relatedalso function\n%s", fullFuncDecl.data() @@ -5980,14 +5815,10 @@ static void computeMemberRelations() // argListToString(md->argumentList()).data() // ); if ( -#ifdef NEWMATCH matchArguments2(bmd->getOuterScope(),bmd->getFileDef(),bmd->argumentList(), md->getOuterScope(), md->getFileDef(), md->argumentList(), TRUE ) -#else - matchArguments(bmd->argumentList(),md->argumentList()) -#endif ) { //printf(" match found!\n"); @@ -7410,7 +7241,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) } else { - QCString cmd="\""+filterName+"\" \""+fileName+"\""; + QCString cmd=filterName+" \""+fileName+"\""; FILE *f=popen(cmd,"r"); if (!f) { diff --git a/src/doxytag.l b/src/doxytag.l index b9cf479..8fcc88e 100644 --- a/src/doxytag.l +++ b/src/doxytag.l @@ -193,9 +193,10 @@ QCString unhtmlify(const char *str) if (c!='&') { result+=c; p++; } else { - if (strncmp(p,"&",5)==0) { result+='&'; p+=5; } - else if (strncmp(p,"<",4)==0) { result+='<'; p+=4; } - else if (strncmp(p,">",4)==0) { result+='>'; p+=4; } + if (strncmp(p,"&",5)==0) { result+='&'; p+=5; } + else if (strncmp(p,"<",4)==0) { result+='<'; p+=4; } + else if (strncmp(p,">",4)==0) { result+='>'; p+=4; } + else if (strncmp(p,""",6)==0) { result+='"'; p+=4; } else /* should not happen */ { result+='&'; p++; } } } @@ -301,12 +302,13 @@ QCString unhtmlify(const char *str) } <Qt3ReadName>. <Qt3ReadArgs>[ \t]*"(" { - memberArgs+="("; + memberArgs+='('; } -<Qt3ReadArgs>"&" { memberArgs+="&"; } -<Qt3ReadArgs>"<" { memberArgs+="<"; } -<Qt3ReadArgs>">" { memberArgs+=">"; } -<Qt3ReadArgs>" " { memberArgs+=" "; } +<Qt3ReadArgs>"&" { memberArgs+='&'; } +<Qt3ReadArgs>"<" { memberArgs+='<'; } +<Qt3ReadArgs>">" { memberArgs+='>'; } +<Qt3ReadArgs>""" { memberArgs+='"'; } +<Qt3ReadArgs>" " { memberArgs+=' '; } <Qt3ReadArgs>"</h3>" { addMember(memberName,memberRef,memberArgs); memberName.resize(0); @@ -316,7 +318,7 @@ QCString unhtmlify(const char *str) } <Qt3ReadArgs>"<"[^>]+">" <Qt3ReadArgs>")" { - memberArgs+=")"; + memberArgs+=')'; addMember(memberName,memberRef,memberArgs); memberName.resize(0); memberRef.resize(0); @@ -329,39 +331,42 @@ QCString unhtmlify(const char *str) /* --------------------------------------------------- */ /* Doxygen class extraction rules */ -<Start>"<!-- doxytag: class=<" { +<Start>"<!-- doxytag: class=\"" { className.resize(0); BEGIN(DoxClassName); } -<DoxClassName>[^&>]+ { +<DoxClassName>[^&"]+ { className=yytext; addClass(className); } <DoxClassName>"<" { - className+="<"; + className+='<'; } <DoxClassName>">" { - className+=">"; + className+='>'; } <DoxClassName>"&" { - className+="&"; + className+='&'; + } +<DoxClassName>""" { + className+='"'; } <DoxClassName>. { className+=*yytext; } -<DoxClassName>"> -->" { +<DoxClassName>"\" -->" { BEGIN(Start); } /* --------------------------------------------------- */ /* Doxygen inheritance extraction rules */ -<Start>"<!-- doxytag: inherits=<" { +<Start>"<!-- doxytag: inherits=\"" { bases.clear(); baseName.resize(0); BEGIN(DoxClassBase); } -<DoxClassBase>[^&,>]+ { +<DoxClassBase>[^&,"]+ { baseName+=yytext; } <DoxClassBase>"," { @@ -369,18 +374,21 @@ QCString unhtmlify(const char *str) baseName.resize(0); } <DoxClassBase>"<" { - baseName+="<"; + baseName+='<'; } <DoxClassBase>">" { - baseName+=">"; + baseName+='>'; } <DoxClassBase>"&" { - baseName+="&"; + baseName+='&'; + } +<DoxClassBase>""" { + baseName+='"'; } <DoxClassBase>. { baseName+=*yytext; } -<DoxClassBase>"> -->" { +<DoxClassBase>"\" -->" { bases.append(baseName); baseName.resize(0); addBases(className); @@ -390,65 +398,74 @@ QCString unhtmlify(const char *str) /* --------------------------------------------------- */ /* Doxygen member extraction rules */ -<Start>"<!-- doxytag: member=<" { +<Start>"<!-- doxytag: member=\"" { memberName.resize(0); BEGIN(DoxReadName); } -<DoxReadName>[^&>]+ { +<DoxReadName>[^&"]+ { memberName+=yytext; } <DoxReadName>"<" { - memberName+="<"; + memberName+='<'; } <DoxReadName>">" { - memberName+=">"; + memberName+='>'; } <DoxReadName>"&" { - memberName+="&"; + memberName+='&'; + } +<DoxReadName>""" { + memberName+='"'; } <DoxReadName>. { memberName+=*yytext; } -<DoxReadName>"> ref=<" { +<DoxReadName>"\" ref=\"" { memberName=memberName.mid(memberName.find("::")+2); memberRef.resize(0); BEGIN(DoxReadAnchor); } -<DoxReadAnchor>[^&>]+ { +<DoxReadAnchor>[^&"]+ { memberRef+=yytext; } <DoxReadAnchor>"<" { - memberRef+="<"; + memberRef+='<'; } <DoxReadAnchor>">" { - memberRef+=">"; + memberRef+='>'; } <DoxReadAnchor>"&" { - memberRef+="&"; + memberRef+='&'; + } +<DoxReadAnchor>""" { + memberRef+='"'; } <DoxReadAnchor>. { memberRef+=*yytext; } -<DoxReadAnchor>"> args=<" { +<DoxReadAnchor>"\" args=\"" { memberArgs.resize(0); BEGIN(DoxReadArgs); } -<DoxReadArgs>[^&>]+ { +<DoxReadArgs>[^&"]+ { memberArgs+=yytext; } <DoxReadArgs>"<" { - memberArgs+="<"; + memberArgs+='<'; } <DoxReadArgs>">" { - memberArgs+=">"; + memberArgs+='>'; } <DoxReadArgs>"&" { - memberArgs+="&"; + memberArgs+='&'; + } +<DoxReadArgs>""" { + memberArgs+='"'; } <DoxReadArgs>. { memberArgs+=*yytext; } -<DoxReadArgs>"> -->" { +<DoxReadArgs>"\" -->" { addMember(memberName,memberRef,memberArgs); memberName.resize(0); memberRef.resize(0); @@ -613,10 +630,11 @@ QCString unhtmlify(const char *str) else BEGIN( Start ); } -<ReadArgs>"&" { memberArgs+="&"; } -<ReadArgs>"<" { memberArgs+="<"; } -<ReadArgs>">" { memberArgs+=">"; } -<ReadArgs>" " { memberArgs+=" "; } +<ReadArgs>"&" { memberArgs+='&'; } +<ReadArgs>"<" { memberArgs+='<'; } +<ReadArgs>">" { memberArgs+='>'; } +<ReadArgs>""" { memberArgs+='"'; } +<ReadArgs>" " { memberArgs+=' '; } /* <ReadArgs>[{}] { // handle enums memberArgs.resize(0); diff --git a/src/filedef.cpp b/src/filedef.cpp index a305ca9..bcc04fe 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -686,13 +686,17 @@ void FileDef::addMembersToMemberGroup() /*! Adds member definition \a md to the list of all members of this file */ void FileDef::insertMember(MemberDef *md) { - //printf("%s:FileDef::insertMember(%s)\n",name().data(),md->name().data()); - if (allMemberList.find(md)!=-1) return; + //printf("%s:FileDef::insertMember(%s (=%p) list has %d elements)\n", + // name().data(),md->name().data(),md,allMemberList.count()); + if (allMemberList.findRef(md)!=-1) + { + return; + } allMemberList.append(md); bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); - switch(md->memberType()) + switch (md->memberType()) { case MemberDef::Variable: case MemberDef::Property: @@ -1129,7 +1133,7 @@ static void addDirsAsGroups(Directory *root,GroupDef *parent,int level) GroupDef *gd=0; if (root->kind()==DirEntry::Dir) { - gd = new GroupDef("<generated>", + gd = new GroupDef("[generated]", 1, root->path(), // name root->name() // title diff --git a/src/groupdef.cpp b/src/groupdef.cpp index eb733f6..f8a9be6 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -218,14 +218,10 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly) md->getOuterScope()->definitionType()==Definition::TypeFile); if (srcMd->isFunction() && md->isFunction() && -#ifdef NEWMATCH matchArguments2(srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->argumentList(), md->getOuterScope(),md->getFileDef(),md->argumentList(), TRUE ) && -#else - matchArguments(srcMd->argumentList(),md->argumentList()) && -#endif sameScope ) { diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 99eb97d..2db2aff 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -603,9 +603,13 @@ void HtmlGenerator::startDoxyAnchor(const char *,const char *, const char *args) { t << "<a class=\"anchor\" name=\"" << anchor << "\"></a>"; - t << "<!-- doxytag: member=<" << name << "> ref=<" << anchor << "> args=<"; + t << "<!-- doxytag: member=\""; + docify(name); + t << "\" ref=\""; + docify(anchor); + t << "\" args=\""; docify(args); - t << "> -->"; + t << "\" -->"; } void HtmlGenerator::endDoxyAnchor(const char *,const char *) @@ -815,6 +819,7 @@ void HtmlGenerator::docify(const char *str) case '<': t << "<"; break; case '>': t << ">"; break; case '&': t << "&"; break; + case '"': t << """; break; case '\\': if (*p=='<') { t << "<"; p++; } diff --git a/src/index.cpp b/src/index.cpp index 597fbb4..4e78c72 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -3101,7 +3101,7 @@ void writeIndex(OutputList &ol) ol.disableAllBut(OutputGenerator::Html); QCString defFileName = - Doxygen::mainPage ? Doxygen::mainPage->getDefFileName().data() : "<generated>"; + Doxygen::mainPage ? Doxygen::mainPage->getDefFileName().data() : "[generated]"; int defLine = Doxygen::mainPage ? Doxygen::mainPage->getDefLine() : -1; diff --git a/src/index.h b/src/index.h index 89b8179..2b76a02 100644 --- a/src/index.h +++ b/src/index.h @@ -104,7 +104,7 @@ enum ClassMemberHighlight CMHL_Properties, CMHL_Events, CMHL_Related, - CMHL_Total = CMHL_Events+1 + CMHL_Total = CMHL_Related+1 }; enum FileMemberHighlight diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 97022d5..3c27bb3 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -315,7 +315,7 @@ void MemberList::writeDeclarations(OutputList &ol, { //printf("subtitle=`%s'\n",subtitle); ol.startMemberSubtitle(); - ol.parseDoc("<generated>",-1,0,0,subtitle,FALSE,FALSE); + ol.parseDoc("[generated]",-1,0,0,subtitle,FALSE,FALSE); ol.endMemberSubtitle(); } @@ -339,7 +339,7 @@ void MemberList::writeDeclarations(OutputList &ol, { //printf("Member group has docs!\n"); ol.startMemberGroupDocs(); - ol.parseDoc("<generated>",-1,0,0,mg->documentation()+"\n",FALSE,FALSE); + ol.parseDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE); ol.endMemberGroupDocs(); } ol.startMemberGroup(); @@ -199,7 +199,7 @@ static FILE *checkAndOpenFile(const QCString &absName) QCString filterName = getFileFilter(absName); if (!filterName.isEmpty()) { - QCString cmd = "\"" + filterName+"\" \""+absName+"\""; + QCString cmd = filterName+" \""+absName+"\""; f=popen(cmd,"r"); if (!f) err("Error: could not execute filter %s\n",cmd.data()); } @@ -2296,7 +2296,7 @@ void preprocessFile(const char *fileName,BufStr &output) } else { - QCString cmd = "\"" + inputFilter+"\" \""+fileName+"\""; + QCString cmd = inputFilter+" \""+fileName+"\""; preYYin = popen(cmd,"r"); if (!preYYin) { diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 58046b1..e524800 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -648,8 +648,8 @@ void RTFDocVisitor::visitPost(DocTitle *) { if (m_hide) return; DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n"); - m_t << "}"; // end bold m_t << "\\par" << endl; + m_t << "}"; // end bold incIndentLevel(); m_t << rtf_Style_Reset << getStyle("DescContinue"); m_lastIsPara=FALSE; diff --git a/src/scanner.l b/src/scanner.l index f56d880..b93df38 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -3992,8 +3992,7 @@ IDLATTR ("["[^\]]*"]"){BN}* /* ---- Single line comments ------ */ -<DocLine>[^\n]*"\n" { // whole line - yyLineNr++; +<DocLine>[^\n]*/"\n" { // whole line handleCommentBlock(yytext,TRUE); BEGIN( docBlockContext ); } diff --git a/src/util.cpp b/src/util.cpp index d0dcec6..6728c56 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -47,6 +47,7 @@ #include "pagedef.h" #include "debug.h" #include "searchindex.h" +#include "doxygen.h" #if !defined(_WIN32) || defined(__CYGWIN__) #include <unistd.h> @@ -599,7 +600,8 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition * * Example: typedef int T; will return 0, since "int" is not a class. */ -ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpec) +static ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md, + MemberDef **pMemType,QCString *pTemplSpec) { //printf("newResolveTypedef(md=%p,cachedVal=%p)\n",md,md->getCachedTypedefVal()); bool isCached = md->isTypedefValCached(); // value already cached @@ -631,7 +633,14 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe ClassDef *result = getResolvedClassRec(md->getOuterScope(), fileScope,type,&memTypeDef,0); // if type is a typedef than return what it resolves to. - if (memTypeDef) return newResolveTypedef(fileScope,memTypeDef,pTemplSpec); + if (memTypeDef && memTypeDef->isTypedef()) + { + return newResolveTypedef(fileScope,memTypeDef,pMemType,pTemplSpec); + } + else if (memTypeDef && memTypeDef->isEnumerate() && pMemType) + { + *pMemType = memTypeDef; + } //printf("type=%s result=%p\n",type.data(),result); if (result==0) @@ -1169,7 +1178,8 @@ ClassDef *getResolvedClassRec(Definition *scope, { QCString spec; minDistance=distance; - ClassDef *cd = newResolveTypedef(fileScope,md,&spec); + MemberDef *enumType = 0; + ClassDef *cd = newResolveTypedef(fileScope,md,&enumType,&spec); if (cd) // shouldn't be 0, but could in some weird cases { //printf(" bestTypeDef=%p spec=%s\n",md,spec.data()); @@ -1177,6 +1187,22 @@ ClassDef *getResolvedClassRec(Definition *scope, bestTypedef = md; bestTemplSpec = spec; } + else if (enumType) + { + bestMatch = 0; + bestTypedef = enumType; + bestTemplSpec = ""; + } + } + } + else if (md->isEnumerate()) + { + if (distance<minDistance) + { + minDistance=distance; + bestMatch = 0; + bestTypedef = md; + bestTemplSpec = ""; } } } @@ -1592,7 +1618,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed) } -QCString argListToString(ArgumentList *al) +QCString argListToString(ArgumentList *al,bool useCanonicalType) { QCString result; if (al==0) return result; @@ -1600,7 +1626,9 @@ QCString argListToString(ArgumentList *al) result+="("; while (a) { - QCString type1 = a->type, type2; + QCString type1 = useCanonicalType && !a->canType.isEmpty() ? + a->canType : a->type; + QCString type2; int i=type1.find(")("); // hack to deal with function pointers if (i!=-1) { @@ -1940,6 +1968,7 @@ int minClassDistance(ClassDef *cd,ClassDef *bcd,int level) // printf(")"); //} +#ifndef NEWMATCH // strip any template specifiers that follow className in string s static QCString trimTemplateSpecifiers( const QCString &namespaceName, @@ -2096,6 +2125,7 @@ static QCString trimScope(const QCString &name,const QCString &s) //printf("trimScope(name=%s,scope=%s)=%s\n",name.data(),s.data(),result.data()); return result; } +#endif void trimBaseClassScope(BaseClassList *bcl,QCString &s,int level=0) { @@ -2256,7 +2286,7 @@ void stripIrrelevantConstVolatile(QCString &s) //#define MATCH printf("Match at line %d\n",__LINE__); //#define NOMATCH printf("Nomatch at line %d\n",__LINE__); - +#ifndef NEWMATCH static bool matchArgument(const Argument *srcA,const Argument *dstA, const QCString &className, const QCString &namespaceName, @@ -2628,10 +2658,105 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, return TRUE; // all arguments match } +#endif + +static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templSpec) +{ + ASSERT(symbol!=0); + if (symbol->definitionType()==Definition::TypeMember && + ((MemberDef*)symbol)->isTypedef()) // if symbol is a typedef then try + // to resolve it + { + MemberDef *md = 0; + ClassDef *cd = newResolveTypedef(fs,(MemberDef*)symbol,&md,&templSpec); + if (cd) + { + return cd->qualifiedNameWithTemplateParameters(); + } + else if (md) + { + return md->qualifiedName(); + } + } + return symbol->qualifiedName(); +} + +static QCString getCanonicalTypeForIdentifier( + Definition *d,FileDef *fs,const QCString &word, + QCString *tSpec) +{ + QCString symName,scope,result,templSpec; + DefinitionList *defList=0; + if (tSpec) templSpec = *tSpec; + + if (word.findRev("::")!=-1 && !(scope=stripScope(word)).isEmpty()) + { + symName=word.mid(scope.length()+2); + } + else + { + symName=word; + } + + if (!symName.isEmpty() && !templSpec.isEmpty() && + (defList=Doxygen::symbolMap->find(symName+templSpec)) && + defList->count()==1) // word without scope but with template specs + // is a unique symbol in the symbol map + { + QCString ts; + result = resolveSymbolName(fs,defList->first(),ts); + *tSpec=""; + } + else if (!symName.isEmpty() && + (defList=Doxygen::symbolMap->find(symName)) && + defList->count()==1) // word without scope is a + // unique symbol in the symbol map + { + QCString ts; + result = resolveSymbolName(fs,defList->first(),ts)+templSpec; + } + else // symbol not unique, try to find the one in the right scope + { + ClassDef *cd = 0; + MemberDef *mType = 0; + if (!templSpec.isEmpty()) + { + cd = getResolvedClass(d,fs,word+templSpec,&mType,0,TRUE); + if (cd) *tSpec=""; + } + if (cd==0) + { + cd = getResolvedClass(d,fs,word,&mType,0,TRUE); + } + + //printf(">>>> word '%s' => '%s'\n",(word+templSpec).data(),cd?cd->qualifiedNameWithTemplateParameters().data():"<none>"); + if (cd) // known type + { + result = cd->qualifiedNameWithTemplateParameters(); + } + else if (mType && mType->isEnumerate()) // an enum + { + result = mType->qualifiedName(); + } + else // not known as a class + { + QCString resolvedType = resolveTypeDef(d,word); + if (resolvedType.isEmpty()) // not known as a typedef either + { + result = word; + } + else + { + result = resolvedType; + } + } + } + return result; +} static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *arg) { - QCString type = arg->type; + QCString type = arg->type.stripWhiteSpace(); QCString name = arg->name; //printf("extractCanonicalType(type=%s,name=%s)\n",type.data(),name.data()); if ((type=="const" || type=="volatile") && !name.isEmpty()) @@ -2655,6 +2780,9 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a type.stripPrefix("enum "); type.stripPrefix("typename "); + type = removeRedundantWhiteSpace(type); + //printf("extractCanonicalTyp2(type=%s,name=%s)\n",type.data(),name.data()); + static QRegExp id("[a-z_A-Z][:a-z_A-Z0-9]*"); QCString canType,templSpec,word; @@ -2664,41 +2792,24 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a { //printf(" i=%d p=%d\n",i,p); canType += type.mid(pp,i-pp); - ClassDef *cd = 0; - if (!templSpec.isEmpty()) - { - cd = getResolvedClass(d,fs,word+templSpec,0,0,TRUE); - } - if (cd==0) - { - cd = getResolvedClass(d,fs,word,0,0,TRUE); - } - //printf(">>>> word '%s' => '%s'\n",(word+templSpec).data(),cd?cd->qualifiedNameWithTemplateParameters().data():"<none>"); - if (cd) - { - canType+=cd->qualifiedNameWithTemplateParameters(); - } - else + + canType += getCanonicalTypeForIdentifier(d,fs,word,&templSpec); + if (!templSpec.isEmpty()) // if we didn't use up the templSpec already + // (i.e. type is not a template specialization) + // then resolve any identifiers inside. { - QCString resolvedType = resolveTypeDef(d,word); - if (resolvedType.isEmpty()) + static QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*"); + int p=0,l,i; + // for each identifier template specifier + while ((i=re.match(templSpec,p,&l))!=-1) { - //int i=word.findRev("::"); - //if (i!=-1) // strip scope if it cannot be resolved anyway - // // TODO is this robust enough? - //{ - // canType+=word.mid(i+2); - //} - //else - //{ - canType+=word+templSpec; - //} - } - else - { - canType+=resolvedType; + canType += templSpec.mid(p,i-p); + canType += getCanonicalTypeForIdentifier(d,fs,word,0); + p=i+l; } + canType+=templSpec.right(templSpec.length()-p); } + pp=p; } canType += type.right(type.length()-pp); @@ -3035,6 +3146,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, //printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data()); MemberName *mn = Doxygen::memberNameSDict[mName]; + //printf("mName=%s mn=%p\n",mName.data(),mn); if (!forceEmptyScope && mn && !(scopeName.isEmpty() && mScope.isEmpty())) { //printf(" >member name found\n"); @@ -3073,14 +3185,10 @@ bool getDefs(const QCString &scName,const QCString &memberName, //if (mmd->isLinkable()) //{ bool match=args==0 || -#ifdef NEW_MATCH - matchArguments2(mmd->getOuterScope(),md->getFileDef(),md->argumentList(), + matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),mmd->argumentList(), fcd,fcd->getFileDef(),argList, checkCV ); -#else - matchArguments(mmd->argumentList(),argList,className,0,checkCV); -#endif //printf("match=%d\n",match); if (match) { @@ -3193,15 +3301,10 @@ bool getDefs(const QCString &scName,const QCString &memberName, { argList=new ArgumentList; stringToArgumentList(args,argList); -#ifdef NEW_MATCH match=matchArguments2( mmd->getOuterScope(),mmd->getFileDef(),mmd->argumentList(), fnd,mmd->getFileDef(),argList, checkCV); -#else - match=matchArguments(mmd->argumentList(),argList,0, - namespaceName,checkCV); -#endif } if (match) { @@ -3280,14 +3383,10 @@ bool getDefs(const QCString &scName,const QCString &memberName, { argList=new ArgumentList; stringToArgumentList(args,argList); -#ifdef NEW_MATCH match=matchArguments2( md->getOuterScope(),fd,md->argumentList(), Doxygen::globalScope,fd,argList, checkCV); -#else - match=matchArguments(md->argumentList(),argList,0,0,checkCV); -#endif delete argList; argList=0; } if (match) @@ -129,10 +129,12 @@ void generateFileRef(OutputDocInterface &od,const char *, const char *linkTxt=0); void writePageRef(OutputDocInterface &od,const char *cn,const char *mn); +#if 0 bool matchArguments(ArgumentList *,ArgumentList *, const char *cl=0,const char *ns=0,bool checkCV=TRUE, NamespaceSDict *usingNamespaces=0, SDict<Definition> *usingClasses=0); +#endif bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *srcAl, Definition *dstScope,FileDef *dstFileScope,ArgumentList *dstAl, bool checkCV @@ -155,7 +157,7 @@ QCString showFileDefMatches(const FileNameDict *fnDict,const char *n); int guessSection(const char *name); bool isId(char c); QCString removeRedundantWhiteSpace(const QCString &s); -QCString argListToString(ArgumentList *al); +QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE); QCString tempArgListToString(ArgumentList *al); QCString generateMarker(int id); void writeExample(OutputList &ol,ExampleSDict *el); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 3a73c55..8be6b44 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -594,9 +594,9 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De if (md->memberType() == MemberDef::Variable) { - ArgumentList *al = md->argumentList(); - t << " volatile=\""; - if (al && al->volatileSpecifier) t << "yes"; else t << "no"; + //ArgumentList *al = md->argumentList(); + //t << " volatile=\""; + //if (al && al->volatileSpecifier) t << "yes"; else t << "no"; t << "\" mutable=\""; if (md->isMutable()) t << "yes"; else t << "no"; @@ -660,7 +660,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De << convertToXML(rmd->name()) << "</reimplementedby>" << endl; } } - + if (isFunc) //function { ArgumentList *declAl = md->declArgumentList(); @@ -723,13 +723,21 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De } } else if (md->memberType()==MemberDef::Define && - md->argsString()!=0) // define + md->argsString()) // define { - ArgumentListIterator ali(*md->argumentList()); - Argument *a; - for (ali.toFirst();(a=ali.current());++ali) + if (md->argumentList()->count()==0) // special case for "foo()" to + // disguish it from "foo". { - t << " <param><defname>" << a->type << "</defname></param>" << endl; + t << " <param></param>" << endl; + } + else + { + ArgumentListIterator ali(*md->argumentList()); + Argument *a; + for (ali.toFirst();(a=ali.current());++ali) + { + t << " <param><defname>" << a->type << "</defname></param>" << endl; + } } } // avoid that extremely large tables are written to the output. |