diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-08-12 12:53:19 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-08-12 12:53:19 (GMT) |
commit | bb18b811e8f1a4a939eadf28d12bc5f99dd74b82 (patch) | |
tree | 96c3b47bbfb0ee3d28e46421e1317253ba052f01 /src | |
parent | 6e8975abdb6b52477a5788bca969e13e467814dd (diff) | |
download | Doxygen-bb18b811e8f1a4a939eadf28d12bc5f99dd74b82.zip Doxygen-bb18b811e8f1a4a939eadf28d12bc5f99dd74b82.tar.gz Doxygen-bb18b811e8f1a4a939eadf28d12bc5f99dd74b82.tar.bz2 |
Release-1.3.8-20040812
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 4 | ||||
-rw-r--r-- | src/commentcnv.l | 9 | ||||
-rw-r--r-- | src/config.l | 4 | ||||
-rw-r--r-- | src/definition.cpp | 5 | ||||
-rw-r--r-- | src/docparser.cpp | 8 | ||||
-rw-r--r-- | src/doctokenizer.l | 3 | ||||
-rw-r--r-- | src/doxygen.cpp | 524 | ||||
-rw-r--r-- | src/filedef.cpp | 2 | ||||
-rw-r--r-- | src/groupdef.cpp | 11 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 7 | ||||
-rw-r--r-- | src/htmlgen.cpp | 32 | ||||
-rw-r--r-- | src/htmlgen.h | 7 | ||||
-rw-r--r-- | src/mandocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/memberdef.cpp | 21 | ||||
-rw-r--r-- | src/memberdef.h | 25 | ||||
-rw-r--r-- | src/memberlist.cpp | 4 | ||||
-rw-r--r-- | src/namespacedef.cpp | 5 | ||||
-rw-r--r-- | src/pre.l | 3 | ||||
-rw-r--r-- | src/rtfgen.cpp | 4 | ||||
-rw-r--r-- | src/scanner.l | 16 | ||||
-rw-r--r-- | src/search.php | 8 | ||||
-rw-r--r-- | src/search_php.h | 8 | ||||
-rw-r--r-- | src/searchindex.cpp | 8 | ||||
-rw-r--r-- | src/translator_adapter.h | 201 | ||||
-rw-r--r-- | src/util.cpp | 23 | ||||
-rw-r--r-- | src/util.h | 3 |
26 files changed, 400 insertions, 549 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 31555b4..9229ce3 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -955,7 +955,7 @@ void ClassDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); - Doxygen::searchIndex->addWord(localName().lower()); + Doxygen::searchIndex->addWord(localName()); } ol.startTextBlock(); @@ -2823,6 +2823,8 @@ QCString ClassDef::className() const void ClassDef::addListReferences() { + if (!isLinkableInProject()) return; + //printf("ClassDef(%s)::addListReferences()\n",name().data()); addRefItem(xrefListItems(), theTranslator->trClass(TRUE,TRUE), getOutputFileBase(),displayName() diff --git a/src/commentcnv.l b/src/commentcnv.l index 7e7d6a4..0f9f956 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -243,12 +243,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_readLineCtx=YY_START; BEGIN(ReadLine); } -<SComment>^[ \t]*"//!"/.*\n { +<SComment>^[ \t]*"//!" | // just //! +<SComment>^[ \t]*"//!<"/.*\n | // or //!< something +<SComment>^[ \t]*"//!"[^<]/.*\n { // or //!something replaceComment(0); g_readLineCtx=YY_START; BEGIN(ReadLine); } -<SComment>\n[ \t]*"//!"/.*\n { +<SComment>\n[ \t]*"//!" | +<SComment>\n[ \t]*"//!<"/.*\n | +<SComment>\n[ \t]*"//!"[^<]/.*\n { replaceComment(1); g_readLineCtx=YY_START; BEGIN(ReadLine); @@ -297,6 +301,7 @@ void replaceComment(int offset) } else { + //printf("replaceComment(%s)\n",yytext); int i=computeIndent(&yytext[offset]); if (i==g_blockHeadCol) { diff --git a/src/config.l b/src/config.l index 0371916..de33167 100644 --- a/src/config.l +++ b/src/config.l @@ -2521,7 +2521,9 @@ void Config::create() "are defined before the preprocessor is started (similar to the -D option of \n" "gcc). The argument of the tag is a list of macros of the form: name \n" "or name=definition (no spaces). If the definition and the = are \n" - "omitted =1 is assumed. \n" + "omitted =1 is assumed. To prevent a macro definition from being \n" + "undefined via #undef or recursively expanded use the := operator \n" + "instead of the = operator.\n" ); cl->addDependency("ENABLE_PREPROCESSING"); cl = addList( diff --git a/src/definition.cpp b/src/definition.cpp index 346b7e6..57d585e 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -363,6 +363,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) QCString lineStr,anchorStr; lineStr.sprintf("%d",m_startBodyLine); anchorStr.sprintf("l%05d",m_startBodyLine); + ol.newParagraph(); if (lineMarkerPos<fileMarkerPos) // line marker before file marker { // write text left from linePos marker @@ -432,10 +433,6 @@ void Definition::writeSourceDef(OutputList &ol,const char *) { err("Error: translation error: invalid markers in trDefinedInSourceFile()\n"); } - - ol.disableAllBut(OutputGenerator::RTF); - ol.newParagraph(); - ol.enableAll(); } ol.popGeneratorState(); } diff --git a/src/docparser.cpp b/src/docparser.cpp index 2f6a55f..6043a2d 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -441,7 +441,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, //printf("findDocsForMemberOrCompound(%s)\n",commandName); *pDoc=""; *pDef=0; - QString cmdArg=commandName; + QString cmdArg=substitute(commandName,"#","::"); int l=cmdArg.length(); if (l==0) return FALSE; @@ -1236,7 +1236,7 @@ DocWord::DocWord(DocNode *parent,const QString &word) : //printf("new word %s url=%s\n",word.data(),g_searchUrl.data()); if (!g_searchUrl.isEmpty()) { - Doxygen::searchIndex->addWord(word.lower()); + Doxygen::searchIndex->addWord(word); } } @@ -1251,7 +1251,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word, //printf("new word %s url=%s\n",word.data(),g_searchUrl.data()); if (!g_searchUrl.isEmpty()) { - Doxygen::searchIndex->addWord(word.lower()); + Doxygen::searchIndex->addWord(word); } } @@ -1517,6 +1517,8 @@ bool DocXRefItem::parse() m_file = refList->listName(); m_anchor = item->listAnchor; m_title = refList->sectionTitle(); + //printf("DocXRefItem: file=%s anchor=%s title=%s\n", + // m_file.data(),m_anchor.data(),m_title.data()); if (!item->text.isEmpty()) { diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 638d30a..62d8886 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -283,7 +283,8 @@ URLCHAR [a-z_A-Z0-9\!\~\:\;\'\$\?\@\&\%\#\.\-\+\/\=] URLMASK (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])? FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+] FILEECHAR [a-z_A-Z0-9\-\+] -FILEMASK {FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)* +HFILEMASK ("."{FILESCHAR}*{FILEECHAR}+)* +FILEMASK ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK} LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))? SPCMD1 {CMD}[a-z_A-Z0-9]+ SPCMD2 {CMD}[\\@<>&$#%~] diff --git a/src/doxygen.cpp b/src/doxygen.cpp index e923082..7fe82bb 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1903,15 +1903,6 @@ static void buildVarList(Entry *root) } p=p->parent; } - // scope annonymous scope name at the end to determine the scope - // where we can put this variable - - //while ((i=scope.findRev("::"))!=-1 && (int)scope.length()>i+2 && - // scope.at(i+2)=='@' - // ) - //{ - // scope=scope.left(i); - //} MemberDef::MemberType mtype; QCString type=root->type.stripWhiteSpace(); @@ -4340,6 +4331,7 @@ static void findMember(Entry *root, QCString funcArgs; QCString funcTempList; QCString exceptions; + QCString funcSpec; bool isRelated=FALSE; bool isFriend=FALSE; bool done; @@ -4449,7 +4441,7 @@ static void findMember(Entry *root, } } scopeName=stripTemplateSpecifiersFromScope( - removeRedundantWhiteSpace(scopeName),FALSE); + removeRedundantWhiteSpace(scopeName),FALSE,&funcSpec); // split scope into a namespace and a class part extractNamespaceName(scopeName,className,namespaceName,TRUE); @@ -4482,7 +4474,14 @@ static void findMember(Entry *root, if (cd) { if (root->tArgLists) root->tArgLists->first(); - tempScopeName=cd->qualifiedNameWithTemplateParameters(root->tArgLists); + if (funcSpec.isEmpty()) + { + tempScopeName=cd->qualifiedNameWithTemplateParameters(root->tArgLists); + } + else + { + tempScopeName=scopeName+funcSpec; + } } //printf("scopeName=%s cd=%p root->tArgLists=%p result=%s\n", // scopeName.data(),cd,root->tArgLists,tempScopeName.data()); @@ -4551,6 +4550,7 @@ static void findMember(Entry *root, " namespaceName=`%s'\n" " className=`%s`\n" " funcType=`%s'\n" + " funcSpec=`%s'\n" " funcName=`%s'\n" " funcArgs=`%s'\n" " funcTempList=`%s'\n" @@ -4561,7 +4561,7 @@ static void findMember(Entry *root, " isFriend=%d\n" " isFunc=%d\n\n", namespaceName.data(),className.data(), - funcType.data(),funcName.data(),funcArgs.data(),funcTempList.data(), + funcType.data(),funcSpec.data(),funcName.data(),funcArgs.data(),funcTempList.data(), funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isFriend, isFunc ); @@ -4589,262 +4589,300 @@ static void findMember(Entry *root, "2. member name exists (%d members with this name)\n",mn->count()); if (!className.isEmpty()) // class name is valid { - int count=0; - MemberNameIterator mni(*mn); - MemberDef *md; - bool memFound=FALSE; - for (mni.toFirst();!memFound && (md=mni.current());++mni) + if (funcSpec.isEmpty()) // not a member specialization { - ClassDef *cd=md->getClassDef(); - Debug::print(Debug::FindMembers,0, - "3. member definition found, " - "scope needed=`%s' scope=`%s' args=`%s'\n", - scopeName.data(),cd ? cd->name().data() : "<none>", - md->argsString()); - //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); - bool ambig; - FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); - NamespaceDef *nd=0; - if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName); - - ClassDef *tcd=findClassDefinition(fd,nd,scopeName); - - if (cd && tcd==cd) // member's classes match + int count=0; + MemberNameIterator mni(*mn); + MemberDef *md; + bool memFound=FALSE; + for (mni.toFirst();!memFound && (md=mni.current());++mni) { + ClassDef *cd=md->getClassDef(); Debug::print(Debug::FindMembers,0, - "4. class definition %s found\n",cd->name().data()); - //int ci; - //ArgumentList *classTemplArgs = cd->templateArguments(); - //ArgumentList *funcTemplArgs = md->memberDefTemplateArguments(); - //if ((ci=cd->name().find("::"))!=-1) // nested class - //{ - // ClassDef *parentClass = getClass(cd->name().left(ci)); - // if (parentClass) - // classTemplArgs = parentClass->templateArguments(); - //} - ////printf("cd->name=%s classTemplArgs=%s\n",cd->name().data(), - //// argListToString(classTemplArgs).data()); - - - // get the template parameter lists found at the member declaration - QList<ArgumentList> declTemplArgs; - cd->getTemplateParameterLists(declTemplArgs); - if (md->templateArguments()) - { - declTemplArgs.append(md->templateArguments()); - } + "3. member definition found, " + "scope needed=`%s' scope=`%s' args=`%s'\n", + scopeName.data(),cd ? cd->name().data() : "<none>", + md->argsString()); + //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); + NamespaceDef *nd=0; + if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName); - // get the template parameter lists found at the member definition - QList<ArgumentList> *defTemplArgs = root->tArgLists; - //printf("defTemplArgs=%p\n",defTemplArgs); + ClassDef *tcd=findClassDefinition(fd,nd,scopeName); - // do we replace the decl argument lists with the def argument lists? - bool substDone=FALSE; - ArgumentList *argList=0; - - /* substitute the occurrences of class template names in the - * argument list before matching - */ - if (declTemplArgs.count()>0 && defTemplArgs && - declTemplArgs.count()==defTemplArgs->count() && - md->argumentList() - ) + if (cd && tcd==cd) // member's classes match { - /* the function definition has template arguments - * and the class definition also has template arguments, so - * we must substitute the template names of the class by that - * of the function definition before matching. + Debug::print(Debug::FindMembers,0, + "4. class definition %s found\n",cd->name().data()); + //int ci; + //ArgumentList *classTemplArgs = cd->templateArguments(); + //ArgumentList *funcTemplArgs = md->memberDefTemplateArguments(); + //if ((ci=cd->name().find("::"))!=-1) // nested class + //{ + // ClassDef *parentClass = getClass(cd->name().left(ci)); + // if (parentClass) + // classTemplArgs = parentClass->templateArguments(); + //} + ////printf("cd->name=%s classTemplArgs=%s\n",cd->name().data(), + //// argListToString(classTemplArgs).data()); + + + // get the template parameter lists found at the member declaration + QList<ArgumentList> declTemplArgs; + cd->getTemplateParameterLists(declTemplArgs); + if (md->templateArguments()) + { + declTemplArgs.append(md->templateArguments()); + } + + // get the template parameter lists found at the member definition + QList<ArgumentList> *defTemplArgs = root->tArgLists; + //printf("defTemplArgs=%p\n",defTemplArgs); + + // do we replace the decl argument lists with the def argument lists? + bool substDone=FALSE; + ArgumentList *argList=0; + + /* substitute the occurrences of class template names in the + * argument list before matching */ - argList = new ArgumentList; - substituteTemplatesInArgList(declTemplArgs,*defTemplArgs, - md->argumentList(),argList); + if (declTemplArgs.count()>0 && defTemplArgs && + declTemplArgs.count()==defTemplArgs->count() && + md->argumentList() + ) + { + /* the function definition has template arguments + * and the class definition also has template arguments, so + * we must substitute the template names of the class by that + * of the function definition before matching. + */ + argList = new ArgumentList; + substituteTemplatesInArgList(declTemplArgs,*defTemplArgs, + md->argumentList(),argList); + + substDone=TRUE; + } + else /* no template arguments, compare argument lists directly */ + { + argList = md->argumentList(); + } - substDone=TRUE; - } - else /* no template arguments, compare argument lists directly */ - { - argList = md->argumentList(); - } + Debug::print(Debug::FindMembers,0, + "5. matching `%s'<=>`%s' className=%s namespaceName=%s\n", + argListToString(argList).data(),argListToString(root->argList).data(), + className.data(),namespaceName.data() + ); - Debug::print(Debug::FindMembers,0, - "5. matching `%s'<=>`%s' className=%s namespaceName=%s\n", - argListToString(argList).data(),argListToString(root->argList).data(), - className.data(),namespaceName.data() - ); - - // TODO: match loop for all possible scopes + // TODO: match loop for all possible scopes - bool ambig; - FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); - // 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) + // list of namespaces using in the file/namespace that this + // member definition is part of + NamespaceSDict *nl = new NamespaceSDict; + if (nd) { - NamespaceDef *nnd; - NamespaceSDict::Iterator nsdi(*nnl); - for (nsdi.toFirst();(nnd=nsdi.current());++nsdi) + NamespaceSDict *nnl = nd->getUsedNamespaces(); + if (nnl) { - nl->append(nnd->qualifiedName(),nnd); + NamespaceDef *nnd; + NamespaceSDict::Iterator nsdi(*nnl); + for (nsdi.toFirst();(nnd=nsdi.current());++nsdi) + { + nl->append(nnd->qualifiedName(),nnd); + } } } - } - if (fd) - { - NamespaceSDict *fnl = fd->getUsedNamespaces(); - if (fnl) + if (fd) { - NamespaceDef *fnd; - NamespaceSDict::Iterator nsdi(*fnl); - for (nsdi.toFirst();(fnd=nsdi.current());++nsdi) + NamespaceSDict *fnl = fd->getUsedNamespaces(); + if (fnl) { - nl->append(fnd->qualifiedName(),fnd); + NamespaceDef *fnd; + NamespaceSDict::Iterator nsdi(*fnl); + for (nsdi.toFirst();(fnd=nsdi.current());++nsdi) + { + nl->append(fnd->qualifiedName(),fnd); + } } } - } - SDict<Definition> *cl = new SDict<Definition>(17); - if (nd) - { - SDict<Definition> *ncl = nd->getUsedClasses(); - if (ncl) + SDict<Definition> *cl = new SDict<Definition>(17); + if (nd) { - SDict<Definition>::Iterator csdi(*ncl); - Definition *ncd; - for (csdi.toFirst();(ncd=csdi.current());++csdi) + SDict<Definition> *ncl = nd->getUsedClasses(); + if (ncl) { - cl->append(ncd->qualifiedName(),ncd); + SDict<Definition>::Iterator csdi(*ncl); + Definition *ncd; + for (csdi.toFirst();(ncd=csdi.current());++csdi) + { + cl->append(ncd->qualifiedName(),ncd); + } } } - } - if (fd) - { - SDict<Definition> *fcl = fd->getUsedClasses(); - if (fcl) + if (fd) { - SDict<Definition>::Iterator csdi(*fcl); - Definition *fcd; - for (csdi.toFirst();(fcd=csdi.current());++csdi) + SDict<Definition> *fcl = fd->getUsedClasses(); + if (fcl) { - cl->append(fcd->qualifiedName(),fcd); + SDict<Definition>::Iterator csdi(*fcl); + Definition *fcd; + for (csdi.toFirst();(fcd=csdi.current());++csdi) + { + 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); + 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 + + Debug::print(Debug::FindMembers,0, + "6. match results = %d\n",matching); + + if (substDone) // found a new 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); + //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; + } } - else // no match -> delete argument list + if (matching) { - delete argList; + //printf("addMemberDocs root->inLine=%d md->isInline()=%d\n", + // root->inLine,md->isInline()); + addMemberDocs(root,md,funcDecl,0,overloaded,nl); + count++; + memFound=TRUE; } - } - 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; + delete cl; + delete nl; + } } - } - if (count==0 && root->parent && root->parent->section==Entry::OBJCIMPL_SEC) - { - goto localObjCMethod; - } - if (count==0 && !(isFriend && funcType=="class")) - { - int candidates=0; - if (mn->count()>0) + if (count==0 && root->parent && root->parent->section==Entry::OBJCIMPL_SEC) { - for (mni.toFirst();(md=mni.current());++mni) + goto localObjCMethod; + } + if (count==0 && !(isFriend && funcType=="class")) + { + int candidates=0; + if (mn->count()>0) { - ClassDef *cd=md->getClassDef(); - if (cd!=0 && cd->name()==className) + for (mni.toFirst();(md=mni.current());++mni) { - if (root->tArgLists && md->templateArguments() && - root->tArgLists->getLast()->count()<=md->templateArguments()->count()) - { // assume we have found a template specialization - // for which there is only a definition, no declaration in - // the class. TODO: we should actually check whether - // the arguments match! - addMethodToClass(root,cd,md->name(),/*cd->name(),*/isFriend); - return; + ClassDef *cd=md->getClassDef(); + if (cd!=0 && cd->name()==className) + { + if (root->tArgLists && md->templateArguments() && + root->tArgLists->getLast()->count()<=md->templateArguments()->count()) + { // assume we have found a template specialization + // for which there is only a definition, no declaration in + // the class. TODO: we should actually check whether + // the arguments match! + addMethodToClass(root,cd,md->name(),/*cd->name(),*/isFriend); + return; + } + candidates++; } - candidates++; } } - } - warn(root->fileName,root->startLine, - "Warning: no matching class member found for" - ); + warn(root->fileName,root->startLine, + "Warning: no matching class member found for" + ); - if (root->tArgLists) - { - QListIterator<ArgumentList> alli(*root->tArgLists); - ArgumentList *al; - for (;(al=alli.current());++alli) + if (root->tArgLists) { - warn_cont(" template %s\n",tempArgListToString(al).data()); + QListIterator<ArgumentList> alli(*root->tArgLists); + ArgumentList *al; + for (;(al=alli.current());++alli) + { + warn_cont(" template %s\n",tempArgListToString(al).data()); + } } - } - warn_cont(" %s\n",fullFuncDecl.data()); + warn_cont(" %s\n",fullFuncDecl.data()); - if (candidates>0) - { - warn_cont("Possible candidates:\n"); - for (mni.toFirst();(md=mni.current());++mni) + if (candidates>0) { - ClassDef *cd=md->getClassDef(); - if (cd!=0 && cd->name()==className) + warn_cont("Possible candidates:\n"); + for (mni.toFirst();(md=mni.current());++mni) { - if (md->templateArguments()) + ClassDef *cd=md->getClassDef(); + if (cd!=0 && cd->name()==className) { - warn_cont(" template %s\n",tempArgListToString(md->templateArguments()).data()); - } - warn_cont(" "); - if (md->typeString()) - { - warn_cont("%s ",md->typeString()); + if (md->templateArguments()) + { + warn_cont(" template %s\n",tempArgListToString(md->templateArguments()).data()); + } + warn_cont(" "); + if (md->typeString()) + { + warn_cont("%s ",md->typeString()); + } + QCString qScope = cd->qualifiedNameWithTemplateParameters(); + if (!qScope.isEmpty()) warn_cont("%s::%s",qScope.data(),md->name().data()); + if (md->argsString()) warn_cont("%s",md->argsString()); + warn_cont("\n"); } - QCString qScope = cd->qualifiedNameWithTemplateParameters(); - if (!qScope.isEmpty()) warn_cont("%s::%s",qScope.data(),md->name().data()); - if (md->argsString()) warn_cont("%s",md->argsString()); - warn_cont("\n"); } } } } + else // member specialization + { + MemberDef::MemberType mtype=MemberDef::Function; + ArgumentList *tArgList = new ArgumentList; + // getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists); + MemberDef *md=new MemberDef( + root->fileName,root->startLine, + funcType,funcName,funcArgs,exceptions, + root->protection,root->virt,root->stat,FALSE, + mtype,tArgList,root->argList); + //printf("new specialized member %s args=`%s'\n",md->name().data(),funcArgs.data()); + if (root->tagInfo) + { + md->setAnchor(root->tagInfo->anchor); + md->setReference(root->tagInfo->tagName); + } + md->setMemberClass(cd); + md->setTemplateSpecialization(TRUE); + md->setDefinition(funcDecl); + md->enableCallGraph(root->callGraph); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); + md->setDocsForDefinition(!root->proto); + md->setPrototype(root->proto); + md->addSectionsToDefinition(root->anchors); + md->setBodySegment(root->bodyLine,root->endBodyLine); + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); + md->setBodyDef(fd); + md->setMemberSpecifiers(root->memSpec); + md->setMemberGroupId(root->mGrpId); + mn->append(md); + cd->insertMember(md); + md->setRefItems(root->sli); + } } else if (overloaded) // check if the function belongs to only one class { @@ -6683,7 +6721,7 @@ static void generateExampleDocs() pd->docLine(), // startLine pd, // context 0, // memberDef - pd->documentation()+"\n\\include "+pd->name(), // docs + pd->documentation()+"\n\n\\include "+pd->name(), // docs TRUE, // index words TRUE, // is example pd->name() @@ -7073,7 +7111,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) { @@ -7214,7 +7252,7 @@ static int readDir(QFileInfo *fi, ) { QDir dir((const char *)fi->absFilePath()); - dir.setFilter( QDir::Files | QDir::Dirs ); + dir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden ); int totalSize=0; //printf("readDir `%s'\n",fi->absFilePath().data()); //printf("killDict=%p count=%d\n",killDict,killDict->count()); @@ -7837,41 +7875,6 @@ void readConfiguration(int argc, char **argv) setPerlModDoxyfile(configFileInfo.absFilePath()); Doxygen::xrefLists->setAutoDelete(TRUE); -#if 0 - /* init the special lists */ - Doxygen::specialLists->insert("todo", - new RefList("todo", - "GENERATE_TODOLIST", - theTranslator->trTodoList(), - theTranslator->trTodo() - //,BaseOutputDocInterface::Todo - ) - ); - Doxygen::specialLists->insert("test", - new RefList("test", - "GENERATE_TESTLIST", - theTranslator->trTestList(), - theTranslator->trTest() - //,BaseOutputDocInterface::Test - ) - ); - Doxygen::specialLists->insert("bug", - new RefList("bug", - "GENERATE_BUGLIST", - theTranslator->trBugList(), - theTranslator->trBug() - //,BaseOutputDocInterface::Bug - ) - ); - Doxygen::specialLists->insert("deprecated", - new RefList("deprecated", - "GENERATE_DEPRECATEDLIST", - theTranslator->trDeprecatedList(), - theTranslator->trDeprecated() - //,BaseOutputDocInterface::Deprecated - ) - ); -#endif } @@ -7884,15 +7887,6 @@ void parseInput() Doxygen::imageNameDict = new FileNameDict(257); Doxygen::dotFileNameDict = new FileNameDict(257); - //if (!Config_getString("DOC_URL").isEmpty()) - //{ - // Doxygen::tagDestinationDict.insert("_doc",new QCString(Config_getString("DOC_URL"))); - //} - //if (!Config_getString("CGI_URL").isEmpty()) - //{ - // Doxygen::tagDestinationDict.insert("_cgi",new QCString(Config_getString("CGI_URL")+"/"+Config_getString("CGI_NAME"))); - //} - /************************************************************************** * Initialize some global constants **************************************************************************/ @@ -8313,16 +8307,16 @@ void parseInput() findEnums(root); findEnumDocumentation(root); + msg("Searching for members imported via using declarations...\n"); + findUsingDeclImports(root); + findUsingDeclarations(root); + msg("Searching for member function documentation...\n"); findObjCMethodDefinitions(root); findMemberDocumentation(root); // may introduce new members ! transferRelatedFunctionDocumentation(); transferFunctionDocumentation(); - msg("Searching for members imported via using declarations...\n"); - findUsingDeclImports(root); - findUsingDeclarations(root); - msg("Building page list...\n"); buildPageList(root); diff --git a/src/filedef.cpp b/src/filedef.cpp index 2dabcc9..12c9872 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -222,7 +222,7 @@ void FileDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); - Doxygen::searchIndex->addWord(localName().lower()); + Doxygen::searchIndex->addWord(localName()); } if (!Config_getString("GENERATE_TAGFILE").isEmpty()) diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 54b0bbd..aa4ec5b 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -16,6 +16,7 @@ */ #include <ctype.h> +#include <qregexp.h> #include "qtbc.h" #include "groupdef.h" #include "classdef.h" @@ -457,14 +458,20 @@ void GroupDef::writeDocumentation(OutputList &ol) //ol.disable(OutputGenerator::Man); startFile(ol,getOutputFileBase(),name(),title); startTitle(ol,getOutputFileBase()); - ol.docify(title); + ol.parseText(title); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),title); if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()); - Doxygen::searchIndex->addWord(localName().lower()); + static QRegExp we("[a-zA-Z_][a-zA-Z_0-9]*"); + int i=0,p=0,l=0; + while ((i=we.match(title,p,&l))!=-1) // foreach word in the title + { + Doxygen::searchIndex->addWord(title.mid(i,l)); + p=i+l; + } } if (Config_getBool("DETAILS_AT_TOP")) diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 5b59560..e6017ba 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -26,9 +26,8 @@ #include "dot.h" #include "message.h" #include "config.h" +#include "htmlgen.h" -#define PREFRAG_START "<div class=\"fragment\"><pre>" -#define PREFRAG_END "</pre></div>" static QString htmlAttribsToString(const HtmlAttribList &attribs) { @@ -872,7 +871,7 @@ void HtmlDocVisitor::visitPost(DocParamSect *) void HtmlDocVisitor::visitPre(DocParamList *pl) { if (m_hide) return; - m_t << " <tr><td>"; + m_t << " <tr><td valign=\"top\">"; if (pl->direction()!=DocParamSect::Unspecified) { m_t << "<tt>["; @@ -890,7 +889,7 @@ void HtmlDocVisitor::visitPre(DocParamList *pl) } m_t << "]</tt> "; } - m_t << "</td><td valign=top><em>"; + m_t << "</td><td valign=\"top\"><em>"; QStrListIterator li(pl->parameters()); const char *s; bool first=TRUE; diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 69dd955..a17c256 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -42,12 +42,11 @@ #define DBG_HTML(x) static const char *defaultStyleSheet = -"H1 {\n" -" text-align: center;\n" +"BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {\n" " font-family: Geneva, Arial, Helvetica, sans-serif;\n" "}\n" -"H2 {\n" -" font-family: Geneva, Arial, Helvetica, sans-serif;\n" +"H1 {\n" +" text-align: center;\n" "}\n" "CAPTION { font-weight: bold }\n" "DIV.qindex {\n" @@ -93,10 +92,15 @@ static const char *defaultStyleSheet = "A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }\n" "A.el { text-decoration: none; font-weight: bold }\n" "A.elRef { font-weight: bold }\n" -"A.code { text-decoration: none; font-weight: normal; color: #1A419D}\n" -"A.codeRef { font-weight: normal; color: #1A419D}\n" +"A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}\n" +"A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}\n" +"A.codeRef:link { font-weight: normal; color: #0000FF}\n" +"A.codeRef:visited { font-weight: normal; color: #0000FF}\n" "A:hover { text-decoration: none; background-color: #f2f2ff }\n" "DL.el { margin-left: -1cm }\n" +".fragment {\n" +" font-family: monospace\n" +"}\n" "PRE.fragment {\n" " border: 1px solid #CCCCCC;\n" " background-color: #f5f5f5;\n" @@ -109,11 +113,12 @@ static const char *defaultStyleSheet = " padding-top: 4px;\n" " padding-bottom: 4px;\n" "}\n" -"DIV.fragment {\n" -" border: 1px solid #CCCCCC;\n" -" background-color: #f5f5f5;\n" -" padding: 6px;\n" -"}\n" +//"DIV.fragment {\n" +//" font-family: monospace\n" +//" border: 1px solid #CCCCCC;\n" +//" background-color: #f5f5f5;\n" +//" padding: 6px;\n" +//"}\n" "DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n" "TD.md { background-color: #F4F4FB; font-weight: bold; }\n" "TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }\n" @@ -123,7 +128,6 @@ static const char *defaultStyleSheet = " margin-top: 12px;\n" " margin-bottom: 6px;\n" " font-weight: bold;\n" -" font-family: Geneva, Arial, Helvetica, sans-serif;\n" "}\n" "DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }\n" "BODY {\n" @@ -216,7 +220,6 @@ static const char *defaultStyleSheet = " border-bottom-style: none;\n" " border-left-style: none;\n" " background-color: #FAFAFA;\n" -" font-family: Geneva, Arial, Helvetica, sans-serif;\n" " font-size: 12px;\n" "}\n" ".memItemRight {\n" @@ -235,7 +238,6 @@ static const char *defaultStyleSheet = " border-bottom-style: none;\n" " border-left-style: none;\n" " background-color: #FAFAFA;\n" -" font-family: Geneva, Arial, Helvetica, sans-serif;\n" " font-size: 13px;\n" "}\n" ".search { color: #003399;\n" @@ -1535,7 +1537,7 @@ void HtmlGenerator::writeSearchPage() t << "\n"; t << "function report_matches()\n"; t << "{\n"; - t << " return \"" << theTranslator->trSearchMatches() << " \";\n"; + t << " return \"" << theTranslator->trSearchMatches() << " \";\n"; t << "}\n"; t << "\n"; t << search_script; diff --git a/src/htmlgen.h b/src/htmlgen.h index e63030a..9371970 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -21,6 +21,9 @@ #include "qtbc.h" #include "outputgen.h" +#define PREFRAG_START "<div class=\"fragment\"><pre class=\"fragment\">" +#define PREFRAG_END "</pre></div>" + class QFile; class HtmlGenerator : public OutputGenerator @@ -112,8 +115,8 @@ class HtmlGenerator : public OutputGenerator void writeRuler() { t << "<hr>"; } void writeAnchor(const char *,const char *name) { t << "<a name=\"" << name <<"\"></a>"; } - void startCodeFragment() { t << "<pre class=\"fragment\"><div>"; } - void endCodeFragment() { t << "</div></pre>"; } + void startCodeFragment() { t << PREFRAG_START; } + void endCodeFragment() { t << PREFRAG_END; } void writeLineNumber(const char *,const char *,const char *,int); void startCodeLine() { col=0; } void endCodeLine() { codify("\n"); } diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 6bb1288..4fddfce 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -460,6 +460,7 @@ void ManDocVisitor::visitPre(DocSimpleList *) { if (m_hide) return; m_indent+=2; + if (!m_firstCol) m_t << endl; m_t << ".PD 0" << endl; } @@ -507,6 +508,7 @@ void ManDocVisitor::visitPre(DocHtmlList *) { if (m_hide) return; m_indent+=2; + if (!m_firstCol) m_t << endl; m_t << ".PD 0" << endl; } @@ -514,6 +516,7 @@ void ManDocVisitor::visitPost(DocHtmlList *) { if (m_hide) return; m_indent-=2; + if (!m_firstCol) m_t << endl; m_t << ".PP" << endl; } @@ -741,6 +744,7 @@ void ManDocVisitor::visitPost(DocSecRefList *) { if (m_hide) return; m_indent-=2; + if (!m_firstCol) m_t << endl; m_t << ".PP" << endl; } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 752e2d8..5c0570b 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -343,6 +343,7 @@ MemberDef::MemberDef(const char *df,int dl, section=0; groupAlias=0; explExt=FALSE; + tspec=FALSE; cachedAnonymousType=0; maxInitLines=Config_getInt("MAX_INITIALIZER_LINES"); userInitLines=-1; @@ -834,8 +835,8 @@ void MemberDef::writeDeclaration(OutputList &ol, if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(qualifiedName(),getOutputFileBase(),anchor()); - Doxygen::searchIndex->addWord(localName().lower()); - Doxygen::searchIndex->addWord(qualifiedName().lower()); + Doxygen::searchIndex->addWord(localName()); + Doxygen::searchIndex->addWord(qualifiedName()); } Definition *d=0; @@ -1248,7 +1249,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, htmlHelp->addIndexItem(cname,name(),cfname,anchor()); } linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i)); - //ol+=*vmd->enumDecl(); vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef()); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-i-l)); @@ -1310,7 +1310,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, else // definition gets it template parameters from its class // (since no definition was found) { - if (cd) + if (cd && !isTemplateSpecialization()) { QList<ArgumentList> tempParamLists; cd->getTemplateParameterLists(tempParamLists); @@ -1670,7 +1670,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.parseText(reimplFromLine.right( reimplFromLine.length()-markerPos-2)); // text right from marker - ol.newParagraph(); } else { @@ -1751,7 +1750,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, index=newIndex+matchLen; } ol.parseText(reimplInLine.right(reimplInLine.length()-index)); - ol.newParagraph(); } } // write the list of examples that use this member @@ -2003,9 +2001,14 @@ void MemberDef::addListReference(Definition *) } } } - //printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId()); - addRefItem(xrefListItems(),memLabel, - getOutputFileBase()+"#"+anchor(),memName,argsString()); + if (xrefListItems()) + { + addRefItem(xrefListItems(),memLabel, + getOutputFileBase()+"#"+anchor(),memName,argsString()); + } + else + { + } } MemberList *MemberDef::getSectionList(Definition *d) const diff --git a/src/memberdef.h b/src/memberdef.h index 34c7164..2fa4a85 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -134,6 +134,7 @@ class MemberDef : public Definition bool isWritable() const { return (memSpec&Entry::Writable)!=0; } bool isImplementation() const { return m_implOnly; } bool isExternal() const { return explExt; } + bool isTemplateSpecialization() const { return tspec; } bool isObjCMethod() const; bool isConstructor() const; bool isDestructor() const; @@ -151,22 +152,23 @@ class MemberDef : public Definition bool isDocumentedFriendClass() const; // set functions - void setMemberType(MemberType t) { mtype=t; } - void setDefinition(const char *d) { def=d; } - void setFileDef(FileDef *fd) { fileDef=fd; } + void setMemberType(MemberType t) { mtype=t; } + void setDefinition(const char *d) { def=d; } + void setFileDef(FileDef *fd) { fileDef=fd; } void setAnchor(const char *a); - void setProtection(Protection p) { prot=p; } - void setMemberSpecifiers(int s) { memSpec=s; } - void mergeMemberSpecifiers(int s) { memSpec|=s; } + void setProtection(Protection p) { prot=p; } + void setMemberSpecifiers(int s) { memSpec=s; } + void mergeMemberSpecifiers(int s) { memSpec|=s; } void setInitializer(const char *i); - void setBitfields(const char *s) { bitfields = s; } - void setMaxInitLines(int lines) { userInitLines=lines; } + void setBitfields(const char *s) { bitfields = s; } + void setMaxInitLines(int lines) { userInitLines=lines; } void setMemberClass(ClassDef *cd); void setSectionList(Definition *d,MemberList *sl); void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs); - void setExplicitExternal(bool b) { explExt=b; } - void setReadAccessor(const char *r) { read=r; } - void setWriteAccessor(const char *w) { write=w; } + void setExplicitExternal(bool b) { explExt=b; } + void setReadAccessor(const char *r) { read=r; } + void setWriteAccessor(const char *w) { write=w; } + void setTemplateSpecialization(bool b) { tspec=b; } void makeRelated() { related=TRUE; } @@ -348,6 +350,7 @@ class MemberDef : public Definition GroupDef *group; // group in which this member is in bool explExt; // member was explicitly declared external + bool tspec; // member is a template specialization ClassDef *cachedAnonymousType; // if the member has an anonymous compound // as its type then this is computed by diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 8a3ace5..e9ad1e1 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -286,14 +286,14 @@ void MemberList::writePlainDeclarations(OutputList &ol, { if (md->fromAnonymousScope() && !md->anonymousDeclShown()) { + md->setFromAnonymousScope(FALSE); //printf("anonymous compound members\n"); if (md->isBriefSectionVisible()) { if (first) ol.startMemberList(),first=FALSE; - md->setFromAnonymousScope(FALSE); md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); - md->setFromAnonymousScope(TRUE); } + md->setFromAnonymousScope(TRUE); } } } diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 4562067..2d1a717 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -275,15 +275,14 @@ void NamespaceDef::writeDocumentation(OutputList &ol) } startFile(ol,getOutputFileBase(),name(),pageTitle); startTitle(ol,getOutputFileBase()); - //ol.docify(pageTitle); - //ol.parseText(pageTitle); + ol.parseText(pageTitle); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),displayName()); if (Config_getBool("SEARCHENGINE")) { Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); - Doxygen::searchIndex->addWord(localName().lower()); + Doxygen::searchIndex->addWord(localName()); } if (!Config_getString("GENERATE_TAGFILE").isEmpty()) @@ -194,7 +194,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()); } @@ -1486,6 +1486,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) Define *def; if ((def=isDefined(yytext)) /*&& !def->isPredefined*/ + && !def->nonRecursive ) { //printf("undefining %s\n",yytext); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index d2d6ec9..87fda60 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -37,8 +37,8 @@ #include "rtfdocvisitor.h" #include "docparser.h" -#define DBG_RTF(x) x; -//#define DBG_RTF(x) +//#define DBG_RTF(x) x; +#define DBG_RTF(x) static QCString dateToRTFDateString() { diff --git a/src/scanner.l b/src/scanner.l index a81a4b0..d9d7da9 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2589,9 +2589,21 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] { varEntry->groups->append(new Grouping(*g)); } + if (current->sli) // copy special list items + { + QListIterator<ListItemInfo> li(*current->sli); + ListItemInfo *lii; + for (li.toFirst();(lii=li.current());++li) + { + varEntry->addSpecialListItem(lii->type,lii->itemId); + } + //delete current->sli; + //current->sli = 0; + } - //printf("Add: type=`%s',name=`%s',args=`%s'\n", - // varEntry->type.data(),varEntry->name.data(),varEntry->args.data()); + //printf("Add: type=`%s',name=`%s',args=`%s' brief=%s doc=%s\n", + // varEntry->type.data(),varEntry->name.data(), + // varEntry->args.data(),varEntry->brief.data(),varEntry->doc.data()); current_root->addSubEntry(varEntry); } if (*yytext==';') diff --git a/src/search.php b/src/search.php index bc4330d..cef406c 100644 --- a/src/search.php +++ b/src/search.php @@ -14,9 +14,9 @@ function readString($file) function readHeader($file) { - $header =fgetc($file); $header.=fgetc($file); - $header.=fgetc($file); $header.=fgetc($file); - return $header; + $header =fgetc($file); $header.=fgetc($file); + $header.=fgetc($file); $header.=fgetc($file); + return $header; } function computeIndex($word) @@ -284,7 +284,7 @@ function main() if (!in_array($word,$foundWords)) { $foundWords[]=$word; - search($file,$word,$results); + search($file,strtolower($word),$results); } $word=strtok(" "); } diff --git a/src/search_php.h b/src/search_php.h index 2ffa41c..fb6668a 100644 --- a/src/search_php.h +++ b/src/search_php.h @@ -14,9 +14,9 @@ "\n" "function readHeader($file)\n" "{\n" -" $header =fgetc($file); $header.=fgetc($file);\n" -" $header.=fgetc($file); $header.=fgetc($file);\n" -" return $header;\n" +" $header =fgetc($file); $header.=fgetc($file);\n" +" $header.=fgetc($file); $header.=fgetc($file);\n" +" return $header;\n" "}\n" "\n" "function computeIndex($word)\n" @@ -284,7 +284,7 @@ " if (!in_array($word,$foundWords))\n" " {\n" " $foundWords[]=$word;\n" -" search($file,$word,$results);\n" +" search($file,strtolower($word),$results);\n" " }\n" " $word=strtok(\" \");\n" " }\n" diff --git a/src/searchindex.cpp b/src/searchindex.cpp index cf049aa..b85d87e 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -81,12 +81,14 @@ static int charsToIndex(const char *word) void SearchIndex::addWord(const char *word) { - IndexWord *w = m_words[word]; + QString wStr=QString(word).lower(); + if (wStr.isEmpty()) return; + IndexWord *w = m_words[wStr]; if (w==0) { - int idx=charsToIndex(word); + int idx=charsToIndex(wStr); if (idx<0) return; - w = new IndexWord(word); + w = new IndexWord(wStr); //fprintf(stderr,"addWord(%s) at index %d\n",word,idx); m_index[idx]->append(w); m_words.insert(word,w); diff --git a/src/translator_adapter.h b/src/translator_adapter.h index bf30e2c..9518721 100644 --- a/src/translator_adapter.h +++ b/src/translator_adapter.h @@ -152,204 +152,5 @@ class TranslatorAdapter_1_2_11 : public TranslatorAdapter_1_2_13 }; -class TranslatorAdapter_1_2_7 : public TranslatorAdapter_1_2_11 -{ - public: - virtual QCString updateNeededMessage() - { return createUpdateNeededMessage(idLanguage(),"release 1.2.7"); } - - /*! These are the default implementations of the obsolete methods - * for introducing author/authors (possibly localized). - */ - virtual QCString trAuthors() - { return "Author(s)"; } - - virtual QCString trAuthor() - { return "Author"; } - - /*! This is the localized implementation of newer equivalent - * using the obsolete methods trAuthors() and trAuthor(). - */ - virtual QCString trAuthor(bool first_capital, bool singular) - { - if (first_capital) - return (singular) ? trAuthor() : trAuthors(); // possibly localized - else - return english.trAuthor(first_capital, singular); - } -}; - - -/*! \brief Translator adapter class for release 1.2.6 - * - * Translator adapter for dealing with translator changes since - * release 1.2.6 - */ -class TranslatorAdapter_1_2_6 : public TranslatorAdapter_1_2_7 -{ - public: - virtual QCString updateNeededMessage() - { return createUpdateNeededMessage(idLanguage(),"release 1.2.6"); } - - /*! Used as ansicpg for RTF file */ - virtual QCString trRTFansicp() - { - return "1252"; - } - - /*! Used as ansicpg for RTF fcharset */ - virtual QCString trRTFCharSet() - { - return "0"; - } - - /*! Used as header RTF general index */ - virtual QCString trRTFGeneralIndex() - { - return "Index"; - } - - ////////////////////////////////////////////////////////////////// - // The following methods were replaced by newer equivalent, but - // the obsolete method may be localized. Let's use the localized - // result if possible. - - - /*! This is the default implementation of the obsolete method - * used in the documentation of a group before the list of - * links to documented files. This is possibly localized. - */ - virtual QCString trFiles() - { return "Files"; } - - /*! This is the localized implementation of newer equivalent - * using the obsolete method trFiles(). - */ - virtual QCString trFile(bool first_capital, bool singular) - { - if (first_capital && !singular) - return trFiles(); // possibly localized - else - return english.trFile(first_capital, singular); - } - - /*! The latexBabelPackage() was superceeded by - * latexLanguageSupportCommand(). The default implementation - * of the obsolete method follows. - */ - virtual QCString latexBabelPackage() - { return ""; } - - /*! Default implementation of the newer method. */ - virtual QCString latexLanguageSupportCommand() - { - QCString result(latexBabelPackage()); - if (!result.isEmpty()) - { - result = "\\usepackage[" + result; - result += "]{babel}\n"; - } - return result; - } - - virtual QCString idLanguageCharset() - { return english.idLanguageCharset(); } - - virtual QCString trClass(bool first_capital, bool singular) - { return english.trClass(first_capital,singular); } - - virtual QCString trNamespace(bool first_capital, bool singular) - { return english.trNamespace(first_capital,singular); } - - virtual QCString trGroup(bool first_capital, bool singular) - { return english.trGroup(first_capital,singular); } - - virtual QCString trPage(bool first_capital, bool singular) - { return english.trPage(first_capital,singular); } - - virtual QCString trMember(bool first_capital, bool singular) - { return english.trMember(first_capital,singular); } - - virtual QCString trField(bool first_capital, bool singular) - { return english.trField(first_capital,singular); } - - virtual QCString trGlobal(bool first_capital, bool singular) - { return english.trGlobal(first_capital,singular); } - - -}; - -/*! \brief Translator adapter class for release 1.2.5 - * - * Translator adapter for dealing with translator changes since - * release 1.2.5 - */ -class TranslatorAdapter_1_2_5 : public TranslatorAdapter_1_2_6 -{ - public: - virtual QCString updateNeededMessage() - { return createUpdateNeededMessage(idLanguage(),"release 1.2.5"); } - - virtual QCString trBug() - { return english.trBug(); } - - virtual QCString trBugList() - { return english.trBugList(); } -}; - -/*! \brief Translator adapter class for release 1.2.4 - * - * Translator adapter for dealing with translator changes since - * release 1.2.4 - */ -class TranslatorAdapter_1_2_4 : public TranslatorAdapter_1_2_5 -{ - public: - virtual QCString updateNeededMessage() - { return createUpdateNeededMessage(idLanguage(),"release 1.2.4"); } - - virtual QCString trInterfaces() - { return english.trInterfaces(); } - - virtual QCString trClasses() - { return english.trClasses(); } - - virtual QCString trPackage(const char *name) - { return english.trPackage(name); } - - virtual QCString trPackageList() - { return english.trPackageList(); } - - virtual QCString trPackageListDescription() - { return english.trPackageListDescription(); } - - virtual QCString trPackages() - { return english.trPackages(); } - - virtual QCString trPackageDocumentation() - { return english.trPackageDocumentation(); } - - virtual QCString trDefineValue() - { return english.trDefineValue(); } - -}; - -/*! \brief Translator adapter class for release 1.2.2 - * - * Translator adapter for dealing with translator changes since - * release 1.2.2 - */ -class TranslatorAdapter_1_2_2 : public TranslatorAdapter_1_2_4 -{ - public: - virtual QCString updateNeededMessage() - { return createUpdateNeededMessage(idLanguage(),"release 1.2.2"); } - - virtual QCString trProperties() - { return english.trProperties(); } - - virtual QCString trPropertyDocumentation() - { return english.trPropertyDocumentation(); } -}; - #endif + diff --git a/src/util.cpp b/src/util.cpp index f2ef4c3..c204a18 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2012,6 +2012,7 @@ void trimBaseClassScope(BaseClassList *bcl,QCString &s,int level=0) } } +#if 0 /*! if either t1 or t2 contains a namespace scope, then remove that * scope. If neither or both have a namespace scope, t1 and t2 remain * unchanged. @@ -2086,6 +2087,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName) p2 = QMAX(i2-2,0); } } +#endif /*! According to the C++ spec and Ivan Vecerina: @@ -2227,7 +2229,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, //srcAType=stripTemplateSpecifiersFromScope(srcAType,FALSE); //dstAType=stripTemplateSpecifiersFromScope(dstAType,FALSE); - //printf("srcA=%s:%s dstA=%s:%s\n",srcAType.data(),srcA->name.data(), + //printf("srcA=%s|%s dstA=%s|%s\n",srcAType.data(),srcA->name.data(), // dstAType.data(),dstA->name.data()); if (srcA->array!=dstA->array) // nomatch for char[] against char @@ -2240,7 +2242,9 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, // remove a namespace scope that is only in one type // (assuming a using statement was used) - trimNamespaceScope(srcAType,dstAType,namespaceName); + //printf("Trimming %s<->%s: %s\n",srcAType.data(),dstAType.data(),namespaceName.data()); + //trimNamespaceScope(srcAType,dstAType,namespaceName); + //printf("After Trimming %s<->%s\n",srcAType.data(),dstAType.data()); //QCString srcScope; //QCString dstScope; @@ -2268,6 +2272,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, srcAType=trimScope(namespaceName,srcAType); dstAType=trimScope(namespaceName,dstAType); } + //printf("#usingNamespace=%d\n",usingNamespaces->count()); if (usingNamespaces && usingNamespaces->count()>0) { NamespaceSDict::Iterator nli(*usingNamespaces); @@ -2278,6 +2283,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, dstAType=trimScope(nd->name(),dstAType); } } + //printf("#usingClasses=%d\n",usingClasses->count()); if (usingClasses && usingClasses->count()>0) { SDict<Definition>::Iterator cli(*usingClasses); @@ -2289,7 +2295,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, } } - //printf("2. srcA=%s:%s dstA=%s:%s\n",srcAType.data(),srcA->name.data(), + //printf("2. srcA=%s|%s dstA=%s|%s\n",srcAType.data(),srcA->name.data(), // dstAType.data(),dstA->name.data()); if (!srcA->name.isEmpty() && !dstA->type.isEmpty() && @@ -4200,7 +4206,8 @@ QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists) * strip both unless A<T> or B<S> are specialized template classes. */ QCString stripTemplateSpecifiersFromScope(const QCString &fullName, - bool parentOnly) + bool parentOnly, + QCString *pLastScopeStripped) { QCString result; int p=0; @@ -4237,6 +4244,10 @@ QCString stripTemplateSpecifiersFromScope(const QCString &fullName, result+=fullName.mid(i,e-i); //printf("2:result+=%s\n",fullName.mid(i,e-i-1).data()); } + else if (pLastScopeStripped) + { + *pLastScopeStripped=fullName.mid(i,e-i); + } p=e; i=fullName.find('<',p); } @@ -4420,7 +4431,7 @@ void addRefItem(const QList<ListItemInfo> *sli, const char *prefix, const char *name,const char *title,const char *args) { - //printf("addRefItem(%s,%s,%s,%s)\n",prefix,name,title,args); + //printf("addRefItem(prefix=%s,name=%s,title=%s,args=%s)\n",prefix,name,title,args); if (sli) { QListIterator<ListItemInfo> slii(*sli); @@ -4440,8 +4451,8 @@ void addRefItem(const QList<ListItemInfo> *sli, { RefItem *item = refList->getRefItem(lii->itemId); ASSERT(item!=0); - if (item->written) return; //printf("anchor=%s\n",item->listAnchor.data()); + if (item->written) return; QCString doc(1000); doc = "\\anchor "; @@ -190,7 +190,8 @@ QCString substituteTemplateArgumentsInString( ArgumentList *copyArgumentList(const ArgumentList *src); QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists); QCString stripTemplateSpecifiersFromScope(const QCString &fullName, - bool parentOnly=TRUE); + bool parentOnly=TRUE, + QCString *lastScopeStripped=0); QCString resolveTypeDef(Definition *d,const QCString &name, Definition **typedefContext=0); QCString mergeScopes(const QCString &leftScope,const QCString &rightScope); |