diff options
Diffstat (limited to 'src')
250 files changed, 1479 insertions, 926 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 865740d..ac7efaa 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2,7 +2,7 @@ # # # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/arguments.cpp b/src/arguments.cpp index 2acf855..87d0438 100644 --- a/src/arguments.cpp +++ b/src/arguments.cpp @@ -54,6 +54,7 @@ ArgumentList *ArgumentList::unmarshal(StorageIntf *s) a->array = unmarshalQCString(s); a->defval = unmarshalQCString(s); a->docs = unmarshalQCString(s); + a->typeConstraint = unmarshalQCString(s); result->append(a); } result->constSpecifier = unmarshalBool(s); @@ -85,6 +86,7 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList) marshalQCString(s,a->array); marshalQCString(s,a->defval); marshalQCString(s,a->docs); + marshalQCString(s,a->typeConstraint); } } marshalBool(s,argList->constSpecifier); diff --git a/src/arguments.h b/src/arguments.h index ed09869..8b3d211 100644 --- a/src/arguments.h +++ b/src/arguments.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -30,37 +30,39 @@ struct Argument /*! Construct a new argument. */ Argument() {} /*! Copy an argument (does a deep copy of all strings). */ - Argument(const Argument &a) - { - attrib=a.attrib.copy(); - type=a.type.copy(); - name=a.name.copy(); - defval=a.defval.copy(); - docs=a.docs.copy(); - array=a.array.copy(); + Argument(const Argument &a) + { + attrib=a.attrib; + type=a.type; + name=a.name; + array=a.array; + defval=a.defval; + docs=a.docs; + typeConstraint=a.typeConstraint; } /*! Assignment of an argument (does a deep copy of all strings). */ Argument &operator=(const Argument &a) { if (this!=&a) { - attrib=a.attrib.copy(); - type=a.type.copy(); - name=a.name.copy(); - defval=a.defval.copy(); - docs=a.docs.copy(); - array=a.array.copy(); + attrib=a.attrib; + type=a.type; + name=a.name; + array=a.array; + defval=a.defval; + docs=a.docs; + typeConstraint=a.typeConstraint; } return *this; } /*! return TRUE if this argument is documentation and the argument has a * non empty name. */ - bool hasDocumentation() const - { - return !name.isEmpty() && !docs.isEmpty(); + bool hasDocumentation() const + { + return !name.isEmpty() && !docs.isEmpty(); } - + QCString attrib; /*!< Argument's attribute (IDL only) */ QCString type; /*!< Argument's type */ QCString canType; /*!< Cached value of canonical type (after type resolution). Empty initially. */ @@ -68,6 +70,7 @@ struct Argument QCString array; /*!< Argument's array specifier (may be empty) */ QCString defval; /*!< Argument's default value (may be empty) */ QCString docs; /*!< Argument's documentation (may be empty) */ + QCString typeConstraint; /*!< Used for Java generics: \<T extends C\> */ }; /*! \brief This class represents an function or template argument list. diff --git a/src/bufstr.h b/src/bufstr.h index 7fb7d40..331def2 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cite.cpp b/src/cite.cpp index f0d7d66..2ea6300 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -63,7 +63,6 @@ void CiteDict::writeLatexBibliography(FTextStream &t) t << "\\bibliographystyle{" << style << "}\n" "\\bibliography{"; QStrList &citeDataList = Config_getList("CITE_BIB_FILES"); - QCString latexOutputDir = Config_getString("LATEX_OUTPUT")+"/"; int i = 0; const char *bibdata = citeDataList.first(); while (bibdata) @@ -211,7 +210,7 @@ void CiteDict::generatePage() const QCString doc; QFileInfo fi(citeListFile); QCString input(fi.size()+1); - f.readBlock(input.data(),fi.size()); + f.readBlock(input.rawData(),fi.size()); f.close(); input.at(fi.size())='\0'; int p=0,s; diff --git a/src/classdef.cpp b/src/classdef.cpp index 5c42f57..95428d6 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -118,6 +118,8 @@ class ClassDefImpl UsesClassDict *usedByImplClassDict; UsesClassDict *usesIntfClassDict; + ConstraintClassDict *constraintClassDict; + /*! Template instances that exists of this class, the key in the * dictionary is the template argument list. */ @@ -216,6 +218,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name, usesImplClassDict=0; usedByImplClassDict=0; usesIntfClassDict=0; + constraintClassDict=0; memberGroupSDict = 0; innerClasses = 0; subGrouping=Config_getBool("SUBGROUPING"); @@ -267,6 +270,7 @@ ClassDefImpl::~ClassDefImpl() delete usesImplClassDict; delete usedByImplClassDict; delete usesIntfClassDict; + delete constraintClassDict; delete incInfo; delete memberGroupSDict; delete innerClasses; @@ -2526,20 +2530,67 @@ bool ClassDef::hasExamples() const return result; } +void ClassDef::addTypeConstraint(const QCString &typeConstraint,const QCString &type) +{ + //printf("addTypeContraint(%s,%s)\n",type.data(),typeConstraint.data()); + static bool hideUndocRelation = Config_getBool("HIDE_UNDOC_RELATIONS"); + if (typeConstraint.isEmpty() || type.isEmpty()) return; + ClassDef *cd = getResolvedClass(this,getFileDef(),typeConstraint); + if (cd==0 && !hideUndocRelation) + { + cd = new ClassDef(getDefFileName(),getDefLine(),getDefColumn(),typeConstraint,ClassDef::Class); + cd->setUsedOnly(TRUE); + cd->setLanguage(getLanguage()); + Doxygen::hiddenClasses->append(typeConstraint,cd); + //printf("Adding undocumented constraint '%s' to class %s on type %s\n", + // typeConstraint.data(),name().data(),type.data()); + } + if (cd) + { + if (m_impl->constraintClassDict==0) + { + m_impl->constraintClassDict = new ConstraintClassDict(17); + m_impl->constraintClassDict->setAutoDelete(TRUE); + } + ConstraintClassDef *ccd=m_impl->constraintClassDict->find(typeConstraint); + if (ccd==0) + { + ccd = new ConstraintClassDef(cd); + m_impl->constraintClassDict->insert(typeConstraint,ccd); + } + ccd->addAccessor(type); + //printf("Adding constraint '%s' to class %s on type %s\n", + // typeConstraint.data(),name().data(),type.data()); + } +} -void ClassDef::setTemplateArguments(ArgumentList *al) +// Java Type Constrains: A<T extends C & I> +void ClassDef::addTypeConstraints() { - if (al==0) return; - if (!m_impl->tempArgs) delete m_impl->tempArgs; // delete old list if needed - m_impl->tempArgs=new ArgumentList; - ArgumentListIterator ali(*al); - Argument *a; - for (;(a=ali.current());++ali) + if (m_impl->tempArgs) { - m_impl->tempArgs->append(new Argument(*a)); + ArgumentListIterator ali(*m_impl->tempArgs); + Argument *a; + for (;(a=ali.current());++ali) + { + if (!a->typeConstraint.isEmpty()) + { + QCString typeConstraint; + int i=0,p=0; + while ((i=a->typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I> + { + typeConstraint = a->typeConstraint.mid(p,i-p).stripWhiteSpace(); + addTypeConstraint(typeConstraint,a->type); + p=i+1; + } + typeConstraint = a->typeConstraint.right(a->typeConstraint.length()-p).stripWhiteSpace(); + addTypeConstraint(typeConstraint,a->type); + } + } } } +// C# Type Constraints: D<T> where T : C, I void ClassDef::setTypeConstraints(ArgumentList *al) { if (al==0) return; @@ -2553,6 +2604,20 @@ void ClassDef::setTypeConstraints(ArgumentList *al) } } +void ClassDef::setTemplateArguments(ArgumentList *al) +{ + if (al==0) return; + if (!m_impl->tempArgs) delete m_impl->tempArgs; // delete old list if needed + //printf("setting template args '%s' for '%s'\n",tempArgListToString(al,getLanguage()).data(),name().data()); + m_impl->tempArgs=new ArgumentList; + ArgumentListIterator ali(*al); + Argument *a; + for (;(a=ali.current());++ali) + { + m_impl->tempArgs->append(new Argument(*a)); + } +} + /*! Returns \c TRUE iff this class or a class inheriting from this class * is \e not defined in an external tag file. */ @@ -3123,18 +3188,19 @@ void ClassDef::mergeCategory(ClassDef *category) Protection prot = mi->prot; //if (makePrivate) prot = Private; MemberDef *newMd = mi->memberDef->deepCopy(); - //printf("Copying member %s\n",mi->memberDef->name().data()); - newMd->moveTo(this); - - MemberInfo *newMi=new MemberInfo(newMd,prot,mi->virt,mi->inherited); - newMi->scopePath=mi->scopePath; - newMi->ambigClass=mi->ambigClass; - newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope; - newMni->append(newMi); - - // also add the newly created member to the global members list if (newMd) { + //printf("Copying member %s\n",mi->memberDef->name().data()); + newMd->moveTo(this); + + MemberInfo *newMi=new MemberInfo(newMd,prot,mi->virt,mi->inherited); + newMi->scopePath=mi->scopePath; + newMi->ambigClass=mi->ambigClass; + newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope; + newMni->append(newMi); + + // also add the newly created member to the global members list + MemberName *mn; QCString name = newMd->name(); if ((mn=Doxygen::memberNameSDict->find(name))) @@ -3147,17 +3213,17 @@ void ClassDef::mergeCategory(ClassDef *category) mn->append(newMd); Doxygen::memberNameSDict->append(name,mn); } + + newMd->setCategory(category); + newMd->setCategoryRelation(mi->memberDef); + mi->memberDef->setCategoryRelation(newMd); + if (makePrivate || isExtension) + { + newMd->makeImplementationDetail(); + } + internalInsertMember(newMd,prot,FALSE); } - - newMd->setCategory(category); - newMd->setCategoryRelation(mi->memberDef); - mi->memberDef->setCategoryRelation(newMd); - if (makePrivate || isExtension) - { - newMd->makeImplementationDetail(); - } - internalInsertMember(newMd,prot,FALSE); - } + } // add it to the dictionary dstMnd->append(newMni->memberName(),newMni); @@ -3648,7 +3714,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName, ClassDef *templateClass=m_impl->templateInstances->find(templSpec); if (templateClass==0) { - Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",name().data(),templSpec.data()); + Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec)); QCString tcname = removeRedundantWhiteSpace(localName()+templSpec); templateClass = new ClassDef( fileName,startLine,startColumn,tcname,ClassDef::Class); @@ -4031,7 +4097,6 @@ int ClassDef::countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom, static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB"); if (!inlineInheritedMembers) // show inherited members as separate lists { - QPtrDict<void> visited(17); count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses); } } @@ -4405,6 +4470,11 @@ UsesClassDict *ClassDef::usedInterfaceClasses() const return m_impl->usesIntfClassDict; } +ConstraintClassDict *ClassDef::templateTypeConstraints() const +{ + return m_impl->constraintClassDict; +} + bool ClassDef::isTemplateArgument() const { return m_impl->isTemplArg; diff --git a/src/classdef.h b/src/classdef.h index 0729d20..6cdd491 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -24,6 +24,7 @@ #include "definition.h" +struct Argument; class MemberDef; class MemberList; class MemberDict; @@ -38,6 +39,7 @@ class MemberDef; class ExampleSDict; class MemberNameInfoSDict; class UsesClassDict; +class ConstraintClassDict; class MemberGroupSDict; class QTextStream; class PackageDef; @@ -229,6 +231,8 @@ class ClassDef : public Definition UsesClassDict *usedInterfaceClasses() const; + ConstraintClassDict *templateTypeConstraints() const; + bool isTemplateArgument() const; /** Returns the definition of a nested compound if @@ -371,6 +375,7 @@ class ClassDef : public Definition void findSectionsInDocumentation(); void addMembersToMemberGroup(); void addListReferences(); + void addTypeConstraints(); void computeAnchors(); void mergeMembers(); void sortMemberLists(); @@ -441,12 +446,13 @@ class ClassDef : public Definition void getTitleForMemberListType(MemberListType type, QCString &title,QCString &subtitle); QCString includeStatement() const; + void addTypeConstraint(const QCString &typeConstraint,const QCString &type); - ClassDefImpl *m_impl; - }; +//------------------------------------------------------------------------ + /** Class that contains information about a usage relation. */ struct UsesClassDef @@ -500,6 +506,8 @@ class UsesClassDictIterator : public QDictIterator<UsesClassDef> ~UsesClassDictIterator() {} }; +//------------------------------------------------------------------------ + /** Class that contains information about an inheritance relation. */ struct BaseClassDef @@ -558,4 +566,56 @@ class BaseClassListIterator : public QListIterator<BaseClassDef> QListIterator<BaseClassDef>(bcl) {} }; +//------------------------------------------------------------------------ + + +/** Class that contains information about a type constraint relations. + */ +struct ConstraintClassDef +{ + ConstraintClassDef(ClassDef *cd) : classDef(cd) + { + accessors = new QDict<void>(17); + } + ~ConstraintClassDef() + { + delete accessors; + } + void addAccessor(const char *s) + { + if (accessors->find(s)==0) + { + accessors->insert(s,(void *)666); + } + } + /** Class definition that this relation uses. */ + ClassDef *classDef; + + /** Dictionary of member types names that form the edge labels of the + * constraint relation. + */ + QDict<void> *accessors; +}; + +/** Dictionary of constraint relations. + */ +class ConstraintClassDict : public QDict<ConstraintClassDef> +{ + public: + ConstraintClassDict(int size) : QDict<ConstraintClassDef>(size) {} + ~ConstraintClassDict() {} +}; + +/** Iterator class to iterate over a dictionary of constraint relations. + */ +class ConstraintClassDictIterator : public QDictIterator<ConstraintClassDef> +{ + public: + ConstraintClassDictIterator(const QDict<ConstraintClassDef> &d) + : QDictIterator<ConstraintClassDef>(d) {} + ~ConstraintClassDictIterator() {} +}; + +//------------------------------------------------------------------------ + #endif diff --git a/src/classlist.cpp b/src/classlist.cpp index 6615a99..81b7d26 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/classlist.h b/src/classlist.h index 3f15b3e..2ae7de8 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index eeb7f78..5c38b5a 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cmdmapper.h b/src/cmdmapper.h index fd33b10..5a59f39 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1236,7 +1236,6 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName, { int vi; QCString vn=varName; - QCString scope; if ((vi=vn.findRev("::"))!=-1 || (vi=vn.findRev('.'))!=-1) // explicit scope A::b(), probably static member { ClassDef *jcd = getClass(vn.left(vi)); diff --git a/src/commentcnv.h b/src/commentcnv.h index 6255a73..a45d29c 100644 --- a/src/commentcnv.h +++ b/src/commentcnv.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/commentcnv.l b/src/commentcnv.l index 64e18be..979e6ee 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1028,6 +1028,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) "Nesting level %d %s",g_nestingCount+1,tmp.data()); // add one for "normal" expected end of comment } g_commentStack.clear(); + g_nestingCount = 0; if (Debug::isFlagSet(Debug::CommentCnv)) { g_outBuf->at(g_outBuf->curPos())='\0'; diff --git a/src/commentscan.h b/src/commentscan.h index ce28ea2..e202f0a 100644 --- a/src/commentscan.h +++ b/src/commentscan.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/commentscan.l b/src/commentscan.l index 702a616..54adbd8 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1,6 +1,6 @@ /***************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -101,7 +101,9 @@ static bool handleNoSubGrouping(const QCString &); static bool handleShowInitializer(const QCString &); static bool handleHideInitializer(const QCString &); static bool handleCallgraph(const QCString &); +static bool handleHideCallgraph(const QCString &); static bool handleCallergraph(const QCString &); +static bool handleHideCallergraph(const QCString &); static bool handleInternal(const QCString &); static bool handleLineBr(const QCString &); static bool handleStatic(const QCString &); @@ -204,7 +206,9 @@ static DocCmdMap docCmdMap[] = { "showinitializer", &handleShowInitializer, FALSE }, { "hideinitializer", &handleHideInitializer, FALSE }, { "callgraph", &handleCallgraph, FALSE }, + { "hidecallgraph", &handleHideCallgraph, FALSE }, { "callergraph", &handleCallergraph, FALSE }, + { "hidecallergraph", &handleHideCallergraph, FALSE }, { "internal", &handleInternal, TRUE }, { "_linebr", &handleLineBr, FALSE }, { "static", &handleStatic, FALSE }, @@ -2689,12 +2693,24 @@ static bool handleCallgraph(const QCString &) return FALSE; } +static bool handleHideCallgraph(const QCString &) +{ + current->callGraph = FALSE; // OFF + return FALSE; +} + static bool handleCallergraph(const QCString &) { current->callerGraph = TRUE; // ON return FALSE; } +static bool handleHideCallergraph(const QCString &) +{ + current->callerGraph = FALSE; // OFF + return FALSE; +} + static bool handleInternal(const QCString &) { if (!Config_getBool("INTERNAL_DOCS")) @@ -2899,7 +2915,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, } Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\n" - "input=[\n%s]\n",fileName.data(),lineNr,comment.data() + "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(comment) ); commentscanYYrestart( commentscanYYin ); @@ -2946,9 +2962,9 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, Debug::print(Debug::CommentScan,0, "brief=[line=%d\n%s]\ndocs=[line=%d\n%s]\ninbody=[line=%d\n%s]\n===========\n", - current->briefLine,current->brief.data(), - current->docLine,current->doc.data(), - current->inbodyLine,current->inbodyDocs.data() + current->briefLine,qPrint(current->brief), + current->docLine,qPrint(current->doc), + current->inbodyLine,qPrint(current->inbodyDocs) ); checkFormula(); @@ -3098,7 +3114,7 @@ void closeGroup(Entry *e,const char *fileName,int,bool foundInline) g_memberGroupId=DOX_NOGROUP; g_memberGroupRelates.resize(0); g_memberGroupDocs.resize(0); - e->mGrpId=DOX_NOGROUP; + if (!foundInline) e->mGrpId=DOX_NOGROUP; //printf("new group id=%d\n",g_memberGroupId); } else if (!g_autoGroupStack.isEmpty()) // end of auto group diff --git a/src/condparser.cpp b/src/condparser.cpp index 67da1e3..b3bea3a 100644 --- a/src/condparser.cpp +++ b/src/condparser.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/condparser.h b/src/condparser.h index 7c65411..09a4f74 100644 --- a/src/condparser.h +++ b/src/condparser.h @@ -2,7 +2,7 @@ #define CONDPARSER_H /** - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/config.h b/src/config.h index 981f6fe..344e007 100644 --- a/src/config.h +++ b/src/config.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -69,7 +69,7 @@ class ConfigOption QCString dependsOn() const { return m_dependency; } void addDependency(const char *dep) { m_dependency = dep; } void setEncoding(const QCString &e) { m_encoding = e; } - void setUserComment(const QCString &u) { m_userComment = u; } + void setUserComment(const QCString &u) { m_userComment += u; } protected: virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0; @@ -507,12 +507,27 @@ class Config */ void create(); + /*! Append user start comment + */ + void appendStartComment(const QCString &u) + { + m_startComment += u; + } /*! Append user comment */ void appendUserComment(const QCString &u) { m_userComment += u; } + /*! Take the user start comment and reset it internally + * \returns user start comment + */ + QCString takeStartComment() + { + QCString result=m_startComment; + m_startComment.resize(0); + return result.replace(QRegExp("\r"),""); + } /*! Take the user comment and reset it internally * \returns user comment */ @@ -552,6 +567,7 @@ class Config QList<ConfigOption> *m_disabled; QDict<ConfigOption> *m_dict; static Config *m_instance; + QCString m_startComment; QCString m_userComment; bool m_initialized; QCString m_header; diff --git a/src/config.l b/src/config.l index a237faf..2ed9973 100644 --- a/src/config.l +++ b/src/config.l @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -53,18 +53,21 @@ #define Config_getEnum(val) getEnum(__FILE__,__LINE__,val) #define Config_getBool(val) getBool(__FILE__,__LINE__,val) +static const char *warning_str = "warning: "; +static const char *error_str = "error: "; + void config_err(const char *fmt, ...) { va_list args; va_start(args, fmt); - vfprintf(stderr, fmt, args); + vfprintf(stderr, (QCString(error_str) + fmt).data(), args); va_end(args); } void config_warn(const char *fmt, ...) { va_list args; va_start(args, fmt); - vfprintf(stderr, fmt, args); + vfprintf(stderr, (QCString(warning_str) + fmt).data(), args); va_end(args); } @@ -85,7 +88,7 @@ static QCString convertToComment(const QCString &s, const QCString &u) if (!s.isEmpty()) { QCString tmp=s.stripWhiteSpace(); - char *p=tmp.data(); + const char *p=tmp.data(); char c; result+="#"; if (*p && *p!='\n') @@ -181,7 +184,7 @@ void ConfigInt::convertStrToVal() int val = m_valueString.toInt(&ok); if (!ok || val<m_minVal || val>m_maxVal) { - config_warn("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" + config_warn("argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value); } else @@ -206,7 +209,7 @@ void ConfigBool::convertStrToVal() } else { - config_warn("Warning: argument `%s' for option %s is not a valid boolean value\n" + config_warn("argument `%s' for option %s is not a valid boolean value\n" "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO"); } } @@ -431,19 +434,11 @@ static bool *b=0; static QStrList *l=0; static int lastState; static QCString elemStr; -static QCString includeName; static QStrList includePathList; static QStack<ConfigFileState> includeStack; static int includeDepth; static bool config_upd = FALSE; -static QCString tabSizeString; -static QCString maxInitLinesString; -static QCString colsInAlphaIndexString; -static QCString enumValuesPerLineString; -static QCString treeViewWidthString; -static QCString maxDotGraphWidthString; -static QCString maxDotGraphHeightString; static QCString encoding; static Config *config; @@ -495,8 +490,8 @@ static QCString configStringRecode( } size_t iLeft=(size_t)inputSize; size_t oLeft=(size_t)outputSize; - char *inputPtr = str.data(); - char *outputPtr = output.data(); + char *inputPtr = str.rawData(); + char *outputPtr = output.rawData(); if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) { outputSize-=(int)oLeft; @@ -527,7 +522,7 @@ static FILE *tryPath(const char *path,const char *fileName) if (fi.exists() && fi.isFile()) { FILE *f=portable_fopen(absName,"r"); - if (!f) config_err("Error: could not open file %s for reading\n",absName.data()); + if (!f) config_err("could not open file %s for reading\n",absName.data()); return f; } return 0; @@ -561,7 +556,7 @@ static FILE *findFile(const char *fileName) static void readIncludeFile(const char *incName) { if (includeDepth==MAX_INCLUDE_DEPTH) { - config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n", + config_err("maximum include depth (%d) reached, %s is not included. Aborting...\n", MAX_INCLUDE_DEPTH,incName); exit(1); } @@ -601,7 +596,7 @@ static void readIncludeFile(const char *incName) } else { - config_err("Error: @INCLUDE = %s: not found!\n",inc.data()); + config_err("@INCLUDE = %s: not found!\n",inc.data()); exit(1); } } @@ -609,9 +604,9 @@ static void readIncludeFile(const char *incName) %} -%option nounput %option noyywrap +%x PreStart %x Start %x SkipComment %x SkipInvalid @@ -625,6 +620,11 @@ static void readIncludeFile(const char *incName) %% <*>\0x0d +<PreStart>"##".*"\n" { config->appendStartComment(yytext);} +<PreStart>. { + BEGIN(Start); + unput(*yytext); + } <Start,GetString,GetStrList,GetBool,SkipInvalid>"##".*"\n" { config->appendUserComment(yytext);} <Start,GetString,GetStrList,GetBool,SkipInvalid>"#" { BEGIN(SkipComment); } <Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext; @@ -632,7 +632,7 @@ static void readIncludeFile(const char *incName) ConfigOption *option = config->get(cmd); if (option==0) // oops not known { - config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + config_warn("ignoring unsupported tag `%s' at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); } @@ -675,12 +675,12 @@ static void readIncludeFile(const char *incName) case ConfigOption::O_Obsolete: if (config_upd) { - config_err("Warning: Tag `%s' at line %d of file `%s' has become obsolete.\n" + config_warn("Tag `%s' at line %d of file `%s' has become obsolete.\n" " This tag has been removed.\n", cmd.data(),yyLineNr,yyFileName.data()); } else { - config_err("Warning: Tag `%s' at line %d of file `%s' has become obsolete.\n" + config_warn("Tag `%s' at line %d of file `%s' has become obsolete.\n" " To avoid this warning please remove this line from your configuration " "file or upgrade it using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data()); } @@ -689,12 +689,12 @@ static void readIncludeFile(const char *incName) case ConfigOption::O_Disabled: if (config_upd) { - config_err("Warning: Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n" + config_warn("Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n" " This tag has been removed.\n", cmd.data(),yyLineNr,yyFileName.data()); } else { - config_err("Warning: Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n" + config_warn("Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n" " To avoid this warning please remove this line from your configuration " "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),yyLineNr,yyFileName.data()); } @@ -708,7 +708,7 @@ static void readIncludeFile(const char *incName) ConfigOption *option = config->get(cmd); if (option==0) // oops not known { - config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + config_warn("ignoring unsupported tag `%s' at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); } @@ -730,18 +730,18 @@ static void readIncludeFile(const char *incName) case ConfigOption::O_String: case ConfigOption::O_Int: case ConfigOption::O_Bool: - config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", + config_warn("operator += not supported for `%s'. Ignoring line at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); break; case ConfigOption::O_Obsolete: - config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n" + config_warn("Tag `%s' at line %d of file %s has become obsolete.\n" "To avoid this warning please update your configuration " "file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); break; case ConfigOption::O_Disabled: - config_err("Warning: Tag `%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n" + config_warn("Tag `%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n" "To avoid this warning please remove this line from your configuration " "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); @@ -778,7 +778,7 @@ static void readIncludeFile(const char *incName) } } -<Start>[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } +<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } <GetString,GetBool,SkipInvalid>\n { yyLineNr++; BEGIN(Start); } <GetStrList>\n { yyLineNr++; @@ -819,7 +819,7 @@ static void readIncludeFile(const char *incName) } if (*yytext=='\n') { - config_err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); + config_warn("Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); yyLineNr++; } BEGIN(lastState); @@ -838,7 +838,7 @@ static void readIncludeFile(const char *incName) else { *b=FALSE; - config_warn("Warning: Invalid value `%s' for " + config_warn("Invalid value `%s' for " "boolean tag in line %d, file %s; use YES or NO\n", bs.data(),yyLineNr,yyFileName.data()); } @@ -859,6 +859,11 @@ static void readIncludeFile(const char *incName) void Config::writeTemplate(FTextStream &t,bool sl,bool upd) { + /* print first lines of user comment that were at the beginning of the file, might have special meaning for editors */ + if (m_startComment) + { + t << takeStartComment() << endl; + } t << "# Doxyfile " << versionString << endl << endl; if (!sl) { @@ -1070,7 +1075,7 @@ void Config::checkFileName(const char *optionName) if ((val=="yes" || val=="true" || val=="1" || val=="all") || (val=="no" || val=="false" || val=="0" || val=="none")) { - config_err("Error: file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data()); + config_err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data()); s=""; // note tihe use of &s above: this will change the option value! } } @@ -1091,15 +1096,15 @@ void Config::check() { if (warnFormat.find("$file")==-1) { - config_err("Warning: warning format does not contain a $file tag!\n"); + config_warn("warning format does not contain a $file tag!\n"); } if (warnFormat.find("$line")==-1) { - config_err("Warning: warning format does not contain a $line tag!\n"); + config_warn("warning format does not contain a $line tag!\n"); } if (warnFormat.find("$text")==-1) { - config_err("Warning: warning format foes not contain a $text tag!\n"); + config_warn("warning format foes not contain a $text tag!\n"); } } @@ -1120,7 +1125,7 @@ void Config::check() if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && paperType!="legal" && paperType!="executive") { - config_err("Error: Unknown page type specified\n"); + config_err("Unknown page type specified\n"); } QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); @@ -1160,7 +1165,7 @@ void Config::check() QFileInfo fi(headerFile); if (!fi.exists()) { - config_err("Error: tag HTML_HEADER: header file `%s' " + config_err("tag HTML_HEADER: header file `%s' " "does not exist\n",headerFile.data()); exit(1); } @@ -1172,11 +1177,12 @@ void Config::check() QFileInfo fi(footerFile); if (!fi.exists()) { - config_err("Error: tag HTML_FOOTER: footer file `%s' " + config_err("tag HTML_FOOTER: footer file `%s' " "does not exist\n",footerFile.data()); exit(1); } } + // Test to see if MathJax code file is valid if (Config_getBool("USE_MATHJAX")) { @@ -1186,12 +1192,13 @@ void Config::check() QFileInfo fi(MathJaxCodefile); if (!fi.exists()) { - config_err("Error: tag MATHJAX_CODEFILE file `%s' " + config_err("tag MATHJAX_CODEFILE file `%s' " "does not exist\n",MathJaxCodefile.data()); exit(1); } } } + // Test to see if LaTeX header is valid QCString &latexHeaderFile = Config_getString("LATEX_HEADER"); if (!latexHeaderFile.isEmpty()) @@ -1199,18 +1206,31 @@ void Config::check() QFileInfo fi(latexHeaderFile); if (!fi.exists()) { - config_err("Error: tag LATEX_HEADER: header file `%s' " + config_err("tag LATEX_HEADER: header file `%s' " "does not exist\n",latexHeaderFile.data()); exit(1); } } + // Test to see if LaTeX footer is valid + QCString &latexFooterFile = Config_getString("LATEX_FOOTER"); + if (!latexFooterFile.isEmpty()) + { + QFileInfo fi(latexFooterFile); + if (!fi.exists()) + { + config_err("tag LATEX_FOOTER: footer file `%s' " + "does not exist\n",latexFooterFile.data()); + exit(1); + } + } + // check include path QStrList &includePath = Config_getList("INCLUDE_PATH"); char *s=includePath.first(); while (s) { QFileInfo fi(s); - if (!fi.exists()) config_err("Warning: tag INCLUDE_PATH: include path `%s' " + if (!fi.exists()) config_warn("tag INCLUDE_PATH: include path `%s' " "does not exist\n",s); s=includePath.next(); } @@ -1226,7 +1246,7 @@ void Config::check() alias=alias.stripWhiteSpace(); if (alias.find(re1)!=0 && alias.find(re2)!=0) { - config_err("Error: Illegal alias format `%s'. Use \"name=value\" or \"name(n)=value\", where n is the number of arguments\n", + config_err("Illegal alias format `%s'. Use \"name=value\" or \"name(n)=value\", where n is the number of arguments\n", alias.data()); } s=aliasList.next(); @@ -1235,19 +1255,19 @@ void Config::check() // check if GENERATE_TREEVIEW and GENERATE_HTMLHELP are both enabled if (Config_getBool("GENERATE_TREEVIEW") && Config_getBool("GENERATE_HTMLHELP")) { - config_err("Error: When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n"); + config_err("When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n"); Config_getBool("GENERATE_TREEVIEW")=FALSE; } if (Config_getBool("SEARCHENGINE") && Config_getBool("GENERATE_HTMLHELP")) { - config_err("Error: When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n"); + config_err("When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n"); Config_getBool("SEARCHENGINE")=FALSE; } // check if SEPARATE_MEMBER_PAGES and INLINE_GROUPED_CLASSES are both enabled if (Config_getBool("SEPARATE_MEMBER_PAGES") && Config_getBool("INLINE_GROUPED_CLASSES")) { - config_err("Error: When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n"); + config_err("When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n"); Config_getBool("SEPARATE_MEMBER_PAGES")=FALSE; } @@ -1267,7 +1287,7 @@ void Config::check() QCString &dotFontName=Config_getString("DOT_FONTNAME"); if (dotFontName=="FreeSans" || dotFontName=="FreeSans.ttf") { - config_err("Warning: doxygen no longer ships with the FreeSans font.\n" + config_warn("doxygen no longer ships with the FreeSans font.\n" "You may want to clear or change DOT_FONTNAME.\n" "Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n"); } @@ -1287,7 +1307,7 @@ void Config::check() QFileInfo dp(dotPath+"/dot"+portable_commandExtension()); if (!dp.exists() || !dp.isFile()) { - config_err("Warning: the dot tool could not be found at %s\n",dotPath.data()); + config_warn("the dot tool could not be found at %s\n",dotPath.data()); dotPath=""; } else @@ -1312,7 +1332,7 @@ void Config::check() QFileInfo dp(mscgenPath+"/mscgen"+portable_commandExtension()); if (!dp.exists() || !dp.isFile()) { - config_err("Warning: the mscgen tool could not be found at %s\n",mscgenPath.data()); + config_warn("the mscgen tool could not be found at %s\n",mscgenPath.data()); mscgenPath=""; } else @@ -1367,7 +1387,7 @@ void Config::check() QFileInfo dp(diaPath+"/dia"+portable_commandExtension()); if (!dp.exists() || !dp.isFile()) { - config_err("Warning: dia could not be found at %s\n",diaPath.data()); + config_warn("dia could not be found at %s\n",diaPath.data()); diaPath=""; } else @@ -1399,7 +1419,7 @@ void Config::check() QFileInfo fi(s); if (!fi.exists()) { - config_err("Warning: tag INPUT: input source `%s' does not exist\n",s); + config_warn("tag INPUT: input source `%s' does not exist\n",s); } s=inputSources.next(); } @@ -1486,18 +1506,19 @@ void Config::check() !Config_getBool("GENERATE_XML") && !Config_getBool("GENERATE_PERLMOD") && !Config_getBool("GENERATE_RTF") && + !Config_getBool("GENERATE_DOCBOOK") && !Config_getBool("GENERATE_AUTOGEN_DEF") && Config_getString("GENERATE_TAGFILE").isEmpty() ) { - config_err("Warning: No output formats selected! Set at least one of the main GENERATE_* options to YES.\n"); + config_warn("No output formats selected! Set at least one of the main GENERATE_* options to YES.\n"); } // check HTMLHELP creation requirements if (!Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) { - config_err("Warning: GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n"); + config_warn("GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n"); } // check QHP creation requirements @@ -1505,13 +1526,13 @@ void Config::check() { if (Config_getString("QHP_NAMESPACE").isEmpty()) { - config_err("Error: GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n"); + config_err("GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n"); Config_getString("QHP_NAMESPACE")="org.doxygen.doc"; } if (Config_getString("QHP_VIRTUAL_FOLDER").isEmpty()) { - config_err("Error: GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n"); + config_err("GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n"); Config_getString("QHP_VIRTUAL_FOLDER")="doc"; } } @@ -1562,7 +1583,7 @@ void Config::check() if (!mathJaxFormat.isEmpty() && mathJaxFormat!="HTML-CSS" && mathJaxFormat!="NativeMML" && mathJaxFormat!="SVG") { - config_err("Error: Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n"); + config_err("Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n"); Config_getEnum("MATHJAX_FORMAT")="HTML-CSS"; } @@ -1608,7 +1629,7 @@ void Config::check() if (!b6) s6=" EXTRACT_PACKAGE = YES (was NO)\n"; else s6=""; - config_err("Warning: enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n" + config_warn("enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n" "%s%s%s%s%s%s",s1,s2,s3,s4,s5,s6 ); @@ -1665,7 +1686,7 @@ void Config::init() ConfigOption * opt = Config::instance()->get(depName); if (opt==0) { - config_err("Warning: Config option '%s' has invalid depends relation on unknown option '%s'\n", + config_warn("Config option '%s' has invalid depends relation on unknown option '%s'\n", option->name().data(),depName.data()); exit(1); } @@ -1695,7 +1716,7 @@ static QCString configFileToString(const char *name) QCString contents(bSize); int totalSize=0; int size; - while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize) + while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize) { totalSize+=bSize; contents.resize(totalSize+bSize); @@ -1712,7 +1733,7 @@ static QCString configFileToString(const char *name) QFileInfo fi(name); if (!fi.exists() || !fi.isFile()) { - config_err("Error: file `%s' not found\n",name); + config_err("file `%s' not found\n",name); return ""; } f.setName(name); @@ -1721,7 +1742,7 @@ static QCString configFileToString(const char *name) { int fsize=f.size(); QCString contents(fsize+2); - f.readBlock(contents.data(),fsize); + f.readBlock(contents.rawData(),fsize); f.close(); if (fsize==0 || contents[fsize-1]=='\n') contents[fsize]='\0'; @@ -1733,7 +1754,7 @@ static QCString configFileToString(const char *name) } if (!fileOpened) { - config_err("Error: cannot open file `%s' for reading\n",name); + config_err("cannot open file `%s' for reading\n",name); } return ""; } @@ -1749,7 +1770,7 @@ bool Config::parseString(const char *fn,const char *str,bool update) includeStack.clear(); includeDepth = 0; configYYrestart( configYYin ); - BEGIN( Start ); + BEGIN( PreStart ); config_upd = update; configYYlex(); config_upd = FALSE; diff --git a/src/config.xml b/src/config.xml index 994190d..9eb9feb 100644 --- a/src/config.xml +++ b/src/config.xml @@ -6,7 +6,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -29,7 +29,9 @@ parsed by \c doxygen. The file may contain tabs and newlines for formatting purposes. The statements in the file are case-sensitive. Comments may be placed anywhere within the file (except within quotes). Comments beginning with two hash characters (\c \#\#) are kept when updating -the configuration file and are placed in front of the TAG are in front of. +the configuration file and are placed in front of the TAG they are in front of. +Comments beginning with two hash characters (\c \#\#) at the beginning of the +configuration file are also kept and placed at the beginning of the file. Comments beginning with two hash characters (\c \#\#) at the end of the configuration file are also kept and placed at the end of the file. Comments begin with the hash character (\c \#) and ends at the end of the line. @@ -1887,13 +1889,13 @@ hr.footer { ]]> </docs> </option> - <option type='bool' id='HTML_TIMESTAMP' defval='1' depends='GENERATE_HTML'> + <option type='bool' id='HTML_TIMESTAMP' defval='0' depends='GENERATE_HTML'> <docs> <![CDATA[ If the \c HTML_TIMESTAMP tag is set to \c YES then the footer of each generated HTML page will contain the date and time when the page - was generated. Setting this to \c NO can help when comparing the output of - multiple runs. + was generated. Setting this to \c YES can help to show when doxygen was last run + and thus if the documentation is up to date. ]]> </docs> </option> @@ -2490,10 +2492,19 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... <docs> <![CDATA[ The \c EXTRA_PACKAGES tag can be used to specify one or more \f$\mbox{\LaTeX}\f$ - package names that should be included in the \f$\mbox{\LaTeX}\f$ output. - To get the times font for instance you can specify + package names that should be included in the \f$\mbox{\LaTeX}\f$ output. The package + can be specified just by its name or with the correct syntax as to be used with the + \f$\mbox{\LaTeX}\f$ `\usepackage` command. + + To get the `times` font for instance you can specify : +\verbatim + EXTRA_PACKAGES=times +or + EXTRA_PACKAGES={times} +\endverbatim + To use the option `intlimits` with the `amsmath` package you can specify: \verbatim -EXTRA_PACKAGES=times + EXTRA_PACKAGES=[intlimits]{amsmath} \endverbatim If left blank no extra packages will be included. ]]> @@ -3232,7 +3243,9 @@ to be found in the default search path. generate a call dependency graph for every global function or class method. <br>Note that enabling this option will significantly increase the time of a run. So in most cases it will be better to enable call graphs for selected - functions only using the \ref cmdcallgraph "\\callgraph" command. + functions only using the \ref cmdcallgraph "\\callgraph" command. + Disabling a call graph can be accomplished by means of the command + \ref cmdhidecallgraph "\\hidecallgraph". ]]> </docs> </option> @@ -3243,7 +3256,9 @@ to be found in the default search path. generate a caller dependency graph for every global function or class method. <br>Note that enabling this option will significantly increase the time of a run. So in most cases it will be better to enable caller graphs for selected - functions only using the \ref cmdcallergraph "\\callergraph" command. + functions only using the \ref cmdcallergraph "\\callergraph" command. + Disabling a caller graph can be accomplished by means of the command + \ref cmdhidecallergraph "\\hidecallergraph". ]]> </docs> </option> @@ -3269,7 +3284,9 @@ to be found in the default search path. <docs> <![CDATA[ The \c DOT_IMAGE_FORMAT tag can be used to set the image format of the images - generated by \c dot. + generated by \c dot. For an explanation of the image formats see the section output formats + in the documentation of the \c dot tool + (<a href="http://www.graphviz.org/">Graphviz</a>). \note If you choose \c svg you need to set \ref cfg_html_file_extension "HTML_FILE_EXTENSION" to \c xhtml in order to make the SVG files visible in IE 9+ (other browsers do not have this requirement). @@ -3279,6 +3296,14 @@ to be found in the default search path. <value name='jpg'/> <value name='gif'/> <value name='svg'/> + <value name='png:gd'/> + <value name='png:gd:gd'/> + <value name='png:cairo'/> + <value name='png:cairo:gd'/> + <value name='png:cairo:cairo'/> + <value name='png:cairo:gdiplus'/> + <value name='png:gdiplus'/> + <value name='png:gdiplus:gdiplus'/> </option> <option type='bool' id='INTERACTIVE_SVG' defval='0' depends='HAVE_DOT'> <docs> diff --git a/src/configgen.py b/src/configgen.py index 7115dba..1647fa2 100755 --- a/src/configgen.py +++ b/src/configgen.py @@ -1,7 +1,7 @@ #!/usr/bin/python # python script to generate configoptions.cpp and config.doc from config.xml # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/configoptions.h b/src/configoptions.h index be8ecf6..3979f7a 100644 --- a/src/configoptions.h +++ b/src/configoptions.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/constexp.h b/src/constexp.h index 27ca039..d84e94e 100644 --- a/src/constexp.h +++ b/src/constexp.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/constexp.l b/src/constexp.l index bb4f842..f1f8cd4 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/constexp.y b/src/constexp.y index 1475c1c..c63fa5e 100644 --- a/src/constexp.y +++ b/src/constexp.y @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/context.cpp b/src/context.cpp index 551db1a..f76c49b 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -4056,8 +4056,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> TemplateVariant hasCallGraph() const { static bool haveDot = Config_getBool("HAVE_DOT"); - static bool callGraph = Config_getBool("CALL_GRAPH"); - if ((callGraph || m_memberDef->hasCallGraph()) && haveDot && + if (m_memberDef->hasCallGraph() && haveDot && (m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal())) { DotCallGraph *cg = getCallGraph(); @@ -4096,8 +4095,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> TemplateVariant hasCallerGraph() const { static bool haveDot = Config_getBool("HAVE_DOT"); - static bool callerGraph = Config_getBool("CALLER_GRAPH"); - if ((callerGraph || m_memberDef->hasCallerGraph()) && haveDot && + if (m_memberDef->hasCallerGraph() && haveDot && (m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal())) { DotCallGraph *cg = getCallerGraph(); diff --git a/src/context.h b/src/context.h index 6b5b810..cb20313 100644 --- a/src/context.h +++ b/src/context.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp index a99ec56..176931d 100644 --- a/src/cppvalue.cpp +++ b/src/cppvalue.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cppvalue.h b/src/cppvalue.h index 67c5433..59dd594 100644 --- a/src/cppvalue.h +++ b/src/cppvalue.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/dbusxmlscanner.cpp b/src/dbusxmlscanner.cpp index 90d51cd..ff1097f 100644 --- a/src/dbusxmlscanner.cpp +++ b/src/dbusxmlscanner.cpp @@ -666,9 +666,6 @@ private: entry->startLine = lineNumber(); entry->bodyLine = lineNumber(); - entry->callGraph = false; - entry->callerGraph = false; - initGroupInfo(entry); m_currentEntry = entry; diff --git a/src/debug.cpp b/src/debug.cpp index e27ce11..c81a1af 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/debug.h b/src/debug.h index e17c03c..8a28c7a 100644 --- a/src/debug.h +++ b/src/debug.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/declinfo.h b/src/declinfo.h index 5f11a1c..d226c7d 100644 --- a/src/declinfo.h +++ b/src/declinfo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/declinfo.l b/src/declinfo.l index f238be3..b7689c7 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -45,7 +45,6 @@ static QCString funcTempList; static QCString type; static QCString name; static QCString args; -static QCString tmpType; static int sharpCount; static bool classTempListFound; static bool funcTempListFound; diff --git a/src/defargs.h b/src/defargs.h index 6ebfe1d..34a19a2 100644 --- a/src/defargs.h +++ b/src/defargs.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/defargs.l b/src/defargs.l index 164c100..40a77fb 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -73,6 +73,7 @@ static QCString g_curArgName; static QCString g_curArgDocs; static QCString g_curArgAttrib; static QCString g_curArgArray; +static QCString g_curTypeConstraint; static QCString g_extraTypeChars; static int g_argRoundCount; static int g_argSharpCount; @@ -80,6 +81,7 @@ static int g_argCurlyCount; static int g_readArgContext; static int g_lastDocContext; static int g_lastDocChar; +static int g_lastExtendsContext; static QCString g_delimiter; /* ----------------------------------------------------------------- @@ -120,6 +122,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" %x FuncQual %x ReadDocBlock %x ReadDocLine +%x ReadTypeConstraint %x TrailingReturn @@ -332,8 +335,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" int i=l-1; while (i>=0 && (isspace((uchar)g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--; while (i>=0 && (isId(g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='$')) i--; - Argument *a = new Argument; - a->attrib = g_curArgAttrib.copy(); + Argument *a = new Argument; + a->attrib = g_curArgAttrib.copy(); + a->typeConstraint = g_curTypeConstraint.stripWhiteSpace(); //printf("a->type=%s a->name=%s i=%d l=%d\n", // a->type.data(),a->name.data(),i,l); a->array.resize(0); @@ -366,18 +370,18 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" if (a->type.left(6)=="const ") sv=6; else if (a->type.left(9)=="volatile ") sv=9; - if (a->type.mid(sv)=="struct" || - a->type.mid(sv)=="union" || - a->type.mid(sv)=="class" || - a->type.mid(sv)=="typename" || - a->type=="const" || + if (a->type.mid(sv,6)=="struct" || + a->type.mid(sv,5)=="union" || + a->type.mid(sv,5)=="class" || + a->type.mid(sv,8)=="typename" || + a->type=="const" || a->type=="volatile" ) { a->type = a->type + " " + a->name; a->name.resize(0); } - //printf(" --> a->type='%s'\n",a->type.data()); + //printf(" --> a->type='%s' a->name='%s'\n",a->type.data(),a->name.data()); } else // assume only the type was specified, try to determine name later { @@ -413,6 +417,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" g_curArgDefValue.resize(0); g_curArgArray.resize(0); g_curArgDocs.resize(0); + g_curTypeConstraint.resize(0); if (*yytext==')') { BEGIN(FuncQual); @@ -424,6 +429,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } } } +<ReadFuncArgType,ReadFuncArgPtr>"extends" { + g_curTypeConstraint.resize(0); + g_lastExtendsContext=YY_START; + BEGIN(ReadTypeConstraint); + } <ReadFuncArgType,ReadFuncArgPtr>"$"?{ID} { QCString name=yytext; //resolveDefines(yytext); if (YY_START==ReadFuncArgType && g_curArgArray=="[]") // Java style array @@ -451,13 +461,23 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" <CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. { *g_copyArgValue += *yytext; } -<FuncQual>"const" { +<ReadTypeConstraint>[,)>] { + unput(*yytext); + BEGIN(g_lastExtendsContext); + } +<ReadTypeConstraint>. { + g_curTypeConstraint+=yytext; + } +<ReadTypeConstraint>\n { + g_curTypeConstraint+=' '; + } +<FuncQual>"const" { g_argList->constSpecifier=TRUE; } -<FuncQual>"volatile" { +<FuncQual>"volatile" { g_argList->volatileSpecifier=TRUE; } -<FuncQual,TrailingReturn>"="{B}*"0" { +<FuncQual,TrailingReturn>"="{B}*"0" { g_argList->pureSpecifier=TRUE; BEGIN(FuncQual); } @@ -534,6 +554,7 @@ void stringToArgumentList(const char *argsString,ArgumentList* al,QCString *extr g_curArgDocs.resize(0); g_curArgAttrib.resize(0); g_curArgArray.resize(0); + g_curTypeConstraint.resize(0); g_extraTypeChars.resize(0); g_argRoundCount = 0; g_argSharpCount = 0; diff --git a/src/defgen.cpp b/src/defgen.cpp index 358cd24..90ae0a2 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/defgen.h b/src/defgen.h index 696fb5c..a56c823 100644 --- a/src/defgen.h +++ b/src/defgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/define.cpp b/src/define.cpp index 2f4e43a..121f5cb 100644 --- a/src/define.cpp +++ b/src/define.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/define.h b/src/define.h index 7971cc4..cc1e390 100644 --- a/src/define.h +++ b/src/define.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/definition.cpp b/src/definition.cpp index 6cb26de..457c6ea 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -495,7 +495,11 @@ void Definition::addSectionsToIndex() } QCString title = si->title; if (title.isEmpty()) title = si->label; - Doxygen::indexList->addContentsItem(TRUE,title, + // determine if there is a next level inside this item + ++li; + bool isDir = ((li.current()) ? (int)(li.current()->type > nextLevel):FALSE); + --li; + Doxygen::indexList->addContentsItem(isDir,title, getReference(), getOutputFileBase(), si->label, @@ -543,7 +547,7 @@ bool Definition::_docsAlreadyAdded(const QCString &doc,QCString &sigList) // double whitespaces... QCString docStr = doc.simplifyWhiteSpace(); MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); //printf("%s:_docsAlreadyAdded doc='%s' sig='%s' docSigs='%s'\n", // name().data(),doc.data(),sigStr.data(),sigList.data()); if (sigList.find(sigStr)==-1) // new docs, add signature to prevent re-adding it @@ -737,7 +741,7 @@ bool readCodeFragment(const char *fileName, else // use filter { QCString cmd=filter+" \""+fileName+"\""; - Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd)); f = portable_popen(cmd,"r"); } bool found = lang==SrcLangExt_VHDL || @@ -864,7 +868,7 @@ bool readCodeFragment(const char *fileName, { portable_pclose(f); Debug::print(Debug::FilterOutput, 0, "Filter output\n"); - Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",result.data()); + Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",qPrint(result)); } else { @@ -893,6 +897,7 @@ QCString Definition::getSourceAnchor() const { const int maxAnchorStrLen = 20; char anchorStr[maxAnchorStrLen]; + anchorStr[0]='\0'; if (m_impl->body && m_impl->body->startLine!=-1) { if (Htags::useHtags) @@ -1662,7 +1667,8 @@ void Definition::writeToc(OutputList &ol) } cs[0]='0'+nextLevel; if (inLi[nextLevel]) ol.writeString("</li>\n"); - ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:si->title)+"</a>"); + QCString titleDoc = convertToHtml(si->title); + ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:titleDoc)+"</a>"); inLi[nextLevel]=TRUE; level = nextLevel; } diff --git a/src/definition.h b/src/definition.h index b1f118d..5905a55 100644 --- a/src/definition.h +++ b/src/definition.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/dia.cpp b/src/dia.cpp index 955171c..347acba 100644 --- a/src/dia.cpp +++ b/src/dia.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/diagram.cpp b/src/diagram.cpp index cc16b50..994c1a4 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/diagram.h b/src/diagram.h index 6ce83f3..2922657 100644 --- a/src/diagram.h +++ b/src/diagram.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/dirdef.cpp b/src/dirdef.cpp index d4af3f0..067daa0 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -80,16 +80,15 @@ void DirDef::addFile(FileDef *fd) static QCString encodeDirName(const QCString &anchor) { - QCString result; - // convert to md5 hash uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); return sigStr; // old algorithm +// QCString result; // int l = anchor.length(),i; // for (i=0;i<l;i++) diff --git a/src/dirdef.h b/src/dirdef.h index 9a8a5ad..1a87f5b 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp index edcafdb..d7a4020 100644 --- a/src/docbookgen.cpp +++ b/src/docbookgen.cpp @@ -2,7 +2,7 @@ * * * -* Copyright (C) 1997-2014 by Dimitri van Heesch. +* Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -589,11 +589,9 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>"; t << " (" << endl; ArgumentList *declAl = md->declArgumentList(); - ArgumentList *defAl = md->argumentList(); if (declAl && declAl->count()>0) { ArgumentListIterator declAli(*declAl); - ArgumentListIterator defAli(*defAl); Argument *a; int cnt=0; for (declAli.toFirst();(a=declAli.current());++declAli) @@ -812,7 +810,7 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de } } -static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,const char *kind, +static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,const char *, bool detailed=0, const char *header=0,const char *documentation=0) { if (ml==0) return; @@ -820,7 +818,6 @@ static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,c MemberDef *md; int count=0; int doc_count=0; - QCString compkind = kind; QCString title, desctitle; for (mli.toFirst();(md=mli.current());++mli) diff --git a/src/docbookgen.h b/src/docbookgen.h index 0431cf2..866d056 100644 --- a/src/docbookgen.h +++ b/src/docbookgen.h @@ -2,7 +2,7 @@ * * * -* Copyright (C) 1997-2014 by Dimitri van Heesch. +* Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 90262e3..70e9c53 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1326,7 +1326,6 @@ void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s) shortName=shortName.right(shortName.length()-i-1); } QCString outDir = Config_getString("DOCBOOK_OUTPUT"); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP); visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height()); visitCaption(this, s->children()); @@ -1351,7 +1350,7 @@ void DocbookDocVisitor::startDotFile(const QCString &fileName, } baseName.prepend("dot_"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP); m_t << "<para>" << endl; visitPreStart(m_t, hasCaption, baseName + "." + imgExt, width, height); diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h index 3796d8a..6c7976c 100644 --- a/src/docbookvisitor.h +++ b/src/docbookvisitor.h @@ -2,7 +2,7 @@ * * * -* Copyright (C) 1997-2014 by Dimitri van Heesch. +* Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docparser.cpp b/src/docparser.cpp index 9a120dc..7944bf7 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -236,7 +236,8 @@ static void docParserPopContext(bool keepParamInfo=FALSE) // replaces > with < and > with > within string s static void unescapeCRef(QCString &s) { - char *p = s.data(); + QCString tmp(s); + char *p = tmp.rawData(); if (p) { char c; @@ -247,8 +248,9 @@ static void unescapeCRef(QCString &s) } } - s=substitute(s,"<","<"); - s=substitute(s,">",">"); + tmp=substitute(tmp,"<","<"); + tmp=substitute(tmp,">",">"); + s = tmp; } //--------------------------------------------------------------------------- @@ -517,8 +519,8 @@ static void checkUndocumentedParams() } else { - warn_doc_error(g_memberDef->docFile(), - g_memberDef->docLine(), + warn_doc_error(g_memberDef->getDefFileName(), + g_memberDef->getDefLine(), substitute(errMsg,"%","%%")); } } @@ -844,7 +846,6 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, const QCString &cmdName) { DBG(("handleStyleArgument(%s)\n",qPrint(cmdName))); - QCString tokenName = g_token->name; int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { @@ -1178,7 +1179,6 @@ static void handleParameterType(DocNode *parent,QList<DocNode> &children,const Q { QCString name = g_token->name; int p=0,i; - QCString type; while ((i=paramTypes.find('|',p))!=-1) { g_token->name = paramTypes.mid(p,i-p); @@ -1743,6 +1743,15 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, static void readTextFileByName(const QCString &file,QCString &text) { + if (portable_isAbsolutePath(file.data())) + { + QFileInfo fi(file); + if (fi.exists()) + { + text = fileToString(file,Config_getBool("FILTER_SOURCE_FILES")); + return; + } + } QStrList &examplePathList = Config_getList("EXAMPLE_PATH"); char *s=examplePathList.first(); while (s) @@ -2137,7 +2146,6 @@ DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) : bool DocXRefItem::parse() { - QCString listName; RefList *refList = Doxygen::xrefLists->find(m_key); if (refList && ( @@ -2571,7 +2579,6 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont { static uint numBibFiles = Config_getList("CITE_BIB_FILES").count(); m_parent = parent; - QCString anchor; //printf("DocCite::DocCite(target=%s)\n",target.data()); ASSERT(!target.isEmpty()); m_relPath = g_relPath; @@ -6939,7 +6946,7 @@ static QCString extractCopyDocId(const char *data, uint &j, uint len) } e=j; QCString id(e-s+1); - if (e>s) memcpy(id.data(),data+s,e-s); + if (e>s) memcpy(id.rawData(),data+s,e-s); id.at(e-s)='\0'; //printf("extractCopyDocId='%s' input='%s'\n",id.data(),&data[s]); return id; diff --git a/src/docparser.h b/src/docparser.h index e8ef754..1abb687 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docsets.cpp b/src/docsets.cpp index 52d24bb..cde317d 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docsets.h b/src/docsets.h index eac5bfc..548ba75 100644 --- a/src/docsets.h +++ b/src/docsets.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/doctokenizer.h b/src/doctokenizer.h index ead8da1..eb39906 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -3,7 +3,7 @@ * $Id: $ * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/doctokenizer.l b/src/doctokenizer.l index d018450..c642fc1 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -3,7 +3,7 @@ * $Id: $ * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1035,7 +1035,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4} <St_IntRef>{BLANK}+"\"" { BEGIN(St_Ref2); } -<St_SetScope>{SCOPEMASK}{BLANK} { +<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK} { g_token->name = yytext; g_token->name = g_token->name.stripWhiteSpace(); return TK_WORD; @@ -1150,8 +1150,8 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4} <St_Comment>"-->" { /* end of html comment */ BEGIN(g_commentState); } -<St_Comment>[^-\n]+ /* inside html comment */ -<St_Comment>. /* inside html comment */ +<St_Comment>[^-]+ /* inside html comment */ +<St_Comment>. /* inside html comment */ /* State for skipping title (all chars until the end of the line) */ diff --git a/src/docvisitor.h b/src/docvisitor.h index a444b47..18fb743 100644 --- a/src/docvisitor.h +++ b/src/docvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/dot.cpp b/src/dot.cpp index f9b4302..705aa27 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -156,8 +156,6 @@ static const char svgZoomFooter[] = //-------------------------------------------------------------------- -static const int maxCmdLine = 40960; - /*! mapping from protection levels to color names */ static const char *normalEdgeColorMap[] = { @@ -166,7 +164,8 @@ static const char *normalEdgeColorMap[] = "firebrick4", // Private "darkorchid3", // "use" relation "grey75", // Undocumented - "orange" // template relation + "orange", // template relation + "orange" // type constraint }; static const char *normalArrowStyleMap[] = @@ -192,7 +191,8 @@ static const char *umlEdgeColorMap[] = "firebrick4", // Private "grey25", // "use" relation "grey75", // Undocumented - "orange" // template relation + "orange", // template relation + "orange" // type constraint }; static const char *umlArrowStyleMap[] = @@ -383,12 +383,15 @@ static bool convertMapFile(FTextStream &t,const char *mapName, while (!f.atEnd()) // foreach line { QCString buf(maxLineLen); - int numBytes = f.readLine(buf.data(),maxLineLen); - buf[numBytes-1]='\0'; - - if (buf.left(5)=="<area") + int numBytes = f.readLine(buf.rawData(),maxLineLen); + if (numBytes>0) { - t << replaceRef(buf,relPath,urlOnly,context); + buf.resize(numBytes+1); + + if (buf.left(5)=="<area") + { + t << replaceRef(buf,relPath,urlOnly,context); + } } } return TRUE; @@ -658,7 +661,8 @@ static bool writeSVGFigureLink(FTextStream &out,const QCString &relPath, // support the PNG format, we need to check the result. static void checkDotResult(const QCString &imgName) { - if (Config_getEnum("DOT_IMAGE_FORMAT")=="png") + QCString imgExt = getDotImageExtension(); + if (imgExt=="png") { FILE *f = portable_fopen(imgName,"rb"); if (f) @@ -733,7 +737,7 @@ static bool checkAndUpdateMd5Signature(const QCString &baseName, { // read checksum QCString md5stored(33); - int bytesRead=f.readBlock(md5stored.data(),32); + int bytesRead=f.readBlock(md5stored.rawData(),32); md5stored[32]='\0'; // compare checksum if (bytesRead==32 && md5==md5stored) @@ -812,7 +816,11 @@ void DotRunner::addPostProcessing(const char *cmd,const char *args) bool DotRunner::run() { int exitCode=0; - QCString dotExe = Config_getString("DOT_PATH")+"dot"; + // we need to use data here to make a copy of the string, as Config_getString can be called by + // multiple threads simulaneously and the reference counting is not thread safe. + QCString dotExe = Config_getString("DOT_PATH").data(); + dotExe+="dot"; + bool multiTargets = Config_getBool("DOT_MULTI_TARGETS"); QCString dotArgs; QListIterator<QCString> li(m_jobs); @@ -988,11 +996,12 @@ bool DotFilePatcher::run() while (!fi.atEnd()) // foreach line { QCString line(maxLineLen); - int numBytes = fi.readLine(line.data(),maxLineLen); + int numBytes = fi.readLine(line.rawData(),maxLineLen); if (numBytes<=0) { break; } + line.resize(numBytes+1); //printf("line=[%s]\n",line.stripWhiteSpace().data()); int i; @@ -1135,11 +1144,12 @@ bool DotFilePatcher::run() while (!fi.atEnd()) // foreach line { QCString line(maxLineLen); - int numBytes = fi.readLine(line.data(),maxLineLen); + int numBytes = fi.readLine(line.rawData(),maxLineLen); if (numBytes<=0) { break; } + line.resize(numBytes+1); Map *map = m_maps.at(0); // there is only one 'map' for a SVG file t << replaceRef(line,map->relPath,map->urlOnly,map->context,"_top"); } @@ -1964,8 +1974,8 @@ void DotNode::writeXML(FTextStream &t,bool isClassGraph) if (!m_url.isEmpty()) { QCString url(m_url); - char *refPtr = url.data(); - char *urlPtr = strchr(url.data(),'$'); + const char *refPtr = url.data(); + char *urlPtr = strchr(url.rawData(),'$'); if (urlPtr) { *urlPtr++='\0'; @@ -1996,6 +2006,7 @@ void DotNode::writeXML(FTextStream &t,bool isClassGraph) case EdgeInfo::Red: t << "private-inheritance"; break; case EdgeInfo::Purple: t << "usage"; break; case EdgeInfo::Orange: t << "template-instance"; break; + case EdgeInfo::Orange2: t << "type-constraint"; break; case EdgeInfo::Grey: ASSERT(0); break; } } @@ -2032,8 +2043,8 @@ void DotNode::writeDocbook(FTextStream &t,bool isClassGraph) if (!m_url.isEmpty()) { QCString url(m_url); - char *refPtr = url.data(); - char *urlPtr = strchr(url.data(),'$'); + const char *refPtr = url.data(); + char *urlPtr = strchr(url.rawData(),'$'); if (urlPtr) { *urlPtr++='\0'; @@ -2064,6 +2075,7 @@ void DotNode::writeDocbook(FTextStream &t,bool isClassGraph) case EdgeInfo::Red: t << "private-inheritance"; break; case EdgeInfo::Purple: t << "usage"; break; case EdgeInfo::Orange: t << "template-instance"; break; + case EdgeInfo::Orange2: t << "type-constraint"; break; case EdgeInfo::Grey: ASSERT(0); break; } } @@ -2105,8 +2117,8 @@ void DotNode::writeDEF(FTextStream &t) if (!m_url.isEmpty()) { QCString url(m_url); - char *refPtr = url.data(); - char *urlPtr = strchr(url.data(),'$'); + const char *refPtr = url.data(); + char *urlPtr = strchr(url.rawData(),'$'); if (urlPtr) { *urlPtr++='\0'; @@ -2141,6 +2153,7 @@ void DotNode::writeDEF(FTextStream &t) case EdgeInfo::Red: t << "private-inheritance"; break; case EdgeInfo::Purple: t << "usage"; break; case EdgeInfo::Orange: t << "template-instance"; break; + case EdgeInfo::Orange2: t << "type-constraint"; break; case EdgeInfo::Grey: ASSERT(0); break; } t << ';' << endl; @@ -2266,7 +2279,8 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out, { QDir d(path); QCString baseName; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); baseName.sprintf("inherit_graph_%d",id); QCString imgName = baseName+"."+ imgExt; QCString mapName = baseName+".map"; @@ -2300,7 +2314,7 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out, uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); bool regenerate=FALSE; if (checkAndUpdateMd5Signature(absBaseName,sigStr) || !checkDeliverables(absImgName,absMapName)) @@ -2316,7 +2330,7 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out, resetReNumbering(); DotRunner *dotRun = new DotRunner(dotName,d.absPath().data(),TRUE,absImgName); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); } @@ -2584,7 +2598,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, { if (Config_getBool("HIDE_UNDOC_CLASSES") && !cd->isLinkable()) return; - int edgeStyle = (label || prot==EdgeInfo::Orange) ? EdgeInfo::Dashed : EdgeInfo::Solid; + int edgeStyle = (label || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid; QCString className; if (usedName) // name is a typedef { @@ -2790,6 +2804,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode, void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,bool base,int distance) { + static bool templateRelations = Config_getBool("TEMPLATE_RELATIONS"); //printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n", // cd->name().data(),distance,base); // ---- Add inheritance relations @@ -2849,10 +2864,43 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,bool base,int distance) } } } + if (templateRelations && base) + { + ConstraintClassDict *dict = cd->templateTypeConstraints(); + if (dict) + { + ConstraintClassDictIterator ccdi(*dict); + ConstraintClassDef *ccd; + for (;(ccd=ccdi.current());++ccdi) + { + QCString label; + QDictIterator<void> dvi(*ccd->accessors); + const char *s; + bool first=TRUE; + int count=0; + int maxLabels=10; + for (;(s=dvi.currentKey()) && count<maxLabels;++dvi,++count) + { + if (first) + { + label=s; + first=FALSE; + } + else + { + label+=QCString("\n")+s; + } + } + if (count==maxLabels) label+="\n..."; + //printf("addClass: %s templSpec=%s\n",ucd->classDef->name().data(),ucd->templSpecifiers.data()); + addClass(ccd->classDef,n,EdgeInfo::Orange2,label,0, + 0,TRUE,distance); + } + } + } // ---- Add template instantiation relations - static bool templateRelations = Config_getBool("TEMPLATE_RELATIONS"); if (templateRelations) { if (base) // template relations for base classes @@ -3028,7 +3076,7 @@ QCString computeMd5Signature(DotNode *root, uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)buf.data(),buf.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); if (reNumber) { resetReNumbering(); @@ -3121,7 +3169,8 @@ QCString DotClassGraph::writeGraph(FTextStream &out, baseName = convertNameToFile(diskName()); // derive target file names from baseName - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = d.absPath().utf8()+"/"+baseName; QCString absDotName = absBaseName+".dot"; QCString absMapName = absBaseName+".map"; @@ -3147,11 +3196,9 @@ QCString DotClassGraph::writeGraph(FTextStream &out, regenerate=TRUE; if (graphFormat==GOF_BITMAP) // run dot to create a bitmap image { - QCString dotArgs(maxCmdLine); - DotRunner *dotRun = new DotRunner(absDotName, d.absPath().data(),TRUE,absImgName); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); @@ -3479,7 +3526,8 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, QCString mapName=escapeCharsInString(m_startNode->m_label,FALSE); if (m_inverse) mapName+="dep"; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = d.absPath().utf8()+"/"+baseName; QCString absDotName = absBaseName+".dot"; QCString absMapName = absBaseName+".map"; @@ -3506,9 +3554,8 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, if (graphFormat==GOF_BITMAP) { // run dot to create a bitmap image - QCString dotArgs(maxCmdLine); DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); } @@ -3792,7 +3839,8 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma QCString baseName = m_diskName + (m_inverse ? "_icgraph" : "_cgraph"); QCString mapName = baseName; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = d.absPath().utf8()+"/"+baseName; QCString absDotName = absBaseName+".dot"; QCString absMapName = absBaseName+".map"; @@ -3819,9 +3867,8 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma if (graphFormat==GOF_BITMAP) { // run dot to create a bitmap image - QCString dotArgs(maxCmdLine); DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); @@ -3947,7 +3994,8 @@ QCString DotDirDeps::writeGraph(FTextStream &out, QCString baseName=m_dir->getOutputFileBase()+"_dep"; QCString mapName=escapeCharsInString(baseName,FALSE); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = d.absPath().utf8()+"/"+baseName; QCString absDotName = absBaseName+".dot"; QCString absMapName = absBaseName+".map"; @@ -3962,7 +4010,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out, uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); bool regenerate=FALSE; if (checkAndUpdateMd5Signature(absBaseName,sigStr) || !checkDeliverables(graphFormat==GOF_BITMAP ? absImgName : @@ -3984,9 +4032,8 @@ QCString DotDirDeps::writeGraph(FTextStream &out, if (graphFormat==GOF_BITMAP) { // run dot to create a bitmap image - QCString dotArgs(maxCmdLine); DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); } @@ -4108,10 +4155,11 @@ void generateGraphLegend(const char *path) uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); QCString absBaseName = (QCString)path+"/graph_legend"; QCString absDotName = absBaseName+".dot"; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = "graph_legend."+imgExt; QCString absImgName = absBaseName+"."+imgExt; if (checkAndUpdateMd5Signature(absBaseName,sigStr) || @@ -4131,7 +4179,7 @@ void generateGraphLegend(const char *path) // run dot to generate the a bitmap image from the graph DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); DotManager::instance()->addRun(dotRun); } else @@ -4159,14 +4207,15 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, err("Output dir %s does not exist!\n",outDir); exit(1); } - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = (QCString)outFile+"."+imgExt; QCString absImgName = d.absPath().utf8()+"/"+imgName; QCString absOutFile = d.absPath().utf8()+"/"+outFile; DotRunner dotRun(inFile,d.absPath().data(),FALSE,absImgName); if (format==GOF_BITMAP) - dotRun.addJob(imgExt,absImgName); + dotRun.addJob(imgFmt,absImgName); else // format==GOF_EPS { if (Config_getBool("USE_PDFLATEX")) @@ -4214,7 +4263,8 @@ void writeDotImageMapFromFile(FTextStream &t, } QCString mapName = baseName+".map"; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = baseName+"."+imgExt; QCString absOutFile = d.absPath().utf8()+"/"+mapName; @@ -4508,11 +4558,11 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t, uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + MD5SigToString(md5_sig,sigStr.rawData(),33); + QCString imgExt = getDotImageExtension(); + QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString baseName = m_diskName; QCString imgName = baseName+"."+imgExt; - QCString mapName = baseName+".map"; QCString absPath = d.absPath().data(); QCString absBaseName = absPath+"/"+baseName; QCString absDotName = absBaseName+".dot"; @@ -4539,10 +4589,8 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t, if (graphFormat==GOF_BITMAP) // run dot to create a bitmap image { - QCString dotArgs(maxCmdLine); - DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); - dotRun->addJob(imgExt,absImgName); + dotRun->addJob(imgFmt,absImgName); if (writeImageMap) dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -45,7 +45,7 @@ enum EmbeddedOutputFormat { EOF_Html, EOF_LaTeX, EOF_Rtf, EOF_DocBook }; /** Attributes of an edge of a dot graph */ struct EdgeInfo { - enum Colors { Blue=0, Green=1, Red=2, Purple=3, Grey=4, Orange=5 }; + enum Colors { Blue=0, Green=1, Red=2, Purple=3, Grey=4, Orange=5, Orange2=6 }; enum Styles { Solid=0, Dashed=1 }; EdgeInfo() : m_color(0), m_style(0), m_labColor(0) {} ~EdgeInfo() {} diff --git a/src/doxygen.cpp b/src/doxygen.cpp index e127b8e..c3d2063 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1265,12 +1265,12 @@ static void addClassToContext(EntryNav *rootNav) ClassDef *cd = getClass(qualifiedName); Debug::print(Debug::Classes,0, " Found class with name %s (qualifiedName=%s -> cd=%p)\n", - cd ? cd->name().data() : root->name.data(), qualifiedName.data(),cd); + cd ? qPrint(cd->name()) : qPrint(root->name), qPrint(qualifiedName),cd); if (cd) { fullName=cd->name(); - Debug::print(Debug::Classes,0," Existing class %s!\n",cd->name().data()); + Debug::print(Debug::Classes,0," Existing class %s!\n",qPrint(cd->name())); //if (cd->templateArguments()==0) //{ // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data()); @@ -1341,7 +1341,7 @@ static void addClassToContext(EntryNav *rootNav) cd=new ClassDef(tagInfo?tagName:root->fileName,root->startLine,root->startColumn, fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum); Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p\n", - fullName.data(),sec,root->tArgLists ? (int)root->tArgLists->count() : -1, tagInfo); + qPrint(fullName),sec,root->tArgLists ? (int)root->tArgLists->count() : -1, tagInfo); cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); cd->setLanguage(root->lang); @@ -1353,7 +1353,7 @@ static void addClassToContext(EntryNav *rootNav) //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data()); //printf("class %s template args=%s\n",fullName.data(), - // tArgList ? tempArgListToString(tArgList).data() : "<none>"); + // tArgList ? tempArgListToString(tArgList,root->lang).data() : "<none>"); cd->setTemplateArguments(tArgList); cd->setProtection(root->protection); cd->setIsStatic(root->stat); @@ -2056,7 +2056,7 @@ static void findUsingDeclarations(EntryNav *rootNav) if (usingCd==0) // definition not in the input => add an artificial class { Debug::print(Debug::Classes,0," New using class `%s' (sec=0x%08x)! #tArgLists=%d\n", - name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); + qPrint(name),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); usingCd = new ClassDef( "<using>",1,1, name, @@ -2068,7 +2068,7 @@ static void findUsingDeclarations(EntryNav *rootNav) else { Debug::print(Debug::Classes,0," Found used class %s in scope=%s\n", - usingCd->name().data(),nd?nd->name().data():fd->name().data()); + qPrint(usingCd->name()),nd?qPrint(nd->name()):qPrint(fd->name())); } if (nd) @@ -2249,13 +2249,13 @@ static MemberDef *addVariableToClass( Debug::print(Debug::Variables,0, " class variable:\n" " `%s' `%s'::`%s' `%s' prot=`%d ann=%d init=`%s'\n", - root->type.data(), - qualScope.data(), - name.data(), - root->args.data(), + qPrint(root->type), + qPrint(qualScope), + qPrint(name), + qPrint(root->args), root->protection, fromAnnScope, - root->initializer.data() + qPrint(root->initializer) ); QCString def; @@ -2416,10 +2416,10 @@ static MemberDef *addVariableToFile( Debug::print(Debug::Variables,0, " global variable:\n" " type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d lang=%d\n", - root->type.data(), - scope.data(), - name.data(), - root->args.data(), + qPrint(root->type), + qPrint(scope), + qPrint(name), + qPrint(root->args), root->protection, mtype, root->lang @@ -2458,7 +2458,6 @@ static MemberDef *addVariableToFile( // see if the function is inside a namespace NamespaceDef *nd = 0; - QCString nscope; if (!scope.isEmpty()) { if (scope.find('@')!=-1) return 0; // anonymous scope! @@ -2562,7 +2561,7 @@ static MemberDef *addVariableToFile( { Debug::print(Debug::Variables,0, - " variable already found: scope=%s\n",md->getOuterScope()->name().data()); + " variable already found: scope=%s\n",qPrint(md->getOuterScope()->name())); addMemberDocs(rootNav,md,def,0,FALSE); md->setRefItems(root->sli); return md; @@ -2578,7 +2577,7 @@ static MemberDef *addVariableToFile( } Debug::print(Debug::Variables,0, - " new variable, nd=%s!\n",nd?nd->name().data():"<global>"); + " new variable, nd=%s!\n",nd?qPrint(nd->name()):"<global>"); // new global variable, enum value or typedef MemberDef *md=new MemberDef( fileName,root->startLine,root->startColumn, @@ -2805,12 +2804,12 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) Debug::print(Debug::Variables,0, "VARIABLE_SEC: \n" " type=`%s' name=`%s' args=`%s' bodyLine=`%d' mGrpId=%d relates=%s\n", - root->type.data(), - root->name.data(), - root->args.data(), + qPrint(root->type), + qPrint(root->name), + qPrint(root->args), root->bodyLine, root->mGrpId, - root->relates.data() + qPrint(root->relates) ); //printf("root->parent->name=%s\n",root->parent->name.data()); @@ -3121,10 +3120,10 @@ static void addInterfaceOrServiceToServiceOrSingleton( " Interface Member:\n" " `%s' `%s' proto=%d\n" " def=`%s'\n", - root->type.data(), - rname.data(), + qPrint(root->type), + qPrint(rname), root->proto, - def.data() + qPrint(def) ); // add member to the global list of all members @@ -3167,20 +3166,20 @@ static void buildInterfaceAndServiceList(EntryNav *const rootNav) Debug::print(Debug::Functions,0, "EXPORTED_INTERFACE_SEC:\n" " `%s' `%s'::`%s' `%s' relates=`%s' relatesType=`%d' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d spec=%lld proto=%d docFile=%s\n", - root->type.data(), - rootNav->parent()->name().data(), - root->name.data(), - root->args.data(), - root->relates.data(), + qPrint(root->type), + qPrint(rootNav->parent()->name()), + qPrint(root->name), + qPrint(root->args), + qPrint(root->relates), root->relatesType, - root->fileName.data(), + qPrint(root->fileName), root->startLine, root->bodyLine, root->tArgLists ? (int)root->tArgLists->count() : -1, root->mGrpId, root->spec, root->proto, - root->docFile.data() + qPrint(root->docFile) ); QCString const rname = removeRedundantWhiteSpace(root->name); @@ -3373,12 +3372,12 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd, " Func Member:\n" " `%s' `%s'::`%s' `%s' proto=%d\n" " def=`%s'\n", - root->type.data(), - qualScope.data(), - rname.data(), - root->args.data(), + qPrint(root->type), + qPrint(qualScope), + qPrint(rname), + qPrint(root->args), root->proto, - def.data() + qPrint(def) ); // add member to the global list of all members @@ -3416,20 +3415,20 @@ static void buildFunctionList(EntryNav *rootNav) Debug::print(Debug::Functions,0, "FUNCTION_SEC:\n" " `%s' `%s'::`%s' `%s' relates=`%s' relatesType=`%d' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d spec=%lld proto=%d docFile=%s\n", - root->type.data(), - rootNav->parent()->name().data(), - root->name.data(), - root->args.data(), - root->relates.data(), + qPrint(root->type), + qPrint(rootNav->parent()->name()), + qPrint(root->name), + qPrint(root->args), + qPrint(root->relates), root->relatesType, - root->fileName.data(), + qPrint(root->fileName), root->startLine, root->bodyLine, root->tArgLists ? (int)root->tArgLists->count() : -1, root->mGrpId, root->spec, root->proto, - root->docFile.data() + qPrint(root->docFile) ); bool isFriend=root->type.find("friend ")!=-1; @@ -3499,7 +3498,7 @@ static void buildFunctionList(EntryNav *rootNav) ) { Debug::print(Debug::Functions,0," --> member %s of class %s!\n", - rname.data(),cd->name().data()); + qPrint(rname),qPrint(cd->name())); addMethodToClass(rootNav,cd,rname,isFriend); } else if (!((rootNav->parent()->section() & Entry::COMPOUND_MASK) @@ -3520,7 +3519,7 @@ static void buildFunctionList(EntryNav *rootNav) MemberDef *md=0; if ((mn=Doxygen::functionNameSDict->find(rname))) { - Debug::print(Debug::Functions,0," --> function %s already found!\n",rname.data()); + Debug::print(Debug::Functions,0," --> function %s already found!\n",qPrint(rname)); MemberNameIterator mni(*mn); for (mni.toFirst();(!found && (md=mni.current()));++mni) { @@ -3663,7 +3662,7 @@ static void buildFunctionList(EntryNav *rootNav) } if (!found) /* global function is unique with respect to the file */ { - Debug::print(Debug::Functions,0," --> new function %s found!\n",rname.data()); + Debug::print(Debug::Functions,0," --> new function %s found!\n",qPrint(rname)); //printf("New function type=`%s' name=`%s' args=`%s' bodyLine=%d\n", // root->type.data(),rname.data(),root->args.data(),root->bodyLine); @@ -3744,12 +3743,12 @@ static void buildFunctionList(EntryNav *rootNav) " Global Function:\n" " `%s' `%s'::`%s' `%s' proto=%d\n" " def=`%s'\n", - root->type.data(), - rootNav->parent()->name().data(), - rname.data(), - root->args.data(), + qPrint(root->type), + qPrint(rootNav->parent()->name()), + qPrint(rname), + qPrint(root->args), root->proto, - def.data() + qPrint(def) ); md->setDefinition(def); md->enableCallGraph(root->callGraph); @@ -3812,7 +3811,7 @@ static void buildFunctionList(EntryNav *rootNav) } else { - Debug::print(Debug::Functions,0," --> %s not processed!\n",rname.data()); + Debug::print(Debug::Functions,0," --> %s not processed!\n",qPrint(rname)); } } else if (rname.isEmpty()) @@ -4251,7 +4250,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, if (arg->name==usedName) // type is a template argument { found=TRUE; - Debug::print(Debug::Classes,0," New used class `%s'\n", usedName.data()); + Debug::print(Debug::Classes,0," New used class `%s'\n", qPrint(usedName)); ClassDef *usedCd = Doxygen::hiddenClasses->find(usedName); if (usedCd==0) @@ -4268,7 +4267,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, Doxygen::hiddenClasses->append(usedName,usedCd); } if (isArtificial) usedCd->setArtificial(TRUE); - Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", usedCd->name().data()); + Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", qPrint(usedCd->name())); instanceCd->addUsedClass(usedCd,md->name(),md->protection()); usedCd->addUsedByClass(instanceCd,md->name(),md->protection()); } @@ -4284,7 +4283,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, if (usedCd) { found=TRUE; - Debug::print(Debug::Classes,0," Adding used class `%s' (2)\n", usedCd->name().data()); + Debug::print(Debug::Classes,0," Adding used class `%s' (2)\n", qPrint(usedCd->name())); instanceCd->addUsedClass(usedCd,md->name(),md->protection()); // class exists usedCd->addUsedByClass(instanceCd,md->name(),md->protection()); } @@ -4304,7 +4303,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, { type+=md->argsString(); } - Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", type.data()); + Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", qPrint(type)); usedCd = new ClassDef( masterCd->getDefFileName(),masterCd->getDefLine(), masterCd->getDefColumn(), @@ -4316,7 +4315,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, if (usedCd) { if (isArtificial) usedCd->setArtificial(TRUE); - Debug::print(Debug::Classes,0," Adding used class `%s' (3)\n", usedCd->name().data()); + Debug::print(Debug::Classes,0," Adding used class `%s' (3)\n", qPrint(usedCd->name())); instanceCd->addUsedClass(usedCd,md->name(),md->protection()); usedCd->addUsedByClass(instanceCd,md->name(),md->protection()); } @@ -4402,7 +4401,7 @@ static bool findTemplateInstanceRelation(Entry *root, bool isArtificial) { Debug::print(Debug::Classes,0," derived from template %s with parameters %s\n", - templateClass->name().data(),templSpec.data()); + qPrint(templateClass->name()),qPrint(templSpec)); //printf("findTemplateInstanceRelation(base=%s templSpec=%s templateNames=", // templateClass->name().data(),templSpec.data()); //if (templateNames) @@ -4429,7 +4428,7 @@ static bool findTemplateInstanceRelation(Entry *root, if (freshInstance) { - Debug::print(Debug::Classes,0," found fresh instance '%s'!\n",instanceClass->name().data()); + Debug::print(Debug::Classes,0," found fresh instance '%s'!\n",qPrint(instanceClass->name())); Doxygen::classSDict->append(instanceClass->name(),instanceClass); instanceClass->setTemplateBaseClassNames(templateNames); @@ -4449,7 +4448,7 @@ static bool findTemplateInstanceRelation(Entry *root, } Debug::print(Debug::Classes,0," template root found %s templSpec=%s!\n", - templateRoot->name.data(),templSpec.data()); + qPrint(templateRoot->name),qPrint(templSpec)); ArgumentList *templArgs = new ArgumentList; stringToArgumentList(templSpec,templArgs); findBaseClassesForClass(templateRootNav,context,templateClass,instanceClass, @@ -4659,11 +4658,11 @@ static bool findClassRelation( { Debug::print( Debug::Classes,0," class relation %s inherited/used by %s found (%s and %s) templSpec='%s'\n", - baseClassName.data(), - rootNav->name().data(), + qPrint(baseClassName), + qPrint(rootNav->name()), (bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"), (bi->virt==Normal)?"normal":"virtual", - templSpec.data() + qPrint(templSpec) ); int i=baseClassName.find('<'); @@ -4769,7 +4768,7 @@ static bool findClassRelation( //printf("3. found=%d\n",found); if (found) { - Debug::print(Debug::Classes,0," Documented base class `%s' templSpec=%s\n",biName.data(),templSpec.isEmpty()?"":templSpec.data()); + Debug::print(Debug::Classes,0," Documented base class `%s' templSpec=%s\n",qPrint(biName),qPrint(templSpec)); // add base class to this class // if templSpec is not empty then we should "instantiate" @@ -4825,7 +4824,7 @@ static bool findClassRelation( { Debug::print(Debug::Classes,0, " New undocumented base class `%s' baseClassName=%s templSpec=%s isArtificial=%d\n", - biName.data(),baseClassName.data(),templSpec.data(),isArtificial + qPrint(biName),qPrint(baseClassName),qPrint(templSpec),isArtificial ); baseClass=0; if (isATemplateArgument) @@ -4884,7 +4883,7 @@ static bool findClassRelation( } else { - Debug::print(Debug::Classes,0," Base class `%s' not found\n",biName.data()); + Debug::print(Debug::Classes,0," Base class `%s' not found\n",qPrint(biName)); } } else @@ -4993,7 +4992,7 @@ static void findInheritedTemplateInstances() { ClassDef *cd; QCString bName = extractClassName(rootNav); - Debug::print(Debug::Classes,0," Inheritance: Class %s : \n",bName.data()); + Debug::print(Debug::Classes,0," Inheritance: Class %s : \n",qPrint(bName)); if ((cd=getClass(bName))) { rootNav->loadEntry(g_storage); @@ -5014,11 +5013,12 @@ static void findUsedTemplateInstances() { ClassDef *cd; QCString bName = extractClassName(rootNav); - Debug::print(Debug::Classes,0," Usage: Class %s : \n",bName.data()); + Debug::print(Debug::Classes,0," Usage: Class %s : \n",qPrint(bName)); if ((cd=getClass(bName))) { rootNav->loadEntry(g_storage); findUsedClassesForClass(rootNav,cd,cd,cd,TRUE); + cd->addTypeConstraints(); rootNav->releaseEntry(); } } @@ -5037,7 +5037,7 @@ static void computeClassRelations() rootNav->loadEntry(g_storage); Entry *root = rootNav->entry(); QCString bName = extractClassName(rootNav); - Debug::print(Debug::Classes,0," Relations: Class %s : \n",bName.data()); + Debug::print(Debug::Classes,0," Relations: Class %s : \n",qPrint(bName)); if ((cd=getClass(bName))) { findBaseClassesForClass(rootNav,cd,cd,cd,DocumentedOnly,FALSE); @@ -5079,12 +5079,12 @@ static void computeTemplateClassRelations() QDict<ClassDef> *templInstances = 0; if (cd && (templInstances=cd->getTemplateInstances())) { - Debug::print(Debug::Classes,0," Template class %s : \n",cd->name().data()); + Debug::print(Debug::Classes,0," Template class %s : \n",qPrint(cd->name())); QDictIterator<ClassDef> tdi(*templInstances); ClassDef *tcd; for (tdi.toFirst();(tcd=tdi.current());++tdi) // for each template instance { - Debug::print(Debug::Classes,0," Template instance %s : \n",tcd->name().data()); + Debug::print(Debug::Classes,0," Template instance %s : \n",qPrint(tcd->name())); QCString templSpec = tdi.currentKey(); ArgumentList *templArgs = new ArgumentList; stringToArgumentList(templSpec,templArgs); @@ -5453,7 +5453,7 @@ static bool findGlobalMember(EntryNav *rootNav, Entry *root = rootNav->entry(); Debug::print(Debug::FindMembers,0, "2. findGlobalMember(namespace=%s,type=%s,name=%s,tempArg=%s,decl=%s)\n", - namespaceName.data(),type,name,tempArg,decl); + qPrint(namespaceName),qPrint(type),qPrint(name),qPrint(tempArg),qPrint(decl)); QCString n=name; if (n.isEmpty()) return FALSE; if (n.find("::")!=-1) return FALSE; // skip undefined class members @@ -5492,8 +5492,7 @@ static bool findGlobalMember(EntryNav *rootNav, ) { Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n", - md->name().data(),namespaceName.data()); - QCString nsName = nd ? nd->name().data() : ""; + qPrint(md->name()),qPrint(namespaceName)); NamespaceDef *rnd = 0; if (!namespaceName.isEmpty()) rnd = Doxygen::namespaceSDict->find(namespaceName); @@ -5773,7 +5772,7 @@ static void findMember(EntryNav *rootNav, "findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d," "isFunc=%d mGrpId=%d tArgList=%p (#=%d) " "spec=%lld lang=%x\n", - root,funcDecl.data(),root->relates.data(),overloaded,isFunc,root->mGrpId, + root,qPrint(funcDecl),qPrint(root->relates),overloaded,isFunc,root->mGrpId, root->tArgLists,root->tArgLists ? root->tArgLists->count() : 0, root->spec,root->lang ); @@ -6061,9 +6060,9 @@ static void findMember(EntryNav *rootNav, " isMemberOf=%d\n" " isFriend=%d\n" " isFunc=%d\n\n", - namespaceName.data(),className.data(), - funcType.data(),funcSpec.data(),funcName.data(),funcArgs.data(),funcTempList.data(), - funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isMemberOf,isFriend, + qPrint(namespaceName),qPrint(className), + qPrint(funcType),qPrint(funcSpec),qPrint(funcName),qPrint(funcArgs),qPrint(funcTempList), + qPrint(funcDecl),qPrint(root->relates),qPrint(exceptions),isRelated,isMemberOf,isFriend, isFunc ); @@ -6103,9 +6102,9 @@ static void findMember(EntryNav *rootNav, Debug::print(Debug::FindMembers,0, "3. member definition found, " "scope needed=`%s' scope=`%s' args=`%s' fileName=%s\n", - scopeName.data(),cd ? cd->name().data() : "<none>", - md->argsString(), - root->fileName.data()); + qPrint(scopeName),cd ? qPrint(cd->name()) : "<none>", + qPrint(md->argsString()), + qPrint(root->fileName)); //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); FileDef *fd=rootNav->fileDef(); NamespaceDef *nd=0; @@ -6172,8 +6171,8 @@ static void findMember(EntryNav *rootNav, Debug::print(Debug::FindMembers,0, "5. matching `%s'<=>`%s' className=%s namespaceName=%s\n", - argListToString(argList,TRUE).data(),argListToString(root->argList,TRUE).data(), - className.data(),namespaceName.data() + qPrint(argListToString(argList,TRUE)),qPrint(argListToString(root->argList,TRUE)), + qPrint(className),qPrint(namespaceName) ); bool matching= @@ -6198,7 +6197,7 @@ static void findMember(EntryNav *rootNav, className+"::",""); // see bug700693 & bug732594 Debug::print(Debug::FindMembers,0, "5b. Comparing return types '%s'<->'%s' #args %d<->%d\n", - md->typeString(),funcType.data(), + qPrint(md->typeString()),qPrint(funcType), md->templateArguments()->count(),root->tArgLists->getLast()->count()); if (md->templateArguments()->count()!=root->tArgLists->getLast()->count() || qstrcmp(memType,funcType)) @@ -6299,7 +6298,7 @@ static void findMember(EntryNav *rootNav, umd = emd = cmd; Debug::print(Debug::FindMembers,0, "7. new candidate className=%s scope=%s args=%s exact match\n", - className.data(),ccd->name().data(),md->argsString()); + qPrint(className),qPrint(ccd->name()),qPrint(md->argsString())); } else // arguments do not match, but member name and scope do -> remember { @@ -6307,7 +6306,7 @@ static void findMember(EntryNav *rootNav, umd = cmd; Debug::print(Debug::FindMembers,0, "7. new candidate className=%s scope=%s args=%s no match\n", - className.data(),ccd->name().data(),md->argsString()); + qPrint(className),qPrint(ccd->name()),qPrint(md->argsString())); } candidates++; } @@ -6428,6 +6427,7 @@ static void findMember(EntryNav *rootNav, md->enableCallGraph(root->callGraph); md->enableCallerGraph(root->callerGraph); md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); md->setPrototype(root->proto); @@ -6495,6 +6495,7 @@ static void findMember(EntryNav *rootNav, doc+="<p>"; doc+=root->doc; md->setDocumentation(doc,root->docFile,root->docLine); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); md->setPrototype(root->proto); @@ -6526,7 +6527,7 @@ static void findMember(EntryNav *rootNav, else if (isRelated && !root->relates.isEmpty()) { Debug::print(Debug::FindMembers,0,"2. related function\n" - " scopeName=%s className=%s\n",scopeName.data(),className.data()); + " scopeName=%s className=%s\n",qPrint(scopeName),qPrint(className)); if (className.isEmpty()) className=root->relates; ClassDef *cd; //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); @@ -6751,7 +6752,7 @@ localObjCMethod: if (Config_getBool("EXTRACT_LOCAL_METHODS") && (cd=getClass(scopeName))) { Debug::print(Debug::FindMembers,0,"4. Local objective C method %s\n" - " scopeName=%s className=%s\n",root->name.data(),scopeName.data(),className.data()); + " scopeName=%s className=%s\n",qPrint(root->name),qPrint(scopeName),qPrint(className)); //printf("Local objective C method `%s' of class `%s' found\n",root->name.data(),cd->name().data()); MemberDef *md=new MemberDef( root->fileName,root->startLine,root->startColumn, @@ -6833,7 +6834,7 @@ static void filterMemberDocumentation(EntryNav *rootNav) int i=-1,l; Debug::print(Debug::FindMembers,0, "findMemberDocumentation(): root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->spec=%lld root->mGrpId=%d\n", - root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->spec,root->mGrpId + qPrint(root->type),qPrint(root->inside),qPrint(root->name),qPrint(root->args),root->section,root->spec,root->mGrpId ); //printf("rootNav->parent()->name()=%s\n",rootNav->parent()->name().data()); bool isFunc=TRUE; @@ -8727,9 +8728,8 @@ static void findMainPage(EntryNav *rootNav) { Entry *root = rootNav->entry(); warn(root->fileName,root->startLine, - "found more than one \\mainpage comment block! Skipping this " - "block." - ); + "found more than one \\mainpage comment block! (first occurrence: %s, line %d), Skipping current block!", + Doxygen::mainPage->docFile().data(),Doxygen::mainPage->docLine()); } rootNav->releaseEntry(); @@ -9949,7 +9949,7 @@ static void devUsage() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2014\n\n",versionString); + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2015\n\n",versionString); msg("You can use doxygen in a number of ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); @@ -9962,7 +9962,7 @@ static void usage(const char *name) msg(" If - is used for configName doxygen will read from standard input.\n\n"); msg("4) Use doxygen to generate a template file controlling the layout of the\n"); msg(" generated documentation:\n"); - msg(" %s -l layoutFileName.xml\n\n",name); + msg(" %s -l [layoutFileName.xml]\n\n",name); msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n"); msg(" RTF: %s -w rtf styleSheetFile\n",name); msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name); @@ -10323,16 +10323,19 @@ void readConfiguration(int argc, char **argv) } else if (qstricmp(formatName,"latex")==0) { - if (optind+4<argc) // use config file to get settings + if (optind+4<argc || QFileInfo("Doxyfile").exists()) { - if (!Config::instance()->parse(argv[optind+4])) + QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile"); + if (!Config::instance()->parse(df)) { err("error opening or reading configuration file %s!\n",argv[optind+4]); + cleanUpDoxygen(); exit(1); } Config::instance()->substituteEnvironmentVars(); Config::instance()->convertStrToVal(); Config_getString("LATEX_HEADER")=""; + Config_getString("LATEX_FOOTER")=""; Config::instance()->check(); } else // use default config @@ -10638,7 +10641,7 @@ static void writeTagFile() FileDef *fd; for (fni.toFirst();(fd=fni.current());++fni) { - fd->writeTagFile(tagFile); + if (fd->isLinkableInProject()) fd->writeTagFile(tagFile); } } // for each class @@ -10646,28 +10649,28 @@ static void writeTagFile() ClassDef *cd; for ( ; (cd=cli.current()) ; ++cli ) { - cd->writeTagFile(tagFile); + if (cd->isLinkableInProject()) cd->writeTagFile(tagFile); } // for each namespace NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); NamespaceDef *nd; for ( ; (nd=nli.current()) ; ++nli ) { - nd->writeTagFile(tagFile); + if (nd->isLinkableInProject()) nd->writeTagFile(tagFile); } // for each group GroupSDict::Iterator gli(*Doxygen::groupSDict); GroupDef *gd; for (gli.toFirst();(gd=gli.current());++gli) { - gd->writeTagFile(tagFile); + if (gd->isLinkableInProject()) gd->writeTagFile(tagFile); } // for each page PageSDict::Iterator pdi(*Doxygen::pageSDict); PageDef *pd=0; for (pdi.toFirst();(pd=pdi.current());++pdi) { - pd->writeTagFile(tagFile); + if (pd->isLinkableInProject()) pd->writeTagFile(tagFile); } if (Doxygen::mainPage) Doxygen::mainPage->writeTagFile(tagFile); @@ -11671,7 +11674,7 @@ void generateOutput() QString oldDir = QDir::currentDirPath(); QDir::setCurrent(Config_getString("HTML_OUTPUT")); portable_sysTimerStart(); - if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", FALSE)) + if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))) { err("failed to run html help compiler on index.hhp\n"); } diff --git a/src/doxygen.h b/src/doxygen.h index aa9b745..0d38d5b 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/doxygen.md b/src/doxygen.md index 9a9d726..ccb47b9 100644 --- a/src/doxygen.md +++ b/src/doxygen.md @@ -168,6 +168,10 @@ easy ways to get debug information. command is specified) - validate<br> Currently not used + - lex<br> + Provide output of the `lex` files used. When a lexer is started and when a lexer + ends the name of the `lex` file is given so it is possible to see in which lexer the + problem occurs. This makes it easier to select the file to be compiled in `lex` debug mode. Producing output ---------------- diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 4f05a35..72410a6 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp index 6680aeb..db5ed4f 100644 --- a/src/eclipsehelp.cpp +++ b/src/eclipsehelp.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h index f0ab78e..a7cde1e 100644 --- a/src/eclipsehelp.h +++ b/src/eclipsehelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/entry.cpp b/src/entry.cpp index b5928b3..bf45f87 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -24,7 +24,7 @@ #include "doxygen.h" #include "filestorage.h" #include "arguments.h" - +#include "config.h" //------------------------------------------------------------------ #define HEADER ('D'<<24)+('O'<<16)+('X'<<8)+'!' @@ -216,6 +216,8 @@ void Entry::addSubEntry(Entry *current) void Entry::reset() { + static bool entryCallGraph = Config_getBool("CALL_GRAPH"); + static bool entryCallerGraph = Config_getBool("CALLER_GRAPH"); //printf("Entry::reset()\n"); name.resize(0); type.resize(0); @@ -245,8 +247,8 @@ void Entry::reset() bodyLine = -1; endBodyLine = -1; mGrpId = -1; - callGraph = FALSE; - callerGraph = FALSE; + callGraph = entryCallGraph; + callerGraph = entryCallerGraph; section = EMPTY_SEC; mtype = Method; virt = Normal; diff --git a/src/entry.h b/src/entry.h index c92038f..f1b81ef 100644 --- a/src/entry.h +++ b/src/entry.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/example.h b/src/example.h index 7c86554..cf30827 100644 --- a/src/example.h +++ b/src/example.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/filedef.cpp b/src/filedef.cpp index dd97c1c..d6e49a2 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1296,7 +1296,6 @@ void FileDef::addIncludedUsingDirectives() visited=TRUE; //printf("( FileDef::addIncludedUsingDirectives for file %s\n",name().data()); - NamespaceList nl; if (m_includeList) // file contains #includes { { @@ -1542,7 +1541,6 @@ static Directory *findDirNode(Directory *root,const QCString &name) static void mergeFileDef(Directory *root,FileDef *fd) { - QCString rootPath = root->name(); QCString filePath = fd->absFilePath(); //printf("merging %s\n",filePath.data()); Directory *dirNode = findDirNode(root,filePath); @@ -1743,7 +1741,7 @@ void FileDef::acquireFileVersion() { msg("Version of %s : ",m_filePath.data()); QCString cmd = vercmd+" \""+m_filePath+"\""; - Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd)); FILE *f=portable_popen(cmd,"r"); if (!f) { diff --git a/src/filedef.h b/src/filedef.h index 33eae35..17a5e60 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/filename.cpp b/src/filename.cpp index 8719f3c..aa51249 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/filename.h b/src/filename.h index ac7b164..fbee0e1 100644 --- a/src/filename.h +++ b/src/filename.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fileparser.cpp b/src/fileparser.cpp index 1d78e1e..b54b243 100644 --- a/src/fileparser.cpp +++ b/src/fileparser.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fileparser.h b/src/fileparser.h index f9a7c7b..4568a39 100644 --- a/src/fileparser.h +++ b/src/fileparser.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/filestorage.h b/src/filestorage.h index 0d72923..5c2a92d 100644 --- a/src/filestorage.h +++ b/src/filestorage.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/formula.cpp b/src/formula.cpp index 9e835e1..7b8d346 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/formula.h b/src/formula.h index 47f7d4b..422030c 100644 --- a/src/formula.h +++ b/src/formula.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fortrancode.h b/src/fortrancode.h index b64ede7..c110852 100644 --- a/src/fortrancode.h +++ b/src/fortrancode.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -34,4 +34,5 @@ void parseFortranCode(CodeOutputInterface &,const char *,const QCString &, void resetFortranCodeParserState(); void codeFreeScanner(); +const int fixedCommentAfter = 72; #endif diff --git a/src/fortrancode.l b/src/fortrancode.l index 51934cd..bf50835 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -50,6 +50,7 @@ #include "filedef.h" #include "namespacedef.h" #include "tooltip.h" +#include "fortrancode.h" // Toggle for some debugging info //#define DBG_CTX(x) fprintf x @@ -211,9 +212,14 @@ static void endFontClass() static void startFontClass(const char *s) { - endFontClass(); - g_code->startFontClass(s); - g_currentFontClass=s; + // if font class is already set don't stop and start it. + // strcmp does not like null pointers as input. + if (!g_currentFontClass || !s || strcmp(g_currentFontClass,s)) + { + endFontClass(); + g_code->startFontClass(s); + g_currentFontClass=s; + } } static void setCurrentDoc(const QCString &anchor) @@ -724,7 +730,7 @@ ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC) /* Assume that attribute statements are almost the same as attributes. */ ATTR_STMT {ATTR_SPEC}|DIMENSION -FLOW (DO|SELECT|CASE|SELECT{BS}(CASE|TYPE)|WHERE|IF|THEN|ELSE|WHILE|FORALL|ELSEWHERE|ELSEIF|RETURN|CONTINUE|EXIT) +FLOW (DO|SELECT|CASE|SELECT{BS}(CASE|TYPE)|WHERE|IF|THEN|ELSE|WHILE|FORALL|ELSEWHERE|ELSEIF|RETURN|CONTINUE|EXIT|GO{BS}TO) COMMANDS (FORMAT|CONTAINS|MODULE{BS_}PROCEDURE|WRITE|READ|ALLOCATE|ALLOCATED|ASSOCIATED|PRESENT|DEALLOCATE|NULLIFY|SIZE|INQUIRE|OPEN|CLOSE|FLUSH|DATA|COMMON) IGNORE (CALL) PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)? @@ -1179,11 +1185,22 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I } YY_FTN_RESET } -<*>^{BS}"type"{BS}"=" { g_code->codify(yytext); } +<*>^{BS}"type"{BS}"=" { g_code->codify(yytext); } -<*>. { - g_code->codify(yytext); - } +<*>. { + if (g_isFixedForm && yy_my_start > fixedCommentAfter) + { + //yy_push_state(YY_START); + //BEGIN(DocBlock); + //docBlock=yytext; + startFontClass("comment"); + codifyLines(yytext); + } + else + { + g_code->codify(yytext); + } + } <*>{LOG_OPER} { // Fortran logical comparison keywords g_code->codify(yytext); } diff --git a/src/fortranscanner.h b/src/fortranscanner.h index 92a8669..bc8071b 100644 --- a/src/fortranscanner.h +++ b/src/fortranscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 4875606..094bfb1 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -72,7 +72,7 @@ #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 -enum ScanVar { V_IGNORE, V_VARIABLE, V_PARAMETER}; +enum ScanVar { V_IGNORE, V_VARIABLE, V_PARAMETER, V_RESULT}; enum InterfaceType { IF_NONE, IF_SPECIFIC, IF_GENERIC, IF_ABSTRACT }; // {{{ ----- Helper structs ----- @@ -165,7 +165,6 @@ static ScanVar v_type = V_IGNORE; // type of parsed variable static QList<Entry> moduleProcedures; // list of all interfaces which contain unresolved // module procedures static QCString docBlock; -static QCString docBlockName; static bool docBlockInBody = FALSE; static bool docBlockJavaStyle; @@ -202,6 +201,7 @@ static int yyread(char *buf,int max_size); static void startCommentBlock(bool); static void handleCommentBlock(const QCString &doc,bool brief); static void subrHandleCommentBlock(const QCString &doc,bool brief); +static void subrHandleCommentBlockResult(const QCString &doc,bool brief); static void addCurrentEntry(int case_insens); static void addModule(const char *name, bool isModule=FALSE); static void addSubprogram(const char *text); @@ -485,7 +485,7 @@ SCOPENAME ({ID}{BS}"::"{BS})* <InterfaceBody>^{BS}end{BS}interface({BS_}{ID})? { // end scope only if GENERIC interface - last_entry->parent()->endBodyLine = yyLineNr - 1; + if (ifType == IF_GENERIC)last_entry->parent()->endBodyLine = yyLineNr - 1; if (ifType == IF_GENERIC && !endScope(current_root)) yyterminate(); @@ -844,6 +844,7 @@ private { QCString rght; if (strt != -1) { + v_type = V_RESULT; lft = ""; rght = ""; if (strt != 0) lft = current_root->type.left(strt).stripWhiteSpace(); @@ -864,6 +865,10 @@ private { } if (current_root->type.length() > 0) current_root->type += " "; current_root->type += "function"; + if (!docBlock.isNull()) + { + subrHandleCommentBlockResult(docBlock,TRUE); + } } else { @@ -982,6 +987,8 @@ private { result=result.stripWhiteSpace(); addSubprogram(result); BEGIN(Subprog); + current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account. + current->startLine = yyLineNr; } <Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{SUBPROG}{BS_} { @@ -1105,6 +1112,10 @@ private { { subrHandleCommentBlock(docBlock,TRUE); } + else if (v_type == V_RESULT) + { + subrHandleCommentBlockResult(docBlock,TRUE); + } yy_pop_state(); docBlock.resize(0); } @@ -1400,11 +1411,15 @@ static const char* prepassFixedForm(const char* contents) int prevLineLength=0; int prevLineAmpOrExclIndex=-1; bool emptyLabel=TRUE; + bool commented=FALSE; + bool inSingle=FALSE; + bool inDouble=FALSE; + bool inBackslash=FALSE; int newContentsSize = strlen(contents)+3; // \000, \n (when necessary) and one spare character (to avoid reallocation) char* newContents = (char*)malloc(newContentsSize); for(int i=0, j=0;;i++,j++) { - if(j>=newContentsSize-1) { // check for one spare character, which may be eventually used below (by &) + if(j>=newContentsSize-3) { // check for spare characters, which may be eventually used below (by & and '! ') newContents = (char*)realloc(newContents, newContentsSize+1000); newContentsSize = newContentsSize+1000; } @@ -1417,9 +1432,11 @@ static const char* prepassFixedForm(const char* contents) prevLineAmpOrExclIndex=getAmpOrExclAtTheEnd(&contents[i-prevLineLength+1], prevLineLength); column=0; emptyLabel=TRUE; + commented=FALSE; newContents[j]=c; break; case ' ': + case '\t': newContents[j]=c; break; case '\000': @@ -1433,21 +1450,58 @@ static const char* prepassFixedForm(const char* contents) newContents[newContentsSize + 1] = '\000'; } return newContents; + case '"': + case '\'': + case '\\': + if ((column <= fixedCommentAfter) && (column!=6) && !commented) + { + // we have some special cases in respect to strings and exscaped string characters + newContents[j]=c; + if (c == '\\') + { + inBackslash = !inBackslash; + break; + } + else if (c == '\'') + { + if (!inDouble) inSingle = !inSingle; + break; + } + else if (c == '"') + { + if (!inSingle) inDouble = !inDouble; + break; + } + } + inBackslash = FALSE; + // fallthrough case 'C': case 'c': case '*': - if (column!=6) + case '!': + if ((column <= fixedCommentAfter) && (column!=6)) { emptyLabel=FALSE; if(column==1) + { newContents[j]='!'; + commented = TRUE; + } + else if ((c == '!') && !inDouble && !inSingle) + { + newContents[j]=c; + commented = TRUE; + } else + { newContents[j]=c; + } break; } + // fallthrough default: if(column==6 && emptyLabel) { // continuation - if (c != '0') { // 0 not allowed as continuatioin character, see f95 standard paragraph 3.3.2.3 + if (c != '0') { // 0 not allowed as continuation character, see f95 standard paragraph 3.3.2.3 newContents[j]=' '; if(prevLineAmpOrExclIndex==-1) { // add & just before end of previous line @@ -1460,6 +1514,15 @@ static const char* prepassFixedForm(const char* contents) } else { newContents[j]=c; // , just handle like space } + } else if ((column > fixedCommentAfter) && !commented) { + // first non commented non blank character after position fixedCommentAfter + if (c != '!') { + // I'm not a possible start of doxygen comment + newContents[j++]='!'; + newContents[j++]=' '; // so that '<' and '>' as first character are not converted to doxygen comment + } + newContents[j]=c; + commented = TRUE; } else { newContents[j]=c; emptyLabel=FALSE; @@ -2222,14 +2285,10 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief) current->inbodyDocs = ""; // strip \\param or @param, so we can do some extra checking. We will add it later on again. - if (loc_doc.find("\\param") == 0) - { - loc_doc = loc_doc.right(loc_doc.length()-strlen("\\param")).stripWhiteSpace(); - } - else if (loc_doc.find("@param") == 0) - { - loc_doc = loc_doc.right(loc_doc.length()-strlen("@param")).stripWhiteSpace(); - } + if (!loc_doc.stripPrefix("\\param") && + !loc_doc.stripPrefix("@param") + ) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning + loc_doc.stripWhiteSpace(); // direction as defined with the declaration of the parameter int dir1 = modifiers[current_root][argName.lower()].direction; @@ -2242,6 +2301,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief) { // strip direction loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN])); + loc_doc.stripWhiteSpace(); // in case of emty documentation or (now) just name, consider it as no documemntation if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) { @@ -2268,6 +2328,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief) (directionParam[dir1] == directionParam[SymbolModifiers::OUT])) { loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT])); + loc_doc.stripWhiteSpace(); if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) { current=tmp_entry; @@ -2291,6 +2352,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief) (directionParam[dir1] == directionParam[SymbolModifiers::INOUT])) { loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT])); + loc_doc.stripWhiteSpace(); if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) { current=tmp_entry; @@ -2322,6 +2384,37 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief) // reset current back to the part inside the routine current=tmp_entry; } +//---------------------------------------------------------------------------- +/// Handle result description as defined after the declaration of the parameter +static void subrHandleCommentBlockResult(const QCString &doc,bool brief) +{ + QCString loc_doc; + loc_doc = doc.stripWhiteSpace(); + + Entry *tmp_entry = current; + current = subrCurrent.getFirst(); // temporarily switch to the entry of the subroutine / function + + // Still in the specification section so no inbodyDocs yet, but parameter documentation + current->inbodyDocs = ""; + + // strip \\returns or @returns. We will add it later on again. + if (!loc_doc.stripPrefix("\\returns") && + !loc_doc.stripPrefix("\\return") && + !loc_doc.stripPrefix("@returns") && + !loc_doc.stripPrefix("@return") + ) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning + loc_doc.stripWhiteSpace(); + + if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) + { + current=tmp_entry; + return; + } + handleCommentBlock(QCString("\n\n@returns ") + loc_doc,brief); + + // reset current back to the part inside the routine + current=tmp_entry; +} //---------------------------------------------------------------------------- #if 0 diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index f45d956..e2774a9 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * ftvhelp.cpp,v 1.0 2000/09/06 16:09:00 * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/ftvhelp.h b/src/ftvhelp.h index bddb2f0..bacf9a5 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 5c08048..2d7674d 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -508,29 +508,21 @@ void GroupDef::removeMember(MemberDef *md) } } -bool GroupDef::containsGroup(const GroupDef *def) +bool GroupDef::findGroup(const GroupDef *def) const { if (this==def) { return TRUE; } - else if (groupList->find(def)>=0) + else if (groupList) { - return TRUE; - } - else // look for subgroups as well - { - GroupList *groups = partOfGroups(); - if (groups) + GroupListIterator it(*groupList); + GroupDef *gd; + for (;(gd=it.current());++it) { - GroupListIterator it(*groups); - GroupDef *gd; - for (;(gd=it.current());++it) + if (gd->findGroup(def)) { - if (gd->containsGroup(def)) - { - return TRUE; - } + return TRUE; } } } @@ -1377,12 +1369,12 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup) warn(root->fileName,root->startLine,"Refusing to add group %s to itself", gd->name().data()); } - else if (gd->containsGroup(subGroup)) + else if (subGroup->findGroup(gd)) { warn(root->fileName,root->startLine,"Refusing to add group %s to group %s, since the latter is already a " "subgroup of the former\n", subGroup->name().data(),gd->name().data()); } - else + else if (!gd->findGroup(subGroup)) { gd->addGroup(subGroup); subGroup->makePartOfGroup(gd); diff --git a/src/groupdef.h b/src/groupdef.h index a21311b..be4475f 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -64,7 +64,7 @@ class GroupDef : public Definition void addDir(const DirDef *dd); bool insertMember(MemberDef *def,bool docOnly=FALSE); void removeMember(MemberDef *md); - bool containsGroup(const GroupDef *def); // true if def is already a subgroup + bool findGroup(const GroupDef *def) const; // true if def is a subgroup of this group void writeDocumentation(OutputList &ol); void writeMemberPages(OutputList &ol); void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; diff --git a/src/htags.cpp b/src/htags.cpp index 1e18ae1..c910eb6 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -105,7 +105,6 @@ bool Htags::execute(const QCString &htmldir) bool Htags::loadFilemap(const QCString &htmlDir) { QCString fileMapName = htmlDir+"/HTML/FILEMAP"; - QCString fileMap; QFileInfo fi(fileMapName); /* * Construct FILEMAP dictionary using QDict. @@ -126,8 +125,10 @@ bool Htags::loadFilemap(const QCString &htmlDir) line.at(maxlen)='\0'; if (f.open(IO_ReadOnly)) { - while (f.readLine(line.data(),maxlen)>0) + int len; + while ((len=f.readLine(line.rawData(),maxlen))>0) { + line.resize(len+1); //printf("Read line: %s",line.data()); int sep = line.find('\t'); if (sep!=-1) diff --git a/src/htags.h b/src/htags.h index 5173b2b..5725e7d 100644 --- a/src/htags.h +++ b/src/htags.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlattrib.h b/src/htmlattrib.h index e7fd204..66d5325 100644 --- a/src/htmlattrib.h +++ b/src/htmlattrib.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index cd6b635..99d6fdd 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1063,7 +1063,6 @@ void HtmlDocVisitor::visitPost(DocPara *p) } } - QCString context; // if the last element of a paragraph is something that should be outside of // the paragraph (<ul>,<dl>,<table>) then that will already have ended the // paragraph and we don't need to do it here @@ -2002,7 +2001,7 @@ void HtmlDocVisitor::writeMscFile(const QCString &fileName, } baseName.prepend("msc_"); QCString outDir = Config_getString("HTML_OUTPUT"); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); MscOutputFormat mscFormat = MSC_BITMAP; if ("svg" == imgExt) mscFormat = MSC_SVG; @@ -2046,7 +2045,7 @@ void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName, baseName=baseName.left(i); } static QCString outDir = Config_getString("HTML_OUTPUT"); - static QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); if (imgExt=="svg") { generatePlantUMLOutput(fileName,outDir,PUML_SVG); diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h index 00ae09e..2ff9f75 100644 --- a/src/htmldocvisitor.h +++ b/src/htmldocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlentity.cpp b/src/htmlentity.cpp index 9327526..c4c601f 100644 --- a/src/htmlentity.cpp +++ b/src/htmlentity.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -59,7 +59,7 @@ static struct htmlEntityInfo { SYM(shy), "\xc2\xad", "­", "<shy/>", "­", "{$\\-$}", NULL, "\\-", { NULL, DocSymbol::Perl_unknown }}, { SYM(reg), "\xc2\xae", "®", "<registered/>", "®", "\\textregistered{}", "(R)", "\\'AE", { "registered", DocSymbol::Perl_symbol }}, { SYM(macr), "\xc2\xaf", "¯", "<macr/>", "¯", "\\={}", NULL, "\\'AF", { NULL, DocSymbol::Perl_unknown }}, - { SYM(deg), "\xc2\xb0", "°", "<deg/>", "°", "\\textdegree", NULL, "\\'B0", { "deg", DocSymbol::Perl_symbol }}, + { SYM(deg), "\xc2\xb0", "°", "<deg/>", "°", "\\textdegree{}", NULL, "\\'B0", { "deg", DocSymbol::Perl_symbol }}, { SYM(plusmn), "\xc2\xb1", "±", "<plusmn/>", "±", "{$\\pm$}", NULL, "\\'B1", { "+/-", DocSymbol::Perl_string }}, { SYM(sup2), "\xc2\xb2", "²", "<sup2/>", "²", "\\texttwosuperior{}", NULL, "\\'B2", { NULL, DocSymbol::Perl_unknown }}, { SYM(sup3), "\xc2\xb3", "³", "<sup3/>", "³", "\\textthreesuperior{}", NULL, "\\'B3", { NULL, DocSymbol::Perl_unknown }}, diff --git a/src/htmlentity.h b/src/htmlentity.h index d3b268c..7e54066 100644 --- a/src/htmlentity.h +++ b/src/htmlentity.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 3bb6792..a2dd473 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -125,7 +125,7 @@ QCString clearBlock(const char *s,const char *begin,const char *end) QCString result(resLen+1); char *r; - for (r=result.data(), p=s; (q=strstr(p,begin))!=0; p=q+endLen) + for (r=result.rawData(), p=s; (q=strstr(p,begin))!=0; p=q+endLen) { int l = (int)(q-p); memcpy(r,p,l); @@ -186,7 +186,7 @@ static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSe static QCString removeEmptyLines(const QCString &s) { BufStr out(s.length()+1); - char *p=s.data(); + const char *p=s.data(); if (p) { char c; @@ -194,7 +194,7 @@ static QCString removeEmptyLines(const QCString &s) { if (c=='\n') { - char *e = p; + const char *e = p; while (*e==' ' || *e=='\t') e++; if (*e=='\n') { diff --git a/src/htmlgen.h b/src/htmlgen.h index 7b63a6b..924d04f 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 2629ab3..a283338 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -599,8 +599,8 @@ QCString HtmlHelp::recode(const QCString &s) QCString output(oSize); size_t iLeft = iSize; size_t oLeft = oSize; - char *iPtr = s.data(); - char *oPtr = output.data(); + char *iPtr = s.rawData(); + char *oPtr = output.rawData(); if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft)) { oSize -= (int)oLeft; diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 574cec9..8191d03 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/image.cpp b/src/image.cpp index 3283754..adec5b3 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/image.h b/src/image.h index ad11a64..35e6ae3 100644 --- a/src/image.h +++ b/src/image.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/index.cpp b/src/index.cpp index bc0b48e..e7ba8e7 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1601,7 +1601,6 @@ static void writeAnnotatedClassList(OutputList &ol) } if (cd->isLinkableInProject() && cd->templateMaster()==0) { - QCString type=cd->compoundTypeString(); ol.startIndexKey(); if (cd->getLanguage()==SrcLangExt_VHDL) { @@ -2144,13 +2143,13 @@ static void writeNamespaceLinkForMember(OutputList &ol,MemberDef *md,const char QCString &prevNamespaceName) { NamespaceDef *nd=md->getNamespaceDef(); - if (nd && prevNamespaceName!=nd->name()) + if (nd && prevNamespaceName!=nd->displayName()) { ol.docify(separator); ol.writeObjectLink(md->getReference(),md->getOutputFileBase(),md->anchor(), - nd->name()); + nd->displayName()); ol.writeString("\n"); - prevNamespaceName = nd->name(); + prevNamespaceName = nd->displayName(); } } @@ -3115,7 +3114,7 @@ static void writePages(PageDef *pd,FTVHelp *ftv) if (ftv) { - //printf("*** adding %s\n",pageTitle.data()); + //printf("*** adding %s hasSubPages=%d hasSections=%d\n",pageTitle.data(),hasSubPages,hasSections); ftv->addContentsItem( hasSubPages,pageTitle, pd->getReference(),pd->getOutputFileBase(), @@ -3124,7 +3123,7 @@ static void writePages(PageDef *pd,FTVHelp *ftv) if (addToIndex && pd!=Doxygen::mainPage) { Doxygen::indexList->addContentsItem( - hasSubPages,pageTitle, + hasSubPages || hasSections,pageTitle, pd->getReference(),pd->getOutputFileBase(), 0,hasSubPages,TRUE); } @@ -3267,7 +3266,8 @@ void writeGraphInfo(OutputList &ol) QCString legendDocs = theTranslator->trLegendDocs(); int s = legendDocs.find("<center>"); int e = legendDocs.find("</center>"); - if (Config_getEnum("DOT_IMAGE_FORMAT")=="svg" && s!=-1 && e!=-1) + QCString imgExt = getDotImageExtension(); + if (imgExt=="svg" && s!=-1 && e!=-1) { legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e); //printf("legendDocs=%s\n",legendDocs.data()); @@ -4140,7 +4140,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry case LayoutNavEntry::Classes: if (annotatedClasses>0 && addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,"annotated",0); Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } diff --git a/src/index.h b/src/index.h index 6805655..150d23f 100644 --- a/src/index.h +++ b/src/index.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/language.cpp b/src/language.cpp index 3b57de1..7457676 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/language.h b/src/language.h index 4780ab3..7c8eef9 100644 --- a/src/language.h +++ b/src/language.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 4cba261..37c2130 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -932,7 +932,7 @@ void LatexDocVisitor::visitPost(DocHtmlTable *t) void LatexDocVisitor::visitPre(DocHtmlCaption *c) { if (m_hide) return; - m_t << "\\end{" << getTableName(c->parent()) << "}\n\\centering\n\\caption{"; + m_t << "\\end{" << getTableName(c->parent()->parent()) << "}\n\\centering\n\\caption{"; } void LatexDocVisitor::visitPost(DocHtmlCaption *) @@ -1578,22 +1578,11 @@ void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const Q { if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) // internal PDF link { - if (ref.isEmpty()) { - m_t << "\\hyperlink{"; - if (!file.isEmpty()) m_t << stripPath(file); - if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_"; - if (!anchor.isEmpty()) m_t << anchor; - m_t << "}{"; - } - else - { - QCString *dest; - m_t << "\\href{"; - if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/"; - if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension; - if (!anchor.isEmpty()) m_t << "#" << anchor; - m_t << "}{"; - } + m_t << "\\hyperlink{"; + if (!file.isEmpty()) m_t << stripPath(file); + if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_"; + if (!anchor.isEmpty()) m_t << anchor; + m_t << "}{"; } else if (ref.isEmpty()) // internal non-PDF link { diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index 0391dcd..d3aeaea 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/latexgen.cpp b/src/latexgen.cpp index d4d8fae..042dd7c 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -421,7 +421,10 @@ static void writeDefaultHeaderPart1(FTextStream &t) const char *pkgName=extraPackages.first(); while (pkgName) { - t << "\\usepackage{" << pkgName << "}\n"; + if ((pkgName[0] == '[') || (pkgName[0] == '{')) + t << "\\usepackage" << pkgName << "\n"; + else + t << "\\usepackage{" << pkgName << "}\n"; pkgName=extraPackages.next(); } t << "\n"; @@ -535,14 +538,18 @@ static void writeDefaultFooter(FTextStream &t) Doxygen::citeDict->writeLatexBibliography(t); // Index + t << "% Index\n"; QCString unit; if (Config_getBool("COMPACT_LATEX")) + { unit = "section"; + } else + { unit = "chapter"; - t << "% Index\n" - "\\backmatter\n" - "\\newpage\n" + t << "\\backmatter\n"; + } + t << "\\newpage\n" "\\phantomsection\n" "\\clearemptydoublepage\n" "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n" @@ -1437,18 +1444,18 @@ void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor) void LatexGenerator::writeAnchor(const char *fName,const char *name) { //printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name); - t << "\\label{" << name << "}" << endl; + t << "\\label{" << stripPath(name) << "}" << endl; static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); if (usePDFLatex && pdfHyperlinks) { if (fName) { - t << "\\hypertarget{" << stripPath(fName) << "_" << name << "}{}" << endl; + t << "\\hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}{}" << endl; } else { - t << "\\hypertarget{" << name << "}{}" << endl; + t << "\\hypertarget{" << stripPath(name) << "}{}" << endl; } } } diff --git a/src/latexgen.h b/src/latexgen.h index 60c649a..ee67803 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/layout.cpp b/src/layout.cpp index c364886..75cb6b3 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/layout.h b/src/layout.h index d50bc7c..0b9ad9e 100644 --- a/src/layout.h +++ b/src/layout.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxycfg.pro.in b/src/libdoxycfg.pro.in index ab7c36c..2812cd2 100644 --- a/src/libdoxycfg.pro.in +++ b/src/libdoxycfg.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxycfg.t.in b/src/libdoxycfg.t.in index 89833f6..33dd0d4 100644 --- a/src/libdoxycfg.t.in +++ b/src/libdoxycfg.t.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 47e5673..f76d862 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxygen.t.in b/src/libdoxygen.t.in index 37bd4c1..a9195bc 100644 --- a/src/libdoxygen.t.in +++ b/src/libdoxygen.t.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/logos.cpp b/src/logos.cpp index 9a9e5db..e9e0905 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/logos.h b/src/logos.h index 083d772..95a8a39 100644 --- a/src/logos.h +++ b/src/logos.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/main.cpp b/src/main.cpp index b64f700..cfd38ce 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 1fe5409..0cc3959 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h index a5906d0..d248c87 100644 --- a/src/mandocvisitor.h +++ b/src/mandocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mangen.cpp b/src/mangen.cpp index dc02ccf..a88ac26 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -107,7 +107,6 @@ ManGenerator::~ManGenerator() void ManGenerator::init() { - QCString ext = getExtension(); QCString &manOutput = Config_getString("MAN_OUTPUT"); QDir d(manOutput); @@ -307,6 +306,7 @@ void ManGenerator::docify(const char *str) { switch(c) { + case '-': t << "\\-"; break; // see bug747780 case '.': t << "\\&."; break; // see bug652277 case '\\': t << "\\\\"; col++; break; case '\n': t << "\n"; col=0; break; diff --git a/src/mangen.h b/src/mangen.h index 98ef959..93111cf 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/markdown.cpp b/src/markdown.cpp index fdf1b0f..02d1416 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -56,7 +56,8 @@ #define isIdChar(i) \ ((data[i]>='a' && data[i]<='z') || \ (data[i]>='A' && data[i]<='Z') || \ - (data[i]>='0' && data[i]<='9')) \ + (data[i]>='0' && data[i]<='9') || \ + (((unsigned char)data[i])>=0x80)) // unicode characters // is character at position i in data allowed before an emphasis section #define isOpenEmphChar(i) \ @@ -132,7 +133,7 @@ static void convertStringFragment(QCString &result,const char *data,int size) { if (size<0) size=0; result.resize(size+1); - memcpy(result.data(),data,size); + memcpy(result.rawData(),data,size); result.at(size)='\0'; } @@ -810,7 +811,6 @@ static int processLink(GrowBuf &out,const char *data,int,int size) { return 0; } - static QRegExp re("^[@\\]ref "); if (isToc) // special case for [TOC] { if (g_current) g_current->stat=TRUE; @@ -1366,7 +1366,9 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent, int startTildes=0; while (i<size && data[i]==' ') indent++,i++; if (indent>=refIndent+4) return FALSE; // part of code block - while (i<size && data[i]=='~') startTildes++,i++; + char tildaChar='~'; + if (i<size && data[i]=='`') tildaChar='`'; + while (i<size && data[i]==tildaChar) startTildes++,i++; if (startTildes<3) return FALSE; // not enough tildes if (i<size && data[i]=='{') i++; // skip over optional { int startLang=i; @@ -1376,11 +1378,11 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent, start=i; while (i<size) { - if (data[i]=='~') + if (data[i]==tildaChar) { end=i-1; int endTildes=0; - while (i<size && data[i]=='~') endTildes++,i++; + while (i<size && data[i]==tildaChar) endTildes++,i++; while (i<size && data[i]==' ') i++; if (i==size || data[i]=='\n') { @@ -2316,7 +2318,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons // finally process the inline markup (links, emphasis and code spans) processInline(out,s,s.length()); out.addChar(0); - Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",input.data(),out.get()); + Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",qPrint(input),qPrint(out.get())); return out.get(); } diff --git a/src/markdown.h b/src/markdown.h index 5e35259..e2e3a74 100644 --- a/src/markdown.h +++ b/src/markdown.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/marshal.cpp b/src/marshal.cpp index 04f426d..af14978 100644 --- a/src/marshal.cpp +++ b/src/marshal.cpp @@ -456,7 +456,7 @@ QCString unmarshalQCString(StorageIntf *s) result.at(len)='\0'; if (len>0) { - s->read(result.data(),len); + s->read(result.rawData(),len); } //printf("unmarshalQCString: result=%s\n",result.data()); return result; diff --git a/src/marshal.h b/src/marshal.h index 0c61276..206ab04 100644 --- a/src/marshal.h +++ b/src/marshal.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 72f3e3c..23c171a 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1808,7 +1808,10 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.disableAllBut(OutputGenerator::Html); //ol.endEmphasis(); ol.docify(" "); - if (separateMemberPages || (m_impl->group!=0 && gd==0)) // forward link to the page or group + if (separateMemberPages || + (m_impl->group!=0 && gd==0) || + (m_impl->nspace!=0 && nd==0) + ) // forward link to the page or group or namespace { ol.startTextLink(getOutputFileBase(),anchor()); } @@ -2043,7 +2046,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const void MemberDef::_writeCallGraph(OutputList &ol) { // write call graph - if ((m_impl->hasCallGraph || Config_getBool("CALL_GRAPH")) + if (m_impl->hasCallGraph && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT") ) { @@ -2068,7 +2071,7 @@ void MemberDef::_writeCallGraph(OutputList &ol) void MemberDef::_writeCallerGraph(OutputList &ol) { - if ((m_impl->hasCallerGraph || Config_getBool("CALLER_GRAPH")) + if (m_impl->hasCallerGraph && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT") ) { @@ -2553,7 +2556,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, QCString cname = container->name(); QCString cfname = getOutputFileBase(); - QCString cfiname = container->getOutputFileBase(); // get member name QCString doxyName=name(); @@ -2589,6 +2591,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ldef=ldef.mid(2); } } + else if (isFunction()) + { + title+=argsString(); + } int i=0,l; static QRegExp r("@[0-9]+"); @@ -2989,13 +2995,13 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { if (!hasDocumentedParams()) { - warn_doc_error(docFile(),docLine(), + warn_doc_error(getDefFileName(),getDefLine(), "parameters of member %s are not (all) documented", qPrint(qualifiedName())); } if (!hasDocumentedReturnType() && isFunction() && hasDocumentation()) { - warn_doc_error(docFile(),docLine(), + warn_doc_error(getDefFileName(),getDefLine(), "return type of member %s is not documented", qPrint(qualifiedName())); } @@ -3204,7 +3210,13 @@ void MemberDef::warnIfUndocumented() if (cd) t="class", d=cd; else if (nd) - t="namespace", d=nd; + { + d=nd; + if (d->getLanguage() == SrcLangExt_Fortran) + t="module"; + else + t="namespace"; + } else if (gd) t="group", d=gd; else @@ -3222,7 +3234,7 @@ void MemberDef::warnIfUndocumented() !isReference() ) { - warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.", + warn_undoc(d->getDefFileName(),d->getDefLine(),"Member %s%s (%s) of %s %s is not documented.", qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),t,qPrint(d->name())); } } @@ -3331,7 +3343,7 @@ void MemberDef::setAnchor() QCString sigStr(33); MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig); //printf("memAnchor=%s\n",memAnchor.data()); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); m_impl->anc = "a"+sigStr; } diff --git a/src/memberdef.h b/src/memberdef.h index b68149f..93cd72d 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/membergroup.cpp b/src/membergroup.cpp index aa0a36e..4bf7721 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -312,7 +312,7 @@ QCString MemberGroup::anchor() const QCString locHeader = grpHeader; if (locHeader.isEmpty()) locHeader="[NOHEADER]"; MD5Buffer((const unsigned char *)locHeader.data(),locHeader.length(),md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); return "amgrp"+sigStr; } diff --git a/src/membergroup.h b/src/membergroup.h index daf8ccb..fa5520e 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 95726a0..64fe44a 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -409,7 +409,6 @@ void MemberList::writePlainDeclarations(OutputList &ol, { ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor()); } - ol.endMemberItem(); if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { DocRoot *rootNode = validatingParseDoc( @@ -437,6 +436,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, delete rootNode; } ol.endMemberDeclaration(md->anchor(),inheritId); + ol.endMemberItem(); } md->warnIfUndocumented(); break; @@ -968,6 +968,15 @@ void MemberList::writeTagFile(FTextStream &tagFile) if (md->getLanguage()!=SrcLangExt_VHDL) { md->writeTagFile(tagFile); + if (md->memberType()==MemberType_Enumeration && md->enumFieldList() && !md->isStrong()) + { + MemberListIterator vmli(*md->enumFieldList()); + MemberDef *vmd; + for ( ; (vmd=vmli.current()) ; ++vmli) + { + vmd->writeTagFile(tagFile); + } + } } else { diff --git a/src/memberlist.h b/src/memberlist.h index 4cccadc..c293d22 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/membername.cpp b/src/membername.cpp index a2f7296..a5248c3 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/membername.h b/src/membername.h index 7a2fdc5..143dca1 100644 --- a/src/membername.h +++ b/src/membername.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/message.cpp b/src/message.cpp index 4156720..8f89c11 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -151,7 +151,7 @@ static void format_warn(const char *file,int line,const char *text) static void do_warn(const char *tag, const char *file, int line, const char *prefix, const char *fmt, va_list args) { - if (!Config_getBool(tag)) return; // warning type disabled + if (tag && !Config_getBool(tag)) return; // warning type disabled const int bufSize = 40960; char text[bufSize]; int l=0; @@ -216,6 +216,14 @@ void err(const char *fmt, ...) va_end(args); } +extern void err_full(const char *file,int line,const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + do_warn(NULL, file, line, error_str, fmt, args); + va_end(args); +} + void printlex(int dbg, bool enter, const char *lexName, const char *fileName) { const char *enter_txt = "entering"; @@ -230,15 +238,15 @@ void printlex(int dbg, bool enter, const char *lexName, const char *fileName) if (dbg) { if (fileName) - fprintf(stderr,"--%s lexical analyzer: %s (for: %s)\n",enter_txt, lexName, fileName); + fprintf(stderr,"--%s lexical analyzer: %s (for: %s)\n",enter_txt, qPrint(lexName), qPrint(fileName)); else - fprintf(stderr,"--%s lexical analyzer: %s\n",enter_txt, lexName); + fprintf(stderr,"--%s lexical analyzer: %s\n",enter_txt, qPrint(lexName)); } else { if (fileName) - Debug::print(Debug::Lex,0,"%s lexical analyzer: %s (for: %s)\n",enter_txt_uc, lexName, fileName); + Debug::print(Debug::Lex,0,"%s lexical analyzer: %s (for: %s)\n",enter_txt_uc, qPrint(lexName), qPrint(fileName)); else - Debug::print(Debug::Lex,0,"%s lexical analyzer: %s\n",enter_txt_uc, lexName); + Debug::print(Debug::Lex,0,"%s lexical analyzer: %s\n",enter_txt_uc, qPrint(lexName)); } } diff --git a/src/message.h b/src/message.h index 481e8bf..3b1a294 100644 --- a/src/message.h +++ b/src/message.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -29,6 +29,7 @@ extern void warn_undoc(const char *file,int line,const char *fmt, ...); extern void warn_doc_error(const char *file,int line,const char *fmt, ...); extern void warn_uncond(const char *fmt, ...); extern void err(const char *fmt, ...); +extern void err_full(const char *file,int line,const char *fmt, ...); void initWarningFormat(); extern void printlex(int dbg, bool enter, const char *lexName, const char *fileName); diff --git a/src/msc.cpp b/src/msc.cpp index f9e919c..7f3c641 100644 --- a/src/msc.cpp +++ b/src/msc.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -169,7 +169,6 @@ QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir, QCString mscExe = Config_getString("MSCGEN_PATH")+"mscgen"+portable_commandExtension(); QCString mscArgs = "-T ismap -i \""; mscArgs+=inFile; - QFileInfo fi(inFile); mscArgs+="\" -o \""; mscArgs+=outFile + "\""; @@ -201,7 +200,6 @@ void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile, ) { QCString mapName = baseName+".map"; - QCString mapFile = inFile+".map"; t << "<img src=\"" << relPath << baseName << "."; switch (format) { @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index f7c8123..d08e735 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1136,7 +1136,7 @@ QCString NamespaceDef::title() const { SrcLangExt lang = getLanguage(); QCString pageTitle; - if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp) + if (lang==SrcLangExt_Java) { pageTitle = theTranslator->trPackage(displayName()); } @@ -1160,10 +1160,14 @@ QCString NamespaceDef::title() const QCString NamespaceDef::compoundTypeString() const { SrcLangExt lang = getLanguage(); - if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp) + if (lang==SrcLangExt_Java) { return "package"; } + else if(lang==SrcLangExt_CSharp) + { + return "namespace"; + } else if (lang==SrcLangExt_Fortran) { return "module"; @@ -1184,7 +1188,7 @@ QCString NamespaceDef::compoundTypeString() const } else { - err("Internal inconsistency: namespace in IDL not module, library or constant group\n"); + err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group"); } } return ""; diff --git a/src/namespacedef.h b/src/namespacedef.h index 800f639..2d23d23 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/objcache.cpp b/src/objcache.cpp index a59c67b..a5180d6 100644 --- a/src/objcache.cpp +++ b/src/objcache.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/objcache.h b/src/objcache.h index 6e6e95d..224b34b 100644 --- a/src/objcache.h +++ b/src/objcache.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputgen.cpp b/src/outputgen.cpp index ee9bc48..31f682e 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputgen.h b/src/outputgen.h index aaf1ba7..c3099df 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 754ee7c..79330d8 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputlist.h b/src/outputlist.h index f578d64..4abb100 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 919a2d7..18a8205 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pagedef.h b/src/pagedef.h index 694d081..c3e54a3 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/parserintf.h b/src/parserintf.h index 989fdcf..cc95ea4 100644 --- a/src/parserintf.h +++ b/src/parserintf.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index c636cdf..6f9eb64 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * Authors: Dimitri van Heesch, Miguel Lobo. * * Permission to use, copy, modify, and distribute this software and its @@ -1371,7 +1371,6 @@ void PerlModDocVisitor::visitPost(DocParBlock *) static void addTemplateArgumentList(ArgumentList *al,PerlModOutput &output,const char *) { - QCString indentStr; if (!al) return; output.openList("template_parameters"); diff --git a/src/perlmodgen.h b/src/perlmodgen.h index f908959..92bb791 100644 --- a/src/perlmodgen.h +++ b/src/perlmodgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/plantuml.cpp b/src/plantuml.cpp index 87e70e1..e3a85e4 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -43,7 +43,7 @@ QCString writePlantUMLSource(const QCString &outDir,const QCString &fileName,con { err("Could not open file %s for writing\n",baseName.data()); } - QCString text = "@startuml\n"; + QCString text = "@startuml"; text+=content; text+="@enduml\n"; file.writeBlock( text, text.length() ); diff --git a/src/plantuml.h b/src/plantuml.h index 27626d1..54ab8a2 100644 --- a/src/plantuml.h +++ b/src/plantuml.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/portable.cpp b/src/portable.cpp index 7f6be6e..5886793 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -45,7 +45,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole) fullCmd += " "; fullCmd += args; #ifndef NODEBUG - Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",fullCmd.data()); + Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",qPrint(fullCmd)); #endif #if !defined(_WIN32) || defined(__CYGWIN__) @@ -194,7 +194,10 @@ uint portable_pid() return pid; } -static char **last_environ; +#if defined(_WIN32) && !defined(__CYGWIN__) +#else + static char **last_environ; +#endif void portable_setenv(const char *name,const char *value) { @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1618,11 +1618,11 @@ static void readIncludeFile(const QCString &inc) { if (alreadyIncluded) { - Debug::print(Debug::Preprocessor,0,"#include %s: already included! skipping...\n",incFileName.data()); + Debug::print(Debug::Preprocessor,0,"#include %s: already included! skipping...\n",qPrint(incFileName)); } else { - Debug::print(Debug::Preprocessor,0,"#include %s: not found! skipping...\n",incFileName.data()); + Debug::print(Debug::Preprocessor,0,"#include %s: not found! skipping...\n",qPrint(incFileName)); } //printf("error: include file %s not found\n",yytext); } @@ -2452,7 +2452,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") { outputArray(yytext,(int)yyleng); } -<SkipCComment>"~~~"[~]* { +<SkipCComment>^({B}*"*"+)?{B}{0,3}"~~~"[~]* { + static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT"); + if (!markdownSupport) + { + REJECT; + } + else + { + outputArray(yytext,(int)yyleng); + g_fenceSize=yyleng; + BEGIN(SkipVerbatim); + } + } +<SkipCComment>^({B}*"*"+)?{B}{0,3}"```"[`]* { static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT"); if (!markdownSupport) { @@ -2599,7 +2612,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(SkipCComment); } } -<SkipVerbatim>"~~~"[~]* { +<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"~~~"[~]* { + outputArray(yytext,(int)yyleng); + if (g_fenceSize==yyleng) + { + BEGIN(SkipCComment); + } + } +<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"```"[`]* { outputArray(yytext,(int)yyleng); if (g_fenceSize==yyleng) { @@ -2609,7 +2629,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <SkipVerbatim>"*/"|"/*" { outputArray(yytext,(int)yyleng); } -<SkipCComment,SkipVerbatim>[^*\\@\x06~\n\/]+ { +<SkipCComment,SkipVerbatim>[^*\\@\x06~`\n\/]+ { outputArray(yytext,(int)yyleng); } <SkipCComment,SkipVerbatim>\n { @@ -3179,7 +3199,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) Define *def; for (di.toFirst();(def=di.current());++di) { - Debug::print(Debug::Preprocessor,0,"%s ",def->name.data()); + Debug::print(Debug::Preprocessor,0,"%s ",qPrint(def->name)); } Debug::print(Debug::Preprocessor,0,"\n---------\n"); } diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index 43b6bde..95e7e47 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -189,7 +189,7 @@ class PrintDocVisitor : public DocVisitor void visit(DocFormula *f) { indent_leaf(); - printf("<formula name=%s test=%s/>",f->name().data(),f->text().data()); + printf("<formula name=%s text=%s/>",f->name().data(),f->text().data()); } void visit(DocIndexEntry *i) { diff --git a/src/pycode.h b/src/pycode.h index 9b0dacb..9817c39 100644 --- a/src/pycode.h +++ b/src/pycode.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pycode.l b/src/pycode.l index 585b587..306acab 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -79,7 +79,6 @@ static int g_paramParens; static bool g_exampleBlock; static QCString g_exampleName; -static QCString g_exampleFile; static QCString g_type; static QCString g_name; diff --git a/src/pyscanner.h b/src/pyscanner.h index e4e974f..affa7ca 100644 --- a/src/pyscanner.h +++ b/src/pyscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pyscanner.l b/src/pyscanner.l index 1ac7b7a..775b0a4 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -83,7 +83,6 @@ static Specifier virt; static int docBlockContext; static QCString docBlock; -static QCString docBlockName; static bool docBlockInBody; static bool docBlockJavaStyle; static bool docBrief; @@ -97,7 +96,6 @@ static int g_indent = 0; static int g_curIndent = 0; static QDict<QCString> g_packageNameCache(257); -static QCString g_packageScope; static char g_atomStart; static char g_atomEnd; @@ -931,7 +929,6 @@ STARTDOCSYMS "##" "=" { // default value // TODO: this rule is too simple, need to be able to // match things like =")" as well! - QCString defVal=&yytext[1]; g_defVal.resize(0); g_braceCount=0; BEGIN(FunctionParamDefVal); @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/reflist.cpp b/src/reflist.cpp index 3cc7694..8b41caa 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/reflist.h b/src/reflist.h index 5b647ea..0d40e80 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/res2cc_cmd.py b/src/res2cc_cmd.py index 772ac84..7e0322d 100755 --- a/src/res2cc_cmd.py +++ b/src/res2cc_cmd.py @@ -3,7 +3,7 @@ # offers an initResources() function, which registers the resources with the resource # manager (class ResourceMgr) # -# Copyright (C) 1997-2014 by Dimitri van Heesch. +# Copyright (C) 1997-2015 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp index a15a702..80bd2ad 100644 --- a/src/resourcemgr.cpp +++ b/src/resourcemgr.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -132,7 +132,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch if (f.open(IO_WriteOnly)) { QCString buf(res->size+1); - memcpy(buf.data(),res->data,res->size); + memcpy(buf.rawData(),res->data,res->size); FTextStream t(&f); buf = replaceColorMarkers(buf); if (qstrcmp(name,"navtree.css")==0) @@ -172,7 +172,7 @@ QCString ResourceMgr::getAsString(const char *name) const if (res) { QCString result(res->size+1); - memcpy(result.data(),res->data,res->size); + memcpy(result.rawData(),res->data,res->size); return result; } else diff --git a/src/resourcemgr.h b/src/resourcemgr.h index 6347e70..220202c 100644 --- a/src/resourcemgr.h +++ b/src/resourcemgr.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index a11e42f..2ea35cc 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1414,6 +1414,11 @@ void RTFDocVisitor::visitPre(DocXRefItem *x) if (x->title().isEmpty()) return; bool anonymousEnum = x->file()=="@"; DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n"); + if (!m_lastIsPara) + { + m_t << "\\par" << endl; + m_lastIsPara=TRUE; + } m_t << "{"; // start param list //m_t << "{\\b "; // start bold m_t << "{" << rtf_Style["Heading5"]->reference << endl; @@ -1671,7 +1676,8 @@ void RTFDocVisitor::writeDotFile(const QCString &fileName) m_t << "{" << endl; m_t << rtf_Style_Reset; m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - m_t << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + m_t << baseName << "." << imgExt; m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; m_t << "}" << endl; m_lastIsPara=TRUE; diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h index c50802d..0e759c1 100644 --- a/src/rtfdocvisitor.h +++ b/src/rtfdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 354469b..7baaa3c 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2015 by Parker Waechter & Dimitri van Heesch. * * Style sheet additions by Alexander Bartolich * @@ -95,7 +95,7 @@ RTFGenerator::~RTFGenerator() void RTFGenerator::writeStyleSheetFile(QFile &file) { - QTextStream t(&file); + FTextStream t(&file); t << "# Generated by doxygen " << versionString << "\n\n"; t << "# This file describes styles used for generating RTF output.\n"; t << "# All text after a hash (#) is considered a comment and will be ignored.\n"; @@ -112,7 +112,7 @@ void RTFGenerator::writeStyleSheetFile(QFile &file) void RTFGenerator::writeExtensionsFile(QFile &file) { - QTextStream t(&file); + FTextStream t(&file); t << "# Generated by doxygen " << versionString << "\n\n"; t << "# This file describes extensions used for generating RTF output.\n"; t << "# All text after a hash (#) is considered a comment and will be ignored.\n"; @@ -2362,19 +2362,24 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl // this is EXTREEEEEEEMLY brittle. It works on OUR rtf // files because the first line before the body // ALWAYS contains "{\comment begin body}" + int len; do { - if (f.readLine(lineBuf.data(),maxLineLength)==-1) + lineBuf.resize(maxLineLength); + if ((len=f.readLine(lineBuf.rawData(),maxLineLength))==-1) { err("read error in %s before end of RTF header!\n",infName.data()); return FALSE; } + lineBuf.resize(len+1); if (bIncludeHeader) encodeForOutput(t,lineBuf.data()); } while (lineBuf.find("\\comment begin body")==-1); - while (f.readLine(lineBuf.data(),maxLineLength)!=-1) + lineBuf.resize(maxLineLength); + while ((len=f.readLine(lineBuf.rawData(),maxLineLength))!=-1) { + lineBuf.resize(len+1); int pos; if ((pos=lineBuf.find("INCLUDETEXT"))!=-1) { @@ -2406,6 +2411,7 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl encodeForOutput(t,lineBuf); } } + lineBuf.resize(maxLineLength); } f.close(); // remove temporary file @@ -2429,7 +2435,8 @@ void RTFGenerator::endDotGraph(const DotClassGraph &g) t << "{" << endl; t << rtf_Style_Reset << endl; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + t << fn << "." << imgExt; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; newParagraph(); @@ -2452,7 +2459,8 @@ void RTFGenerator::endInclDepGraph(const DotInclDepGraph &g) t << "{" << endl; t << rtf_Style_Reset << endl; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + t << fn << "." << imgExt; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl) @@ -2482,7 +2490,8 @@ void RTFGenerator::endCallGraph(const DotCallGraph &g) t << "{" << endl; t << rtf_Style_Reset << endl; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + t << fn << "." << imgExt; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endCallGraph)}" << endl) @@ -2504,7 +2513,8 @@ void RTFGenerator::endDirDepGraph(const DotDirDeps &g) t << "{" << endl; t << rtf_Style_Reset << endl; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = getDotImageExtension(); + t << fn << "." << imgExt; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endDirDepGraph)}" << endl) diff --git a/src/rtfgen.h b/src/rtfgen.h index 2617ee6..f0f1f6e 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2015 by Parker Waechter & Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfstyle.cpp b/src/rtfstyle.cpp index f44951a..1ea8868 100644 --- a/src/rtfstyle.cpp +++ b/src/rtfstyle.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfstyle.h b/src/rtfstyle.h index ae7e456..60f671f 100644 --- a/src/rtfstyle.h +++ b/src/rtfstyle.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/scanner.h b/src/scanner.h index 8c8c3d9..ac574e2 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/scanner.l b/src/scanner.l index d012b93..9529c34 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -83,7 +83,6 @@ static int roundCount = 0 ; static int curlyCount = 0 ; static int squareCount = 0 ; static int padCount = 0 ; -static QCString slString; static Entry* current_root = 0 ; static Entry* global_root = 0 ; static Entry* current = 0 ; @@ -114,7 +113,6 @@ static QCString aliasName; static QCString baseName; static QCString* specName; static QCString formulaText; -static QCString formulaEnd; static bool useOverrideCommands = FALSE; static SrcLangExt language; @@ -162,13 +160,7 @@ static bool needsSemi; //static int depthIf; static int initBracketCount; -static QCString memberGroupRelates; -static QCString memberGroupInside; -static QCString xrefItemKey; -static QCString xrefItemTitle; -static QCString xrefListTitle; -static QCString g_skipBlockName; static QCString oldStyleArgType; static QCString docBackup; static QCString briefBackup; @@ -182,6 +174,7 @@ static char docBlockTerm; static QCString idlAttr; static QCString idlProp; +static bool odlProp; static bool g_lexInit = FALSE; static bool externC; @@ -675,6 +668,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) %x SkipString %x SkipPHPString %x SkipInits +%x SkipC11Inits %x SkipCPP %x SkipCPPBlock %x SkipComment @@ -1824,7 +1818,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <FindMembers>{B}*{TYPEDEFPREFIX}{IDLATTR}?"enum"({BN}+("class"|"struct"))?{BN}+ { // for IDL: typedef [something] enum QCString text=yytext; isTypedef = text.find("typedef")!=-1; - bool isStrongEnum = text.find("struct")!=-1 || text.find("class")!=-1; + bool isStrongEnum = text.find("struct")!=-1 || text.find("class")!=-1 || insideCS; if (insideJava) { current->section = Entry::CLASS_SEC; @@ -2811,7 +2805,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } <FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}".*|"/*"([!*]?){B}*{CMD}"}"[^*]*"*/" { - closeGroup(current,yyFileName,yyLineNr); + bool insideEnum = YY_START==FindFields || (YY_START==ReadInitializer && lastInitializerContext==FindFields); // see bug746226 + closeGroup(current,yyFileName,yyLineNr,insideEnum); } <FindMembers>"=" { // in PHP code this could also be due to "<?=" current->bodyLine = yyLineNr; @@ -3398,6 +3393,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) idlAttr.resize(0); idlProp.resize(0); current->mtype = mtype; + + if (Config_getBool("IDL_PROPERTY_SUPPORT") && + current->mtype == Property) + { // we are inside the properties section of a dispinterface + odlProp = true; + current->spec |= Entry::Gettable; + current->spec |= Entry::Settable; + } + BEGIN( IDLAttribute ); } else if (insideCS && @@ -3452,7 +3456,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) current->spec |= Entry::Optional; } <IDLAttribute>"readonly" { // on UNO IDL attribute or property - current->spec |= Entry::Readonly; + if (Config_getBool("IDL_PROPERTY_SUPPORT") && odlProp) + { + current->spec ^= Entry::Settable; + } + else + { + current->spec |= Entry::Readonly; + } } <IDLAttribute>"bound" { // on UNO IDL attribute or property current->spec |= Entry::Bound; @@ -3479,6 +3490,11 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } <IDLPropName>{BN}*{ID}{BN}* { // return type (probably HRESULT) - skip it + + if (odlProp) + { // property type + idlProp = yytext; + } } <IDLPropName>{ID}{BN}*"(" { current->name = yytext; @@ -3487,6 +3503,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) current->startColumn = yyColNr; BEGIN( IDLProp ); } +<IDLPropName>{BN}*"("{BN}*{ID}{BN}*")"{BN}* { + if (odlProp) + { + idlProp += yytext; + } + } +<IDLPropName>{ID}{BN}*/";" { + if (odlProp) + { + current->name = yytext; + idlProp = idlProp.stripWhiteSpace(); + odlProp = false; + + BEGIN( IDLProp ); + } + } <IDLProp>{BN}*"["[^\]]*"]"{BN}* { // attribute of a parameter idlAttr = yytext; idlAttr=idlAttr.stripWhiteSpace(); @@ -3562,6 +3594,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) sharpCount++; } <Sharp>{BN}+ { + current->type += ' '; lineCount(); } <Sharp>. { current->type += *yytext ; } @@ -4977,8 +5010,18 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } <SkipInits>{ID}{BN}*"{" { // C++11 style initializer (see bug 688647) lineCount(); + curlyCount=1; + BEGIN(SkipC11Inits); + } +<SkipC11Inits>"{" { ++curlyCount; } +<SkipC11Inits>"}" { + if ( --curlyCount<=0 ) + { + BEGIN(SkipInits); + } + } <SkipInits>"{" { // C++11 style initializer unput('{'); BEGIN( Function ); @@ -5082,7 +5125,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) //addToBody(yytext); BEGIN( SkipCurlyCpp ); } -<SkipCurly,SkipInits>\n { +<SkipCurly,SkipC11Inits,SkipInits>\n { lineCount(); //addToBody(yytext); } @@ -5111,22 +5154,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) //addToBody(yytext); lineCount(); } -<SkipInits,SkipCurly,SkipCurlyCpp>"/*" { +<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp>"/*" { //addToBody(yytext); lastCContext = YY_START; BEGIN(SkipComment); } -<SkipInits,SkipCurly,SkipCurlyCpp>"//" { +<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp>"//" { //addToBody(yytext); lastCContext = YY_START; BEGIN(SkipCxxComment); } -<SkipInits>"(" { +<SkipInits,SkipC11Inits>"(" { roundCount=0; lastSkipRoundContext=YY_START; BEGIN(SkipRound); } -<SkipInits>\" { +<SkipInits,SkipC11Inits>\" { lastStringContext=YY_START; BEGIN( SkipString ); } @@ -5161,7 +5204,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(SkipPHPString); } } -<SkipInits,SkipCurly,SkipCurlyCpp>. { } +<SkipInits,SkipC11Inits,SkipCurly,SkipCurlyCpp>. { } <SkipString,SkipPHPString>\\. { } <SkipString>\" { BEGIN( lastStringContext ); @@ -5950,7 +5993,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } <Comment>. { current->program += *yytext ; } -<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>("//"{B}*)?"/*!" { +<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,Bases,OldStyleArgs>("//"{B}*)?"/*!" { //printf("Start doc block at %d\n",yyLineNr); removeSlashes=(yytext[1]=='/'); tmpDocType=-1; @@ -6222,13 +6265,20 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) g_nestedComment=FALSE; BEGIN(DocCopyBlock); } -<DocBlock>"~~~"[~]* { +<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* { docBlock+=yytext; docBlockName="~~~"; g_fencedSize=yyleng; g_nestedComment=FALSE; BEGIN(DocCopyBlock); } +<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* { + docBlock+=yytext; + docBlockName="```"; + g_fencedSize=yyleng; + g_nestedComment=FALSE; + BEGIN(DocCopyBlock); + } <DocBlock>{B}*"<code>" { if (insideCS) { @@ -6340,7 +6390,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) REJECT; } } -<DocCopyBlock>"~~~"[~]* { +<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* { + docBlock+=yytext; + if (g_fencedSize==yyleng) + { + BEGIN(DocBlock); + } + } +<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* { docBlock+=yytext; if (g_fencedSize==yyleng) { diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 22727fe..ee545bf 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -310,7 +310,6 @@ void SearchIndex::write(const char *fileName) padding = size - padding; //int statsOffset = size; - QDictIterator<IndexWord> wdi(m_words); //IndexWord *iw; int *wordStatOffsets = new int[m_words.count()]; @@ -1077,7 +1076,6 @@ void writeJavascriptSearchIndex() for (li.toFirst();(dl=li.current());++li) { Definition *d = dl->getFirst(); - QCString id = d->localName(); if (!firstEntry) { diff --git a/src/searchindex.h b/src/searchindex.h index 17d39a2..b9f45c6 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/section.h b/src/section.h index a1f859e..51668a2 100644 --- a/src/section.h +++ b/src/section.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/sortdict.h b/src/sortdict.h index f79a335..f4d23f2 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index 42a0307..40d744a 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -754,7 +754,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def) bindIntParameter(memberdef_insert,":new",md->isNew()); bindIntParameter(memberdef_insert,":optional",md->isOptional()); bindIntParameter(memberdef_insert,":required",md->isRequired()); - + bindIntParameter(memberdef_insert,":virt",md->virtualness()); } // place in the arguments and linkify the arguments @@ -1027,9 +1027,16 @@ static void generateSqlite3ForClass(sqlite3 *db, ClassDef *cd) BaseClassDef *bcd; for (bcli.toFirst();(bcd=bcli.current());++bcli) { - bindTextParameter(derivedcompoundref_insert,":base",cd->displayName()); - bindTextParameter(derivedcompoundref_insert,":dervied",bcd->classDef->displayName()); - bindTextParameter(derivedcompoundref_insert,":refid",bcd->classDef->getOutputFileBase()); + bindTextParameter(derivedcompoundref_insert,":base",cd->displayName(),FALSE); + if (!bcd->templSpecifiers.isEmpty()) + { + bindTextParameter(derivedcompoundref_insert,":derived",insertTemplateSpecifierInScope(bcd->classDef->name(),bcd->templSpecifiers),FALSE); + } + else + { + bindTextParameter(derivedcompoundref_insert,":derived",bcd->classDef->displayName(),FALSE); + } + bindTextParameter(derivedcompoundref_insert,":refid",bcd->classDef->getOutputFileBase(),FALSE); bindIntParameter(derivedcompoundref_insert,":prot",bcd->prot); bindIntParameter(derivedcompoundref_insert,":virt",bcd->virt); step(db,derivedcompoundref_insert); diff --git a/src/sqlite3gen.h b/src/sqlite3gen.h index 59664dd..6396d3a 100644 --- a/src/sqlite3gen.h +++ b/src/sqlite3gen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/store.cpp b/src/store.cpp index 8d9a0cd..c09dcfb 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/store.h b/src/store.h index 597ea63..39917df 100644 --- a/src/store.h +++ b/src/store.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tagreader.cpp b/src/tagreader.cpp index be0472a..290399a 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tagreader.h b/src/tagreader.h index 1b5f7e3..6ea2d81 100644 --- a/src/tagreader.h +++ b/src/tagreader.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tclscanner.h b/src/tclscanner.h index baa8e84..aa1673c 100644 --- a/src/tclscanner.h +++ b/src/tclscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * Copyright (C) 2010-2011 by Rene Zaumseil * * Permission to use, copy, modify, and distribute this software and its diff --git a/src/tclscanner.l b/src/tclscanner.l index f162637..7befd40 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -657,7 +657,7 @@ static void tcl_font_end() } //! Codify 'str' with special font class 's'. -static void tcl_codify(const char *s,char *str) +static void tcl_codify(const char *s,const char *str) { if (!tcl.code || !str) return; if (s && qstrcmp(s,"NULL")!=0) @@ -666,7 +666,9 @@ static void tcl_codify(const char *s,char *str) tcl.code->startFontClass(s); tcl.code_font=s; } - char *p=str,*sp=p; + char *tmp = (char *) malloc(strlen(str)+1); + strcpy(tmp, str); + char *p=tmp,*sp=p; char c; bool done=FALSE; while (!done) @@ -676,7 +678,10 @@ static void tcl_codify(const char *s,char *str) if (c=='\n') { tcl.code_line++; - *(p-1)='\0'; + *(p-1)='\0'; // Dimitri: is this really needed? + // wtschueller: As far as I can see: yes. + // Deletes that \n that would produce ugly source listings otherwise. + // However, there may exist more sophisticated solutions. tcl.code->codify(sp); if (tcl.code_font) { @@ -699,6 +704,7 @@ static void tcl_codify(const char *s,char *str) done=TRUE; } } + free(tmp); tcl_font_end(); } @@ -719,7 +725,6 @@ static void tcl_codify(const char *s,const QString &str) if (tcl.code==NULL) return; tcl_codify(s,str.utf8()); } -#endif //! Codify 'str' with special font class 's'. static void tcl_codify(const char *s,const QCString &str) @@ -727,6 +732,7 @@ static void tcl_codify(const char *s,const QCString &str) if (!tcl.code) return; tcl_codify(s,str.data()); } +#endif static void tcl_codify_cmd(const char *s,int i) { @@ -1123,7 +1129,6 @@ D static tcl_scan *tcl_scan_start(char type, QString content, QCString ns, Entry *entry_cl, Entry *entry_fn) { tcl_scan *myScan=tcl.scan.at(0); - QCString myName; tcl_inf("line=%d type=%d '%s'\n",tcl.line_body0,type,content.ascii()); myScan->line1=yylineno; @@ -2298,7 +2303,7 @@ D static void tcl_command_ITCL_CLASS() { D - QCString myNs, myName, myStr; + QCString myNs, myName; Entry *myEntryCl; tcl_scan *myScan = tcl.scan.at(0); @@ -2327,7 +2332,7 @@ D static void tcl_command_OO_CLASS() { D - QCString myNs, myName, myStr; + QCString myNs, myName; //Entry *myEntryNs; Entry *myEntryCl; tcl_scan *myScan = tcl.scan.at(0); diff --git a/src/template.cpp b/src/template.cpp index 9fa03aa..4250f08 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2998,7 +2998,6 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange> { c->push(); //int index = m_reversed ? list.count() : 0; - TemplateVariant v; const TemplateVariant *parentLoop = c->getRef("forloop"); uint index = 0; int i = m_down ? e : s; @@ -4395,7 +4394,7 @@ TemplateLexer::TemplateLexer(const TemplateEngine *engine,const QCString &fileNa m_engine(engine), m_fileName(fileName) { m_data.resize(size+1); - memcpy(m_data.data(),data,size); + memcpy(m_data.rawData(),data,size); m_data[size]=0; } @@ -4602,7 +4601,7 @@ void TemplateLexer::addToken(QList<TemplateToken> &tokens, { int len = endPos-startPos+1; QCString text(len); - qstrncpy(text.data(),data+startPos,len); + qstrncpy(text.rawData(),data+startPos,len); if (type!=TemplateToken::Text) text = text.stripWhiteSpace(); tokens.append(new TemplateToken(type,text,line)); } diff --git a/src/template.h b/src/template.h index ef9792c..c6c918c 100644 --- a/src/template.h +++ b/src/template.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp index 6f3151f..8c8ecad 100644 --- a/src/textdocvisitor.cpp +++ b/src/textdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h index b17065d..1bbc357 100644 --- a/src/textdocvisitor.h +++ b/src/textdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tooltip.cpp b/src/tooltip.cpp index 8085bff..957c661 100644 --- a/src/tooltip.cpp +++ b/src/tooltip.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -59,7 +59,7 @@ void TooltipManager::clearTooltips() static QCString escapeId(const char *s) { QCString res=s; - char *p=res.data(); + char *p=res.rawData(); while (*p) { if (!isId(*p)) *p='_'; diff --git a/src/tooltip.h b/src/tooltip.h index ea8948d..34a578a 100644 --- a/src/tooltip.h +++ b/src/tooltip.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator.h b/src/translator.h index 32eaf09..7092174 100644 --- a/src/translator.h +++ b/src/translator.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_am.h b/src/translator_am.h index 9eaba0e..b50aec2 100644 --- a/src/translator_am.h +++ b/src/translator_am.h @@ -2,7 +2,7 @@ *
*
*
- * Copyright (C) 1997-2014 by Dimitri van Heesch.
+ * Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -994,7 +994,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0 "};\n"
"\\endcode\n"
"Սրանով կստանանք հետևյալ գրաֆը."
- "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n"
+ "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n"
"<p>\n"
"Այս գրաֆի ուղղանկյունները ունեն հետևյալ իմաստը.\n"
"<ul>\n"
diff --git a/src/translator_ar.h b/src/translator_ar.h index 5d37b69..5daaa4c 100644 --- a/src/translator_ar.h +++ b/src/translator_ar.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1044,14 +1044,14 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6 "\\endcode\n" "If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " "is set to 240 this will result in the following graph:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "The boxes in the above graph have the following meaning:\n" "<ul>\n" "<li>%A filled black box represents the struct or class for which the " "graph is generated.\n" "<li>%A box with a black border denotes a documented struct or class.\n" - "<li>%A box with a grey border denotes an undocumented struct or class.\n" + "<li>%A box with a gray border denotes an undocumented struct or class.\n" "<li>%A box with a red border denotes a documented struct or class for" "which not all inheritance/containment relations are shown. %A graph is " "truncated if it does not fit within the specified boundaries.\n" diff --git a/src/translator_br.h b/src/translator_br.h index b7bd604..6a7966f 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1007,7 +1007,7 @@ class TranslatorBrazilian : public Translator "};\n" "\\endcode\n" "Isto irá gerar o seguinte gráfo:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "As caixas no grafo acima tem as seguintes interpretações:\n" "<ul>\n" diff --git a/src/translator_ca.h b/src/translator_ca.h index 5c3e595..d4aca52 100644 --- a/src/translator_ca.h +++ b/src/translator_ca.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1019,7 +1019,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0 "};\n" "\\endcode\n" "Resultarà el gràfic següent:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Les caixes del gràfic superior tenen aquesta interpretació:\n" "<ul>\n" diff --git a/src/translator_cn.h b/src/translator_cn.h index fc01ce0..4d60e87 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -910,7 +910,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_2 "};\n" "\\endcode\n" "结果将会生成以下图:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "上图中的矩形有如下意义:\n" "</p>\n" diff --git a/src/translator_cz.h b/src/translator_cz.h index b83eb92..2ddc029 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1070,7 +1070,7 @@ class TranslatorCzech : public Translator "};\n" "\\endcode\n" "K výše uvedenému bude vygenerován následující graf:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Bloky (tj. uzly) v uvedeném grafu mají následující význam:\n" "<ul>\n" diff --git a/src/translator_de.h b/src/translator_de.h index d936bf1..f2ca676 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1116,7 +1116,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4 "};\n" "\\endcode\n" "Dies liefert den folgenden Graphen:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "Die Rechtecke in obigem Graphen bedeuten:\n" "</p>\n" diff --git a/src/translator_dk.h b/src/translator_dk.h index 74b07f4..9ea5b28 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -993,7 +993,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0 "\\endcode\n" "Hvis \\c MAX_DOT_GRAPH_HEIGHT i konfigurationsfilen " "er sat til 240, vil dette resultere i følgende graf:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "De forskellige slags kasser i ovenstående graf har følgende " "betydninger:\n" diff --git a/src/translator_en.h b/src/translator_en.h index 5937ed3..ba89726 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1014,7 +1014,7 @@ class TranslatorEnglish : public Translator "};\n" "\\endcode\n" "This will result in the following graph:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "The boxes in the above graph have the following meaning:\n" "</p>\n" @@ -1022,7 +1022,7 @@ class TranslatorEnglish : public Translator "<li>%A filled gray box represents the struct or class for which the " "graph is generated.</li>\n" "<li>%A box with a black border denotes a documented struct or class.</li>\n" - "<li>%A box with a grey border denotes an undocumented struct or class.</li>\n" + "<li>%A box with a gray border denotes an undocumented struct or class.</li>\n" "<li>%A box with a red border denotes a documented struct or class for" "which not all inheritance/containment relations are shown. %A graph is " "truncated if it does not fit within the specified boundaries.</li>\n" diff --git a/src/translator_eo.h b/src/translator_eo.h index e1513cb..65f7e82 100644 --- a/src/translator_eo.h +++ b/src/translator_eo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1017,7 +1017,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4 "};\n" "\\endcode\n" "Tio ĉi liveros la sekvan diagramon:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "La skatoloj de la supra diagramo havas la sekvajn signifojn:\n" "<ul>\n" diff --git a/src/translator_es.h b/src/translator_es.h index ba6e823..97d1d26 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1045,7 +1045,7 @@ class TranslatorSpanish : public Translator "};\n" "\\endcode\n" "Dará como resultado el siguiente gráfico:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "Las cajas en el gráfico arriba tienen el siguiente significado:\n" "</p>\n" diff --git a/src/translator_fa.h b/src/translator_fa.h index 7b6f9d7..7effafe 100644 --- a/src/translator_fa.h +++ b/src/translator_fa.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1015,14 +1015,14 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5 "\\endcode\n" "If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " "is set to 240 this will result in the following graph:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "The boxes in the above graph have the following meaning:\n" "<ul>\n" "<li>%A filled black box represents the struct or class for which the " "graph is generated.\n" "<li>%A box with a black border denotes a documented struct or class.\n" - "<li>%A box with a grey border denotes an undocumented struct or class.\n" + "<li>%A box with a gray border denotes an undocumented struct or class.\n" "<li>%A box with a red border denotes a documented struct or class for" "which not all inheritance/containment relations are shown. %A graph is " "truncated if it does not fit within the specified boundaries.\n" diff --git a/src/translator_fi.h b/src/translator_fi.h index eeeb9a5..8343cdd 100644 --- a/src/translator_fi.h +++ b/src/translator_fi.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1101,7 +1101,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0 "{\n" " private:\n" " Kaytetty *m_kaytettyLuokka;\n" - "}\n"; + "}\n" // "class Inherited : public PublicBase,\n" // " protected ProtectedBase,\n" // " private PrivateBase,\n" @@ -1114,7 +1114,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0 "\\endcode\n" "Tuloksena on seuraavanlainen kaavio:" //"This will result in the following graph:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Ylläolevassa kaaviossa laatikoilla on seuraavat merkitykset\n:" // "The boxes in the above graph have the following meaning:\n" diff --git a/src/translator_fr.h b/src/translator_fr.h index 2c548c2..e1fb5e6 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1077,7 +1077,7 @@ class TranslatorFrench : public Translator "};\n" "\\endcode\n" "Cela aboutira au graphe suivant :" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "Les rectangles du graphe ci-dessus ont la signification suivante :\n" "<ul>\n" @@ -2057,4 +2057,4 @@ class TranslatorFrench : public Translator }; -#endif
\ No newline at end of file +#endif diff --git a/src/translator_gr.h b/src/translator_gr.h index fa7a682..e264deb 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -987,7 +987,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_4 "};\n" "\\endcode\n" "Αυτό οδηγεί στο επόμενο διάγραμμα:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "Τα κουτιά στο παραπάνω διάγραμμα έχουν την ακόλουθη σημασία:\n" "</p>\n" diff --git a/src/translator_hr.h b/src/translator_hr.h index 98a746a..cfefa32 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -753,7 +753,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2 "};\n" "\\endcode\n" "To će rezultirati grafikonom:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Pravokutnici imaju slijedeće značenje:\n" "<ul>\n" diff --git a/src/translator_hu.h b/src/translator_hu.h index 610af8e..4bf3f71 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -997,7 +997,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6 "\\endcode\n" "Ha a konfigurációs fájl \\c MAX_DOT_GRAPH_HEIGHT elemének értékét " "240-re állítjuk, az eredmény a következő ábra lesz:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Az ábrán levő dobozok jelentése:\n" "<ul>\n" diff --git a/src/translator_id.h b/src/translator_id.h index 5647bc0..c5c58fa 100644 --- a/src/translator_id.h +++ b/src/translator_id.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1001,7 +1001,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0 "\\endcode\n" "Apabila tag \\c MAX_DOT_GRAPH_HEIGHT di file konfigurasi " "diset ke 240 kode di atas akan menghasilkan bagan berikut:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Kotak-kotak pada bagan di atas mempunyai arti sebagai berikut:\n" "<ul>\n" diff --git a/src/translator_it.h b/src/translator_it.h index 59799a3..c52aa50 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1028,7 +1028,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_2 "};\n" "\\endcode\n" "Verrà prodotto il grafo seguente:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "I riquadri nel grafo qui sopra hanno il seguente significato:\n" "</p>\n" diff --git a/src/translator_je.h b/src/translator_je.h index 4dbcb4e..835a516 100644 --- a/src/translator_je.h +++ b/src/translator_je.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_jp.h b/src/translator_jp.h index ae3605a..66f1ac6 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1037,7 +1037,7 @@ class TranslatorJapanese : public Translator "\\c MAX_DOT_GRAPH_" /* わざわざちょん切っているのは doc/translator.py の検出回避のため */ "HEIGHT タグに 200 を与えた設定ファイル" "を使うと、次のようなグラフとなります。" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "グラフ内の矩形は構造体やクラスを表しています。色の意味は次の通りです。\n" "<ul>\n" diff --git a/src/translator_ke.h b/src/translator_ke.h index 56a70b3..525cf84 100644 --- a/src/translator_ke.h +++ b/src/translator_ke.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_kr.h b/src/translator_kr.h index 18337a5..7d669a5 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1035,7 +1035,7 @@ class TranslatorKorean : public Translator "};\n" "\\endcode\n" "다음과 같은 그래프가 출력될 것입니다. :" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "위 그래프의 박스들은 다음과 같은 의미를 가집니다. :\n" "<ul>\n" diff --git a/src/translator_lt.h b/src/translator_lt.h index 174170e..faf4197 100644 --- a/src/translator_lt.h +++ b/src/translator_lt.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1006,14 +1006,14 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6 "\\endcode\n" "If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " "is set to 240 this will result in the following graph:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "The boxes in the above graph have the following meaning:\n" "<ul>\n" "<li>%A filled black box represents the struct or class for which the " "graph is generated.\n" "<li>%A box with a black border denotes a documented struct or class.\n" - "<li>%A box with a grey border denotes an undocumented struct or class.\n" + "<li>%A box with a gray border denotes an undocumented struct or class.\n" "<li>%A box with a red border denotes a documented struct or class for" "which not all inheritance/containment relations are shown. %A graph is " "truncated if it does not fit within the specified boundaries.\n" diff --git a/src/translator_lv.h b/src/translator_lv.h index 135cd11..20b2a38 100644 --- a/src/translator_lv.h +++ b/src/translator_lv.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1020,7 +1020,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4 "};\n" "\\endcode\n" "This will result in the following graph:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "The boxes in the above graph have the following meaning:\n" "</p>\n" @@ -1028,7 +1028,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4 "<li>%A filled gray box represents the struct or class for which the " "graph is generated.</li>\n" "<li>%A box with a black border denotes a documented struct or class.</li>\n" - "<li>%A box with a grey border denotes an undocumented struct or class.</li>\n" + "<li>%A box with a gray border denotes an undocumented struct or class.</li>\n" "<li>%A box with a red border denotes a documented struct or class for" "which not all inheritance/containment relations are shown. %A graph is " "truncated if it does not fit within the specified boundaries.</li>\n" diff --git a/src/translator_mk.h b/src/translator_mk.h index 510561e..d963dfc 100644 --- a/src/translator_mk.h +++ b/src/translator_mk.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1003,7 +1003,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0 "\\endcode\n" "Ако вредноста на \\c MAX_DOT_GRAPH_HEIGHT во конфигурациската датотека " "е 240 тогаш примерот ќе го создаде следниов дијаграм:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Правоаголниците во дијаграмот погоре го имаат следново значење:\n" "<ul>\n" diff --git a/src/translator_nl.h b/src/translator_nl.h index 2ffacb6..ab811a5 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -656,7 +656,7 @@ class TranslatorDutch : public Translator "};\n" "\\endcode\n" "Dit voorbeeld zal resulteren in de volgende graaf:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "De rechthoeken in the bovenstaande graaf hebben de volgende betekenis:\n" "<ul>\n" diff --git a/src/translator_no.h b/src/translator_no.h index 2662e47..40d3287 100644 --- a/src/translator_no.h +++ b/src/translator_no.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1048,7 +1048,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6 "\\endcode\n" "Hvis \\c MAX_DOT_GRAPH_HEIGHT er satt til 200 i " "konfigurasjonsfila vil dette resultere i følgende graf:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Boksene i grafen over betyr følgende:\n" "<ul>\n" diff --git a/src/translator_pl.h b/src/translator_pl.h index 6f2e14c..f1bec57 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1012,7 +1012,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2 "};\n" "\\endcode\n" "Rezultat na następującym wykresie:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "Prostokąty w powyższym wykresie mają następujące znaczenie:\n" "</p>\n" diff --git a/src/translator_pt.h b/src/translator_pt.h index 13422f6..5edfdf6 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1016,7 +1016,7 @@ class TranslatorPortuguese : public Translator "};\n" "\\endcode\n" "Isto irá gerar o seguinte gráfo:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "As caixas no grafo anterior têm as seguintes interpretações:\n" "<ul>\n" diff --git a/src/translator_ro.h b/src/translator_ro.h index ea0988d..394e570 100644 --- a/src/translator_ro.h +++ b/src/translator_ro.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1031,7 +1031,7 @@ class TranslatorRomanian : public Translator "\\endcode\n" "Dacă tagul \\c MAX_DOT_GRAPH_HEIGHT din fişierul de configurare " "este setat la 200, acesta este graful rezultat:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Căsuţele din partea de sus au următoarea semnificaţie:\n" "<ul>\n" diff --git a/src/translator_ru.h b/src/translator_ru.h index c06d911..c06027c 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1004,7 +1004,7 @@ class TranslatorRussian : public Translator "\\endcode\n" "Если \\c MAX_DOT_GRAPH_HEIGHT в конфигурационном файле " "установлен в 240, получится следующий граф:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Прямоугольники в этом графе имеют следующее значение:\n" "<ul>\n" diff --git a/src/translator_sc.h b/src/translator_sc.h index 84e8756..388af8c 100644 --- a/src/translator_sc.h +++ b/src/translator_sc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1033,7 +1033,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0 "\\endcode\n" "Ако је \\c MAX_DOT_GRAPH_HEIGHT таг у конфигурационој датотеци " "подешен на 240, то ће резултовати на следећи начин:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Правоугаоници имају следеће значење:\n" "<ul>\n" diff --git a/src/translator_si.h b/src/translator_si.h index 33bc27a..97a1931 100644 --- a/src/translator_si.h +++ b/src/translator_si.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -684,14 +684,14 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6 "\\endcode\n" "If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " "is set to 200 this will result in the following graph:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "The boxes in the above graph have the following meaning:\n" "<ul>\n" "<li>%A filled black box represents the struct or class for which the " "graph is generated.\n" "<li>%A box with a black border denotes a documented struct or class.\n" - "<li>%A box with a grey border denotes an undocumented struct or class.\n" + "<li>%A box with a gray border denotes an undocumented struct or class.\n" "<li>%A box with a red border denotes a documented struct or class for\n" "which not all inheritance/containment relations are shown. %A graph is " "truncated if it does not fit within the specified boundaries." diff --git a/src/translator_sk.h b/src/translator_sk.h index 0fc826b..875e92c 100644 --- a/src/translator_sk.h +++ b/src/translator_sk.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1004,7 +1004,7 @@ class TranslatorSlovak : public Translator "};\n" "\\endcode\n" "K vyššie uvedenému bude vygenerovaný nasledujúci graf:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Bloky (tj. uzly) v uvedenom grafe majú nasledujúci význam:\n" "<ul>\n" diff --git a/src/translator_sr.h b/src/translator_sr.h index 09b6534..05e8018 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1001,7 +1001,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0 "\\endcode\n" "Ako je \\c MAX_DOT_GRAPH_HEIGHT tag u konfiguracionoj datoteci " "postavljen na \\c 200 graf izvođenja će izgledati ovako:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "Graf će biti odsečen ako ne stane unutar zadatih granica.\n" "<p>\n" "Pravougaonici imaju sledeća značenja:\n" diff --git a/src/translator_sv.h b/src/translator_sv.h index f4d0a35..68b8a1b 100644 --- a/src/translator_sv.h +++ b/src/translator_sv.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -65,6 +65,8 @@ Problem! Deprecated: nån hygglig svensk översättning??? Skicka gärna synpunkter. +2015/01/09 +* Uppdaterat den till senaste versionen 1.8.9.1 */ #ifndef TRANSLATOR_SE_H @@ -491,8 +493,8 @@ class TranslatorSwedish : public Translator case ClassDef::Struct: result+=" strukt"; break; case ClassDef::Union: result+=" union"; break; case ClassDef::Interface: result+=" gränssnitt"; break; - case ClassDef::Protocol: result+=" protocol"; break; // translate me! - case ClassDef::Category: result+=" category"; break; // translate me! + case ClassDef::Protocol: result+=" protokoll"; break; + case ClassDef::Category: result+=" kategori"; break; case ClassDef::Exception: result+=" undantag"; break; default: break; } @@ -633,8 +635,8 @@ class TranslatorSwedish : public Translator case ClassDef::Struct: result+="denna strukt "; break; case ClassDef::Union: result+="denna union "; break; case ClassDef::Interface: result+="detta gränssnitt "; break; - case ClassDef::Protocol: result+="protocol"; break; // translate me! - case ClassDef::Category: result+="category"; break; // translate me! + case ClassDef::Protocol: result+="detta protokoll"; break; + case ClassDef::Category: result+="denna kategori"; break; case ClassDef::Exception: result+="detta undantag "; break; default: break; } @@ -877,9 +879,9 @@ class TranslatorSwedish : public Translator "genererar.<p>\n" "Tag följande exempel:\n" "\\code\n" - "/*! Osynlig klass på grund av stympning */\n" + "/*! Osynlig klass på grund av trunkering */\n" "class Invisible { };\n\n" - "/*! Stympad klass, ärvningsrelationen är dold */\n" + "/*! Trunkerad klass, ärvningsrelationen är dold */\n" "class Truncated : public Invisible { };\n\n" "/* Klass utan doxygen-kommentarer */\n" "class Undocumented { };\n\n" @@ -904,34 +906,33 @@ class TranslatorSwedish : public Translator " Used *m_usedClass;\n" "};\n" "\\endcode\n" - "Om \\c MAX_DOT_GRAPH_HEIGHT är satt till 240 i konfigurationsfilen, " - "kommer följande graf att generas:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "Detta resulterar i att följande graf genereras:" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "Rektanglarna i den ovanstående grafen har följande betydelser:\n" "<ul>\n" - "<li>%En fylld svart rektangel representerar den strukt eller klass " - "som har genererat grafen.\n" - "<li>%En rektangel med svart kant symboliserar en dokumenterad " - "strukt eller klass.\n" - "<li>%En rektangel med grå kant symboliserar en odokumenterad strukt " - "eller klass.\n" + "<li>%En fylld grå rektangel representerar den strukt eller klass " + "som har genererat grafen.</li>\n" + "<li>%En rektangel med svart kant symboliserar en dokumenterad strukt eller klass.</li>\n" + "<li>%En rektangel med grå kant symboliserar en odokumenterad strukt eller klass.</li>\n" "<li>%En klass med röd kant symboliserar en strukt eller klass där " - "alla dess relationer inte visas. %En graf stympas om den inte får " - "plats inom de givna gränserna.\n" + "alla dess relationer inte visas. %En graf trunkeras om den inte får " + "plats inom de givna gränserna.</li>\n" "</ul>\n" + "<p>\n" "Pilarna har följande betydelser:\n" + "</p>\n" "<ul>\n" "<li>%En mörkblå pil används för att visualisera en publik arvrelation " - "mellan två klasser.\n" - "<li>%En mörkgrön pil används för en skyddad arvsrelation.\n" - "<li>%En mörkröd pil används för en privat arvsrelation.\n" + "mellan två klasser.</li>\n" + "<li>%En mörkgrön pil används för en skyddad arvsrelation.</li>\n" + "<li>%En mörkröd pil används för en privat arvsrelation.\n</li>" "<li>%En sträckad lila pil används om en klass är innesluten eller " "använd av en annan klass. Vid pilen står namnet på den eller de " - "variabler som klassen pilen pekar på kommer åt.\n" + "variabler som klassen pilen pekar på kommer åt.</li>\n" "<li>%En sträckad gul pil symboliserar förhållandet mellan en " "template-instans och template-klassen, som den instantierades från.\n" - "Vid pilen står instansens template-parametrar.\n" + "Vid pilen står instansens template-parametrar.</li>\n" "</ul>\n"; } @@ -1719,7 +1720,7 @@ class TranslatorSwedish : public Translator /*! Used in dot graph when UML_LOOK is enabled and there are many fields */ virtual QCString trAndMore(const QCString &number) - { return "och "+number+" mera..."; } + { return "och "+number+" flera..."; } /*! Used file list for a Java enum */ virtual QCString trEnumGeneratedFromFiles(bool single) diff --git a/src/translator_tr.h b/src/translator_tr.h index 56b4a19..26ae08f 100644 --- a/src/translator_tr.h +++ b/src/translator_tr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1016,7 +1016,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5 "};\n" "\\endcode\n" "Bu kod aşağıdaki şemayı oluşturur:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Yukarıdaki şemadaki kutular aşağıda açıklanmıştır:\n" "<ul>\n" diff --git a/src/translator_tw.h b/src/translator_tw.h index 9da3365..e61ab5c 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -749,7 +749,8 @@ class TranslatorChinesetraditional : public Translator /*! This is put at the bottom of a class documentation page and is * followed by a list of files that were used to generate the page. */ - virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,bool) + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file QCString result=(QCString)"此"; @@ -765,7 +766,7 @@ class TranslatorChinesetraditional : public Translator default: break; } result+=" 文件是由下列檔案中產生"; - result+=":"; + if (single) result+=":"; else result+=":"; return result; } @@ -993,7 +994,7 @@ class TranslatorChinesetraditional : public Translator ".<p>\n" "請看下面範例:\n" "\\code\n" - "/*! 因為截斷的不可見類別 */\n" + "/*! 因為截斷而造成的不可見類別 */\n" "class Invisible { };\n\n" "/*! 截斷的類別, 繼承關係被隱藏 */\n" "class Truncated : public Invisible { };\n\n" @@ -1020,32 +1021,32 @@ class TranslatorChinesetraditional : public Translator " Used *m_usedClass;\n" "};\n" "\\endcode\n" - "若在組態檔中的 \\c MAX_DOT_GRAPH_HEIGHT tag " - "設為 240,將會產生下列的圖示:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "這個例子會產生下列的圖示:" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n" "<p>\n" "上圖中的各區塊意義如下:\n" + "</p>\n" "<ul>\n" "<li>%A 填滿黑色的區塊代表產生這個圖示的類別或結構 " ".\n" - "<li>%A 黑邊的區塊代表文件化過的結構或類別.\n" - "<li>%A 灰邊的區塊代表未經文件化的結構或是類別.\n" + "<li>%A 黑邊的區塊代表文件化過的結構或類別.</li>\n" + "<li>%A 灰邊的區塊代表未經文件化的結構或是類別.</li>\n" "<li>%A 紅邊的區塊代表文件化的結構或是類別," "這些結構或類別的繼承或包含關係不會全部顯示. %A 圖示 " - "若無法塞入指定的邊界中將會被截斷.\n" + "若無法塞入指定的邊界中將會被截斷.</li>\n" "</ul>\n" + "<p>\n" "箭頭具有下面的意義:\n" + "</p>\n" "<ul>\n" "<li>%A 深藍色箭頭用來代表兩個類別間的公開繼承 " "關係.\n" - "<li>%A 深綠色箭頭代表保護繼承.\n" - "<li>%A 深紅色箭頭代表私有繼承.\n" + "<li>%A 深綠色箭頭代表保護繼承。</li>\n" + "<li>%A 深紅色箭頭代表私有繼承。</li>\n" "<li>%A 紫色箭頭用來表示類別被另一個包含或是使用." - "箭頭上標示著可存取該類別或是結構的對應變數" - ".\n" + "箭頭上標示著可存取該類別或是結構的對應變數。</li>\n" "<li>%A 黃色箭頭代表樣版實體與樣版類別之間的關係。" - "箭頭上標記著樣版實體上的參數" - ".\n" + "箭頭上標記著樣版實體上的參數。</li>\n" "</ul>\n"; } /*! text for the link to the legend page */ @@ -1947,21 +1948,21 @@ class TranslatorChinesetraditional : public Translator return result; } /** UNO IDL service page */ - virtual QCString trServiceGeneratedFromFiles(bool) + virtual QCString trServiceGeneratedFromFiles(bool single) { // single is true implies a single file QCString result=(QCString)"本服務的文件由以下的檔案" "所產生"; - result+=":"; + if (single) result+=":"; else result+=":"; return result; } /** UNO IDL singleton page */ - virtual QCString trSingletonGeneratedFromFiles(bool) + virtual QCString trSingletonGeneratedFromFiles(bool single) { // single is true implies a single file QCString result=(QCString)"本singleton的文件由下面的檔案" "所產生"; - result+=":"; + if (single) result+=":"; else result+=":"; return result; } diff --git a/src/translator_ua.h b/src/translator_ua.h index 45efd6e..871acd1 100644 --- a/src/translator_ua.h +++ b/src/translator_ua.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -993,7 +993,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4 "};\n" "\\endcode\n" "Таким чином, отримуємо наступний граф:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Прямокутники в цьому графі мають наступний зміст:\n" "<ul>\n" diff --git a/src/translator_vi.h b/src/translator_vi.h index dd0a8f1..b2bbdd7 100644 --- a/src/translator_vi.h +++ b/src/translator_vi.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1021,7 +1021,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 "};\n" "\\endcode\n" "Kết quả trong biểu đồ sau đây:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Các hộp trong biểu đồ trên có ý nghĩa như sau:\n" "<ul>\n" diff --git a/src/translator_za.h b/src/translator_za.h index f47052e..ca94e7a 100644 --- a/src/translator_za.h +++ b/src/translator_za.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1002,7 +1002,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0 "\\endcode\n" "As die \\c MAX_DOT_GRAPH_HEIGHT merker in die konfigurasie leër " "aan 240 gelyk gestel is, word die volgende diagram geproduseer:" - "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center>\n" "<p>\n" "Die reghoeke in die diagram het die volgende betekenis:\n" "<ul>\n" diff --git a/src/types.h b/src/types.h index 688d664..f6c704c 100644 --- a/src/types.h +++ b/src/types.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/util.cpp b/src/util.cpp index 938c8d6..1a44a38 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,7 +1,7 @@ /***************************************************************************** * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1448,7 +1448,7 @@ static ClassDef *getResolvedClassRec(Definition *scope, // below is a more efficient coding of // QCString key=scope->name()+"+"+name+"+"+explicitScopePart; QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1); - char *p=key.data(); + char *p=key.rawData(); qstrcpy(p,scope->name()); *(p+scopeNameLen-1)='+'; p+=scopeNameLen; qstrcpy(p,name); *(p+nameLen-1)='+'; @@ -1724,7 +1724,7 @@ nextChar: growBuf.addChar(' '); } else if (i>0 && c=='>' && // current char is a > - (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space + (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&' || s.at(i-1)=='.') && // prev char is an id char or space (i<8 || !findOperator(s,i)) // string in front is not "operator" ) { @@ -1741,9 +1741,11 @@ nextChar: } else if (i>0 && ( - (s.at(i-1)==')' && isId(c)) + (s.at(i-1)==')' && isId(c)) // ")id" -> ") id" || - (c=='\'' && s.at(i-1)==' ') + (c=='\'' && s.at(i-1)==' ') // "'id" -> "' id" + || + (i>1 && s.at(i-2)==' ' && s.at(i-1)==' ') // " id" -> " id" ) ) { @@ -2223,12 +2225,21 @@ QCString tempArgListToString(ArgumentList *al,SrcLangExt lang) if (i>0) { result+=a->type.right(a->type.length()-i-1); + if (a->type.find("...")!=-1) + { + result+="..."; + } } else // nothing found -> take whole name { result+=a->type; } } + if (!a->typeConstraint.isEmpty() && lang==SrcLangExt_Java) + { + result+=" extends "; // TODO: now Java specific, C# has where... + result+=a->typeConstraint; + } ++ali; a=ali.current(); if (a) result+=", "; @@ -2379,8 +2390,8 @@ QCString transcodeCharacterStringToUTF8(const QCString &input) { size_t iLeft=inputSize; size_t oLeft=outputSize; - char *inputPtr = input.data(); - char *outputPtr = output.data(); + char *inputPtr = input.rawData(); + char *outputPtr = output.rawData(); if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) { outputSize-=(int)oLeft; @@ -2418,12 +2429,12 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode) QCString contents(bSize); int totalSize=0; int size; - while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize) + while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize) { totalSize+=bSize; - contents.resize(totalSize+bSize); + contents.resize(totalSize+bSize); } - totalSize = filterCRLF(contents.data(),totalSize+size)+2; + totalSize = filterCRLF(contents.rawData(),totalSize+size)+2; contents.resize(totalSize); contents.at(totalSize-2)='\n'; // to help the scanner contents.at(totalSize-1)='\0'; @@ -3317,7 +3328,7 @@ static QCString getCanonicalTypeForIdentifier( { if (count>10) return word; // oops recursion - QCString symName,scope,result,templSpec,tmpName; + QCString symName,result,templSpec,tmpName; //DefinitionList *defList=0; if (tSpec && !tSpec->isEmpty()) templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,*tSpec)); @@ -4111,8 +4122,6 @@ bool getDefs(const QCString &scName, if (!args) break; - QCString className = mmd->getClassDef()->name(); - ArgumentList *mmdAl = mmd->argumentList(); if (matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),mmdAl, Doxygen::globalScope,mmd->getFileDef(),argList, @@ -5060,7 +5069,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst) } QCString result(resLen+1); char *r; - for (r=result.data(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) + for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) { int l = (int)(q-p); memcpy(r,p,l); @@ -5340,7 +5349,7 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore) uchar md5_sig[16]; QCString sigStr(33); MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig); - MD5SigToString(md5_sig,sigStr.data(),33); + MD5SigToString(md5_sig,sigStr.rawData(),33); result=result.left(128-32)+sigStr; } } @@ -6454,6 +6463,8 @@ void filterLatexString(FTextStream &t,const char *str, //printf("filterLatexString(%s)\n",str); //if (strlen(str)<2) stackTrace(); const unsigned char *p=(const unsigned char *)str; + const unsigned char *q; + int cnt; unsigned char c; unsigned char pc='\0'; while (*p) @@ -6480,7 +6491,35 @@ void filterLatexString(FTextStream &t,const char *str, case '$': t << "\\$"; break; case '%': t << "\\%"; break; case '^': t << "$^\\wedge$"; break; - case '&': t << "\\&"; break; + case '&': // possibility to have a special symbol + q = p; + cnt = 2; // we have to count & and ; as well + while ((*q >= 'a' && *q <= 'z') || (*q >= 'A' && *q <= 'Z') || (*q >= '0' && *q <= '9')) + { + cnt++; + q++; + } + if (*q == ';') + { + --p; // we need & as well + DocSymbol::SymType res = HtmlEntityMapper::instance()->name2sym(QCString((char *)p).left(cnt)); + if (res == DocSymbol::Sym_Unknown) + { + p++; + t << "\\&"; + } + else + { + t << HtmlEntityMapper::instance()->latex(res); + q++; + p = q; + } + } + else + { + t << "\\&"; + } + break; case '*': t << "$\\ast$"; break; case '_': if (!insideTabbing) t << "\\+"; t << "\\_"; @@ -6550,7 +6589,7 @@ QCString rtfFormatBmkStr(const char *name) g_tagDict.insert( key, tag ); // This is the increment part - char* nxtTag = g_nextTag.data() + g_nextTag.length() - 1; + char* nxtTag = g_nextTag.rawData() + g_nextTag.length() - 1; for ( unsigned int i = 0; i < g_nextTag.length(); ++i, --nxtTag ) { if ( ( ++(*nxtTag) ) > 'Z' ) @@ -7482,7 +7521,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC else { QCString cmd=filterName+" \""+fileName+"\""; - Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd)); FILE *f=portable_popen(cmd,"r"); if (!f) { @@ -7500,7 +7539,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC portable_pclose(f); inBuf.at(inBuf.curPos()) ='\0'; Debug::print(Debug::FilterOutput, 0, "Filter output\n"); - Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",inBuf.data()); + Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",qPrint(inBuf)); } int start=0; @@ -7648,8 +7687,12 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href) if (!relPath.isEmpty() && l>0 && result.at(0)=='.') { // relative path -> prepend relPath. result.prepend(relPath); + l+=relPath.length(); + } + if (!href){ + result.prepend("doxygen=\""+ref+":"); + l+=10+ref.length(); } - if (!href) result.prepend("doxygen=\""+ref+":"); if (l>0 && result.at(l-1)!='/') result+='/'; if (!href) result.append("\" "); } @@ -7968,12 +8011,10 @@ void addDocCrossReference(MemberDef *src,MemberDef *dst) { static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION"); static bool referencesRelation = Config_getBool("REFERENCES_RELATION"); - static bool callerGraph = Config_getBool("CALLER_GRAPH"); - static bool callGraph = Config_getBool("CALL_GRAPH"); //printf("--> addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data()); if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types - if ((referencedByRelation || callerGraph || dst->hasCallerGraph()) && + if ((referencedByRelation || dst->hasCallerGraph()) && src->showInCallGraph() ) { @@ -7989,7 +8030,7 @@ void addDocCrossReference(MemberDef *src,MemberDef *dst) mdDecl->addSourceReferencedBy(src); } } - if ((referencesRelation || callGraph || src->hasCallGraph()) && + if ((referencesRelation || src->hasCallGraph()) && src->showInCallGraph() ) { @@ -8339,3 +8380,9 @@ bool mainPageHasTitle() return TRUE; } +QCString getDotImageExtension(void) +{ + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + imgExt = imgExt.replace( QRegExp(":.*"), "" ); + return imgExt; +} @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -443,6 +443,8 @@ bool protectionLevelVisible(Protection prot); QCString stripIndentation(const QCString &s); +QCString getDotImageExtension(void); + bool fileVisibleInIndex(FileDef *fd,bool &genSourceFile); void addDocCrossReference(MemberDef *src,MemberDef *dst); diff --git a/src/version.h b/src/version.h index b31fe4f..16bf9df 100644 --- a/src/version.h +++ b/src/version.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/version.py b/src/version.py index 003cf95..a99ede3 100755 --- a/src/version.py +++ b/src/version.py @@ -17,12 +17,15 @@ major = 0 minor = 0 revision = 0 mnt = 'NO' +configure = '../configure' +if len(sys.argv) > 2: + configure = sys.argv[2] # # open input file # read file and get relevant information # close # -f = open('../configure', 'r') +f = open(configure, 'r') for line in f: # check if line can match (saves 3 comparisons) if (line.startswith('doxygen_version')): diff --git a/src/vhdlcode.l b/src/vhdlcode.l index fa199d1..0de0966 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -68,7 +68,6 @@ static bool g_startCode = FALSE; static QCString g_PrevString; static QCString g_CurrClass; static QDict<QCString>g_vhdlKeyDict; -static QCString g_tempClass; static QCString g_tempComp; static QCString g_PortMapComp; static MemberDef *g_vhdlMember; @@ -77,7 +76,6 @@ static QCString g_FuncProto; //----------------------------------------------------------- static CodeOutputInterface * g_code; -static QCString g_curClassName; static QCString g_parmType; static QCString g_parmName; static const char * g_inputString; //!< the code fragment as text @@ -90,9 +88,6 @@ static Definition *g_searchCtx; static QCString g_exampleName; static QCString g_exampleFile; -static QCString g_type; -static QCString g_name; -static QCString g_args; static QCString g_classScope; static QCString g_CurrScope; @@ -620,7 +615,7 @@ static void appStringLower(QCString& qcs,const char* text) static QCString g_temp; /* writes and links a port map statement */ -static void codifyMapLines(char *text) +static void codifyMapLines(const char *text) { if (text==0) return; g_temp.resize(0); @@ -628,7 +623,7 @@ static void codifyMapLines(char *text) int wordCounter=0; QCString ctemp; //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text); - char *p=text; //,*sp=p; + const char *p=text; //,*sp=p; char c; bool done=FALSE; while (!done) @@ -1055,7 +1050,6 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI <ClassesName>{FUNCNAME} { - QDict<QCString> mem; appStringLower(g_PrevString,vhdlcodeYYtext); g_CurrClass.resize(0); g_CurrClass.append(vhdlcodeYYtext); diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 3f7cd1d..2b92d40 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -70,7 +70,6 @@ static QDict<QCString> g_vhdlKeyDict0(17,FALSE); static QDict<QCString> g_vhdlKeyDict1(17,FALSE); static QDict<QCString> g_vhdlKeyDict2(17,FALSE); static QDict<QCString> g_vhdlKeyDict3(17,FALSE); -static QDict<QCString> g_xilinxUcfDict(17,FALSE); static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief); static void writeUCFLink(const MemberDef* mdef,OutputList &ol); @@ -170,7 +169,6 @@ static void createSVG() QCString dir="-o \""+ov+"/vhdl_design_overview.html\""; ov+="/vhdl_design.dot"; - QRegExp ep("[\\s]"); QCString vlargs="-Tsvg \""+ov+"\" "+dir ; if (portable_system("dot",vlargs)!=0) @@ -200,7 +198,6 @@ void VhdlDocGen::writeOverview() QCString ov =Config_getString("HTML_OUTPUT"); QCString fileName=ov+"/vhdl_design.dot"; QFile f(fileName); - QStringList qli; FTextStream t(&f); if (!f.open(IO_WriteOnly)) @@ -502,7 +499,6 @@ static QList<MemberDef>* getPorts(ClassDef *cd) static void writeTable(QList<MemberDef>* port,FTextStream & t) { - QCString space(" "); MemberDef *md; uint len=port->count(); @@ -712,7 +708,6 @@ ClassDef *VhdlDocGen::getClass(const char *name) ClassDef* VhdlDocGen::getPackageName(const QCString & name) { ClassDef* cd=0; - QStringList ql=QStringList::split(".",name,FALSE); cd=getClass(name); return cd; @@ -800,12 +795,9 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem if (!packages.contains(ecd)) VhdlDocGen::findAllPackages(ecd); } - uint len=packages.count(); - for (uint j=0;j<len;j++) - { - for (QMap<ClassDef*,QList<ClassDef> >::Iterator cList=packages.begin();cList != packages.end();cList++) - { - if (cList.key()==0) continue; + QMap<ClassDef*,QList<ClassDef> >::Iterator cList=packages.find(ecd); + if (cList.key()!=0) + { QList<ClassDef> mlist=cList.data(); for (uint j=0;j<mlist.count();j++) { @@ -814,8 +806,7 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem mdef=VhdlDocGen::findMemberDef(mlist.at(j),memName,MemberListType_pubMethods); if (mdef) return mdef; } - } - } + } return 0; }//findMember @@ -1127,7 +1118,6 @@ ClassDef* VhdlDocGen::findArchitecture(const ClassDef *cd) void VhdlDocGen::writeVhdlLink(const ClassDef* ccd ,OutputList& ol,QCString& type,QCString& nn,QCString& behav) { if (ccd==0) return; - QCString temp=ccd->getOutputFileBase(); ol.startBold(); ol.docify(type.data()); ol.endBold(); @@ -1185,7 +1175,6 @@ void VhdlDocGen::parseFuncProto(const char* text,QList<Argument>& qlist, if ((end-index)>0) { - QCString tt=s1.mid(index,(end-index+1)); temp=s1.mid(index+1,(end-index-1)); //getFuncParams(qlist,temp); } @@ -1820,8 +1809,6 @@ static void setGlobalType(MemberList *ml) MemberListIterator mmli(*ml); for ( ; (mdd=mmli.current()); ++mmli ) { - QCString l=mdd->typeString(); - if (qstrcmp(mdd->argsString(),"package")==0) { mdd->setMemberSpecifiers(VhdlDocGen::INSTANTIATION); @@ -1982,11 +1969,8 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, bool /*inGroup*/) { - static QRegExp reg("[%]"); - Definition *d=0; - ASSERT(cd!=0 || nd!=0 || fd!=0 || gd!=0 || mdef->getMemberSpecifiers()==VhdlDocGen::LIBRARY || mdef->getMemberSpecifiers()==VhdlDocGen::USE @@ -2661,7 +2645,6 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b { QCString ucFile(input); int lineNo=0; - QCString newLine="\n"; QCString comment("#!"); QCString brief; @@ -2717,7 +2700,6 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief) { if (qcs.isEmpty())return; - QRegExp sp("\\s"); QRegExp reg("[\\s=]"); QCString n; // bool bo=(qstricmp(type,qcs.data())==0); @@ -2810,7 +2792,8 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne) QCString file; QCString co("Constraints"); - if (Config_getBool("HAVE_DOT") && Config_getEnum("DOT_IMAGE_FORMAT")=="svg") + QCString imgExt = getDotImageExtension(); + if (Config_getBool("HAVE_DOT") && imgExt=="svg") { QCString ov = theTranslator->trDesignOverview(); QCString ofile("vhdl_design_overview"); @@ -2840,7 +2823,6 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch) { int index; QCString label; - QCString ent("entity"); if (!entity.contains(":")) return ""; QRegExp exp("[:()\\s]"); @@ -2930,7 +2912,7 @@ void assignBinding(VhdlConfNode * conf) QListIterator<Entry> eli(instList); Entry *cur=0; ClassDef *archClass=0,*entClass=0; - QCString archName,entityName; + QCString archName; QCString arcBind,entBind; bool others,all; @@ -2995,7 +2977,7 @@ void assignBinding(VhdlConfNode * conf) { if (cur->exception.lower()==label || conf->isInlineConf) { - QCString sign,archy; + QCString archy; if (all || others) { @@ -3997,7 +3979,6 @@ void FlowChart::writeShape(FTextStream &t,const FlowChart* fl) } t<<getNodeName(fl->id).data(); - QCString q=getNodeType(fl->type); #ifdef DEBUGFLOW QCString qq(getNodeName(fl->id).data()); @@ -4053,7 +4034,6 @@ void FlowChart::writeShape(FTextStream &t,const FlowChart* fl) { if (fl->text.isEmpty()) return; bool var=(fl->type & FlowChart::VARIABLE_NO); - QCString repl("<BR ALIGN=\"LEFT\"/>"); QCString q=fl->text; if (exit) diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index 7f87ce5..2d1ecf1 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index 7b0c112..ea43341 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -40,7 +40,7 @@ static int yyLineNr = 1; static int* lineParse; static int iDocLine = -1; static QCString inputString; -static Entry gBlock; +static Entry* gBlock = 0; static Entry* previous = 0; //------------------------------------------------------- @@ -102,38 +102,40 @@ Entry* getVhdlCompound() void startCodeBlock(int index) { int ll=strComment.length(); + if (!gBlock) gBlock = new Entry; iCodeLen=inputString.findRev(strComment.data())+ll; // fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll); - gBlock.reset(); + gBlock->reset(); int len=strComment.length(); QCString name=strComment.right(len-index);// name=VhdlDocGen::getIndexWord(name.data(),1); if (!name) - gBlock.name="misc"+ VhdlDocGen::getRecordNumber(); + gBlock->name="misc"+ VhdlDocGen::getRecordNumber(); else - gBlock.name=name; + gBlock->name=name; - gBlock.startLine=yyLineNr; - gBlock.bodyLine=yyLineNr; + gBlock->startLine=yyLineNr; + gBlock->bodyLine=yyLineNr; strComment=strComment.left(index); VhdlDocGen::prepareComment(strComment); - gBlock.brief+=strComment; + gBlock->brief+=strComment; } void makeInlineDoc(int endCode) { int len=endCode-iCodeLen; + if (!gBlock) gBlock = new Entry; QCString par=inputString.mid(iCodeLen,len); //fprintf(stderr,"\n inline code: \n<%s>",par.data()); - gBlock.doc=par; - gBlock.inbodyDocs=par; - gBlock.section=Entry::VARIABLE_SEC; - gBlock.spec=VhdlDocGen::MISCELLANEOUS; - gBlock.fileName = yyFileName; - gBlock.endBodyLine=yyLineNr-1; - gBlock.lang=SrcLangExt_VHDL; - Entry *temp=new Entry(gBlock); + gBlock->doc=par; + gBlock->inbodyDocs=par; + gBlock->section=Entry::VARIABLE_SEC; + gBlock->spec=VhdlDocGen::MISCELLANEOUS; + gBlock->fileName = yyFileName; + gBlock->endBodyLine=yyLineNr-1; + gBlock->lang=SrcLangExt_VHDL; + Entry *temp=new Entry(*gBlock); Entry* compound=getVhdlCompound(); if (compound) @@ -146,7 +148,7 @@ void makeInlineDoc(int endCode) VhdlParser::current_root->addSubEntry(temp); } strComment.resize(0); - gBlock.reset(); + gBlock->reset(); }// makeInlineDoc @@ -396,7 +398,7 @@ void VHDLLanguageScanner::parsePrototype(const char *text) varr=TRUE; } -void VhdlParser::addCompInst(char *n, char* instName, char* comp,int iLine) +void VhdlParser::addCompInst(const char *n, const char* instName, const char* comp,int iLine) { current->spec=VhdlDocGen::INSTANTIATION; current->section=Entry::VARIABLE_SEC; @@ -437,7 +439,6 @@ void VhdlParser::addCompInst(char *n, char* instName, char* comp,int iLine) void VhdlParser::addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot) { - static QRegExp reg("[\\s]"); QCString name(n); if (isFuncProcProced() || VhdlDocGen::getFlowMember()) return; @@ -540,7 +541,6 @@ void VhdlParser::pushLabel( QCString &label,QCString & val) QCString VhdlParser::popLabel(QCString & q) { - QCString u=q; int i=q.findRev("|"); if (i<0) return ""; q = q.left(i); @@ -550,8 +550,7 @@ void VhdlParser::pushLabel( QCString &label,QCString & val) void VhdlParser::addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf) { VhdlConfNode* co=0; - QCString ent,arch,lab; - QCString l=genLabels; + QCString ent; ent=a; if (b) @@ -606,7 +605,6 @@ void VhdlParser::addProto(const char *s1,const char *s2,const char *s3, const char *s4,const char *s5,const char *s6) { (void)s5; // avoid unused warning - static QRegExp reg("[\\s]"); QCString name=s2; QStringList ql=QStringList::split(",",name,FALSE); diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 65711ab..27f7274 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -44,8 +44,6 @@ static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height) { - QCString tmpStr; - t << "<" << cmd; if (writeType) { diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h index 3e2236c..c65688f 100644 --- a/src/xmldocvisitor.h +++ b/src/xmldocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 8e1d02f..215b88a 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -394,6 +394,12 @@ static void writeTemplateArgumentList(ArgumentList *al, linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->defval); t << "</defval>" << endl; } + if (!a->typeConstraint.isEmpty()) + { + t << indentStr << " <typeconstraint>"; + linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->typeConstraint); + t << "</typeconstraint>" << endl; + } t << indentStr << " </param>" << endl; } t << indentStr << "</templateparamlist>" << endl; @@ -1865,7 +1871,7 @@ void generateXML() if (len>0) { QCString s(len+1); - qstrncpy(s.data(),startLine,len); + qstrncpy(s.rawData(),startLine,len); s[len]='\0'; if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1) { diff --git a/src/xmlgen.h b/src/xmlgen.h index 9c9ae17..0447591 100644 --- a/src/xmlgen.h +++ b/src/xmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby |