From 6b40e3de857d42921d0e6b736d9768d95e948da9 Mon Sep 17 00:00:00 2001 From: dimitri Date: Sun, 4 Mar 2001 18:15:26 +0000 Subject: Release-1.2.5-20010304 --- INSTALL | 4 +-- README | 4 +-- VERSION | 2 +- doc/config.doc | 4 +-- doc/preprocessing.doc | 5 +-- examples/Makefile.in | 6 ++-- examples/Makefile.win.in | 4 --- examples/tag.cfg | 2 +- packages/rpm/doxygen.spec | 2 +- src/code.l | 2 +- src/doc.l | 3 ++ src/doxygen.cpp | 92 +++++++++++++++++++++-------------------------- src/htmlgen.h | 8 +---- src/memberdef.cpp | 22 ++++++------ src/memberdef.h | 2 +- src/scanner.l | 24 ++++++++----- src/tagreader.cpp | 15 +++++++- 17 files changed, 101 insertions(+), 100 deletions(-) diff --git a/INSTALL b/INSTALL index a2505e6..693d8bc 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.5-20010226 +DOXYGEN Version 1.2.5-20010304 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (26 February 2001) +Dimitri van Heesch (04 March 2001) diff --git a/README b/README index 0fed8a0..f73e3d2 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.5-20010226 +DOXYGEN Version 1.2.5-20010304 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (26 February 2001) +Dimitri van Heesch (04 March 2001) diff --git a/VERSION b/VERSION index 6bd7939..597f916 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.5-20010226 +1.2.5-20010304 diff --git a/doc/config.doc b/doc/config.doc index 2bccacd..4d28ba0 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -94,7 +94,7 @@ followed by the descriptions of the tags grouped by category.
  • \refitem cfg_example_patterns EXAMPLE_PATTERNS
  • \refitem cfg_exclude EXCLUDE
  • \refitem cfg_exclude_patterns EXCLUDE_PATTERNS -
  • \refitem cfg_expand_as_defined EXPAND_AS_PREDEFINED +
  • \refitem cfg_expand_as_defined EXPAND_AS_DEFINED
  • \refitem cfg_expand_only_predef EXPAND_ONLY_PREDEF
  • \refitem cfg_ext_doc_paths EXT_DOC_PATHS
  • \refitem cfg_extra_packages EXTRA_PACKAGES @@ -1006,7 +1006,7 @@ EXTRA_PACKAGES = times \addindex EXPAND_ONLY_PREDEF If the \c EXPAND_ONLY_PREDEF and \c MACRO_EXPANSION tags are both set to YES then the macro expansion is limited to the macros specified with the - \c PREDEFINED and \c EXPAND_AS_PREDEFINED tags. + \c PREDEFINED and \c EXPAND_AS_DEFINED tags. \anchor cfg_search_includes
    \c SEARCH_INCLUDES
    diff --git a/doc/preprocessing.doc b/doc/preprocessing.doc index 9eb5f6c..3a97d87 100644 --- a/doc/preprocessing.doc +++ b/doc/preprocessing.doc @@ -66,9 +66,10 @@ allows you to expand only those defines that you explicitly specify. For this you have to set the \ref cfg_expand_only_predef "EXPAND_ONLY_PREDEF" tag to \c YES and specify the macro definitions after -the \ref cfg_predefined "PREDEFINED" tag. +the \ref cfg_predefined "PREDEFINED" or +\ref cfg_expand_as_defined "EXPAND_AS_DEFINED" tag. -As an example, suppose you have the following obfusciated code fragment +As an example, suppose you have the following obfuscated code fragment of an abstract base class called \c IUnknown: \verbatim diff --git a/examples/Makefile.in b/examples/Makefile.in index a04c9f6..07906aa 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -77,10 +77,10 @@ structcmd/html/index.html: structcmd.h structcmd.cfg autolink/html/index.html: autolink.cpp autolink.cfg $(DOXYGEN)/bin/doxygen autolink.cfg -tag/html/index.html: tag.cpp tag.cfg +tag/html/index.html: tag.cpp tag.cfg example/html/index.html $(DOXYGEN)/bin/doxygen tag.cfg - sed -e "1,1s#perl#$(PERL)#g" tag/html/installdox >tag/html/installdox.perl - cd tag/html ; $(PERL) installdox.perl -lexample.tag@../../example/html +# sed -e "1,1s#perl#$(PERL)#g" tag/html/installdox >tag/html/installdox.perl +# cd tag/html ; $(PERL) installdox.perl -lexample.tag@../../example/html restypedef/html/index.html: restypedef.cpp restypedef.cfg $(DOXYGEN)/bin/doxygen restypedef.cfg diff --git a/examples/Makefile.win.in b/examples/Makefile.win.in index 9406f1e..1caef19 100644 --- a/examples/Makefile.win.in +++ b/examples/Makefile.win.in @@ -81,10 +81,6 @@ autolink/html/index.html: autolink.cpp autolink.cfg tag/html/index.html: tag.cpp tag.cfg $(DOXYDIR)\doxygen tag.cfg - cd tag\html - echo perl installdox -lexample.tag@../../example/html >runperl.bat - runperl.bat - cd ..\.. restypedef/html/index.html: restypedef.cpp restypedef.cfg $(DOXYDIR)\doxygen restypedef.cfg diff --git a/examples/tag.cfg b/examples/tag.cfg index 6b71953..9e79152 100644 --- a/examples/tag.cfg +++ b/examples/tag.cfg @@ -5,7 +5,7 @@ GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = tag.cpp -TAGFILES = example.tag +TAGFILES = example.tag=../../example/html PERL_PATH = perl QUIET = YES JAVADOC_AUTOBRIEF = YES diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index a2b7bfd..c71bdd7 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.2.5-20010226 +Version: 1.2.5-20010304 Summary: documentation system for C, C++ and IDL Release: 1 Source0: doxygen-%{version}.src.tar.gz diff --git a/src/code.l b/src/code.l index b8cdc69..76ad9b2 100644 --- a/src/code.l +++ b/src/code.l @@ -1170,7 +1170,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" [0-9]+ { g_code->codify(yytext); } -[0-9]+[xX][0-9A-F]+ { +[0-9]+[xX][0-9A-Fa-f]+ { g_code->codify(yytext); } {KEYWORD}/([^a-z_A-Z0-9]) { diff --git a/src/doc.l b/src/doc.l index 90a2381..f5afe59 100644 --- a/src/doc.l +++ b/src/doc.l @@ -1786,6 +1786,9 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } ("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); } [a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } +{FILESCHAR}*{FILEECHAR}+/".\\n" { // special exception that is otherwise matches by FILEMASK + generateRef(*outDoc,className,yytext,inSeeBlock); + } {FILEMASK} { generateFileRef(*outDoc,yytext); } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 8d11d8e..dc95b83 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -424,8 +424,8 @@ static void buildGroupList(Entry *root) static void buildFileList(Entry *root) { if (((root->section==Entry::FILEDOC_SEC) || - ((root->section & Entry::FILE_MASK) && Config::extractAllFlag)) && - !root->name.isEmpty() + ((root->section & Entry::FILE_MASK) && Config::extractAllFlag)) && + !root->name.isEmpty() && !root->tagInfo // skip any file coming from tag files ) { bool ambig; @@ -436,10 +436,10 @@ static void buildFileList(Entry *root) (!root->brief.isEmpty() && !fd->briefDescription().isEmpty())) { warn( - root->fileName,root->startLine, - "Warning: file %s already documented. " - "Skipping documentation.", - root->name.data() + root->fileName,root->startLine, + "Warning: file %s already documented. " + "Skipping documentation.", + root->name.data() ); } else @@ -469,15 +469,15 @@ static void buildFileList(Entry *root) const char *fn = root->fileName.data(); QCString text; text.sprintf("Warning: the name `%s' supplied as " - "the second argument in the \\file statement ", - root->name.data() + "the second argument in the \\file statement ", + root->name.data() ); if (ambig) // name is ambigious { text+="matches the following input files:\n"; text+=showFileDefMatches(Doxygen::inputNameDict,root->name); text+="Please use a more specific name by " - "including a (larger) part of the path!"; + "including a (larger) part of the path!"; } else // name is not an input file { @@ -811,7 +811,7 @@ static void buildNamespaceList(Entry *root) //printf("Found namespace %s in %s at line %d\n",root->name.data(), // root->fileName.data(), root->startLine); NamespaceDef *nd; - if ((nd=Doxygen::namespaceDict[fullName])) + if ((nd=Doxygen::namespaceDict[fullName])) // existing namespace { if (!root->doc.isEmpty() || !root->brief.isEmpty()) // block contains docs { @@ -852,11 +852,7 @@ static void buildNamespaceList(Entry *root) addNamespaceToGroups(root,nd); nd->setRefItems(root->todoId,root->testId,root->bugId); } - else /* if (!root->doc.isEmpty() || - !root->brief.isEmpty() || - Config::extractAllFlag - ) - */ + else // fresh namespace { QCString tagName; if (root->tagInfo) @@ -1390,16 +1386,17 @@ static MemberDef *addVariableToFile( * \returns -1 if this is not a function pointer variable or * the index at which the brace of (...*name) was found. */ -static int findFunctionPtr(const QCString &type) +static int findFunctionPtr(const QCString &type,int *pLength=0) { - static const QRegExp re("([^)]*)"); - int i=-1; + static const QRegExp re("([^)]*"); + int i=-1,l; if (!type.isEmpty() && // return type is non-empty - (i=type.find(re,0))!=-1 && // contains a (* + (i=re.match(type,0,&l))!=-1 && // contains a (* type.find("operator")==-1 && // not an operator type.find(")(")==-1 // not a function pointer return type ) { + if (pLength) *pLength=l; return i; } else @@ -1414,18 +1411,13 @@ static int findFunctionPtr(const QCString &type) void buildVarList(Entry *root) { - int i=-1; if (!root->name.isEmpty() && (root->type.isEmpty() || compoundKeywordDict.find(root->type)==0) && ( (root->section==Entry::VARIABLE_SEC // it's a variable ) || (root->section==Entry::FUNCTION_SEC && // or maybe a function pointer variable - (i=findFunctionPtr(root->type))!=-1 - //!root->type.isEmpty() && // return type is non-empty - // root->type.find(re,0)!=-1 && // contains a (* - // /root->type.find("operator")==-1 && // not an operator - // root->type.find(")(")==-1 // not a function pointer return type + findFunctionPtr(root->type)!=-1 ) ) ) // documented variable @@ -1444,11 +1436,14 @@ void buildVarList(Entry *root) if (root->type.isEmpty() && root->name.find("operator")==-1 && (root->name.find('*')!=-1 || root->name.find('&')!=-1)) { - // recover from parse error caused by redundant braces + // recover from parse error caused by redundant braces + // like in "int *(var[10]);", which is parsed as + // type="" name="int *" args="(var[10])" + root->type=root->name; static const QRegExp reName("[a-z_A-Z][a-z_A-Z0-9]*"); int l; - i=root->args.isEmpty() ? -1 : reName.match(root->args,0,&l); + int i=root->args.isEmpty() ? -1 : reName.match(root->args,0,&l); root->name=root->args.mid(i,l); root->args=root->args.mid(i+l,root->args.find(')',i+l)-i-l); //printf("new: type=`%s' name=`%s' args=`%s'\n", @@ -1456,6 +1451,7 @@ void buildVarList(Entry *root) } else { + int i=findFunctionPtr(root->type); if (i!=-1) // function pointer { int ai = root->type.find('[',i); @@ -1464,7 +1460,7 @@ void buildVarList(Entry *root) root->args.prepend(root->type.right(root->type.length()-ai)); root->type=root->type.left(ai); } - else + else if (root->type.find(')',i)!=-1) // function ptr, not variable like "int (*bla)[10]" { root->type=root->type.left(root->type.length()-1); root->args.prepend(")"); @@ -1473,12 +1469,6 @@ void buildVarList(Entry *root) } QCString scope,name=root->name.copy(); - //int si; - //if ((si=name.findRev("::"))!=-1) - //{ - // scope=name.left(si); - // name=name.right(name.length()-si-2); - //} // find the scope of this variable Entry *p = root->parent; @@ -3781,31 +3771,26 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl static void findMemberDocumentation(Entry *root) { int i=-1,l; - //QRegExp re("([a-z_A-Z0-9: ]*\\*+[ \\*]*"); Debug::print(Debug::FindMembers,0, "root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->memSpec=%d root->mGrpId=%d\n", root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId ); bool isFunc=TRUE; - if ( - findFunctionPtr(root->type)!=-1 // func variable/typedef to func ptr - //!root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1 + if ( // detect func variable/typedef to func ptr + (i=findFunctionPtr(root->type,&l))!=-1 ) { + // fix type and argument root->args+=root->type.right(root->type.length()-i-l); root->type=root->type.left(i+l); isFunc=FALSE; } - //else if (root->name.find(re)!=-1 && root->name.find("operator")==-1) - // // func ptr entered with \fn, \var or \typedef - //{ - // isFunc=FALSE; - //} - else if ((root->type.isEmpty() && root->name.left(8)=="typedef ") - || root->args.find('(')==-1) + else if ((root->type.left(8)=="typedef " && root->args.find('(')!=-1)) + // detect function types marked as functions { isFunc=FALSE; } + //printf("Member %s isFunc=%d\n",root->name.data(),isFunc); if (root->section==Entry::MEMBERDOC_SEC) { @@ -3820,15 +3805,18 @@ static void findMemberDocumentation(Entry *root) findMember(root,root->name,root->relates,TRUE,isFunc); } else if - ((root->section==Entry::FUNCTION_SEC // function + ((root->section==Entry::FUNCTION_SEC // function || - (root->section==Entry::VARIABLE_SEC && // variable - !root->type.isEmpty() && /*root->type.left(8)!="typedef " &&*/ - compoundKeywordDict.find(root->type)==0 + (root->section==Entry::VARIABLE_SEC && // variable + !root->type.isEmpty() && // with a type + compoundKeywordDict.find(root->type)==0 // that is not a keyword + // (to skip forward declaration of class etc.) ) - ) && !root->stat && - (!root->doc.isEmpty() || !root->brief.isEmpty() || /*root->bodyLine!=-1 ||*/ - (root->memSpec&Entry::Inline) || root->mGrpId!=-1 + ) && !root->stat && // not static + (!root->doc.isEmpty() || // has detailed docs + !root->brief.isEmpty() || // has brief docs + (root->memSpec&Entry::Inline) || // is inline + root->mGrpId!=-1 // is part of a group ) ) { diff --git a/src/htmlgen.h b/src/htmlgen.h index c0fb455..baa73a3 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -115,13 +115,7 @@ class HtmlGenerator : public OutputGenerator void writeAnchor(const char *,const char *name) { t << ""; } void startCodeFragment() { t << "
    "; }
    -    void endCodeFragment()   { t << "
    "; } // <- I know this is - // ordered the wrong - // way, but it is - // the only way I know - // to prevent an extra - // blank line - // (with netscape) + void endCodeFragment() { t << ""; } void startPreFragment() { t << "
    "; }
         void endPreFragment()   { t << "
    "; } void startCodeLine() { col=0; } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index a48f284..1756970 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1475,17 +1475,17 @@ QCString MemberDef::getScopeString() const } -Definition *MemberDef::getCompoundDef() const -{ - NamespaceDef *nd=getNamespaceDef(); - ClassDef *cd=getClassDef(); - FileDef *fd=getFileDef(); - GroupDef *gd=getGroupDef(); - Definition *d = 0; - if (cd) d=cd; else if (nd) d=nd; else if (gd) d=gd; else d=fd; - ASSERT(d!=0); - return d; -} +//Definition *MemberDef::getCompoundDef() const +//{ +// NamespaceDef *nd=getNamespaceDef(); +// ClassDef *cd=getClassDef(); +// FileDef *fd=getFileDef(); +// GroupDef *gd=getGroupDef(); +// Definition *d = 0; +// if (cd) d=cd; else if (nd) d=nd; else if (gd) d=gd; else d=fd; +// ASSERT(d!=0); +// return d; +//} QCString MemberDef::anchor() const { diff --git a/src/memberdef.h b/src/memberdef.h index a939853..ee60338 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -88,7 +88,7 @@ class MemberDef : public Definition GroupDef *getGroupDef() const { return group; } FileDef *getFileDef() const { return fileDef; } NamespaceDef* getNamespaceDef() const { return nspace; } - Definition *getCompoundDef() const; + //Definition *getCompoundDef() const; // direct kind info Protection protection() const { return prot; } diff --git a/src/scanner.l b/src/scanner.l index 72cee53..5bd5c0b 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1136,7 +1136,9 @@ TITLE [tT][iI][tT][lL][eE] } . -[*&]+ { current->name += yytext ; } +[*&]+ { current->name += yytext ; + addType( current ); + } ";"{BN}*("/**"|"//!"|"/*!"|"///")"<" { lineCount(); if (current->bodyLine==-1) @@ -1677,7 +1679,7 @@ TITLE [tT][iI][tT][lL][eE] } . { current->program += yytext ; } -"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ { +("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { current->bodyLine = yyLineNr; lineCount(); addType(current); @@ -1769,13 +1771,17 @@ TITLE [tT][iI][tT][lL][eE] . { current->type += *yytext; } -"(" { current->args = yytext; - current->bodyLine = yyLineNr; - currentArgumentContext = FuncQual; - fullArgString=current->args.copy(); - copyArgString=¤t->args; - BEGIN( ReadFuncArgType ) ; - //printf(">>> Read function arguments!\n"); +"(" { + if (!current->name.isEmpty()) + { + current->args = yytext; + current->bodyLine = yyLineNr; + currentArgumentContext = FuncQual; + fullArgString=current->args.copy(); + copyArgString=¤t->args; + BEGIN( ReadFuncArgType ) ; + //printf(">>> Read function arguments!\n"); + } } /* "("{BN}*("void"{BN}*)?")" { diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 9070103..bb9e76d 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -857,6 +857,19 @@ void TagFileParser::buildMemberList(Entry *ce,QList &members) } } +static QString stripPath(const QString &s) +{ + int i=s.findRev('/'); + if (i!=-1) + { + return s.right(s.length()-i-1); + } + else + { + return s; + } +} + void TagFileParser::buildLists(Entry *root) { // build class list @@ -902,7 +915,7 @@ void TagFileParser::buildLists(Entry *root) ti->fileName = tfi->filename; fe->tagInfo = ti; - QString fullName = m_tagName+":"+tfi->path+tfi->name; + QString fullName = m_tagName+":"+tfi->path+stripPath(tfi->name); fe->fileName = fullName; FileDef *fd = new FileDef(m_tagName+":"+tfi->path,tfi->name,m_tagName); FileName *mn; -- cgit v0.12