summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
-rw-r--r--src/classdef.cpp26
-rw-r--r--src/cmdmapper.cpp2
-rw-r--r--src/cmdmapper.h2
-rw-r--r--src/code.l137
-rw-r--r--src/commentcnv.l19
-rw-r--r--src/commentscan.h8
-rw-r--r--src/commentscan.l244
-rw-r--r--src/config.xml2
-rwxr-xr-xsrc/configgen.py4
-rw-r--r--src/configimpl.l65
-rw-r--r--src/constexp.l2
-rw-r--r--src/context.cpp2
-rw-r--r--src/declinfo.h3
-rw-r--r--src/declinfo.l31
-rw-r--r--src/defargs.l6
-rw-r--r--src/defgen.cpp8
-rw-r--r--src/definition.cpp12
-rw-r--r--src/diagram.cpp6
-rw-r--r--src/docbookvisitor.cpp87
-rw-r--r--src/docbookvisitor.h2
-rw-r--r--src/docgroup.cpp215
-rw-r--r--src/docgroup.h54
-rw-r--r--src/docparser.cpp521
-rw-r--r--src/docparser.h44
-rw-r--r--src/doctokenizer.l16
-rw-r--r--src/docvisitor.h3
-rw-r--r--src/dotclassgraph.cpp8
-rw-r--r--src/dotgfxhierarchytable.cpp6
-rw-r--r--src/dotincldepgraph.cpp2
-rw-r--r--src/dotnode.cpp2
-rw-r--r--src/dotrunner.cpp8
-rw-r--r--src/doxygen.cpp339
-rw-r--r--src/doxygen.h8
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/filename.cpp2
-rw-r--r--src/fortrancode.l2
-rw-r--r--src/fortranscanner.l8
-rw-r--r--src/ftvhelp.h2
-rw-r--r--src/groupdef.cpp8
-rw-r--r--src/htmldocvisitor.cpp22
-rw-r--r--src/htmldocvisitor.h2
-rw-r--r--src/htmlgen.cpp18
-rw-r--r--src/index.cpp4
-rw-r--r--src/latexdocvisitor.cpp20
-rw-r--r--src/latexdocvisitor.h2
-rw-r--r--src/latexgen.cpp29
-rw-r--r--src/layout.cpp9
-rw-r--r--src/layout.h2
-rw-r--r--src/mandocvisitor.cpp18
-rw-r--r--src/mandocvisitor.h2
-rw-r--r--src/markdown.cpp7
-rw-r--r--src/memberdef.cpp44
-rw-r--r--src/memberdef.h4
-rw-r--r--src/membergroup.cpp2
-rw-r--r--src/memberlist.cpp6
-rw-r--r--src/msc.cpp2
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/outputgen.h2
-rw-r--r--src/outputlist.cpp35
-rw-r--r--src/outputlist.h5
-rw-r--r--src/perlmodgen.cpp18
-rw-r--r--src/pre.l70
-rw-r--r--src/printdocvisitor.h38
-rw-r--r--src/pycode.l30
-rw-r--r--src/pyscanner.l77
-rw-r--r--src/resourcemgr.cpp2
-rw-r--r--src/rtfdocvisitor.cpp26
-rw-r--r--src/rtfdocvisitor.h2
-rw-r--r--src/rtfgen.cpp8
-rw-r--r--src/scanner.l91
-rw-r--r--src/searchindex.cpp5
-rw-r--r--src/sqlite3gen.cpp2
-rw-r--r--src/tagreader.cpp116
-rw-r--r--src/tclscanner.l27
-rw-r--r--src/template.cpp2
-rw-r--r--src/textdocvisitor.h2
-rw-r--r--src/util.cpp224
-rw-r--r--src/util.h14
-rw-r--r--src/version.h23
-rw-r--r--src/vhdlcode.l2
-rw-r--r--src/vhdljjparser.cpp4
-rw-r--r--src/xmldocvisitor.cpp31
-rw-r--r--src/xmldocvisitor.h2
-rw-r--r--src/xmlgen.cpp6
85 files changed, 1584 insertions, 1405 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bc79194..06e0e44 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,6 +5,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/libmd5
${CMAKE_SOURCE_DIR}/liblodepng
${CMAKE_SOURCE_DIR}/libmscgen
+ ${CMAKE_SOURCE_DIR}/libversion
${CMAKE_SOURCE_DIR}/vhdlparser
${CMAKE_SOURCE_DIR}/src
${CLANG_INCLUDEDIR}
@@ -16,7 +17,7 @@ file(MAKE_DIRECTORY ${GENERATED_SRC})
file(GLOB LANGUAGE_FILES "${CMAKE_SOURCE_DIR}/src/translator_??.h")
# instead of increasebuffer.py
-add_definitions(-DYY_BUF_SIZE=262144 -DYY_READ_BUF_SIZE=262144)
+add_definitions(-DYY_BUF_SIZE=${enlarge_lex_buffers} -DYY_READ_BUF_SIZE=${enlarge_lex_buffers})
# generate settings.h
file(GENERATE OUTPUT ${GENERATED_SRC}/settings.h
@@ -32,12 +33,6 @@ CONTENT "#ifndef SETTINGS_H
set_source_files_properties(${GENERATED_SRC}/settings.h PROPERTIES GENERATED 1)
-# generate version.cpp
-file(GENERATE OUTPUT ${GENERATED_SRC}/version.cpp
- CONTENT "char versionString[]=\"${VERSION}\";"
-)
-set_source_files_properties(${GENERATED_SRC}/version.cpp PROPERTIES GENERATED 1)
-
# configvalues.h
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h
@@ -142,7 +137,6 @@ add_library(_doxygen STATIC
${GENERATED_SRC}/lang_cfg.h
${GENERATED_SRC}/settings.h
${GENERATED_SRC}/layout_default.xml.h
- ${GENERATED_SRC}/version.cpp
${GENERATED_SRC}/ce_parse.h
${GENERATED_SRC}/configvalues.h
${GENERATED_SRC}/resources.cpp
@@ -254,6 +248,7 @@ add_library(_doxygen STATIC
xmlgen.cpp
docbookvisitor.cpp
docbookgen.cpp
+ docgroup.cpp
)
add_executable(doxygen main.cpp)
@@ -285,6 +280,7 @@ target_link_libraries(doxygen
md5
lodepng
mscgen
+ version
vhdlparser
${SQLITE3_LIBRARIES}
${ICONV_LIBRARIES}
diff --git a/src/classdef.cpp b/src/classdef.cpp
index a7f24ed..856ab05 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -3330,7 +3330,7 @@ void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCStri
//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);
+ ClassDef *cd = const_cast<ClassDef*>(getResolvedClass(this,getFileDef(),typeConstraint));
if (cd==0 && !hideUndocRelation)
{
cd = new ClassDefImpl(getDefFileName(),getDefLine(),getDefColumn(),typeConstraint,ClassDef::Class);
@@ -3456,7 +3456,7 @@ bool ClassDefImpl::hasNonReferenceSuperClass() const
void ClassDefImpl::writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
const ClassDef *inheritedFrom,const char *inheritId) const
{
- //printf("ClassName=`%s' inGroup=%d\n",name().data(),inGroup);
+ //printf("ClassName='%s' inGroup=%d\n",name().data(),inGroup);
ol.docify(compoundTypeString());
QCString cn = displayName(FALSE);
@@ -3570,8 +3570,8 @@ bool ClassDefImpl::hasDocumentation() const
//----------------------------------------------------------------------
// recursive function:
-// returns TRUE iff class definition `bcd' represents an (in)direct base
-// class of class definition `cd'.
+// returns TRUE iff class definition 'bcd' represents an (in)direct base
+// class of class definition 'cd'.
bool ClassDefImpl::isBaseClass(const ClassDef *bcd, bool followInstances,int level) const
{
@@ -3636,7 +3636,7 @@ static bool isStandardFunc(MemberDef *md)
}
/*!
- * recursively merges the `all members' lists of a class base
+ * recursively merges the 'all members' lists of a class base
* with that of this class. Must only be called for classes without
* subclasses!
*/
@@ -3781,7 +3781,7 @@ void ClassDefImpl::mergeMembers()
{
if (!isStandardFunc(srcMd))
{
- //printf(" insertMember `%s'\n",srcMd->name().data());
+ //printf(" insertMember '%s'\n",srcMd->name().data());
internalInsertMember(srcMd,prot,FALSE);
}
}
@@ -3858,7 +3858,7 @@ void ClassDefImpl::mergeMembers()
{
if (!isStandardFunc(mi->memberDef))
{
- //printf(" insertMember `%s'\n",mi->memberDef->name().data());
+ //printf(" insertMember '%s'\n",mi->memberDef->name().data());
internalInsertMember(mi->memberDef,prot,FALSE);
}
}
@@ -4119,7 +4119,7 @@ void ClassDefImpl::determineImplUsageRelation()
if (md->isVariable()) // for each member variable in this class
{
QCString type=removeRedundantWhiteSpace(md->typeString());
- //printf("in class %s found var type=`%s' name=`%s'\n",
+ //printf("in class %s found var type='%s' name='%s'\n",
// name().data(),type.data(),md->name().data());
int pos=0;
QCString usedClassName;
@@ -4127,7 +4127,7 @@ void ClassDefImpl::determineImplUsageRelation()
bool found=FALSE;
while (extractClassNameFromType(type,pos,usedClassName,templSpec)!=-1 && !found)
{
- //printf("usedClassName=`%s' templSpec=%s\n",usedClassName.data(),templSpec.data());
+ //printf("usedClassName='%s' templSpec=%s\n",usedClassName.data(),templSpec.data());
// check if usedClassName is a template argument of its class
ClassDef *cd=md->getClassDef();
if (cd && cd->templateArguments())
@@ -4239,11 +4239,11 @@ void ClassDefImpl::addUsedInterfaceClasses(MemberDef *md,const char *typeStr)
{
ucd = new UsesClassDef(cd);
m_impl->usesIntfClassDict->insert(cd->name(),ucd);
- //printf("in class `%s' adding used intf class `%s'\n",
+ //printf("in class '%s' adding used intf class '%s'\n",
// name().data(),cd->name().data());
}
ucd->addAccessor(md->name());
- //printf("in class `%s' adding accessor `%s' to class `%s'\n",
+ //printf("in class '%s' adding accessor '%s' to class '%s'\n",
// name().data(),md->name().data(),ucd->classDef->name().data());
}
p=i+l;
@@ -4482,7 +4482,7 @@ ClassDef *ClassDefImpl::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",qPrint(name()),qPrint(templSpec));
+ Debug::print(Debug::Classes,0," New template instance class '%s''%s'\n",qPrint(name()),qPrint(templSpec));
QCString tcname = removeRedundantWhiteSpace(localName()+templSpec);
templateClass = new ClassDefImpl(
fileName,startLine,startColumn,tcname,ClassDef::Class);
@@ -4505,7 +4505,7 @@ ClassDef *ClassDefImpl::getVariableInstance(const char *templSpec) const
ClassDef *templateClass=m_impl->variableInstances->find(templSpec);
if (templateClass==0)
{
- Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec));
+ Debug::print(Debug::Classes,0," New template variable instance class '%s' '%s'\n",qPrint(name()),qPrint(templSpec));
QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
templateClass = new ClassDefImpl("<code>",1,1,tcname,
ClassDef::Class,0,0,FALSE);
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 55f8214..b4d35d4 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -197,6 +197,8 @@ CommandMap htmlTagMap[] =
{ "blockquote", HTML_BLOCKQUOTE },
{ "strike", HTML_STRIKE },
{ "u", HTML_UNDERLINE },
+ { "ins", HTML_INS },
+ { "del", HTML_DEL },
{ "c", XML_C },
// { "code", XML_CODE }, <= ambiguous <code> is also a HTML tag
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index 8c49b3f..d670cd4 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -179,6 +179,8 @@ enum HtmlTagType
HTML_BLOCKQUOTE= 33,
HTML_STRIKE = 34,
HTML_UNDERLINE = 35,
+ HTML_INS = 36,
+ HTML_DEL = 37,
XML_CmdMask = 0x100,
diff --git a/src/code.l b/src/code.l
index ad39e0e..8df0085 100644
--- a/src/code.l
+++ b/src/code.l
@@ -139,9 +139,9 @@ struct ObjCCallCtx
QCString methodName;
QCString objectTypeOrName;
QGString comment;
- ClassDef *objectType;
- MemberDef *objectVar;
- MemberDef *method;
+ const ClassDef *objectType;
+ const MemberDef *objectVar;
+ const MemberDef *method;
QCString format;
int lexState;
int braceCount;
@@ -252,7 +252,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
DBG_CTX((stderr,"** addVariable trying: type='%s' name='%s' g_currentDefinition=%s\n",
ltype.data(),lname.data(),g_currentDefinition?g_currentDefinition->name().data():"<none>"));
Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast();
- ClassDef *varType;
+ const ClassDef *varType;
int i=0;
if (
(varType=g_codeClassSDict->find(ltype)) || // look for class definitions inside the code block
@@ -268,7 +268,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
QCString typeName(ltype.left(i));
ClassDef* newDef = 0;
QCString templateArgs(ltype.right(ltype.length() - i));
- if (
+ if ( !typeName.isEmpty() &&
( // look for class definitions inside the code block
(varType=g_codeClassSDict->find(typeName)) ||
// otherwise look for global class definitions
@@ -338,15 +338,15 @@ class CallContext
public:
struct Ctx
{
- Ctx() : name(g_name), type(g_type), d(0) {}
+ Ctx(QCString _name, QCString _type) : name(_name), type(_type), d(0) {}
QCString name;
QCString type;
const Definition *d;
};
- CallContext()
+ CallContext()
{
- m_defList.append(new Ctx);
+ m_defList.append(new Ctx("",""));
m_defList.setAutoDelete(TRUE);
}
virtual ~CallContext() {}
@@ -359,12 +359,12 @@ class CallContext
ctx->d=d;
}
}
- void pushScope()
+ void pushScope(QCString _name, QCString _type)
{
- m_defList.append(new Ctx);
+ m_defList.append(new Ctx(_name,_type));
DBG_CTX((stderr,"** Push call context %d\n",m_defList.count()));
}
- void popScope()
+ void popScope(QCString &_name, QCString &_type)
{
if (m_defList.count()>1)
{
@@ -372,8 +372,8 @@ class CallContext
Ctx *ctx = m_defList.getLast();
if (ctx)
{
- g_name = ctx->name;
- g_type = ctx->type;
+ _name = ctx->name;
+ _type = ctx->type;
}
m_defList.removeLast();
}
@@ -386,7 +386,7 @@ class CallContext
{
DBG_CTX((stderr,"** Clear call context\n"));
m_defList.clear();
- m_defList.append(new Ctx);
+ m_defList.append(new Ctx("",""));
}
const Definition *getScope() const
{
@@ -415,7 +415,7 @@ static void pushScope(const char *s)
g_classScope += "::";
g_classScope += s;
}
- //printf("pushScope(%s) result: `%s'\n",s,g_classScope.data());
+ //printf("pushScope(%s) result: '%s'\n",s,g_classScope.data());
}
/*! remove the top class/namespace name from the scope */
@@ -431,7 +431,7 @@ static void popScope()
{
//err("Too many end of scopes found!\n");
}
- //printf("popScope() result: `%s'\n",g_classScope.data());
+ //printf("popScope() result: '%s'\n",g_classScope.data());
}
static void setCurrentDoc(const QCString &anchor)
@@ -482,7 +482,7 @@ static void setClassScope(const QCString &name)
n = n.mid(i+2);
}
pushScope(n);
- //printf("--->New class scope `%s'\n",g_classScope.data());
+ //printf("--->New class scope '%s'\n",g_classScope.data());
}
/*! start a new line of code, inserting a line number if g_sourceFileDef
@@ -513,7 +513,7 @@ static void startCodeLine()
g_args.resize(0);
g_parmType.resize(0);
g_parmName.resize(0);
- //printf("Real scope: `%s'\n",g_realScope.data());
+ //printf("Real scope: '%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
QCString lineAnchor;
lineAnchor.sprintf("l%05d",g_yyLineNr);
@@ -567,7 +567,7 @@ static void nextCodeLine()
}
}
-/*! write a code fragment `text' that may span multiple lines, inserting
+/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
static void codifyLines(const char *text)
@@ -695,7 +695,7 @@ static void setParameterList(const MemberDef *md)
}
}
-static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
+static const ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
{
int pos=0;
QCString type = s;
@@ -704,7 +704,7 @@ static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
while (extractClassNameFromType(type,pos,className,templSpec)!=-1)
{
QCString clName=className+templSpec;
- ClassDef *cd=0;
+ const ClassDef *cd=0;
if (!g_classScope.isEmpty())
{
cd=getResolvedClass(d,g_sourceFileDef,g_classScope+"::"+clName);
@@ -713,7 +713,7 @@ static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
{
cd=getResolvedClass(d,g_sourceFileDef,clName);
}
- //printf("stripClass trying `%s' = %p\n",clName.data(),cd);
+ //printf("stripClass trying '%s' = %p\n",clName.data(),cd);
if (cd)
{
return cd;
@@ -768,7 +768,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
DBG_CTX((stderr,"local variable?\n"));
if (mcd!=VariableContext::dummyContext)
{
- DBG_CTX((stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data()));
+ DBG_CTX((stderr,"local var '%s' mcd=%s\n",name.data(),mcd->name().data()));
g_theCallContext.setScope(mcd);
}
}
@@ -786,7 +786,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
DBG_CTX((stderr,"Found member %s\n",md->name().data()));
if (g_scopeStack.top()!=CLASSBLOCK)
{
- DBG_CTX((stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data()));
+ DBG_CTX((stderr,"class member '%s' mcd=%s\n",name.data(),mcd->name().data()));
g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
}
return md;
@@ -797,7 +797,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
// look for a global member
if ((mn=Doxygen::functionNameSDict->find(name)))
{
- //printf("global var `%s'\n",name.data());
+ //printf("global var '%s'\n",name.data());
if (mn->count()==1) // global defined only once
{
MemberDef *md=mn->getFirst();
@@ -843,7 +843,7 @@ static void updateCallContextForSmartPointer()
MemberDef *md;
if (d && d->definitionType()==Definition::TypeClass && (md=(dynamic_cast<const ClassDef*>(d))->isSmartPointer()))
{
- ClassDef *ncd = stripClassName(md->typeString(),md->getOuterScope());
+ const ClassDef *ncd = stripClassName(md->typeString(),md->getOuterScope());
if (ncd)
{
g_theCallContext.setScope(ncd);
@@ -865,7 +865,7 @@ static bool getLinkInScope(const QCString &c, // scope
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
- DBG_CTX((stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly));
+ DBG_CTX((stderr,"getLinkInScope: trying '%s'::'%s' varOnly=%d\n",c.data(),m.data(),varOnly));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
(!varOnly || md->isVariable()))
{
@@ -899,7 +899,7 @@ static bool getLinkInScope(const QCString &c, // scope
{
addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
}
- //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
+ //printf("d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
writeMultiLineCodeLink(ol,md, text ? text : memberText);
addToSearchIndex(text ? text : memberText);
@@ -961,8 +961,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
{
className = substitute(className,".","::"); // for PHP namespaces
}
- ClassDef *cd=0,*lcd=0;
- MemberDef *md=0;
+ const ClassDef *cd=0,*lcd=0;
+ const MemberDef *md=0;
bool isLocal=FALSE;
//printf("generateClassOrGlobalLink(className=%s)\n",className.data());
@@ -1033,7 +1033,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
anchor.sprintf("_a%d",g_anchorCount);
//printf("addExampleClass(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
// g_exampleFile.data());
- if (cd->addExample(anchor,g_exampleName,g_exampleFile))
+ if (const_cast<ClassDef*>(cd)->addExample(anchor,g_exampleName,g_exampleFile))
{
ol.writeCodeAnchor(anchor);
g_anchorCount++;
@@ -1050,7 +1050,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
if (d && d->isLinkable() && md->isLinkable() &&
g_currentMemberDef && g_collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,md);
+ addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
}
}
}
@@ -1092,8 +1092,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
}
text+=getLanguageSpecificSeparator(md->getLanguage());
text+=clName;
- md->setName(text);
- md->setLocalName(text);
+ const_cast<MemberDef*>(md)->setName(text);
+ const_cast<MemberDef*>(md)->setLocalName(text);
}
else // normal reference
{
@@ -1103,7 +1103,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
addToSearchIndex(clName);
if (g_currentMemberDef && g_collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,md);
+ addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
}
return;
}
@@ -1122,7 +1122,7 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
// extract class definition of the return type in order to resolve
// a->b()->c() like call chains
- //printf("type=`%s' args=`%s' class=%s\n",
+ //printf("type='%s' args='%s' class=%s\n",
// xmd->typeString(),xmd->argsString(),
// xmd->getClassDef()->name().data());
@@ -1139,7 +1139,7 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
}
}
- ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
+ const ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
g_theCallContext.setScope(typeClass);
@@ -1220,7 +1220,7 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
if (varName.isEmpty()) return;
// look for the variable in the current context
- ClassDef *vcd = g_theVarContext.findVariable(varName);
+ const ClassDef *vcd = g_theVarContext.findVariable(varName);
if (vcd)
{
if (vcd!=VariableContext::dummyContext)
@@ -1250,7 +1250,7 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
vcd = getResolvedClass(g_currentDefinition,g_sourceFileDef,g_classScope);
if (vcd && vcd->isLinkable())
{
- //printf("Found class %s for variable `%s'\n",g_classScope.data(),varName.data());
+ //printf("Found class %s for variable '%s'\n",g_classScope.data(),varName.data());
MemberName *vmn=Doxygen::memberNameSDict->find(varName);
if (vmn==0)
{
@@ -1261,18 +1261,18 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
ClassDef *jcd = getClass(vn.left(vi));
vn=vn.right(vn.length()-vi-2);
vmn=Doxygen::memberNameSDict->find(vn);
- //printf("Trying name `%s' scope=%s\n",vn.data(),scope.data());
+ //printf("Trying name '%s' scope=%s\n",vn.data(),scope.data());
if (vmn)
{
MemberNameIterator vmni(*vmn);
- MemberDef *vmd;
+ const MemberDef *vmd;
for (;(vmd=vmni.current());++vmni)
{
if (/*(vmd->isVariable() || vmd->isFunction()) && */
vmd->getClassDef()==jcd)
{
//printf("Found variable type=%s\n",vmd->typeString());
- ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
+ const ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
if (generateClassMemberLink(ol,mcd,memName)) return;
@@ -1284,16 +1284,16 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
}
if (vmn)
{
- //printf("There is a variable with name `%s'\n",varName);
+ //printf("There is a variable with name '%s'\n",varName);
MemberNameIterator vmni(*vmn);
- MemberDef *vmd;
+ const MemberDef *vmd;
for (;(vmd=vmni.current());++vmni)
{
if (/*(vmd->isVariable() || vmd->isFunction()) && */
vmd->getClassDef()==vcd)
{
//printf("Found variable type=%s\n",vmd->typeString());
- ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
+ const ClassDef *mcd=stripClassName(vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
if (generateClassMemberLink(ol,mcd,memName)) return;
@@ -1513,7 +1513,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
ctx->objectType = stripClassName(ctx->objectVar->typeString());
//printf(" ctx->objectType=%p\n",ctx->objectType);
- if (ctx->objectType)
+ if (ctx->objectType && !ctx->methodName.isEmpty())
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
//printf(" ctx->method=%p\n",ctx->method);
@@ -1525,7 +1525,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
else // local variable
{
//printf(" object is local variable\n");
- if (cd!=VariableContext::dummyContext)
+ if (cd!=VariableContext::dummyContext && !ctx->methodName.isEmpty())
{
ctx->method = cd->getMemberByName(ctx->methodName);
//printf(" class=%p method=%p\n",cd,ctx->method);
@@ -1561,7 +1561,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
writeMultiLineCodeLink(*g_code,ctx->method,pName->data());
if (g_currentMemberDef && g_collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,ctx->method);
+ addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(ctx->method));
}
}
else
@@ -1594,7 +1594,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
ctx->objectType = ctx->objectType->categoryOf();
}
- if (ctx->objectType)
+ if (ctx->objectType && !ctx->methodName.isEmpty())
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
}
@@ -1623,7 +1623,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
if (bclass->classDef->compoundType()!=ClassDef::Protocol)
{
ctx->objectType = bclass->classDef;
- if (ctx->objectType)
+ if (ctx->objectType && !ctx->methodName.isEmpty())
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
}
@@ -1640,7 +1640,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
writeMultiLineCodeLink(*g_code,ctx->objectVar,pObject->data());
if (g_currentMemberDef && g_collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,ctx->objectVar);
+ addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(ctx->objectVar));
}
}
else if (ctx->objectType &&
@@ -1648,12 +1648,12 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
ctx->objectType->isLinkable()
) // object is class name
{
- ClassDef *cd = ctx->objectType;
+ const ClassDef *cd = ctx->objectType;
writeMultiLineCodeLink(*g_code,cd,pObject->data());
}
else // object still needs to be resolved
{
- ClassDef *cd = getResolvedClass(g_currentDefinition,
+ const ClassDef *cd = getResolvedClass(g_currentDefinition,
g_sourceFileDef, *pObject);
if (cd && cd->isLinkable())
{
@@ -1701,7 +1701,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
else
{
ctx->objectType = stripClassName(ictx->method->typeString());
- if (ctx->objectType)
+ if (ctx->objectType && !ctx->methodName.isEmpty())
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
}
@@ -2302,12 +2302,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
char *s=g_curClassBases.first();
while (s)
{
- ClassDef *bcd;
- bcd=g_codeClassSDict->find(s);
+ const ClassDef *bcd=g_codeClassSDict->find(s);
if (bcd==0) bcd=getResolvedClass(g_currentDefinition,g_sourceFileDef,s);
if (bcd && bcd!=ncd)
{
- ncd->insertBaseClass(bcd,s,Public,Normal);
+ ncd->insertBaseClass(const_cast<ClassDef*>(bcd),s,Public,Normal);
}
s=g_curClassBases.next();
}
@@ -2510,7 +2509,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<Body>"*"{B}*")" { // end of cast?
g_code->codify(yytext);
- g_theCallContext.popScope();
+ g_theCallContext.popScope(g_name, g_type);
g_bracketCount--;
g_parmType = g_name;
BEGIN(FuncCall);
@@ -2520,7 +2519,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_name.resize(0);g_type.resize(0);
if (*yytext==')')
{
- g_theCallContext.popScope();
+ g_theCallContext.popScope(g_name, g_type);
g_bracketCount--;
BEGIN(FuncCall);
}
@@ -2852,7 +2851,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
else if (*yytext=='[')
{
- g_theCallContext.pushScope();
+ g_theCallContext.pushScope(g_name, g_type);
}
g_args.resize(0);
g_parmType.resize(0);
@@ -2878,7 +2877,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<ObjCMemberCall>"[" {
g_code->codify(yytext);
- g_theCallContext.pushScope();
+ g_theCallContext.pushScope(g_name, g_type);
}
<ObjCMemberCall2>{ID}":"? {
g_name+=yytext;
@@ -2900,7 +2899,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN(ObjCMemberCall3);
}
<ObjCMemberCall2,ObjCMemberCall3>"]" {
- g_theCallContext.popScope();
+ g_theCallContext.popScope(g_name, g_type);
g_code->codify(yytext);
BEGIN(Body);
}
@@ -2990,7 +2989,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<ObjCCall,ObjCMName,ObjCSkipStr>\n { g_currentCtx->format+=*yytext; }
<Body>"]" {
- g_theCallContext.popScope();
+ g_theCallContext.popScope(g_name, g_type);
g_code->codify(yytext);
// TODO: nested arrays like: a[b[0]->func()]->func()
g_name = g_saveName.copy();
@@ -3093,7 +3092,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_parmType.resize(0);g_parmName.resize(0);
g_code->codify(yytext);
g_bracketCount++;
- g_theCallContext.pushScope();
+ g_theCallContext.pushScope(g_name, g_type);
if (YY_START==FuncCall && !g_insideBody)
{
g_theVarContext.pushScope();
@@ -3127,7 +3126,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_parmName.resize(0);
g_theVarContext.addVariable(g_parmType,g_parmName);
}
- g_theCallContext.popScope();
+ g_theCallContext.popScope(g_name, g_type);
g_inForEachExpression = FALSE;
//g_theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b().
g_code->codify(yytext);
@@ -3184,7 +3183,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_theVarContext.pushScope();
}
g_theVarContext.addVariable(g_parmType,g_parmName);
- //g_theCallContext.popScope();
+ //g_theCallContext.popScope(g_name, g_type);
g_parmType.resize(0);g_parmName.resize(0);
int index = g_name.findRev("::");
DBG_CTX((stderr,"g_name=%s\n",g_name.data()));
@@ -3192,7 +3191,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
QCString scope = g_name.left(index);
if (!g_classScope.isEmpty()) scope.prepend(g_classScope+"::");
- ClassDef *cd=getResolvedClass(Doxygen::globalScope,g_sourceFileDef,scope);
+ const ClassDef *cd=getResolvedClass(Doxygen::globalScope,g_sourceFileDef,scope);
if (cd)
{
setClassScope(cd->name());
@@ -3644,11 +3643,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<*>"("|"[" {
g_code->codify(yytext);
- g_theCallContext.pushScope();
+ g_theCallContext.pushScope(g_name, g_type);
}
<*>")"|"]" {
g_code->codify(yytext);
- g_theCallContext.popScope();
+ g_theCallContext.popScope(g_name, g_type);
}
<*>\n {
g_yyColNr++;
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 0ea5ff7..031b6f5 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -266,7 +266,7 @@ void replaceComment(int offset);
else
{
g_pythonDocString = TRUE;
- g_nestingCount=0;
+ g_nestingCount=1;
g_commentStack.clear(); /* to be on the save side */
copyToOutput(yytext,(int)yyleng);
BEGIN(CComment);
@@ -281,7 +281,7 @@ void replaceComment(int offset);
else
{
copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0;
+ g_nestingCount=0; // Fortran doesn't have an end comment
g_commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
@@ -298,7 +298,7 @@ void replaceComment(int offset);
if (isFixedForm && (g_col == 0))
{
copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0;
+ g_nestingCount=0; // Fortran doesn't have an end comment
g_commentStack.clear(); /* to be on the safe side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
@@ -404,7 +404,7 @@ void replaceComment(int offset);
REJECT;
}
g_specialComment=(int)yyleng==3;
- g_nestingCount=0;
+ g_nestingCount=1;
g_commentStack.clear(); /* to be on the save side */
copyToOutput(yytext,(int)yyleng);
BEGIN(CComment);
@@ -418,7 +418,7 @@ void replaceComment(int offset);
else
{
copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0;
+ g_nestingCount=0; // Python doesn't have an end comment for #
g_commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
@@ -433,7 +433,7 @@ void replaceComment(int offset);
{
g_vhdl = TRUE;
copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0;
+ g_nestingCount=0; // VHDL doesn't have an end comment
g_commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
@@ -447,7 +447,7 @@ void replaceComment(int offset);
else
{
copyToOutput(yytext,(int)yyleng);
- g_nestingCount=0;
+ g_nestingCount=0; // Fortran doesn't have an end comment
g_commentStack.clear(); /* to be on the save side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
@@ -680,13 +680,14 @@ void replaceComment(int offset);
else
{
copyToOutput(yytext,(int)yyleng);
+ g_nestingCount--;
if (g_nestingCount<=0)
{
BEGIN(Scan);
}
else
{
- g_nestingCount--;
+ //g_nestingCount--;
delete g_commentStack.pop();
}
}
@@ -1119,7 +1120,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
}
tmp += ")";
warn(g_fileName,g_lineNr,"Reached end of file while still inside a (nested) comment. "
- "Nesting level %d %s",g_nestingCount+1,tmp.data()); // add one for "normal" expected end of comment
+ "Nesting level %d %s",g_nestingCount,tmp.data());
}
g_commentStack.clear();
g_nestingCount = 0;
diff --git a/src/commentscan.h b/src/commentscan.h
index 75cd99f..7d2189f 100644
--- a/src/commentscan.h
+++ b/src/commentscan.h
@@ -85,13 +85,5 @@ bool parseCommentBlock(ParserInterface *parser,
bool &newEntryNeeded
);
-void groupEnterFile(const char *file,int line);
-void groupLeaveFile(const char *file,int line);
-void groupLeaveCompound(const char *file,int line,const char *name);
-void groupEnterCompound(const char *file,int line,const char *name);
-void openGroup(Entry *e,const char *file,int line);
-void closeGroup(Entry *,const char *file,int line,bool foundInline=FALSE);
-void initGroupInfo(Entry *e);
-
#endif
diff --git a/src/commentscan.l b/src/commentscan.l
index b3902fc..a495c5e 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -386,11 +386,6 @@ class GuardedSection
bool m_parentVisible;
};
-void openGroup(Entry *e,const char *file,int line);
-void closeGroup(Entry *e,const char *file,int line,bool foundInline=FALSE);
-void initGroupInfo(Entry *e);
-static void groupAddDocs(Entry *e);
-
/* -----------------------------------------------------------------
*
* statics
@@ -451,20 +446,11 @@ static bool g_insideParBlock;
//-----------------------------------------------------------------------------
-static QStack<Grouping> g_autoGroupStack;
-static int g_memberGroupId = DOX_NOGROUP;
-static QCString g_memberGroupHeader;
-static QCString g_memberGroupDocs;
-static QCString g_memberGroupRelates;
-static QCString g_compoundName;
-
-//-----------------------------------------------------------------------------
-
static void initParser()
{
g_sectionLabel.resize(0);
g_sectionTitle.resize(0);
- g_memberGroupHeader.resize(0);
+ Doxygen::docGroup.clearHeader();
g_insideParBlock = FALSE;
}
@@ -826,6 +812,10 @@ static inline void setOutput(OutputContext ctx)
}
else
{
+ if (!current->doc.isEmpty()) // when appending parts add a new line
+ {
+ current->doc += "\n";
+ }
pOutputString = &current->doc;
inContext = OutputDoc; // need to switch to detailed docs, see bug 631380
}
@@ -1218,12 +1208,12 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<Comment>{B}*{CMD}"{" { // begin of a group
//langParser->handleGroupStartCommand(g_memberGroupHeader);
- openGroup(current,yyFileName,yyLineNr);
+ Doxygen::docGroup.open(current,yyFileName,yyLineNr);
}
<Comment>{B}*{CMD}"}" { // end of a group
//langParser->handleGroupEndCommand();
- closeGroup(current,yyFileName,yyLineNr,TRUE);
- g_memberGroupHeader.resize(0);
+ Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE);
+ Doxygen::docGroup.clearHeader();
parseMore=TRUE;
needNewEntry = TRUE;
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
@@ -1904,17 +1894,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput('\n');
}
<FormatBlock>"/*" { // start of a C-comment
- g_commentCount++;
+ if (!(blockName=="code" || blockName=="verbatim")) g_commentCount++;
addOutput(yytext);
}
<FormatBlock>"*/" { // end of a C-comment
addOutput(yytext);
- g_commentCount--;
- if (g_commentCount<0 && blockName!="verbatim")
- {
- warn(yyFileName,yyLineNr,
+ if (!(blockName=="code" || blockName=="verbatim"))
+ {
+ g_commentCount--;
+ if (g_commentCount<0)
+ {
+ warn(yyFileName,yyLineNr,
"found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data());
- }
+ }
+ }
}
<FormatBlock>. {
addOutput(*yytext);
@@ -2129,10 +2122,10 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<NameParam>{LC} { // line continuation
yyLineNr++;
addOutput('\n');
- g_memberGroupHeader+=' ';
+ Doxygen::docGroup.appendHeader(' ');
}
<NameParam>. { // ignore other stuff
- g_memberGroupHeader+=*yytext;
+ Doxygen::docGroup.appendHeader(*yytext);
current->name+=*yytext;
}
@@ -2552,11 +2545,11 @@ static bool handleName(const QCString &, const QCStringList &)
bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC);
if (!stop)
{
- g_memberGroupHeader.resize(0);
+ Doxygen::docGroup.clearHeader();
BEGIN( NameParam );
- if (g_memberGroupId!=DOX_NOGROUP) // end of previous member group
+ if (!Doxygen::docGroup.isEmpty()) // end of previous member group
{
- closeGroup(current,yyFileName,yyLineNr,TRUE);
+ Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE,true);
}
}
return stop;
@@ -2984,7 +2977,7 @@ static bool handleToc(const QCString &, const QCStringList &optList)
{
if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1)
{
- warn(yyFileName,yyLineNr,"Unknown option:level specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data());
+ warn(yyFileName,yyLineNr,"Unknown option:level specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
opt = "";
}
else
@@ -3014,7 +3007,7 @@ static bool handleToc(const QCString &, const QCStringList &optList)
}
else
{
- warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data());
+ warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
}
}
}
@@ -3157,6 +3150,10 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
parseMore = FALSE;
inBody = isInbody;
outputXRef.resize(0);
+ if (!isBrief && !isAutoBriefOn && !current->doc.isEmpty())
+ { // add newline separator between detailed comment blocks
+ current->doc += '\n';
+ }
setOutput( isBrief || isAutoBriefOn ? OutputBrief : OutputDoc );
briefEndsAtDot = isAutoBriefOn;
g_condCount = 0;
@@ -3204,9 +3201,9 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
}
if (current->section==Entry::MEMBERGRP_SEC &&
- g_memberGroupId==DOX_NOGROUP) // @name section but no group started yet
+ Doxygen::docGroup.isEmpty()) // @name section but no group started yet
{
- openGroup(current,yyFileName,yyLineNr);
+ Doxygen::docGroup.open(current,yyFileName,yyLineNr,true);
}
Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\noutput=[\n"
@@ -3220,7 +3217,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
checkFormula();
prot = protection;
- groupAddDocs(curEntry);
+ Doxygen::docGroup.addDocs(curEntry);
newEntryNeeded = needNewEntry;
@@ -3239,185 +3236,6 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
return parseMore;
}
-//---------------------------------------------------------------------------
-
-void groupEnterFile(const char *fileName,int)
-{
- g_autoGroupStack.setAutoDelete(TRUE);
- g_autoGroupStack.clear();
- g_memberGroupId = DOX_NOGROUP;
- g_memberGroupDocs.resize(0);
- g_memberGroupRelates.resize(0);
- g_compoundName=fileName;
-}
-
-void groupLeaveFile(const char *fileName,int line)
-{
- //if (g_memberGroupId!=DOX_NOGROUP)
- //{
- // warn(fileName,line,"end of file while inside a member group\n");
- //}
- g_memberGroupId=DOX_NOGROUP;
- g_memberGroupRelates.resize(0);
- g_memberGroupDocs.resize(0);
- if (!g_autoGroupStack.isEmpty())
- {
- warn(fileName,line,"end of file while inside a group\n");
- }
-}
-
-void groupEnterCompound(const char *fileName,int line,const char *name)
-{
- if (g_memberGroupId!=DOX_NOGROUP)
- {
- warn(fileName,line,"try to put compound %s inside a member group\n",name);
- }
- g_memberGroupId=DOX_NOGROUP;
- g_memberGroupRelates.resize(0);
- g_memberGroupDocs.resize(0);
- g_compoundName = name;
- int i = g_compoundName.find('(');
- if (i!=-1)
- {
- g_compoundName=g_compoundName.left(i); // strip category (Obj-C)
- }
- if (g_compoundName.isEmpty())
- {
- g_compoundName=fileName;
- }
- //printf("groupEnterCompound(%s)\n",name);
-}
-
-void groupLeaveCompound(const char *,int,const char * /*name*/)
-{
- //printf("groupLeaveCompound(%s)\n",name);
- //if (g_memberGroupId!=DOX_NOGROUP)
- //{
- // warn(fileName,line,"end of compound %s while inside a member group\n",name);
- //}
- g_memberGroupId=DOX_NOGROUP;
- g_memberGroupRelates.resize(0);
- g_memberGroupDocs.resize(0);
- g_compoundName.resize(0);
-}
-
-static int findExistingGroup(int &groupId,const MemberGroupInfo *info)
-{
- //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data());
- QIntDictIterator<MemberGroupInfo> di(Doxygen::memGrpInfoDict);
- MemberGroupInfo *mi;
- for (di.toFirst();(mi=di.current());++di)
- {
- if (g_compoundName==mi->compoundName && // same file or scope
- !mi->header.isEmpty() && // not a nameless group
- qstricmp(mi->header,info->header)==0 // same header name
- )
- {
- //printf("Found it!\n");
- return (int)di.currentKey(); // put the item in this group
- }
- }
- groupId++; // start new group
- return groupId;
-}
-
-void openGroup(Entry *e,const char *,int)
-{
- //printf("==> openGroup(name=%s,sec=%x) g_autoGroupStack=%d\n",
- // e->name.data(),e->section,g_autoGroupStack.count());
- if (e->section==Entry::GROUPDOC_SEC) // auto group
- {
- g_autoGroupStack.push(new Grouping(e->name,e->groupingPri()));
- }
- else // start of a member group
- {
- //printf(" membergroup id=%d %s\n",g_memberGroupId,g_memberGroupHeader.data());
- if (g_memberGroupId==DOX_NOGROUP) // no group started yet
- {
- static int curGroupId=0;
-
- MemberGroupInfo *info = new MemberGroupInfo;
- info->header = g_memberGroupHeader.stripWhiteSpace();
- info->compoundName = g_compoundName;
- g_memberGroupId = findExistingGroup(curGroupId,info);
- //printf(" use membergroup %d\n",g_memberGroupId);
- Doxygen::memGrpInfoDict.insert(g_memberGroupId,info);
-
- g_memberGroupRelates = e->relates;
- e->mGrpId = g_memberGroupId;
- }
- }
-}
-
-void closeGroup(Entry *e,const char *fileName,int line,bool foundInline)
-{
- //printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) g_autoGroupStack=%d\n",
- // e->name.data(),e->section,fileName,line,g_autoGroupStack.count());
- if (g_memberGroupId!=DOX_NOGROUP) // end of member group
- {
- MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId);
- if (info) // known group
- {
- info->doc = g_memberGroupDocs;
- info->docFile = fileName;
- info->docLine = line;
- }
- g_memberGroupId=DOX_NOGROUP;
- g_memberGroupRelates.resize(0);
- g_memberGroupDocs.resize(0);
- if (!foundInline) e->mGrpId=DOX_NOGROUP;
- //printf("new group id=%d\n",g_memberGroupId);
- }
- else if (!g_autoGroupStack.isEmpty()) // end of auto group
- {
- Grouping *grp = g_autoGroupStack.pop();
- // see bug577005: we should not remove the last group for e
- if (!foundInline) e->groups->removeLast();
- //printf("Removing %s e=%p\n",grp->groupname.data(),e);
- delete grp;
- if (!foundInline) initGroupInfo(e);
- }
-}
-
-void initGroupInfo(Entry *e)
-{
- //printf("==> initGroup(id=%d,related=%s,e=%p)\n",g_memberGroupId,
- // g_memberGroupRelates.data(),e);
- e->mGrpId = g_memberGroupId;
- e->relates = g_memberGroupRelates;
- if (!g_autoGroupStack.isEmpty())
- {
- //printf("Appending group %s to %s: count=%d entry=%p\n",
- // g_autoGroupStack.top()->groupname.data(),
- // e->name.data(),e->groups->count(),e);
- e->groups->append(new Grouping(*g_autoGroupStack.top()));
- }
-}
-
-static void groupAddDocs(Entry *e)
-{
- if (e->section==Entry::MEMBERGRP_SEC)
- {
- g_memberGroupDocs=e->brief.stripWhiteSpace();
- e->doc = stripLeadingAndTrailingEmptyLines(e->doc,e->docLine);
- if (!g_memberGroupDocs.isEmpty() && !e->doc.isEmpty())
- {
- g_memberGroupDocs+="\n\n";
- }
- g_memberGroupDocs+=e->doc;
- MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId);
- if (info)
- {
- info->doc = g_memberGroupDocs;
- info->docFile = e->docFile;
- info->docLine = e->docLine;
- info->setRefItems(e->sli);
- }
- e->doc.resize(0);
- e->brief.resize(0);
- }
-}
-
static void handleGuard(const QCString &expr)
{
CondParser prs;
diff --git a/src/config.xml b/src/config.xml
index 8e19d67..966072f 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -482,7 +482,7 @@ Go to the <a href="commands.html">next</a> section or return to the
<docs>
<![CDATA[
If the \c JAVADOC_BANNER tag is set to \c YES then doxygen
- will interpret a line such as "/***************" as being the
+ will interpret a line such as \verbatim /***************\endverbatim as being the
beginning of a Javadoc-style comment "banner". If set to \c NO, the
Javadoc-style will behave just like regular comments and it will
not be interpreted by doxygen.
diff --git a/src/configgen.py b/src/configgen.py
index ca2a5d1..dbba264 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -717,6 +717,10 @@ def main():
print("")
print("void ConfigValues::init()")
print("{")
+ print(" static bool first = TRUE;")
+ print(" if (!first) return;")
+ print(" first = FALSE;")
+ print("")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
if (n.nodeName == "group"):
diff --git a/src/configimpl.l b/src/configimpl.l
index 1505d9a..bcb5a8c 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -174,7 +174,7 @@ void ConfigInt::convertStrToVal()
int val = m_valueString.toInt(&ok);
if (!ok || val<m_minVal || val>m_maxVal)
{
- config_warn("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
@@ -199,7 +199,7 @@ void ConfigBool::convertStrToVal()
}
else
{
- config_warn("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");
}
}
@@ -711,7 +711,7 @@ static void readIncludeFile(const char *incName)
ConfigOption *option = config->get(cmd);
if (option==0) // oops not known
{
- config_warn("ignoring unsupported tag `%s' at line %d, file %s\n",
+ config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
cmd.data(),yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
}
@@ -754,12 +754,12 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_Obsolete:
if (config_upd)
{
- config_warn("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_warn("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());
}
@@ -768,12 +768,12 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_Disabled:
if (config_upd)
{
- config_warn("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_warn("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());
}
@@ -787,7 +787,7 @@ static void readIncludeFile(const char *incName)
ConfigOption *option = config->get(cmd);
if (option==0) // oops not known
{
- config_warn("ignoring unsupported tag `%s' at line %d, file %s\n",
+ config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
cmd.data(),yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
}
@@ -809,18 +809,18 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_String:
case ConfigOption::O_Int:
case ConfigOption::O_Bool:
- config_warn("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_warn("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_warn("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);
@@ -857,13 +857,13 @@ static void readIncludeFile(const char *incName)
}
}
-<Start>[a-z_A-Z0-9]+ { config_warn("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++;
if (!elemStr.isEmpty())
{
- //printf("elemStr1=`%s'\n",elemStr.data());
+ //printf("elemStr1='%s'\n",elemStr.data());
l->append(elemStr);
}
BEGIN(Start);
@@ -871,7 +871,7 @@ static void readIncludeFile(const char *incName)
<GetStrList>[ \t,]+ {
if (!elemStr.isEmpty())
{
- //printf("elemStr2=`%s'\n",elemStr.data());
+ //printf("elemStr2='%s'\n",elemStr.data());
l->append(elemStr);
}
elemStr.resize(0);
@@ -886,7 +886,7 @@ static void readIncludeFile(const char *incName)
<GetQuotedString>"\""|"\n" {
// we add a bogus space to signal that the string was quoted. This space will be stripped later on.
tmpString+=" ";
- //printf("Quoted String = `%s'\n",tmpString.data());
+ //printf("Quoted String = '%s'\n",tmpString.data());
if (lastState==GetString)
{
(*s)+=configStringRecode(tmpString,encoding,"UTF-8");
@@ -917,7 +917,7 @@ static void readIncludeFile(const char *incName)
else
{
*b=FALSE;
- config_warn("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());
}
@@ -943,7 +943,7 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
{
t << takeStartComment() << endl;
}
- t << "# Doxyfile " << versionString << endl << endl;
+ t << "# Doxyfile " << getVersion() << endl << endl;
if (!sl)
{
t << convertToComment(m_header,"");
@@ -964,7 +964,12 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
void ConfigImpl::compareDoxyfile(FTextStream &t)
{
- t << "# Difference with default Doxyfile " << versionString << endl;
+ t << "# Difference with default Doxyfile " << getVersion();
+ if (strlen(getGitVersion()))
+ {
+ t << " (" << getGitVersion() << ")";
+ }
+ t << endl;
QListIterator<ConfigOption> it = iterator();
ConfigOption *option;
for (;(option=it.current());++it)
@@ -1003,7 +1008,7 @@ static void substEnvVarsInString(QCString &s)
//printf("substEnvVarInString(%s) start\n",s.data());
while ((i=re.match(s,p,&l))!=-1 || (i=re2.match(s,p,&l))!=-1)
{
- //printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
+ //printf("Found environment var s.mid(%d,%d)='%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
QCString env=portable_getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
@@ -1200,7 +1205,7 @@ static QCString configFileToString(const char *name)
QFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
{
- config_err("file `%s' not found\n",name);
+ config_err("file '%s' not found\n",name);
return "";
}
f.setName(name);
@@ -1221,7 +1226,7 @@ static QCString configFileToString(const char *name)
}
if (!fileOpened)
{
- config_err("cannot open file `%s' for reading\n",name);
+ config_err("cannot open file '%s' for reading\n",name);
exit(1);
}
return "";
@@ -1401,7 +1406,7 @@ void Config::checkAndCorrect()
QFileInfo fi(headerFile);
if (!fi.exists())
{
- err("tag HTML_HEADER: header file `%s' "
+ err("tag HTML_HEADER: header file '%s' "
"does not exist\n",headerFile.data());
exit(1);
}
@@ -1413,7 +1418,7 @@ void Config::checkAndCorrect()
QFileInfo fi(footerFile);
if (!fi.exists())
{
- err("tag HTML_FOOTER: footer file `%s' "
+ err("tag HTML_FOOTER: footer file '%s' "
"does not exist\n",footerFile.data());
exit(1);
}
@@ -1428,7 +1433,7 @@ void Config::checkAndCorrect()
QFileInfo fi(MathJaxCodefile);
if (!fi.exists())
{
- err("tag MATHJAX_CODEFILE file `%s' "
+ err("tag MATHJAX_CODEFILE file '%s' "
"does not exist\n",MathJaxCodefile.data());
exit(1);
}
@@ -1448,7 +1453,7 @@ void Config::checkAndCorrect()
QFileInfo fi(latexHeaderFile);
if (!fi.exists())
{
- err("tag LATEX_HEADER: header file `%s' "
+ err("tag LATEX_HEADER: header file '%s' "
"does not exist\n",latexHeaderFile.data());
exit(1);
}
@@ -1460,7 +1465,7 @@ void Config::checkAndCorrect()
QFileInfo fi(latexFooterFile);
if (!fi.exists())
{
- err("tag LATEX_FOOTER: footer file `%s' "
+ err("tag LATEX_FOOTER: footer file '%s' "
"does not exist\n",latexFooterFile.data());
exit(1);
}
@@ -1472,7 +1477,7 @@ void Config::checkAndCorrect()
while (s)
{
QFileInfo fi(s);
- if (!fi.exists()) warn_uncond("tag INCLUDE_PATH: include path `%s' "
+ if (!fi.exists()) warn_uncond("tag INCLUDE_PATH: include path '%s' "
"does not exist\n",s);
s=includePath.next();
}
@@ -1488,7 +1493,7 @@ void Config::checkAndCorrect()
alias=alias.stripWhiteSpace();
if (alias.find(re1)!=0 && alias.find(re2)!=0)
{
- err("Illegal alias format `%s'. Use \"name=value\" or \"name(n)=value\", where n is the number of arguments\n",
+ 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();
@@ -1522,7 +1527,7 @@ void Config::checkAndCorrect()
}
//else if (dotImageFormat!="gif" && dotImageFormat!="png" && dotImageFormat!="jpg")
//{
- // err("Invalid value for DOT_IMAGE_FORMAT: `%s'. Using the default.\n",dotImageFormat.data());
+ // err("Invalid value for DOT_IMAGE_FORMAT: '%s'. Using the default.\n",dotImageFormat.data());
// dotImageFormat = "png";
//}
@@ -1637,7 +1642,7 @@ void Config::checkAndCorrect()
QFileInfo fi(s);
if (!fi.exists())
{
- warn_uncond("tag INPUT: input source `%s' does not exist\n",s);
+ warn_uncond("tag INPUT: input source '%s' does not exist\n",s);
}
s=inputSources.next();
}
diff --git a/src/constexp.l b/src/constexp.l
index bd42104..c9b984a 100644
--- a/src/constexp.l
+++ b/src/constexp.l
@@ -124,7 +124,7 @@ bool parseconstexp(const char *fileName,int lineNr,const QCString &s)
constexpYYrestart( yyin, yyscanner );
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- //printf("Expression: `%s'\n",s.data());
+ //printf("Expression: '%s'\n",s.data());
constexpYYparse(yyscanner);
diff --git a/src/context.cpp b/src/context.cpp
index 66206b1..49c9afa 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -380,7 +380,7 @@ class DoxygenContext::Private
public:
TemplateVariant version() const
{
- return versionString;
+ return getVersion();
}
TemplateVariant date() const
{
diff --git a/src/declinfo.h b/src/declinfo.h
index d226c7d..2039dca 100644
--- a/src/declinfo.h
+++ b/src/declinfo.h
@@ -20,9 +20,10 @@
#include <stdio.h>
#include <qcstring.h>
+#include "types.h"
extern void parseFuncDecl(const QCString &decl,
- bool objC,
+ const SrcLangExt lang,
QCString &clName,
QCString &type,
QCString &name,
diff --git a/src/declinfo.l b/src/declinfo.l
index d7f8743..36ef94a 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -34,6 +34,7 @@
#include "declinfo.h"
#include "util.h"
#include "message.h"
+#include "types.h"
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
@@ -59,6 +60,7 @@ struct declinfoYY_state
bool funcTempListFound;
QCString exceptionString;
bool insideObjC;
+ bool insidePHP;
};
static void addType(yyscan_t yyscanner);
@@ -100,13 +102,21 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
yyextra->name += yytext;
}
}
+<Start>([~!]{B}*)?{ID}{B}*"["{B}*"]" { // PHP
+ if (!yyextra->insidePHP)
+ {
+ REJECT;
+ }
+ addTypeName(yyscanner);
+ yyextra->name += removeRedundantWhiteSpace(yytext);
+ }
<Start>([~!]{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
// the / was add to deal with multi-
// dimensional C++ arrays like A[][15]
// the leading ~ is for a destructor
// the leading ! is for a C++/CLI finalizer (see bug 456475 and 635198)
addTypeName(yyscanner);
- yyextra->name += yytext;
+ yyextra->name += removeRedundantWhiteSpace(yytext);
}
<Start>{B}*"::"{B}* { // found a yyextra->scope specifier
if (!yyextra->scope.isEmpty())
@@ -198,7 +208,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
static void addType(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("addType() yyextra->type=`%s' yyextra->scope=`%s' yyextra->name=`%s'\n",
+ //printf("addType() yyextra->type='%s' yyextra->scope='%s' yyextra->name='%s'\n",
// yyextra->type.data(),yyextra->scope.data(),yyextra->name.data());
if (yyextra->name.isEmpty() && yyextra->scope.isEmpty()) return;
if (!yyextra->type.isEmpty()) yyextra->type+=" ";
@@ -211,7 +221,7 @@ static void addType(yyscan_t yyscanner)
static void addTypeName(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("addTypeName() yyextra->type=`%s' yyextra->scope=`%s' yyextra->name=`%s'\n",
+ //printf("addTypeName() yyextra->type='%s' yyextra->scope='%s' yyextra->name='%s'\n",
// yyextra->type.data(),yyextra->scope.data(),yyextra->name.data());
if (yyextra->name.isEmpty() ||
yyextra->name.at(yyextra->name.length()-1)==':') // end of Objective-C keyword => append to yyextra->name not yyextra->type
@@ -240,7 +250,7 @@ static int yyread(char *buf,int max_size, yyscan_t yyscanner)
static yyscan_t g_yyscanner;
static struct declinfoYY_state g_declinfo_extra;
-void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
+void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCString &t,
QCString &n,QCString &a,QCString &ftl,QCString &exc)
{
if (decl.isEmpty())
@@ -256,11 +266,12 @@ void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
printlex(yy_flex_debug, TRUE, __FILE__, NULL);
yyextra->inputString = decl;
- //printf("Input=`%s'\n",yyextra->inputString);
+ //printf("Input='%s'\n",yyextra->inputString);
yyextra->inputPosition = 0;
yyextra->classTempListFound = FALSE;
yyextra->funcTempListFound = FALSE;
- yyextra->insideObjC = objC;
+ yyextra->insideObjC = lang==SrcLangExt_ObjC;
+ yyextra->insidePHP = lang==SrcLangExt_PHP;
yyextra->scope.resize(0);
yyextra->className.resize(0);
yyextra->classTempList.resize(0);
@@ -274,7 +285,7 @@ void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
BEGIN( Start );
declinfoYYlex(g_yyscanner);
- //printf("yyextra->type=`%s' class=`%s' yyextra->name=`%s' yyextra->args=`%s'\n",
+ //printf("yyextra->type='%s' class='%s' yyextra->name='%s' yyextra->args='%s'\n",
// yyextra->type.data(),yyextra->scope.data(),yyextra->name.data(),yyextra->args.data());
int nb = yyextra->name.findRev('[');
@@ -327,7 +338,7 @@ void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
a.prepend(")");
t=t.left(t.length()-1);
}
- //printf("yyextra->type=`%s' class=`%s' yyextra->name=`%s' yyextra->args=`%s'\n",
+ //printf("yyextra->type='%s' class='%s' yyextra->name='%s' yyextra->args='%s'\n",
// t.data(),cl.data(),n.data(),a.data());
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
@@ -351,8 +362,8 @@ void dumpDecl(const char *s)
QCString funcTNames;
msg("-----------------------------------------\n");
parseFuncDecl(s,yyextra->className,classTNames,yyextra->type,yyextra->name,yyextra->args,funcTNames);
- msg("yyextra->type=`%s' class=`%s' classTempl=`%s' yyextra->name=`%s' "
- "funcTemplateNames=`%s' yyextra->args=`%s'\n",
+ msg("yyextra->type='%s' class='%s' classTempl='%s' yyextra->name='%s' "
+ "funcTemplateNames='%s' yyextra->args='%s'\n",
yyextra->type.data(),yyextra->className.data(),classTNames.data(),
yyextra->name.data(),funcTNames.data(),yyextra->args.data()
);
diff --git a/src/defargs.l b/src/defargs.l
index e49ef2e..85878c1 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -367,7 +367,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName);
g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();
- //printf("curArgType=`%s' curArgDefVal=`%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data());
+ //printf("curArgType='%s' curArgDefVal='%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data());
int l=g_curArgTypeName.length();
if (l>0)
{
@@ -447,7 +447,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
a->defval = g_curArgDefValue.copy();
//printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data());
a->docs = g_curArgDocs.stripWhiteSpace();
- //printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data());
+ //printf("Argument '%s' '%s' adding docs='%s'\n",a->type.data(),a->name.data(),a->docs.data());
g_argList->append(a);
}
g_curArgAttrib.resize(0);
@@ -479,7 +479,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_curArgTypeName+=" []";
g_curArgArray.resize(0);
}
- //printf("resolveName `%s'->`%s'\n",yytext,name.data());
+ //printf("resolveName '%s'->'%s'\n",yytext,name.data());
g_curArgTypeName+=name;
}
<ReadFuncArgType,ReadFuncArgPtr>. {
diff --git a/src/defgen.cpp b/src/defgen.cpp
index ab19c2a..aa9a1da 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -263,7 +263,7 @@ void generateDEFForMember(MemberDef *md,
t << memPrefix << "referenceto = {" << endl;
t << refPrefix << "id = '"
<< rmd->getBodyDef()->getOutputFileBase()
- << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
<< rmd->anchor() << "';" << endl;
t << refPrefix << "line = '"
@@ -296,7 +296,7 @@ void generateDEFForMember(MemberDef *md,
t << memPrefix << "referenceby = {" << endl;
t << refPrefix << "id = '"
<< rmd->getBodyDef()->getOutputFileBase()
- << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
<< rmd->anchor() << "';" << endl;
t << refPrefix << "line = '"
@@ -577,13 +577,13 @@ void generateDEF()
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
- err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
+ err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else
{
- msg("Notice: Output directory `%s' does not exist. "
+ msg("Notice: Output directory '%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
diff --git a/src/definition.cpp b/src/definition.cpp
index b9c40f6..3b5fea1 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -231,7 +231,7 @@ static void addToMap(const char *name,Definition *d)
if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2);
if (!symbolName.isEmpty())
{
- //printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d);
+ //printf("******* adding symbol '%s' (%p)\n",symbolName.data(),d);
DefinitionIntf *di=Doxygen::symbolMap->find(symbolName);
//printf(" addToMap(%p): looking for symbol %s: %p\n",d,symbolName.data(),di);
if (di==0) // new Symbol
@@ -275,7 +275,7 @@ static void removeFromMap(Definition *d)
QCString symbolName = d->_symbolName();
if (!symbolName.isEmpty())
{
- //printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d);
+ //printf("******* removing symbol '%s' (%p)\n",symbolName.data(),d);
DefinitionIntf *di=Doxygen::symbolMap->find(symbolName);
if (di)
{
@@ -438,7 +438,7 @@ void DefinitionImpl::addSectionsToDefinition(QList<SectionInfo> *anchorList)
SectionInfo *si;
for (;(si=it.current());++it)
{
- //printf("Add section `%s' to definition `%s'\n",
+ //printf("Add section '%s' to definition '%s'\n",
// si->label.data(),name().data());
SectionInfo *gsi=Doxygen::sectionDict->find(si->label);
//printf("===== label=%s gsi=%p\n",si->label.data(),gsi);
@@ -594,7 +594,7 @@ void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int doc
}
if (!_docsAlreadyAdded(doc,m_impl->docSignatures))
{
- //printf("setting docs for %s: `%s'\n",name().data(),m_doc.data());
+ //printf("setting docs for %s: '%s'\n",name().data(),m_doc.data());
if (m_impl->details==0)
{
m_impl->details = new DocInfo;
@@ -913,7 +913,7 @@ bool readCodeFragment(const char *fileName,
int pc=0;
while ((c=*p++)!='{' && c!=':' && c!=0)
{
- //printf("parsing char `%c'\n",c);
+ //printf("parsing char '%c'\n",c);
if (c=='\n')
{
lineNr++,col=0;
@@ -1277,7 +1277,7 @@ void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
// codeFragment.data(),m_impl->defFileExt.data());
ParserInterface *pIntf = Doxygen::parserManager->getParser(m_impl->defFileExt);
pIntf->resetCodeParserState();
- //printf("Read:\n`%s'\n\n",codeFragment.data());
+ //printf("Read:\n'%s'\n\n",codeFragment.data());
const MemberDef *thisMd = 0;
if (definitionType()==TypeMember) thisMd = dynamic_cast <const MemberDef*>(this);
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 06480fc..08b49ca 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -1165,7 +1165,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
t << " /boxwidth boxwidth str stringwidth pop max def\n";
t << "} def\n";
t << "\n";
- t << "/box % draws a box with text `arg1' at grid pos (arg2,arg3)\n";
+ t << "/box % draws a box with text 'arg1' at grid pos (arg2,arg3)\n";
t << "{ gsave\n";
t << " 2 setlinewidth\n";
t << " newpath\n";
@@ -1267,7 +1267,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
t << " stroke\n";
t << "} def\n";
t << "\n";
- t << "/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'\n";
+ t << "/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3'\n";
t << "{\n";
t << " /ys exch def\n";
t << " /xe exch def\n";
@@ -1337,7 +1337,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
epsBaseName.data(),epsBaseName.data());
- //printf("Converting eps using `%s'\n",epstopdfArgs.data());
+ //printf("Converting eps using '%s'\n",epstopdfArgs.data());
portable_sysTimerStart();
if (portable_system("epstopdf",epstopdfArgs)!=0)
{
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 73db25f..a42a895 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -263,7 +263,9 @@ DB_VIS_C
case DocStyleChange::Small: /* XSLT Stylesheets can be used */ break;
/* HTML only */
case DocStyleChange::Strike: break;
+ case DocStyleChange::Del: break;
case DocStyleChange::Underline: break;
+ case DocStyleChange::Ins: break;
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
}
@@ -480,7 +482,7 @@ DB_VIS_C
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -636,152 +638,152 @@ DB_VIS_C
case DocSimpleSect::See:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trSeeAlso() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trSeeAlso() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSeeAlso()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSeeAlso()) << "</title>" << endl;
}
break;
case DocSimpleSect::Return:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trReturns()<< ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trReturns()<< "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trReturns()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trReturns()) << "</title>" << endl;
}
break;
case DocSimpleSect::Author:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, TRUE) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, TRUE) << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, TRUE)) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, TRUE)) << "</title>" << endl;
}
break;
case DocSimpleSect::Authors:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, FALSE) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, FALSE) << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, FALSE)) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, FALSE)) << "</title>" << endl;
}
break;
case DocSimpleSect::Version:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trVersion() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trVersion() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trVersion()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trVersion()) << "</title>" << endl;
}
break;
case DocSimpleSect::Since:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trSince() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trSince() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSince()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSince()) << "</title>" << endl;
}
break;
case DocSimpleSect::Date:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trDate() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trDate() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trDate()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trDate()) << "</title>" << endl;
}
break;
case DocSimpleSect::Note:
if (m_insidePre)
{
- m_t << "<note><title>" << theTranslator->trNote() << ": </title>" << endl;
+ m_t << "<note><title>" << theTranslator->trNote() << "</title>" << endl;
}
else
{
- m_t << "<note><title>" << convertToDocBook(theTranslator->trNote()) << ": </title>" << endl;
+ m_t << "<note><title>" << convertToDocBook(theTranslator->trNote()) << "</title>" << endl;
}
break;
case DocSimpleSect::Warning:
if (m_insidePre)
{
- m_t << "<warning><title>" << theTranslator->trWarning() << ": </title>" << endl;
+ m_t << "<warning><title>" << theTranslator->trWarning() << "</title>" << endl;
}
else
{
- m_t << "<warning><title>" << convertToDocBook(theTranslator->trWarning()) << ": </title>" << endl;
+ m_t << "<warning><title>" << convertToDocBook(theTranslator->trWarning()) << "</title>" << endl;
}
break;
case DocSimpleSect::Pre:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trPrecondition() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trPrecondition() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPrecondition()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPrecondition()) << "</title>" << endl;
}
break;
case DocSimpleSect::Post:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trPostcondition() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trPostcondition() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPostcondition()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPostcondition()) << "</title>" << endl;
}
break;
case DocSimpleSect::Copyright:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trCopyright() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trCopyright() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trCopyright()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trCopyright()) << "</title>" << endl;
}
break;
case DocSimpleSect::Invar:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trInvariant() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trInvariant() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trInvariant()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trInvariant()) << "</title>" << endl;
}
break;
case DocSimpleSect::Remark:
// <remark> is miising the <title> possibility
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trRemarks() << ": </title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trRemarks() << "</title>" << endl;
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trRemarks()) << ": </title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trRemarks()) << "</title>" << endl;
}
break;
case DocSimpleSect::Attention:
if (m_insidePre)
{
- m_t << "<caution><title>" << theTranslator->trAttention() << ": </title>" << endl;
+ m_t << "<caution><title>" << theTranslator->trAttention() << "</title>" << endl;
}
else
{
- m_t << "<caution><title>" << convertToDocBook(theTranslator->trAttention()) << ": </title>" << endl;
+ m_t << "<caution><title>" << convertToDocBook(theTranslator->trAttention()) << "</title>" << endl;
}
break;
case DocSimpleSect::User:
@@ -1431,11 +1433,9 @@ DB_VIS_C
{
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
- bool first=TRUE;
m_t << " <entry>";
for (li.toFirst();(type=li.current());++li)
{
- if (!first) m_t << " | "; else first=FALSE;
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
@@ -1444,6 +1444,11 @@ DB_VIS_C
{
visit((DocLinkedWord*)type);
}
+ else if (type->kind()==DocNode::Kind_Sep)
+ {
+ m_t << " " << ((DocSeparator *)type)->chars() << " ";
+ }
+
}
m_t << " </entry>";
}
@@ -1523,22 +1528,6 @@ DB_VIS_C
m_t << " ";
}
-void DocbookDocVisitor::visitPre(DocCopy *)
-{
-DB_VIS_C
- if (m_hide) return;
- // TODO: to be implemented
-}
-
-
-void DocbookDocVisitor::visitPost(DocCopy *)
-{
-DB_VIS_C
- if (m_hide) return;
- // TODO: to be implemented
-}
-
-
void DocbookDocVisitor::visitPre(DocText *)
{
DB_VIS_C
diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h
index 24b1fbb..47275f7 100644
--- a/src/docbookvisitor.h
+++ b/src/docbookvisitor.h
@@ -127,8 +127,6 @@ class DocbookDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/docgroup.cpp b/src/docgroup.cpp
new file mode 100644
index 0000000..1f4fb6d
--- /dev/null
+++ b/src/docgroup.cpp
@@ -0,0 +1,215 @@
+#include "doxygen.h"
+#include "util.h"
+#include "entry.h"
+#include "message.h"
+#include "docgroup.h"
+
+
+void DocGroup::enterFile(const char *fileName,int)
+{
+ m_openCount = 0;
+ m_autoGroupStack.setAutoDelete(TRUE);
+ m_autoGroupStack.clear();
+ m_memberGroupId = DOX_NOGROUP;
+ m_memberGroupDocs.resize(0);
+ m_memberGroupRelates.resize(0);
+ m_compoundName=fileName;
+}
+
+void DocGroup::leaveFile(const char *fileName,int line)
+{
+ //if (m_memberGroupId!=DOX_NOGROUP)
+ //{
+ // warn(fileName,line,"end of file while inside a member group\n");
+ //}
+ m_memberGroupId=DOX_NOGROUP;
+ m_memberGroupRelates.resize(0);
+ m_memberGroupDocs.resize(0);
+ if (!m_autoGroupStack.isEmpty())
+ {
+ warn(fileName,line,"end of file while inside a group");
+ }
+ else if (m_openCount > 0) // < 0 is already handled on close call
+ {
+ warn(fileName,line,"end of file with unbalanced grouping commands");
+ }
+}
+
+void DocGroup::enterCompound(const char *fileName,int line,const char *name)
+{
+ if (m_memberGroupId!=DOX_NOGROUP)
+ {
+ warn(fileName,line,"try to put compound %s inside a member group\n",name);
+ }
+ m_memberGroupId=DOX_NOGROUP;
+ m_memberGroupRelates.resize(0);
+ m_memberGroupDocs.resize(0);
+ m_compoundName = name;
+ int i = m_compoundName.find('(');
+ if (i!=-1)
+ {
+ m_compoundName=m_compoundName.left(i); // strip category (Obj-C)
+ }
+ if (m_compoundName.isEmpty())
+ {
+ m_compoundName=fileName;
+ }
+ //printf("groupEnterCompound(%s)\n",name);
+}
+
+void DocGroup::leaveCompound(const char *,int,const char * /*name*/)
+{
+ //printf("groupLeaveCompound(%s)\n",name);
+ //if (m_memberGroupId!=DOX_NOGROUP)
+ //{
+ // warn(fileName,line,"end of compound %s while inside a member group\n",name);
+ //}
+ m_memberGroupId=DOX_NOGROUP;
+ m_memberGroupRelates.resize(0);
+ m_memberGroupDocs.resize(0);
+ m_compoundName.resize(0);
+}
+
+int DocGroup::findExistingGroup(int &groupId,const MemberGroupInfo *info)
+{
+ //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data());
+ QIntDictIterator<MemberGroupInfo> di(Doxygen::memGrpInfoDict);
+ MemberGroupInfo *mi;
+ for (di.toFirst();(mi=di.current());++di)
+ {
+ if (m_compoundName==mi->compoundName && // same file or scope
+ !mi->header.isEmpty() && // not a nameless group
+ qstricmp(mi->header,info->header)==0 // same header name
+ )
+ {
+ //printf("Found it!\n");
+ return (int)di.currentKey(); // put the item in this group
+ }
+ }
+ groupId++; // start new group
+ return groupId;
+}
+
+void DocGroup::open(Entry *e,const char *,int, bool implicit)
+{
+ if (!implicit) m_openCount++;
+ //printf("==> openGroup(name=%s,sec=%x) m_autoGroupStack=%d\n",
+ // e->name.data(),e->section,m_autoGroupStack.count());
+ if (e->section==Entry::GROUPDOC_SEC) // auto group
+ {
+ m_autoGroupStack.push(new Grouping(e->name,e->groupingPri()));
+ }
+ else // start of a member group
+ {
+ //printf(" membergroup id=%d %s\n",m_memberGroupId,m_memberGroupHeader.data());
+ if (m_memberGroupId==DOX_NOGROUP) // no group started yet
+ {
+ static int curGroupId=0;
+
+ MemberGroupInfo *info = new MemberGroupInfo;
+ info->header = m_memberGroupHeader.stripWhiteSpace();
+ info->compoundName = m_compoundName;
+ m_memberGroupId = findExistingGroup(curGroupId,info);
+ //printf(" use membergroup %d\n",m_memberGroupId);
+ Doxygen::memGrpInfoDict.insert(m_memberGroupId,info);
+
+ m_memberGroupRelates = e->relates;
+ e->mGrpId = m_memberGroupId;
+ }
+ }
+}
+
+void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit)
+{
+ if (!implicit)
+ {
+ if (m_openCount < 1)
+ {
+ warn(fileName,line,"unbalanced grouping commands");
+ }
+ else
+ {
+ m_openCount--;
+ }
+ }
+ //printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) m_autoGroupStack=%d\n",
+ // e->name.data(),e->section,fileName,line,m_autoGroupStack.count());
+ if (m_memberGroupId!=DOX_NOGROUP) // end of member group
+ {
+ MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(m_memberGroupId);
+ if (info) // known group
+ {
+ info->doc = m_memberGroupDocs;
+ info->docFile = fileName;
+ info->docLine = line;
+ }
+ m_memberGroupId=DOX_NOGROUP;
+ m_memberGroupRelates.resize(0);
+ m_memberGroupDocs.resize(0);
+ if (!foundInline) e->mGrpId=DOX_NOGROUP;
+ //printf("new group id=%d\n",m_memberGroupId);
+ }
+ else if (!m_autoGroupStack.isEmpty()) // end of auto group
+ {
+ Grouping *grp = m_autoGroupStack.pop();
+ // see bug577005: we should not remove the last group for e
+ if (!foundInline) e->groups->removeLast();
+ //printf("Removing %s e=%p\n",grp->groupname.data(),e);
+ delete grp;
+ if (!foundInline) initGroupInfo(e);
+ }
+}
+
+void DocGroup::initGroupInfo(Entry *e)
+{
+ //printf("==> initGroup(id=%d,related=%s,e=%p)\n",m_memberGroupId,
+ // m_memberGroupRelates.data(),e);
+ e->mGrpId = m_memberGroupId;
+ e->relates = m_memberGroupRelates;
+ if (!m_autoGroupStack.isEmpty())
+ {
+ //printf("Appending group %s to %s: count=%d entry=%p\n",
+ // m_autoGroupStack.top()->groupname.data(),
+ // e->name.data(),e->groups->count(),e);
+ e->groups->append(new Grouping(*m_autoGroupStack.top()));
+ }
+}
+
+void DocGroup::addDocs(Entry *e)
+{
+ if (e->section==Entry::MEMBERGRP_SEC)
+ {
+ m_memberGroupDocs=e->brief.stripWhiteSpace();
+ e->doc = stripLeadingAndTrailingEmptyLines(e->doc,e->docLine);
+ if (!m_memberGroupDocs.isEmpty() && !e->doc.isEmpty())
+ {
+ m_memberGroupDocs+="\n\n";
+ }
+ m_memberGroupDocs+=e->doc;
+ MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(m_memberGroupId);
+ if (info)
+ {
+ info->doc = m_memberGroupDocs;
+ info->docFile = e->docFile;
+ info->docLine = e->docLine;
+ info->setRefItems(e->sli);
+ }
+ e->doc.resize(0);
+ e->brief.resize(0);
+ }
+}
+
+bool DocGroup::isEmpty() const
+{
+ return (m_memberGroupId==DOX_NOGROUP);
+}
+
+void DocGroup::clearHeader()
+{
+ m_memberGroupHeader.resize(0);
+}
+
+void DocGroup::appendHeader(const char text)
+{
+ m_memberGroupHeader += text;
+}
diff --git a/src/docgroup.h b/src/docgroup.h
new file mode 100644
index 0000000..4775d90
--- /dev/null
+++ b/src/docgroup.h
@@ -0,0 +1,54 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2019 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
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef DOCGROUP_H
+#define DOCGROUP_H
+
+#include <qstack.h>
+#include <qstring.h>
+#include "membergroup.h"
+
+class Entry;
+
+class DocGroup
+{
+ public:
+ DocGroup() {};
+
+ public:
+ void enterFile(const char *fileName,int);
+ void leaveFile(const char *fileName,int line);
+ void enterCompound(const char *fileName,int line,const char *name);
+ void leaveCompound(const char *,int,const char * /*name*/);
+ void open(Entry *e,const char *,int,bool implicit=false);
+ void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false);
+ void initGroupInfo(Entry *e);
+ bool isEmpty() const;
+ void clearHeader();
+ void appendHeader(const char);
+ void addDocs(Entry *e);
+
+ private:
+ int findExistingGroup(int &groupId,const MemberGroupInfo *info);
+ int m_openCount;
+ QCString m_memberGroupHeader;
+ int m_memberGroupId;
+ QCString m_memberGroupRelates;
+ QCString m_memberGroupDocs;
+ QStack<Grouping> m_autoGroupStack;
+ QCString m_compoundName;
+};
+
+#endif
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 90ace3f..baa22b4 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -101,6 +101,7 @@ static QCString g_relPath;
static bool g_hasParamCommand;
static bool g_hasReturnCommand;
+static QDict<void> g_retvalsFound;
static QDict<void> g_paramsFound;
static const MemberDef * g_memberDef;
static bool g_isExample;
@@ -136,6 +137,7 @@ struct DocParserContext
bool hasParamCommand;
bool hasReturnCommand;
const MemberDef * memberDef;
+ QDict<void> retvalsFound;
QDict<void> paramsFound;
bool isExample;
QCString exampleName;
@@ -183,6 +185,7 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
ctx->hasParamCommand = g_hasParamCommand;
ctx->hasReturnCommand = g_hasReturnCommand;
ctx->paramsFound = g_paramsFound;
+ ctx->retvalsFound = g_retvalsFound;
}
ctx->memberDef = g_memberDef;
@@ -223,6 +226,7 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
{
g_hasParamCommand = ctx->hasParamCommand;
g_hasReturnCommand = ctx->hasReturnCommand;
+ g_retvalsFound = ctx->retvalsFound;
g_paramsFound = ctx->paramsFound;
}
g_memberDef = ctx->memberDef;
@@ -396,13 +400,13 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
return result;
}
-/*! Collects the parameters found with \@param or \@retval commands
- * in a global list g_paramsFound. If \a isParam is set to TRUE
- * and the parameter is not an actual parameter of the current
+/*! Collects the parameters found with \@param command
+ * in a global list g_paramsFound. If
+ * the parameter is not an actual parameter of the current
* member g_memberDef, then a warning is raised (unless warnings
* are disabled altogether).
*/
-static void checkArgumentName(const QCString &name,bool isParam)
+static void checkArgumentName(const QCString &name)
{
if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
if (g_memberDef==0) return; // not a member
@@ -419,7 +423,7 @@ static void checkArgumentName(const QCString &name,bool isParam)
{
QCString aName=name.mid(i,l);
if (lang==SrcLangExt_Fortran) aName=aName.lower();
- //printf("aName=`%s'\n",aName.data());
+ //printf("aName='%s'\n",aName.data());
ArgumentListIterator ali(*al);
const Argument *a;
bool found=FALSE;
@@ -428,16 +432,16 @@ static void checkArgumentName(const QCString &name,bool isParam)
QCString argName = g_memberDef->isDefine() ? a->type : a->name;
if (lang==SrcLangExt_Fortran) argName=argName.lower();
argName=argName.stripWhiteSpace();
- //printf("argName=`%s' aName=%s\n",argName.data(),aName.data());
+ //printf("argName='%s' aName=%s\n",argName.data(),aName.data());
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
- if (aName==argName && isParam)
+ if (aName==argName)
{
g_paramsFound.insert(aName,(void *)(0x8));
found=TRUE;
break;
}
}
- if (!found && isParam)
+ if (!found)
{
//printf("member type=%d\n",g_memberDef->memberType());
QCString scope=g_memberDef->getScopeString();
@@ -465,6 +469,23 @@ static void checkArgumentName(const QCString &name,bool isParam)
p=i+l;
}
}
+/*! Collects the return values found with \@retval command
+ * in a global list g_retvalsFound.
+ */
+static void checkRetvalName(const QCString &name)
+{
+ if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
+ if (g_memberDef==0 || name.isEmpty()) return; // not a member or no valid name
+ if (g_retvalsFound.find(name))
+ {
+ warn_doc_error(g_memberDef->getDefFileName(),
+ g_memberDef->getDefLine(),
+ "return value '" + name + "' of " +
+ QCString(g_memberDef->qualifiedName()) +
+ " has multiple documentation sections");
+ }
+ g_retvalsFound.insert(name,(void *)(0x8));
+}
/*! Checks if the parameters that have been specified using \@param are
* indeed all parameters and that a parameter does not have multiple
@@ -696,7 +717,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
const GroupDef *gd=0;
const PageDef *pd=0;
bool found = getDefs(
- g_context.find('.')==-1?g_context.data():"", // `find('.') is a hack to detect files
+ g_context.find('.')==-1?g_context.data():"", // find('.') is a hack to detect files
name,
args.isEmpty()?0:args.data(),
md,cd,fd,nd,gd,FALSE,0,TRUE);
@@ -718,7 +739,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
{
fullName.prepend(g_context.left(scopeOffset)+"::");
}
- //printf("Trying fullName=`%s'\n",fullName.data());
+ //printf("Trying fullName='%s'\n",fullName.data());
// try class, namespace, group, page, file reference
cd = Doxygen::classSDict->find(fullName);
@@ -816,8 +837,8 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return tok;
}
while ((tok=doctokenizerYYlex()) &&
@@ -852,7 +873,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
break;
}
}
- DBG(("handleStyleArgument(%s) end tok=%x\n",qPrint(cmdName),tok));
+ DBG(("handleStyleArgument(%s) end tok=%x\n",qPrint(saveCmdName),tok));
return (tok==TK_NEWPARA || tok==TK_LISTITEM || tok==TK_ENDLIST
) ? tok : RetVal_OK;
}
@@ -995,7 +1016,9 @@ const char *DocStyleChange::styleString() const
case DocStyleChange::Div: return "div";
case DocStyleChange::Span: return "span";
case DocStyleChange::Strike: return "strike";
+ case DocStyleChange::Del: return "del";
case DocStyleChange::Underline: return "u";
+ case DocStyleChange::Ins: return "ins";
}
return "<invalid>";
}
@@ -1142,17 +1165,25 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
static void handleParameterType(DocNode *parent,QList<DocNode> &children,const QCString &paramTypes)
{
- QCString name = g_token->name;
- int p=0,i;
+ QCString name = g_token->name; // save token name
+ QCString name1;
+ int p=0,i,l,ii;
while ((i=paramTypes.find('|',p))!=-1)
{
- g_token->name = paramTypes.mid(p,i-p);
+ name1 = paramTypes.mid(p,i-p);
+ ii=name1.find('[');
+ g_token->name=ii!=-1 ? name1.mid(0,ii) : name1; // take part without []
handleLinkedWord(parent,children);
+ if (ii!=-1) children.append(new DocWord(parent,name1.mid(ii))); // add [] part
p=i+1;
+ children.append(new DocSeparator(parent,"|"));
}
- g_token->name = paramTypes.mid(p);
+ name1 = paramTypes.mid(p);
+ ii=name1.find('[');
+ g_token->name=ii!=-1 ? name1.mid(0,ii) : name1;
handleLinkedWord(parent,children);
- g_token->name = name;
+ if (ii!=-1) children.append(new DocWord(parent,name1.mid(ii)));
+ g_token->name = name; // restore original token name
}
static DocInternalRef *handleInternalRef(DocNode *parent)
@@ -1162,7 +1193,7 @@ static DocInternalRef *handleInternalRef(DocNode *parent)
QCString tokenName = g_token->name;
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
qPrint(tokenName));
return 0;
}
@@ -1182,7 +1213,7 @@ static DocAnchor *handleAnchor(DocNode *parent)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
qPrint(g_token->name));
return 0;
}
@@ -1525,6 +1556,16 @@ reparsetoken:
handleStyleLeave(parent,children,DocStyleChange::Strike,tokenName);
}
break;
+ case HTML_DEL:
+ if (!g_token->endTag)
+ {
+ handleStyleEnter(parent,children,DocStyleChange::Del,&g_token->attribs);
+ }
+ else
+ {
+ handleStyleLeave(parent,children,DocStyleChange::Del,tokenName);
+ }
+ break;
case HTML_UNDERLINE:
if (!g_token->endTag)
{
@@ -1535,6 +1576,16 @@ reparsetoken:
handleStyleLeave(parent,children,DocStyleChange::Underline,tokenName);
}
break;
+ case HTML_INS:
+ if (!g_token->endTag)
+ {
+ handleStyleEnter(parent,children,DocStyleChange::Ins,&g_token->attribs);
+ }
+ else
+ {
+ handleStyleLeave(parent,children,DocStyleChange::Ins,tokenName);
+ }
+ break;
case HTML_CODE:
case XML_C:
if (!g_token->endTag)
@@ -1848,6 +1899,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
if (id.isEmpty())
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Empty anchor label");
+ return;
}
if (id.left(CiteConsts::anchorPrefix.length()) == CiteConsts::anchorPrefix)
@@ -1860,7 +1912,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
}
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid cite anchor id `%s'",qPrint(id));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid cite anchor id '%s'",qPrint(id));
m_anchor = "invalid";
m_file = "invalid";
}
@@ -1885,7 +1937,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
}
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid anchor id `%s'",qPrint(id));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid anchor id '%s'",qPrint(id));
m_anchor = "invalid";
m_file = "invalid";
}
@@ -2098,100 +2150,6 @@ void DocIncOperator::parse()
//---------------------------------------------------------------------------
-void DocCopy::parse(QList<DocNode> &children)
-{
- QCString doc,brief;
- const Definition *def = 0;
- if (findDocsForMemberOrCompound(m_link,&doc,&brief,&def))
- {
- if (g_copyStack.findRef(def)==-1) // definition not parsed earlier
- {
- bool hasParamCommand = g_hasParamCommand;
- bool hasReturnCommand = g_hasReturnCommand;
- QDict<void> paramsFound = g_paramsFound;
- //printf("..1 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
-
- docParserPushContext(FALSE);
- g_scope = def;
- if (def->definitionType()==Definition::TypeMember && def->getOuterScope())
- {
- if (def->getOuterScope()!=Doxygen::globalScope)
- {
- g_context=def->getOuterScope()->name();
- }
- }
- else if (def!=Doxygen::globalScope)
- {
- g_context=def->name();
- }
- g_styleStack.clear();
- g_nodeStack.clear();
- g_paramsFound.clear();
- g_copyStack.append(def);
- // make sure the descriptions end with a newline, so the parser will correctly
- // handle them in all cases.
- //printf("doc='%s'\n",doc.data());
- //printf("brief='%s'\n",brief.data());
- if (m_copyBrief)
- {
- brief+='\n';
- internalValidatingParseDoc(m_parent,children,brief);
-
- //printf("..2 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
- hasParamCommand = hasParamCommand || g_hasParamCommand;
- hasReturnCommand = hasReturnCommand || g_hasReturnCommand;
- QDictIterator<void> it(g_paramsFound);
- void *item;
- for (;(item=it.current());++it)
- {
- paramsFound.insert(it.currentKey(),it.current());
- }
- }
- if (m_copyDetails)
- {
- doc+='\n';
- internalValidatingParseDoc(m_parent,children,doc);
-
- //printf("..3 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
- hasParamCommand = hasParamCommand || g_hasParamCommand;
- hasReturnCommand = hasReturnCommand || g_hasReturnCommand;
- QDictIterator<void> it(g_paramsFound);
- void *item;
- for (;(item=it.current());++it)
- {
- paramsFound.insert(it.currentKey(),it.current());
- }
- }
- g_copyStack.remove(def);
- ASSERT(g_styleStack.isEmpty());
- ASSERT(g_nodeStack.isEmpty());
- docParserPopContext(TRUE);
-
- g_hasParamCommand = hasParamCommand;
- g_hasReturnCommand = hasReturnCommand;
- g_paramsFound = paramsFound;
-
- //printf("..4 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
- }
- else // oops, recursion
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"recursive call chain of \\copydoc commands detected at %d\n",
- doctokenizerYYlineno);
- }
- }
- else
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"target %s of \\copydoc command not found",
- qPrint(m_link));
- }
-}
-
-//---------------------------------------------------------------------------
-
DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
m_id(id), m_key(key), m_relPath(g_relPath)
{
@@ -2530,7 +2488,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
}
}
m_text = target;
- warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to `%s' for \\ref command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to '%s' for \\ref command",
qPrint(target));
}
@@ -2628,7 +2586,7 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
}
else if (cite==0)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to `%s' for \\cite command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to '%s' for \\cite command",
qPrint(target));
}
else
@@ -2671,7 +2629,7 @@ DocLink::DocLink(DocNode *parent,const QCString &target)
}
// bogus link target
- warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve link to `%s' for \\link command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve link to '%s' for \\link command",
qPrint(target));
}
@@ -2775,8 +2733,9 @@ DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &cont
m_parent = parent;
}
-void DocDotFile::parse()
+bool DocDotFile::parse()
{
+ bool ok = false;
defaultHandleTitleAndSize(CMD_DOTFILE,this,m_children,m_width,m_height);
bool ambig;
@@ -2788,6 +2747,7 @@ void DocDotFile::parse()
if (fd)
{
m_file = fd->absFilePath();
+ ok = true;
}
else if (ambig)
{
@@ -2801,6 +2761,7 @@ void DocDotFile::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"included dot file %s is not found "
"in any of the paths specified via DOTFILE_DIRS!",qPrint(m_name));
}
+ return ok;
}
DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &context) :
@@ -2809,8 +2770,9 @@ DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &cont
m_parent = parent;
}
-void DocMscFile::parse()
+bool DocMscFile::parse()
{
+ bool ok = false;
defaultHandleTitleAndSize(CMD_MSCFILE,this,m_children,m_width,m_height);
bool ambig;
@@ -2822,6 +2784,7 @@ void DocMscFile::parse()
if (fd)
{
m_file = fd->absFilePath();
+ ok = true;
}
else if (ambig)
{
@@ -2835,6 +2798,7 @@ void DocMscFile::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"included msc file %s is not found "
"in any of the paths specified via MSCFILE_DIRS!",qPrint(m_name));
}
+ return ok;
}
//---------------------------------------------------------------------------
@@ -2845,8 +2809,9 @@ DocDiaFile::DocDiaFile(DocNode *parent,const QCString &name,const QCString &cont
m_parent = parent;
}
-void DocDiaFile::parse()
+bool DocDiaFile::parse()
{
+ bool ok = false;
defaultHandleTitleAndSize(CMD_DIAFILE,this,m_children,m_width,m_height);
bool ambig;
@@ -2858,6 +2823,7 @@ void DocDiaFile::parse()
if (fd)
{
m_file = fd->absFilePath();
+ ok = true;
}
else if (ambig)
{
@@ -2871,6 +2837,7 @@ void DocDiaFile::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"included dia file %s is not found "
"in any of the paths specified via DIAFILE_DIRS!",qPrint(m_name));
}
+ return ok;
}
//---------------------------------------------------------------------------
@@ -3257,7 +3224,7 @@ DocHtmlCaption::DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs)
HtmlAttrib *opt;
for (li.toFirst();(opt=li.current());++li)
{
- if (opt->name=="id") // interpret id attribute as an anchor
+ if (opt->name=="id" && !opt->value.isEmpty()) // interpret id attribute as an anchor
{
SectionInfo *sec = Doxygen::sectionDict->find(opt->value);
if (sec)
@@ -3274,7 +3241,7 @@ DocHtmlCaption::DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs)
}
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid caption id `%s'",qPrint(opt->value));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid caption id '%s'",qPrint(opt->value));
}
}
else // copy attribute
@@ -4643,8 +4610,8 @@ int DocParamList::parse(const QCString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
retval=0;
goto endparamlist;
}
@@ -4660,19 +4627,19 @@ int DocParamList::parse(const QCString &cmdName)
handleParameterType(this,m_paramTypes,g_token->name.left(typeSeparator));
g_token->name = g_token->name.mid(typeSeparator+1);
g_hasParamCommand=TRUE;
- checkArgumentName(g_token->name,TRUE);
+ checkArgumentName(g_token->name);
((DocParamSect*)parent())->m_hasTypeSpecifier=TRUE;
}
else
{
g_hasParamCommand=TRUE;
- checkArgumentName(g_token->name,TRUE);
+ checkArgumentName(g_token->name);
}
}
else if (m_type==DocParamSect::RetVal)
{
g_hasReturnCommand=TRUE;
- checkArgumentName(g_token->name,FALSE);
+ checkRetvalName(g_token->name);
}
//m_params.append(g_token->name);
handleLinkedWord(this,m_params);
@@ -4682,7 +4649,7 @@ int DocParamList::parse(const QCString &cmdName)
if (tok==0) /* premature end of comment block */
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected end of comment block while parsing the "
- "argument of command %s",qPrint(cmdName));
+ "argument of command %s",qPrint(saveCmdName));
retval=0;
goto endparamlist;
}
@@ -4717,12 +4684,12 @@ int DocParamList::parseXml(const QCString &paramName)
if (m_type==DocParamSect::Param)
{
g_hasParamCommand=TRUE;
- checkArgumentName(g_token->name,TRUE);
+ checkArgumentName(g_token->name);
}
else if (m_type==DocParamSect::RetVal)
{
g_hasReturnCommand=TRUE;
- checkArgumentName(g_token->name,FALSE);
+ checkRetvalName(g_token->name);
}
handleLinkedWord(this,m_params);
@@ -4880,7 +4847,7 @@ void DocPara::handleCite()
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
qPrint("cite"));
return;
}
@@ -4912,7 +4879,7 @@ void DocPara::handleEmoji()
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
qPrint("emoji"));
return;
}
@@ -4959,12 +4926,13 @@ int DocPara::handleXRefItem()
void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t)
{
- DBG(("handleIncludeOperator(%s)\n",qPrint(cmdName)));
+ QCString saveCmdName = cmdName;
+ DBG(("handleIncludeOperator(%s)\n",qPrint(saveCmdName)));
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return;
}
doctokenizerYYsetStatePattern();
@@ -4973,13 +4941,13 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected end of comment block while parsing the "
- "argument of command %s", qPrint(cmdName));
+ "argument of command %s", qPrint(saveCmdName));
return;
}
else if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
DocIncOperator *op = new DocIncOperator(this,t,g_token->name,g_context,g_isExample,g_exampleName);
@@ -5045,7 +5013,7 @@ void DocPara::handleImage(const QCString &cmdName)
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command with option",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command with option",
qPrint(saveCmdName));
return;
}
@@ -5053,7 +5021,7 @@ void DocPara::handleImage(const QCString &cmdName)
}
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
qPrint(saveCmdName));
return;
}
@@ -5068,7 +5036,7 @@ void DocPara::handleImage(const QCString &cmdName)
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
qPrint(saveCmdName));
return;
}
@@ -5103,11 +5071,12 @@ void DocPara::handleImage(const QCString &cmdName)
template<class T>
void DocPara::handleFile(const QCString &cmdName)
{
+ QCString saveCmdName = cmdName;
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateFile();
@@ -5116,13 +5085,19 @@ void DocPara::handleFile(const QCString &cmdName)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
QCString name = g_token->name;
T *df = new T(this,name,g_context);
- m_children.append(df);
- df->parse();
+ if (df->parse())
+ {
+ m_children.append(df);
+ }
+ else
+ {
+ delete df;
+ }
}
void DocPara::handleVhdlFlow()
@@ -5134,11 +5109,12 @@ void DocPara::handleVhdlFlow()
void DocPara::handleLink(const QCString &cmdName,bool isJavaLink)
{
+ QCString saveCmdName = cmdName;
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateLink();
@@ -5146,7 +5122,7 @@ void DocPara::handleLink(const QCString &cmdName,bool isJavaLink)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"%s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
doctokenizerYYsetStatePara();
@@ -5161,12 +5137,13 @@ void DocPara::handleLink(const QCString &cmdName,bool isJavaLink)
void DocPara::handleRef(const QCString &cmdName)
{
- DBG(("handleRef(%s)\n",qPrint(cmdName)));
+ QCString saveCmdName = cmdName;
+ DBG(("handleRef(%s)\n",qPrint(saveCmdName)));
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateRef();
@@ -5175,7 +5152,7 @@ void DocPara::handleRef(const QCString &cmdName)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
goto endref;
}
ref = new DocRef(this,g_token->name,g_context);
@@ -5188,6 +5165,7 @@ endref:
void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
{
DBG(("handleInclude(%s)\n",qPrint(cmdName)));
+ QCString saveCmdName = cmdName;
int tok=doctokenizerYYlex();
bool isBlock = false;
if (tok==TK_WORD && g_token->name=="{")
@@ -5228,8 +5206,8 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
}
else if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateFile();
@@ -5238,13 +5216,13 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected end of comment block while parsing the "
- "argument of command %s",qPrint(cmdName));
+ "argument of command %s",qPrint(saveCmdName));
return;
}
else if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
QCString fileName = g_token->name;
@@ -5258,7 +5236,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected block identifier, but found token %s instead while parsing the %s command",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
blockId = "["+g_token->name+"]";
@@ -5292,25 +5270,26 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
void DocPara::handleSection(const QCString &cmdName)
{
+ QCString saveCmdName = cmdName;
// get the argument of the section command.
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected end of comment block while parsing the "
- "argument of command %s\n", qPrint(cmdName));
+ "argument of command %s\n", qPrint(saveCmdName));
return;
}
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
g_token->sectionId = g_token->name;
@@ -5399,7 +5378,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
{
case CMD_UNKNOWN:
m_children.append(new DocWord(this,TK_COMMAND_CHAR(tok) + cmdName));
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command `\\%s'",qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command '\\%s'",qPrint(cmdName));
break;
case CMD_EMPHASIS:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,TRUE));
@@ -5945,9 +5924,15 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
case HTML_STRIKE:
handleStyleEnter(this,m_children,DocStyleChange::Strike,&g_token->attribs);
break;
+ case HTML_DEL:
+ handleStyleEnter(this,m_children,DocStyleChange::Del,&g_token->attribs);
+ break;
case HTML_UNDERLINE:
handleStyleEnter(this,m_children,DocStyleChange::Underline,&g_token->attribs);
break;
+ case HTML_INS:
+ handleStyleEnter(this,m_children,DocStyleChange::Ins,&g_token->attribs);
+ break;
case HTML_CODE:
if (/*getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp ||*/ g_xmlComment)
// for C# source or inside a <summary> or <remark> section we
@@ -6360,9 +6345,15 @@ int DocPara::handleHtmlEndTag(const QCString &tagName)
case HTML_STRIKE:
handleStyleLeave(this,m_children,DocStyleChange::Strike,"strike");
break;
+ case HTML_DEL:
+ handleStyleLeave(this,m_children,DocStyleChange::Del,"del");
+ break;
case HTML_UNDERLINE:
handleStyleLeave(this,m_children,DocStyleChange::Underline,"u");
break;
+ case HTML_INS:
+ handleStyleLeave(this,m_children,DocStyleChange::Ins,"ins");
+ break;
case HTML_CODE:
handleStyleLeave(this,m_children,DocStyleChange::Code,"code");
break;
@@ -6885,54 +6876,55 @@ int DocSection::parse()
//printf("m_level=%d <-> %d\n",m_level,Doxygen::subpageNestingLevel);
- if (retval==RetVal_Subsection && m_level==Doxygen::subpageNestingLevel+1)
+ while (true)
{
- // then parse any number of nested sections
- while (retval==RetVal_Subsection) // more sections follow
+ if (retval==RetVal_Subsection && m_level<=Doxygen::subpageNestingLevel+1)
{
- //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
- DocSection *s=new DocSection(this,
- QMIN(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
- m_children.append(s);
- retval = s->parse();
+ // then parse any number of nested sections
+ while (retval==RetVal_Subsection) // more sections follow
+ {
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ DocSection *s=new DocSection(this,
+ QMIN(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ break;
}
- }
- else if (retval==RetVal_Subsubsection && m_level==Doxygen::subpageNestingLevel+2)
- {
- // then parse any number of nested sections
- while (retval==RetVal_Subsubsection) // more sections follow
+ else if (retval==RetVal_Subsubsection && m_level<=Doxygen::subpageNestingLevel+2)
{
- //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
- DocSection *s=new DocSection(this,
- QMIN(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
- m_children.append(s);
- retval = s->parse();
+ if ((m_level<=1+Doxygen::subpageNestingLevel) && !QString(g_token->sectionId).startsWith("autotoc_md"))
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected subsubsection command found inside %s!",sectionLevelToName[m_level]);
+ // then parse any number of nested sections
+ while (retval==RetVal_Subsubsection) // more sections follow
+ {
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ DocSection *s=new DocSection(this,
+ QMIN(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ if (!(m_level<Doxygen::subpageNestingLevel+2 && retval == RetVal_Subsection)) break;
}
- }
- else if (retval==RetVal_Paragraph && m_level==QMIN(5,Doxygen::subpageNestingLevel+3))
- {
- // then parse any number of nested sections
- while (retval==RetVal_Paragraph) // more sections follow
+ else if (retval==RetVal_Paragraph && m_level<=QMIN(5,Doxygen::subpageNestingLevel+3))
{
- //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
- DocSection *s=new DocSection(this,
- QMIN(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
- m_children.append(s);
- retval = s->parse();
+ if ((m_level<=2+Doxygen::subpageNestingLevel) && !QString(g_token->sectionId).startsWith("autotoc_md"))
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected paragraph command found inside %s!",sectionLevelToName[m_level]);
+ // then parse any number of nested sections
+ while (retval==RetVal_Paragraph) // more sections follow
+ {
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ DocSection *s=new DocSection(this,
+ QMIN(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ if (!(m_level<Doxygen::subpageNestingLevel+3 && (retval == RetVal_Subsection || retval == RetVal_Subsubsection))) break;
+ }
+ else
+ {
+ break;
}
- }
- else if ((m_level<=1+Doxygen::subpageNestingLevel && retval==RetVal_Subsubsection) ||
- (m_level<=2+Doxygen::subpageNestingLevel && retval==RetVal_Paragraph)
- )
- {
- int level = (retval==RetVal_Subsubsection) ? 3 : 4;
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected %s "
- "command found inside %s!",
- sectionLevelToName[level],sectionLevelToName[m_level]);
- retval=0; // stop parsing
- }
- else
- {
}
INTERNAL_ASSERT(retval==0 ||
@@ -7040,7 +7032,7 @@ void DocText::parse()
m_children.append(new DocSymbol(this,DocSymbol::Sym_Equal));
break;
default:
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected command `%s' found",
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected command '%s' found",
qPrint(g_token->name));
break;
}
@@ -7086,21 +7078,96 @@ void DocRoot::parse()
{
delete par;
}
- if (retval==TK_LISTITEM)
+ if (retval==RetVal_Paragraph)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid list item found");
+ if (!QString(g_token->sectionId).startsWith("autotoc_md"))
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"found paragraph command outside of subsubsection context!");
+ while (retval==RetVal_Paragraph)
+ {
+ if (!g_token->sectionId.isEmpty())
+ {
+ SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ if (sec)
+ {
+ DocSection *s=new DocSection(this,
+ QMIN(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid paragraph id '%s'; ignoring paragraph",qPrint(g_token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Missing id for paragraph; ignoring paragraph");
+ retval = 0;
+ }
+ }
}
- else if (retval==RetVal_Subsection)
+ if (retval==RetVal_Subsubsection)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsection command outside of section context!");
+ if (!(QString(g_token->sectionId).startsWith("autotoc_md")))
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsubsection command outside of subsection context!");
+ while (retval==RetVal_Subsubsection)
+ {
+ if (!g_token->sectionId.isEmpty())
+ {
+ SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ if (sec)
+ {
+ DocSection *s=new DocSection(this,
+ QMIN(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid subsubsection id '%s'; ignoring subsubsection",qPrint(g_token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Missing id for subsubsection; ignoring subsubsection");
+ retval = 0;
+ }
+ }
}
- else if (retval==RetVal_Subsubsection)
+ if (retval==RetVal_Subsection)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsubsection command outside of subsection context!");
+ if (!(QString(g_token->sectionId).startsWith("autotoc_md")))
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsection command outside of section context!");
+ while (retval==RetVal_Subsection)
+ {
+ if (!g_token->sectionId.isEmpty())
+ {
+ SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ if (sec)
+ {
+ DocSection *s=new DocSection(this,
+ QMIN(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid subsection id '%s'; ignoring subsection",qPrint(g_token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Missing id for subsection; ignoring subsection");
+ retval = 0;
+ }
+ }
}
- else if (retval==RetVal_Paragraph)
+ if (retval==TK_LISTITEM)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"found paragraph command outside of subsubsection context!");
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid list item found");
}
if (retval==RetVal_Internal)
{
@@ -7115,17 +7182,25 @@ void DocRoot::parse()
// then parse any number of level1 sections
while (retval==RetVal_Section)
{
- SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
- if (sec)
+ if (!g_token->sectionId.isEmpty())
{
- DocSection *s=new DocSection(this,
- QMIN(1+Doxygen::subpageNestingLevel,5),g_token->sectionId);
- m_children.append(s);
- retval = s->parse();
+ SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ if (sec)
+ {
+ DocSection *s=new DocSection(this,
+ QMIN(1+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid section id '%s'; ignoring section",qPrint(g_token->sectionId));
+ retval = 0;
+ }
}
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid section id `%s'; ignoring section",qPrint(g_token->sectionId));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Missing id for section; ignoring section");
retval = 0;
}
}
@@ -7615,6 +7690,8 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_exampleName = exampleName;
g_hasParamCommand = FALSE;
g_hasReturnCommand = FALSE;
+ g_retvalsFound.setAutoDelete(FALSE);
+ g_retvalsFound.clear();
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
g_sectionDict = 0; //sections;
@@ -7685,6 +7762,8 @@ DocText *validatingParseText(const char *input)
g_exampleName = "";
g_hasParamCommand = FALSE;
g_hasReturnCommand = FALSE;
+ g_retvalsFound.setAutoDelete(FALSE);
+ g_retvalsFound.clear();
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
g_searchUrl="";
diff --git a/src/docparser.h b/src/docparser.h
index ef01089..e608d8f 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -141,7 +141,8 @@ class DocNode
Kind_VhdlFlow = 50,
Kind_ParBlock = 51,
Kind_DiaFile = 52,
- Kind_Emoji = 53
+ Kind_Emoji = 53,
+ Kind_Sep = 54
};
/*! Creates a new node */
DocNode() : m_parent(0), m_insidePre(FALSE) {}
@@ -382,7 +383,9 @@ class DocStyleChange : public DocNode
Span = (1<<8),
Div = (1<<9),
Strike = (1<<10),
- Underline = (1<<11)
+ Underline = (1<<11),
+ Del = (1<<12),
+ Ins = (1<<13)
};
DocStyleChange(DocNode *parent,uint position,Style s,bool enable,
@@ -516,6 +519,19 @@ class DocWhiteSpace : public DocNode
QCString m_chars;
};
+/** Node representing a separator */
+class DocSeparator : public DocNode
+{
+ public:
+ DocSeparator(DocNode *parent,const QCString &chars) :
+ m_chars(chars) { m_parent = parent; }
+ Kind kind() const { return Kind_Sep; }
+ QCString chars() const { return m_chars; }
+ void accept(DocVisitor *v) { }
+ private:
+ QCString m_chars;
+};
+
/** Node representing a verbatim, unparsed text fragment */
class DocVerbatim : public DocNode
{
@@ -694,24 +710,6 @@ class DocIndexEntry : public DocNode
//-----------------------------------------------------------------------
-/** Node representing a copy of documentation block. */
-class DocCopy : public DocNode
-{
- public:
- DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails)
- : m_link(link),
- m_copyBrief(copyBrief), m_copyDetails(copyDetails) { m_parent = parent; }
- Kind kind() const { return Kind_Copy; }
- QCString link() const { return m_link; }
- void accept(DocVisitor * /*v*/) { /*CompAccept<DocCopy>::accept(this,v);*/ }
- void parse(QList<DocNode> &children);
-
- private:
- QCString m_link;
- bool m_copyBrief;
- bool m_copyDetails;
-};
-
/** Node representing an auto List */
class DocAutoList : public CompAccept<DocAutoList>
{
@@ -816,7 +814,7 @@ class DocDotFile : public CompAccept<DocDotFile>
{
public:
DocDotFile(DocNode *parent,const QCString &name,const QCString &context);
- void parse();
+ bool parse();
Kind kind() const { return Kind_DotFile; }
QCString name() const { return m_name; }
QCString file() const { return m_file; }
@@ -839,7 +837,7 @@ class DocMscFile : public CompAccept<DocMscFile>
{
public:
DocMscFile(DocNode *parent,const QCString &name,const QCString &context);
- void parse();
+ bool parse();
Kind kind() const { return Kind_MscFile; }
QCString name() const { return m_name; }
QCString file() const { return m_file; }
@@ -862,7 +860,7 @@ class DocDiaFile : public CompAccept<DocDiaFile>
{
public:
DocDiaFile(DocNode *parent,const QCString &name,const QCString &context);
- void parse();
+ bool parse();
Kind kind() const { return Kind_DiaFile; }
QCString name() const { return m_name; }
QCString file() const { return m_file; }
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 5346c0a..194327c 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -157,7 +157,7 @@ static int computeIndent(const char *str,int length)
static void processSection()
{
- //printf("%s: found section/anchor with name `%s'\n",g_fileName.data(),g_secLabel.data());
+ //printf("%s: found section/anchor with name '%s'\n",g_fileName.data(),g_secLabel.data());
QCString file;
if (g_memberGroup)
{
@@ -405,8 +405,8 @@ WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
CAPTION [cC][aA][pP][tT][iI][oO][nN]
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
-HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u"
-HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"|"STRIKE"|"U"
+HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u"|"del"|"ins"
+HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"|"STRIKE"|"U"|"DEL"|"INS"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?)
REFWORD2 {REFWORD2_PRE}{FUNCARG2}?
@@ -1151,7 +1151,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->name = g_token->name.left((int)yyleng-2);
return TK_WORD;
}
-<St_Param>({PHPTYPE}{BLANK}*"|"{BLANK}*)*{PHPTYPE}{WS}+("&")?"$"{LABELID} {
+<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
QCString params = yytext;
int j = params.find('&');
int i = params.find('$');
@@ -1343,7 +1343,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
BEGIN(St_Sections);
}
<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
- warn(g_fileName,yylineno,"Unexpected character `%s' while looking for section label or title",yytext);
+ warn(g_fileName,yylineno,"Unexpected character '%s' while looking for section label or title",yytext);
}
<St_Snippet>[^\n]+ |
@@ -1358,12 +1358,12 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
warn(g_fileName,yylineno,"Unexpected new line character");
}
<*>[\\@<>&$#%~"=] { /* unescaped special character */
- //warn(g_fileName,yylineno,"Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
+ //warn(g_fileName,yylineno,"Unexpected character '%s', assuming command \\%s was meant.",yytext,yytext);
g_token->name = yytext;
return TK_COMMAND_SEL();
}
<*>. {
- warn(g_fileName,yylineno,"Unexpected character `%s'",yytext);
+ warn(g_fileName,yylineno,"Unexpected character '%s'",yytext);
}
%%
@@ -1375,7 +1375,7 @@ void doctokenizerYYFindSections(const char *input,Definition *d,
if (input==0) return;
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
g_inputString = input;
- //printf("parsing --->`%s'<---\n",input);
+ //printf("parsing --->'%s'<---\n",input);
g_inputPos = 0;
g_definition = d;
g_memberGroup = mg;
diff --git a/src/docvisitor.h b/src/docvisitor.h
index d2318c9..0a53595 100644
--- a/src/docvisitor.h
+++ b/src/docvisitor.h
@@ -79,7 +79,6 @@ class DocLinkedWord;
class DocParamSect;
class DocParamList;
class DocInternalRef;
-class DocCopy; // TODO: no longer generated => remove
class DocText;
class DocSimpleSectSep;
class DocHtmlBlockQuote;
@@ -187,8 +186,6 @@ class DocVisitor
virtual void visitPost(DocXRefItem *) = 0;
virtual void visitPre(DocInternalRef *) = 0;
virtual void visitPost(DocInternalRef *) = 0;
- virtual void visitPre(DocCopy *) = 0;
- virtual void visitPost(DocCopy *) = 0;
virtual void visitPre(DocText *) = 0;
virtual void visitPost(DocText *) = 0;
virtual void visitPre(DocHtmlBlockQuote *) = 0;
diff --git a/src/dotclassgraph.cpp b/src/dotclassgraph.cpp
index 308be4b..3f5d228 100644
--- a/src/dotclassgraph.cpp
+++ b/src/dotclassgraph.cpp
@@ -49,7 +49,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
{
className=cd->displayName();
}
- //printf("DotClassGraph::addClass(class=`%s',parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
+ //printf("DotClassGraph::addClass(class='%s',parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
// className.data(),n->label().data(),prot,label,distance,usedName,templSpec,base);
DotNode *bn = m_usedNodes->find(className);
if (bn) // class already inserted
@@ -100,7 +100,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
}
bn->setDistance(distance);
m_usedNodes->insert(className,bn);
- //printf(" add new child node `%s' to %s hidden=%d url=%s\n",
+ //printf(" add new child node '%s' to %s hidden=%d url=%s\n",
// className.data(),n->label().data(),cd->isHidden(),tmp_url.data());
buildGraph(cd,bn,base,distance+1);
@@ -253,7 +253,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
BaseClassDef *bcd;
for ( ; (bcd=bcli.current()) ; ++bcli )
{
- //printf("-------- inheritance relation %s->%s templ=`%s'\n",
+ //printf("-------- inheritance relation %s->%s templ='%s'\n",
// cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
addClass(bcd->classDef,n,bcd->prot,0,bcd->usedName,
bcd->templSpecifiers,base,distance);
@@ -374,7 +374,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
{
- //printf("--------------- DotClassGraph::DotClassGraph `%s'\n",cd->displayName().data());
+ //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",cd->displayName().data());
m_graphType = t;
QCString tmp_url="";
if (cd->isLinkable() && !cd->isHidden())
diff --git a/src/dotgfxhierarchytable.cpp b/src/dotgfxhierarchytable.cpp
index 0082b7e..0a7942f 100644
--- a/src/dotgfxhierarchytable.cpp
+++ b/src/dotgfxhierarchytable.cpp
@@ -106,7 +106,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,
void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,bool hideSuper)
{
- //printf("addHierarchy `%s' baseClasses=%d\n",cd->name().data(),cd->baseClasses()->count());
+ //printf("addHierarchy '%s' baseClasses=%d\n",cd->name().data(),cd->baseClasses()->count());
if (cd->subClasses())
{
BaseClassListIterator bcli(*cd->subClasses());
@@ -114,11 +114,11 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,bool hideS
for ( ; (bcd=bcli.current()) ; ++bcli )
{
ClassDef *bClass=bcd->classDef;
- //printf(" Trying sub class=`%s' usedNodes=%d\n",bClass->name().data(),m_usedNodes->count());
+ //printf(" Trying sub class='%s' usedNodes=%d\n",bClass->name().data(),m_usedNodes->count());
if (bClass->isVisibleInHierarchy() && hasVisibleRoot(bClass->baseClasses()))
{
DotNode *bn;
- //printf(" Node `%s' Found visible class=`%s'\n",n->label().data(),
+ //printf(" Node '%s' Found visible class='%s'\n",n->label().data(),
// bClass->name().data());
if ((bn=m_usedNodes->find(bClass->name()))) // node already present
{
diff --git a/src/dotincldepgraph.cpp b/src/dotincldepgraph.cpp
index c968b68..23588db 100644
--- a/src/dotincldepgraph.cpp
+++ b/src/dotincldepgraph.cpp
@@ -29,7 +29,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
{
const FileDef *bfd = ii->fileDef;
QCString in = ii->includeName;
- //printf(">>>> in=`%s' bfd=%p\n",ii->includeName.data(),bfd);
+ //printf(">>>> in='%s' bfd=%p\n",ii->includeName.data(),bfd);
bool doc=TRUE,src=FALSE;
if (bfd)
{
diff --git a/src/dotnode.cpp b/src/dotnode.cpp
index 41d5f06..ae06fb2 100644
--- a/src/dotnode.cpp
+++ b/src/dotnode.cpp
@@ -907,7 +907,7 @@ void DotNode::renumberNodes(int &number)
const DotNode *DotNode::findDocNode() const
{
if (!m_url.isEmpty()) return this;
- //printf("findDocNode(): `%s'\n",m_label.data());
+ //printf("findDocNode(): '%s'\n",m_label.data());
if (m_parents)
{
QListIterator<DotNode> dnli(*m_parents);
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index b7ddda1..3a621c7 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -41,7 +41,7 @@ static void checkPngResult(const char *imgName)
{
if (!(data[1]=='P' && data[2]=='N' && data[3]=='G'))
{
- err("Image `%s' produced by dot is not a valid PNG!\n"
+ err("Image '%s' produced by dot is not a valid PNG!\n"
"You should either select a different format "
"(DOT_IMAGE_FORMAT in the config file) or install a more "
"recent version of graphviz (1.7+)\n",imgName
@@ -50,13 +50,13 @@ static void checkPngResult(const char *imgName)
}
else
{
- err("Could not read image `%s' generated by dot!\n",imgName);
+ err("Could not read image '%s' generated by dot!\n",imgName);
}
fclose(f);
}
else
{
- err("Could not open image `%s' generated by dot!\n",imgName);
+ err("Could not open image '%s' generated by dot!\n",imgName);
}
}
@@ -128,6 +128,7 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
if (p) // found PageBoundingBox or /MediaBox string
{
int x,y;
+ fclose(f);
if (sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height)!=4)
{
//printf("readBoundingBox sscanf fail\n");
@@ -137,6 +138,7 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
}
}
err("Failed to extract bounding box from generated diagram file %s\n",fileName);
+ fclose(f);
return FALSE;
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index c7fce01..6bf67a0 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -174,6 +174,7 @@ QCString Doxygen::spaces;
bool Doxygen::generatingXmlOutput = FALSE;
bool Doxygen::markdownSupport = TRUE;
GenericsSDict *Doxygen::genericsDict;
+DocGroup Doxygen::docGroup;
// locally accessible globals
static QDict<Entry> g_classEntries(1009);
@@ -804,7 +805,7 @@ static void buildFileList(Entry *root)
{
const char *fn = root->fileName.data();
QCString text(4096);
- text.sprintf("the name `%s' supplied as "
+ text.sprintf("the name '%s' supplied as "
"the argument in the \\file statement ",
qPrint(root->name));
if (ambig) // name is ambiguous
@@ -857,7 +858,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
)
{ // explicit request
QCString text;
- text.sprintf("the name `%s' supplied as "
+ text.sprintf("the name '%s' supplied as "
"the argument of the \\class, \\struct, \\union, or \\include command ",
qPrint(includeFile)
);
@@ -1287,7 +1288,7 @@ static void addClassToContext(Entry *root)
QCString namespaceName;
extractNamespaceName(fullName,className,namespaceName);
- //printf("New class: fullname %s namespace `%s' name=`%s' brief=`%s' docs=`%s'\n",
+ //printf("New class: fullname %s namespace '%s' name='%s' brief='%s' docs='%s'\n",
// fullName.data(),namespaceName.data(),className.data(),root->brief.data(),root->doc.data());
QCString tagName;
@@ -1320,7 +1321,7 @@ static void addClassToContext(Entry *root)
}
cd=createClassDef(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",
+ Debug::print(Debug::Classes,0," New class '%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p\n",
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);
@@ -1368,7 +1369,7 @@ static void addClassToContext(Entry *root)
}
if (fd && (root->section & Entry::COMPOUND_MASK))
{
- //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
+ //printf(">> Inserting class '%s' in file '%s' (root->fileName='%s')\n",
// cd->name().data(),
// fd->name().data(),
// root->fileName.data()
@@ -1862,7 +1863,7 @@ static const NamespaceDef *findUsedNamespace(const NamespaceSDict *unl,
{
QCString uScope=und->name()+"::";
usingNd = getResolvedNamespace(uScope+name);
- //printf("Also trying with scope=`%s' usingNd=%p\n",(uScope+name).data(),usingNd);
+ //printf("Also trying with scope='%s' usingNd=%p\n",(uScope+name).data(),usingNd);
}
}
return usingNd;
@@ -1899,7 +1900,7 @@ static void findUsingDirectives(Entry *root)
}
}
- // find the scope in which the `using' namespace is defined by prepending
+ // find the scope in which the 'using' namespace is defined by prepending
// the possible scopes in which the using statement was found, starting
// with the most inner scope and going to the most outer scope (i.e.
// file scope).
@@ -1909,7 +1910,7 @@ static void findUsingDirectives(Entry *root)
QCString scope=scopeOffset>0 ?
nsName.left(scopeOffset)+"::" : QCString();
usingNd = getResolvedNamespace(scope+name);
- //printf("Trying with scope=`%s' usingNd=%p\n",(scope+name).data(),usingNd);
+ //printf("Trying with scope='%s' usingNd=%p\n",(scope+name).data(),usingNd);
if (scopeOffset==0)
{
scopeOffset=-1;
@@ -2058,7 +2059,7 @@ static void findUsingDeclarations(Entry *root)
}
// Assume the using statement was used to import a class.
- // Find the scope in which the `using' namespace is defined by prepending
+ // Find the scope in which the 'using' namespace is defined by prepending
// the possible scopes in which the using statement was found, starting
// with the most inner scope and going to the most outer scope (i.e.
// file scope).
@@ -2069,7 +2070,7 @@ static void findUsingDeclarations(Entry *root)
// vector -> std::vector
if (usingCd==0)
{
- usingCd = getResolvedClass(nd,fd,name); // try via resolving (see also bug757509)
+ usingCd = const_cast<ClassDef*>(getResolvedClass(nd,fd,name)); // try via resolving (see also bug757509)
}
if (usingCd==0)
{
@@ -2079,7 +2080,7 @@ static void findUsingDeclarations(Entry *root)
//printf("%s -> %p\n",root->name.data(),usingCd);
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",
+ Debug::print(Debug::Classes,0," New using class '%s' (sec=0x%08x)! #tArgLists=%d\n",
qPrint(name),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
usingCd = createClassDef(
"<using>",1,1,
@@ -2135,7 +2136,7 @@ static void findUsingDeclImports(Entry *root)
{
QCString scope=root->name.left(i);
QCString memName=root->name.right(root->name.length()-i-2);
- ClassDef *bcd = getResolvedClass(cd,0,scope); // todo: file in fileScope parameter
+ const ClassDef *bcd = getResolvedClass(cd,0,scope); // todo: file in fileScope parameter
if (bcd)
{
//printf("found class %s memName=%s\n",bcd->name().data(),memName.data());
@@ -2266,7 +2267,7 @@ static MemberDef *addVariableToClass(
}
Debug::print(Debug::Variables,0,
" class variable:\n"
- " `%s' `%s'::`%s' `%s' prot=`%d ann=%d init=`%s'\n",
+ " '%s' '%s'::'%s' '%s' prot=%d ann=%d init='%s'\n",
qPrint(root->type),
qPrint(qualScope),
qPrint(name),
@@ -2327,7 +2328,8 @@ static MemberDef *addVariableToClass(
{
//printf("md->getClassDef()=%p cd=%p type=[%s] md->typeString()=[%s]\n",
// md->getClassDef(),cd,root->type.data(),md->typeString());
- if (md->getClassDef()==cd &&
+ if (!md->isAlias() &&
+ md->getClassDef()==cd &&
removeRedundantWhiteSpace(root->type)==md->typeString())
// member already in the scope
{
@@ -2434,7 +2436,7 @@ static MemberDef *addVariableToFile(
{
Debug::print(Debug::Variables,0,
" global variable:\n"
- " file='%s' type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d lang=%d\n",
+ " file='%s' type='%s' scope='%s' name='%s' args='%s' prot=`%d mtype=%d lang=%d\n",
qPrint(root->fileName),
qPrint(root->type),
qPrint(scope),
@@ -2555,7 +2557,7 @@ static MemberDef *addVariableToFile(
MemberDef *md;
for (mni.toFirst();(md=mni.current());++mni)
{
- if (
+ if (!md->isAlias() &&
((nd==0 && md->getNamespaceDef()==0 && md->getFileDef() &&
root->fileName==md->getFileDef()->absFilePath()
) // both variable names in the same file
@@ -2835,7 +2837,7 @@ static void addVariable(Entry *root,int isFuncPtr=-1)
Debug::print(Debug::Variables,0,
"VARIABLE_SEC: \n"
- " type=`%s' name=`%s' args=`%s' bodyLine=`%d' mGrpId=%d relates=%s\n",
+ " type='%s' name='%s' args='%s' bodyLine=%d mGrpId=%d relates='%s'\n",
qPrint(root->type),
qPrint(root->name),
qPrint(root->args),
@@ -2861,7 +2863,7 @@ static void addVariable(Entry *root,int isFuncPtr=-1)
root->name=root->args.mid(i,l);
root->args=root->args.mid(i+l,root->args.find(')',i+l)-i-l);
}
- //printf("new: type=`%s' name=`%s' args=`%s'\n",
+ //printf("new: type='%s' name='%s' args='%s'\n",
// root->type.data(),root->name.data(),root->args.data());
}
else
@@ -3016,7 +3018,7 @@ static void addVariable(Entry *root,int isFuncPtr=-1)
}
}
- //printf("name=`%s' scope=%s scope.right=%s\n",
+ //printf("name='%s' scope=%s scope.right=%s\n",
// name.data(),scope.data(),
// scope.right(scope.length()-si).data());
addVariableToClass(root, // entry
@@ -3199,8 +3201,8 @@ static void addInterfaceOrServiceToServiceOrSingleton(
Debug::print(Debug::Functions,0,
" Interface Member:\n"
- " `%s' `%s' proto=%d\n"
- " def=`%s'\n",
+ " '%s' '%s' proto=%d\n"
+ " def='%s'\n",
qPrint(root->type),
qPrint(rname),
root->proto,
@@ -3242,7 +3244,7 @@ static void buildInterfaceAndServiceList(Entry *root)
{
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",
+ " '%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",
qPrint(root->type),
qPrint(root->parent()->name),
qPrint(root->name),
@@ -3345,7 +3347,7 @@ static void addMethodToClass(Entry *root,ClassDef *cd,
fileName = root->tagInfo->tagName;
}
- //printf("root->name=`%s; root->args=`%s' root->argList=`%s'\n",
+ //printf("root->name='%s; root->args='%s' root->argList='%s'\n",
// root->name.data(),root->args.data(),argListToString(root->argList).data()
// );
@@ -3446,8 +3448,8 @@ static void addMethodToClass(Entry *root,ClassDef *cd,
Debug::print(Debug::Functions,0,
" Func Member:\n"
- " `%s' `%s'::`%s' `%s' proto=%d\n"
- " def=`%s'\n",
+ " '%s' '%s'::'%s' '%s' proto=%d\n"
+ " def='%s'\n",
qPrint(root->type),
qPrint(qualScope),
qPrint(rname),
@@ -3487,7 +3489,7 @@ static void buildFunctionList(Entry *root)
{
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",
+ " '%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",
qPrint(root->type),
qPrint(root->parent()->name),
qPrint(root->name),
@@ -3648,9 +3650,9 @@ static void buildFunctionList(Entry *root)
)
{
GroupDef *gd=0;
- if (root->groups->getFirst()!=0)
+ if (root->groups->getFirst() && !root->groups->getFirst()->groupname.isEmpty())
{
- gd = Doxygen::groupSDict->find(root->groups->getFirst()->groupname.data());
+ gd = Doxygen::groupSDict->find(root->groups->getFirst()->groupname);
}
//printf("match!\n");
//printf("mnd=%p rnd=%p nsName=%s rnsName=%s\n",mnd,rnd,nsName.data(),rnsName.data());
@@ -3747,7 +3749,7 @@ static void buildFunctionList(Entry *root)
if (!found) /* global function is unique with respect to the file */
{
Debug::print(Debug::Functions,0," --> new function %s found!\n",qPrint(rname));
- //printf("New function type=`%s' name=`%s' args=`%s' bodyLine=%d\n",
+ //printf("New function type='%s' name='%s' args='%s' bodyLine=%d\n",
// root->type.data(),rname.data(),root->args.data(),root->bodyLine);
// new global function
@@ -3825,8 +3827,8 @@ static void buildFunctionList(Entry *root)
}
Debug::print(Debug::Functions,0,
" Global Function:\n"
- " `%s' `%s'::`%s' `%s' proto=%d\n"
- " def=`%s'\n",
+ " '%s' '%s'::'%s' '%s' proto=%d\n"
+ " def='%s'\n",
qPrint(root->type),
qPrint(root->parent()->name),
qPrint(rname),
@@ -3892,7 +3894,7 @@ static void buildFunctionList(Entry *root)
}
}
- //printf("unrelated function %d `%s' `%s' `%s'\n",
+ //printf("unrelated function %d '%s' '%s' '%s'\n",
// root->parent->section,root->type.data(),rname.data(),root->args.data());
}
else
@@ -3919,7 +3921,7 @@ static void findFriends()
MemberName *fn;
for (;(fn=fnli.current());++fnli) // for each global function name
{
- //printf("Function name=`%s'\n",fn->memberName());
+ //printf("Function name='%s'\n",fn->memberName());
MemberName *mn;
if ((mn=Doxygen::memberNameSDict->find(fn->memberName())))
{ // there are members with the same name
@@ -4146,7 +4148,7 @@ static void transferRelatedFunctionDocumentation()
/* find a matching function declaration and definition for this function */
for (mni.toFirst();(md=mni.current());++mni) // for each global function
{
- //printf(" Function `%s'\n",md->name().data());
+ //printf(" Function '%s'\n",md->name().data());
MemberName *rmn;
if ((rmn=Doxygen::memberNameSDict->find(md->name()))) // check if there is a member with the same name
{
@@ -4155,7 +4157,7 @@ static void transferRelatedFunctionDocumentation()
MemberNameIterator rmni(*rmn);
for (rmni.toFirst();(rmd=rmni.current());++rmni) // for each member with the same name
{
- //printf(" Member found: related=`%d'\n",rmd->isRelated());
+ //printf(" Member found: related='%d'\n",rmd->isRelated());
if ((rmd->isRelated() || rmd->isForeign()) && // related function
!md->isAlias() && !rmd->isAlias() &&
matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(),
@@ -4164,7 +4166,7 @@ static void transferRelatedFunctionDocumentation()
)
)
{
- //printf(" Found related member `%s'\n",md->name().data());
+ //printf(" Found related member '%s'\n",md->name().data());
if (rmd->relatedAlso())
md->setRelatedAlso(rmd->relatedAlso());
else if (rmd->isForeign())
@@ -4228,11 +4230,11 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co
FileDef *fd=cd->getFileDef();
if (context && cd!=context)
{
- result = getResolvedClass(context,0,name,0,0,TRUE,TRUE);
+ result = const_cast<ClassDef*>(getResolvedClass(context,0,name,0,0,TRUE,TRUE));
}
if (result==0)
{
- result = getResolvedClass(cd,fd,name,0,0,TRUE,TRUE);
+ result = const_cast<ClassDef*>(getResolvedClass(cd,fd,name,0,0,TRUE,TRUE));
}
if (result==0) // try direct class, needed for namespaced classes imported via tag files (see bug624095)
{
@@ -4300,7 +4302,7 @@ static void findUsedClassesForClass(Entry *root,
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec,root->lang)!=-1)
{
// find the type (if any) that matches usedClassName
- ClassDef *typeCd = getResolvedClass(masterCd,
+ const ClassDef *typeCd = getResolvedClass(masterCd,
masterCd->getFileDef(),
usedClassName,
0,0,
@@ -4344,7 +4346,7 @@ static void findUsedClassesForClass(Entry *root,
if (arg->name==usedName) // type is a template argument
{
found=TRUE;
- Debug::print(Debug::Classes,0," New used class `%s'\n", qPrint(usedName));
+ Debug::print(Debug::Classes,0," New used class '%s'\n", qPrint(usedName));
ClassDef *usedCd = Doxygen::hiddenClasses->find(usedName);
if (usedCd==0)
@@ -4361,7 +4363,7 @@ static void findUsedClassesForClass(Entry *root,
Doxygen::hiddenClasses->append(usedName,usedCd);
}
if (isArtificial) usedCd->setArtificial(TRUE);
- Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", qPrint(usedCd->name()));
+ 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());
}
@@ -4377,7 +4379,7 @@ static void findUsedClassesForClass(Entry *root,
if (usedCd)
{
found=TRUE;
- Debug::print(Debug::Classes,0," Adding used class `%s' (2)\n", qPrint(usedCd->name()));
+ 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());
}
@@ -4397,7 +4399,7 @@ static void findUsedClassesForClass(Entry *root,
{
type+=md->argsString();
}
- Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", qPrint(type));
+ Debug::print(Debug::Classes,0," New undocumented used class '%s'\n", qPrint(type));
usedCd = createClassDef(
masterCd->getDefFileName(),masterCd->getDefLine(),
masterCd->getDefColumn(),
@@ -4409,7 +4411,7 @@ static void findUsedClassesForClass(Entry *root,
if (usedCd)
{
if (isArtificial) usedCd->setArtificial(TRUE);
- Debug::print(Debug::Classes,0," Adding used class `%s' (3)\n", qPrint(usedCd->name()));
+ 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());
}
@@ -4673,7 +4675,7 @@ static bool findClassRelation(
QCString biName=bi->name;
bool explicitGlobalScope=FALSE;
- //printf("findClassRelation: biName=`%s'\n",biName.data());
+ //printf("findClassRelation: biName='%s'\n",biName.data());
if (biName.left(2)=="::") // explicit global scope
{
biName=biName.right(biName.length()-2);
@@ -4689,7 +4691,7 @@ static bool findClassRelation(
int scopeOffset=explicitGlobalScope ? 0 : scopeName.length();
do // try all parent scope prefixes, starting with the largest scope
{
- //printf("scopePrefix=`%s' biName=`%s'\n",
+ //printf("scopePrefix='%s' biName='%s'\n",
// scopeName.left(scopeOffset).data(),biName.data());
QCString baseClassName=biName;
@@ -4701,19 +4703,20 @@ static bool findClassRelation(
//baseClassName=stripTemplateSpecifiersFromScope
// (removeRedundantWhiteSpace(baseClassName),TRUE,
// &stripped);
- MemberDef *baseClassTypeDef=0;
+ const MemberDef *baseClassTypeDef=0;
QCString templSpec;
- ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context,
+ ClassDef *baseClass=const_cast<ClassDef*>(
+ getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context,
cd->getFileDef(),
baseClassName,
&baseClassTypeDef,
&templSpec,
mode==Undocumented,
TRUE
- );
+ ));
//printf("baseClassName=%s baseClass=%p cd=%p explicitGlobalScope=%d\n",
// baseClassName.data(),baseClass,cd,explicitGlobalScope);
- //printf(" scope=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
+ //printf(" scope='%s' baseClassName='%s' baseClass=%s templSpec=%s\n",
// cd ? cd->name().data():"<none>",
// baseClassName.data(),
// baseClass?baseClass->name().data():"<none>",
@@ -4761,14 +4764,15 @@ static bool findClassRelation(
{
templSpec=removeRedundantWhiteSpace(baseClassName.mid(i,e-i));
baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e);
- baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context,
- cd->getFileDef(),
- baseClassName,
- &baseClassTypeDef,
- 0, //&templSpec,
- mode==Undocumented,
- TRUE
- );
+ baseClass=const_cast<ClassDef*>(
+ getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context,
+ cd->getFileDef(),
+ baseClassName,
+ &baseClassTypeDef,
+ 0, //&templSpec,
+ mode==Undocumented,
+ TRUE
+ ));
//printf("baseClass=%p -> baseClass=%s templSpec=%s\n",
// baseClass,baseClassName.data(),templSpec.data());
}
@@ -4797,14 +4801,15 @@ static bool findClassRelation(
QCString tmpTemplSpec;
// replace any namespace aliases
replaceNamespaceAliases(baseClassName,si);
- baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context,
+ baseClass=const_cast<ClassDef*>(
+ getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context,
cd->getFileDef(),
baseClassName,
&baseClassTypeDef,
&tmpTemplSpec,
mode==Undocumented,
TRUE
- );
+ ));
found=baseClass!=0 && baseClass!=cd;
if (found) templSpec = tmpTemplSpec;
}
@@ -4844,7 +4849,7 @@ static bool findClassRelation(
//printf("3. found=%d\n",found);
if (found)
{
- Debug::print(Debug::Classes,0," Documented base class `%s' templSpec=%s\n",qPrint(biName),qPrint(templSpec));
+ 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"
@@ -4899,7 +4904,7 @@ static bool findClassRelation(
else if (mode==Undocumented && (scopeOffset==0 || isATemplateArgument))
{
Debug::print(Debug::Classes,0,
- " New undocumented base class `%s' baseClassName=%s templSpec=%s isArtificial=%d\n",
+ " New undocumented base class '%s' baseClassName=%s templSpec=%s isArtificial=%d\n",
qPrint(biName),qPrint(baseClassName),qPrint(templSpec),isArtificial
);
baseClass=0;
@@ -4959,7 +4964,7 @@ static bool findClassRelation(
}
else
{
- Debug::print(Debug::Classes,0," Base class `%s' not found\n",qPrint(biName));
+ Debug::print(Debug::Classes,0," Base class '%s' not found\n",qPrint(biName));
}
}
else
@@ -4984,7 +4989,7 @@ static bool findClassRelation(
{
scopeOffset=0;
}
- //printf("new scopeOffset=`%d'",scopeOffset);
+ //printf("new scopeOffset='%d'",scopeOffset);
} while (scopeOffset>=0);
if (parentNode==0)
@@ -5329,8 +5334,8 @@ static void generateXRefPages()
}
//----------------------------------------------------------------------
-// Copy the documentation in entry `root' to member definition `md' and
-// set the function declaration of the member to `funcDecl'. If the boolean
+// Copy the documentation in entry 'root' to member definition 'md' and
+// set the function declaration of the member to 'funcDecl'. If the boolean
// over_load is set the standard overload text is added.
static void addMemberDocs(Entry *root,
@@ -5340,7 +5345,7 @@ static void addMemberDocs(Entry *root,
NamespaceSDict *
)
{
- //printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s' mSpec=%d\n",
+ //printf("addMemberDocs: '%s'::'%s' '%s' funcDecl='%s' mSpec=%d\n",
// root->parent->name.data(),md->name().data(),md->argsString(),funcDecl,root->spec);
QCString fDecl=funcDecl;
// strip extern specifier
@@ -5476,18 +5481,18 @@ static void addMemberDocs(Entry *root,
// find a class definition given the scope name and (optionally) a
// template list specifier
-static ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd,
+static const ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd,
const char *scopeName)
{
- ClassDef *tcd = getResolvedClass(nd,fd,scopeName,0,0,TRUE,TRUE);
+ const ClassDef *tcd = getResolvedClass(nd,fd,scopeName,0,0,TRUE,TRUE);
return tcd;
}
//----------------------------------------------------------------------
-// Adds the documentation contained in `root' to a global function
-// with name `name' and argument list `args' (for overloading) and
-// function declaration `decl' to the corresponding member definition.
+// Adds the documentation contained in 'root' to a global function
+// with name 'name' and argument list 'args' (for overloading) and
+// function declaration 'decl' to the corresponding member definition.
static bool findGlobalMember(Entry *root,
const QCString &namespaceName,
@@ -5542,10 +5547,10 @@ static bool findGlobalMember(Entry *root,
if ((namespaceName.isEmpty() && nd==0) || // not in a namespace
(nd && nd->name()==namespaceName) || // or in the same namespace
- viaUsingDirective // member in `using' namespace
+ viaUsingDirective // member in 'using' namespace
)
{
- Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n",
+ Debug::print(Debug::FindMembers,0,"4. Try to add member '%s' to scope '%s'\n",
qPrint(md->name()),qPrint(namespaceName));
NamespaceDef *rnd = 0;
@@ -5641,7 +5646,7 @@ static bool findGlobalMember(Entry *root,
)
{
warn(root->fileName,root->startLine,
- "documented symbol `%s' was not declared or defined.",decl
+ "documented symbol '%s' was not declared or defined.",decl
);
}
}
@@ -5822,7 +5827,7 @@ static void findMember(Entry *root,
)
{
Debug::print(Debug::FindMembers,0,
- "findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,"
+ "findMember(root=%p,funcDecl='%s',related='%s',overload=%d,"
"isFunc=%d mGrpId=%d tArgList=%p (#=%d) "
"spec=%lld lang=%x\n",
root,qPrint(funcDecl),qPrint(root->relates),overloaded,isFunc,root->mGrpId,
@@ -5891,7 +5896,7 @@ static void findMember(Entry *root,
" ::","::"
).stripWhiteSpace();
- //printf("funcDecl=`%s'\n",funcDecl.data());
+ //printf("funcDecl='%s'\n",funcDecl.data());
if (isFriend && funcDecl.left(6)=="class ")
{
//printf("friend class\n");
@@ -5906,18 +5911,18 @@ static void findMember(Entry *root,
else
{
// extract information from the declarations
- parseFuncDecl(funcDecl,root->lang==SrcLangExt_ObjC,scopeName,funcType,funcName,
+ parseFuncDecl(funcDecl,root->lang,scopeName,funcType,funcName,
funcArgs,funcTempList,exceptions
);
}
- //printf("scopeName=`%s' funcType=`%s' funcName=`%s' funcArgs=`%s'\n",
+ //printf("scopeName='%s' funcType='%s' funcName='%s' funcArgs='%s'\n",
// scopeName.data(),funcType.data(),funcName.data(),funcArgs.data());
// the class name can also be a namespace name, we decide this later.
// if a related class name is specified and the class name could
// not be derived from the function declaration, then use the
// related field.
- //printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n",
+ //printf("scopeName='%s' className='%s' namespaceName='%s'\n",
// scopeName.data(),className.data(),namespaceName.data());
if (!root->relates.isEmpty())
{ // related member, prefix user specified scope
@@ -5993,13 +5998,13 @@ static void findMember(Entry *root,
// split scope into a namespace and a class part
extractNamespaceName(scopeName,className,namespaceName,TRUE);
- //printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n",
+ //printf("scopeName='%s' className='%s' namespaceName='%s'\n",
// scopeName.data(),className.data(),namespaceName.data());
//namespaceName=removeAnonymousScopes(namespaceName);
if (namespaceName.find('@')!=-1) return; // skip stuff in anonymous namespace...
- //printf("namespaceName=`%s' className=`%s'\n",namespaceName.data(),className.data());
+ //printf("namespaceName='%s' className='%s'\n",namespaceName.data(),className.data());
// merge class and namespace scopes again
scopeName.resize(0);
if (!namespaceName.isEmpty())
@@ -6022,7 +6027,7 @@ static void findMember(Entry *root,
{
scopeName=className;
}
- //printf("new scope=`%s'\n",scopeName.data());
+ //printf("new scope='%s'\n",scopeName.data());
QCString tempScopeName=scopeName;
ClassDef *cd=getClass(scopeName);
@@ -6041,7 +6046,7 @@ static void findMember(Entry *root,
//printf("scopeName=%s cd=%p root->tArgLists=%p result=%s\n",
// scopeName.data(),cd,root->tArgLists,tempScopeName.data());
- //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right).
if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool(HIDE_SCOPE_NAMES))
{
@@ -6062,7 +6067,7 @@ static void findMember(Entry *root,
{
funcDecl=tempScopeName+"::"+funcName+funcTempList;
}
- else // variable => add `argument' list
+ else // variable => add 'argument' list
{
funcDecl=tempScopeName+"::"+funcName+funcArgs;
}
@@ -6076,7 +6081,7 @@ static void findMember(Entry *root,
{
funcDecl=funcType+" "+funcName+funcTempList;
}
- else // variable => add `argument' list
+ else // variable => add 'argument' list
{
funcDecl=funcType+" "+funcName+funcArgs;
}
@@ -6099,16 +6104,16 @@ static void findMember(Entry *root,
Debug::print(Debug::FindMembers,0,
"findMember() Parse results:\n"
- " namespaceName=`%s'\n"
+ " namespaceName='%s'\n"
" className=`%s`\n"
- " funcType=`%s'\n"
- " funcSpec=`%s'\n"
- " funcName=`%s'\n"
- " funcArgs=`%s'\n"
- " funcTempList=`%s'\n"
- " funcDecl=`%s'\n"
- " related=`%s'\n"
- " exceptions=`%s'\n"
+ " funcType='%s'\n"
+ " funcSpec='%s'\n"
+ " funcName='%s'\n"
+ " funcArgs='%s'\n"
+ " funcTempList='%s'\n"
+ " funcDecl='%s'\n"
+ " related='%s'\n"
+ " exceptions='%s'\n"
" isRelated=%d\n"
" isMemberOf=%d\n"
" isFriend=%d\n"
@@ -6123,7 +6128,7 @@ static void findMember(Entry *root,
if (!funcName.isEmpty()) // function name is valid
{
Debug::print(Debug::FindMembers,0,
- "1. funcName=`%s'\n",funcName.data());
+ "1. funcName='%s'\n",funcName.data());
if (funcName.left(9)=="operator ") // strip class scope from cast operator
{
funcName = substitute(funcName,className+"::","");
@@ -6154,7 +6159,7 @@ static void findMember(Entry *root,
ClassDef *cd=md->getClassDef();
Debug::print(Debug::FindMembers,0,
"3. member definition found, "
- "scope needed=`%s' scope=`%s' args=`%s' fileName=%s\n",
+ "scope needed='%s' scope='%s' args='%s' fileName=%s\n",
qPrint(scopeName),cd ? qPrint(cd->name()) : "<none>",
qPrint(md->argsString()),
qPrint(root->fileName));
@@ -6223,7 +6228,7 @@ static void findMember(Entry *root,
}
Debug::print(Debug::FindMembers,0,
- "5. matching `%s'<=>`%s' className=%s namespaceName=%s\n",
+ "5. matching '%s'<=>'%s' className=%s namespaceName=%s\n",
qPrint(argListToString(argList,TRUE)),qPrint(argListToString(root->argList,TRUE)),
qPrint(className),qPrint(namespaceName)
);
@@ -6477,7 +6482,7 @@ static void findMember(Entry *root,
declMd ? declMd->protection() : root->protection,
root->virt,root->stat,Member,
mtype,tArgList,root->argList,root->metaData);
- //printf("new specialized member %s args=`%s'\n",md->name().data(),funcArgs.data());
+ //printf("new specialized member %s args='%s'\n",md->name().data(),funcArgs.data());
md->setTagInfo(root->tagInfo);
md->setLanguage(root->lang);
md->setId(root->id);
@@ -6540,7 +6545,7 @@ static void findMember(Entry *root,
// new overloaded member function
ArgumentList *tArgList =
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
- //printf("new related member %s args=`%s'\n",md->name().data(),funcArgs.data());
+ //printf("new related member %s args='%s'\n",md->name().data(),funcArgs.data());
MemberDef *md=createMemberDef(
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
@@ -6595,7 +6600,7 @@ static void findMember(Entry *root,
" 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());
+ //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
if ((cd=getClass(scopeName)))
{
bool newMember=TRUE; // assume we have a new member
@@ -6668,7 +6673,7 @@ static void findMember(Entry *root,
funcDecl=funcType + " " + funcName;
}
- //printf("New related name `%s' `%d'\n",funcName.data(),
+ //printf("New related name '%s' '%d'\n",funcName.data(),
// root->argList ? (int)root->argList->count() : -1);
// first note that we pass:
@@ -6709,7 +6714,7 @@ static void findMember(Entry *root,
- //printf("Related member name=`%s' decl=`%s' bodyLine=`%d'\n",
+ //printf("Related member name='%s' decl='%s' bodyLine='%d'\n",
// funcName.data(),funcDecl.data(),root->bodyLine);
// try to find the matching line number of the body from the
@@ -6805,7 +6810,7 @@ static void findMember(Entry *root,
else
{
warn_undoc(root->fileName,root->startLine,
- "class `%s' for related function `%s' is not "
+ "class '%s' for related function '%s' is not "
"documented.",
className.data(),funcName.data()
);
@@ -6815,12 +6820,12 @@ static void findMember(Entry *root,
{
localObjCMethod:
ClassDef *cd;
- //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
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",qPrint(root->name),qPrint(scopeName),qPrint(className));
- //printf("Local objective C method `%s' of class `%s' found\n",root->name.data(),cd->name().data());
+ //printf("Local objective C method '%s' of class '%s' found\n",root->name.data(),cd->name().data());
MemberDef *md=createMemberDef(
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
@@ -6872,14 +6877,14 @@ localObjCMethod:
if (className.isEmpty() && !globMem)
{
warn(root->fileName,root->startLine,
- "class for member `%s' cannot "
+ "class for member '%s' cannot "
"be found.", funcName.data()
);
}
else if (!className.isEmpty() && !globMem)
{
warn(root->fileName,root->startLine,
- "member `%s' of class `%s' cannot be found",
+ "member '%s' of class '%s' cannot be found",
funcName.data(),className.data());
}
}
@@ -6901,7 +6906,7 @@ static void filterMemberDocumentation(Entry *root)
{
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",
+ "findMemberDocumentation(): root->type='%s' root->inside='%s' root->name='%s' root->args='%s' section=%x root->spec=%lld root->mGrpId=%d\n",
qPrint(root->type),qPrint(root->inside),qPrint(root->name),qPrint(root->args),root->section,root->spec,root->mGrpId
);
//printf("root->parent()->name=%s\n",root->parent()->name.data());
@@ -6935,7 +6940,7 @@ static void filterMemberDocumentation(Entry *root)
//printf("Member %s isFunc=%d\n",root->name.data(),isFunc);
if (root->section==Entry::MEMBERDOC_SEC)
{
- //printf("Documentation for inline member `%s' found args=`%s'\n",
+ //printf("Documentation for inline member '%s' found args='%s'\n",
// root->name.data(),root->args.data());
//if (root->relates.length()) printf(" Relates %s\n",root->relates.data());
if (root->type.isEmpty())
@@ -6963,7 +6968,7 @@ static void filterMemberDocumentation(Entry *root)
)
)
{
- //printf("Documentation for member `%s' found args=`%s' excp=`%s'\n",
+ //printf("Documentation for member '%s' found args='%s' excp='%s'\n",
// root->name.data(),root->args.data(),root->exception.data());
//if (root->relates.length()) printf(" Relates %s\n",root->relates.data());
//printf("Inside=%s\n Relates=%s\n",root->inside.data(),root->relates.data());
@@ -7087,7 +7092,7 @@ static void findEnums(Entry *root)
bool isGlobal;
bool isRelated=FALSE;
bool isMemberOf=FALSE;
- //printf("Found enum with name `%s' relates=%s\n",root->name.data(),root->relates.data());
+ //printf("Found enum with name '%s' relates=%s\n",root->name.data(),root->relates.data());
int i;
QCString name;
@@ -7124,7 +7129,7 @@ static void findEnums(Entry *root)
if (cd && !name.isEmpty()) // found a enum inside a compound
{
- //printf("Enum `%s'::`%s'\n",cd->name().data(),name.data());
+ //printf("Enum '%s'::'%s'\n",cd->name().data(),name.data());
fd=0;
mnsd=Doxygen::memberNameSDict;
isGlobal=FALSE;
@@ -7265,7 +7270,7 @@ static void addEnumValuesToEnums(Entry *root)
MemberNameSDict *mnsd=0;
bool isGlobal;
bool isRelated=FALSE;
- //printf("Found enum with name `%s' relates=%s\n",root->name.data(),root->relates.data());
+ //printf("Found enum with name '%s' relates=%s\n",root->name.data(),root->relates.data());
int i;
QCString name;
@@ -7301,21 +7306,21 @@ static void addEnumValuesToEnums(Entry *root)
if (cd && !name.isEmpty()) // found a enum inside a compound
{
- //printf("Enum in class `%s'::`%s'\n",cd->name().data(),name.data());
+ //printf("Enum in class '%s'::'%s'\n",cd->name().data(),name.data());
fd=0;
mnsd=Doxygen::memberNameSDict;
isGlobal=FALSE;
}
else if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') // found enum inside namespace
{
- //printf("Enum in namespace `%s'::`%s'\n",nd->name().data(),name.data());
+ //printf("Enum in namespace '%s'::'%s'\n",nd->name().data(),name.data());
mnsd=Doxygen::functionNameSDict;
isGlobal=TRUE;
}
else // found a global enum
{
fd=root->fileDef();
- //printf("Enum in file `%s': `%s'\n",fd->name().data(),name.data());
+ //printf("Enum in file '%s': '%s'\n",fd->name().data(),name.data());
mnsd=Doxygen::functionNameSDict;
isGlobal=TRUE;
}
@@ -7330,7 +7335,7 @@ static void addEnumValuesToEnums(Entry *root)
MemberDef *md;
for (mni.toFirst(); (md=mni.current()) ; ++mni) // for each enum in this list
{
- if (md->isEnumerate() && root->children())
+ if (!md->isAlias() && md->isEnumerate() && root->children())
{
//printf(" enum with %d children\n",root->children()->count());
EntryListIterator eli(*root->children()); // for each enum value
@@ -7482,7 +7487,7 @@ static void findEnumDocumentation(Entry *root)
&& root->name.at(0)!='@' // skip anonymous enums
)
{
- //printf("Found docs for enum with name `%s' in context %s\n",
+ //printf("Found docs for enum with name '%s' in context %s\n",
// root->name.data(),root->parent->name.data());
int i;
QCString name;
@@ -7491,7 +7496,7 @@ static void findEnumDocumentation(Entry *root)
{
name=root->name.right(root->name.length()-i-2); // extract name
scope=root->name.left(i); // extract scope
- //printf("Scope=`%s' Name=`%s'\n",scope.data(),name.data());
+ //printf("Scope='%s' Name='%s'\n",scope.data(),name.data());
}
else // just the name
{
@@ -7511,7 +7516,7 @@ static void findEnumDocumentation(Entry *root)
bool found=FALSE;
if (cd)
{
- //printf("Enum: scope=`%s' name=`%s'\n",cd->name(),name.data());
+ //printf("Enum: scope='%s' name='%s'\n",cd->name(),name.data());
QCString className=cd->name().copy();
MemberName *mn=Doxygen::memberNameSDict->find(name);
if (mn)
@@ -7602,7 +7607,7 @@ static void findEnumDocumentation(Entry *root)
if (!found)
{
warn(root->fileName,root->startLine,
- "Documentation for undefined enum `%s' found.",
+ "Documentation for undefined enum '%s' found.",
name.data()
);
}
@@ -7728,9 +7733,9 @@ static void vhdlCorrectMemberProperties()
//----------------------------------------------------------------------
-// computes the relation between all members. For each member `m'
-// the members that override the implementation of `m' are searched and
-// the member that `m' overrides is searched.
+// computes the relation between all members. For each member 'm'
+// the members that override the implementation of 'm' are searched and
+// the member that 'm' overrides is searched.
static void computeMemberRelations()
{
@@ -7750,7 +7755,7 @@ static void computeMemberRelations()
if (mcd && mcd->baseClasses())
{
const ClassDef *bmcd = bmd->getClassDef();
- //printf("Check relation between `%s'::`%s' (%p) and `%s'::`%s' (%p)\n",
+ //printf("Check relation between '%s'::'%s' (%p) and '%s'::'%s' (%p)\n",
// mcd->name().data(),md->name().data(),md,
// bmcd->name().data(),bmd->name().data(),bmd
// );
@@ -7768,7 +7773,7 @@ static void computeMemberRelations()
//printf(" derived scope\n");
ArgumentList *bmdAl = bmd->argumentList();
ArgumentList *mdAl = md->argumentList();
- //printf(" Base argList=`%s'\n Super argList=`%s'\n",
+ //printf(" Base argList='%s'\n Super argList='%s'\n",
// argListToString(bmdAl.pointer()).data(),
// argListToString(mdAl.pointer()).data()
// );
@@ -8097,7 +8102,7 @@ static void addSourceReferences()
(fd->generateSourceFile() || Doxygen::parseSourcesNeeded)
)
{
- //printf("Found member `%s' in file `%s' at line `%d' def=%s\n",
+ //printf("Found member '%s' in file '%s' at line '%d' def=%s\n",
// md->name().data(),fd->name().data(),md->getStartBodyLine(),md->getOuterScope()->name().data());
fd->addSourceRef(md->getStartBodyLine(),md->getOuterScope(),md);
}
@@ -8122,7 +8127,7 @@ static void addSourceReferences()
(fd->generateSourceFile() || Doxygen::parseSourcesNeeded)
)
{
- //printf("Found member `%s' in file `%s' at line `%d' def=%s\n",
+ //printf("Found member '%s' in file '%s' at line '%d' def=%s\n",
// md->name().data(),fd->name().data(),md->getStartBodyLine(),md->getOuterScope()->name().data());
fd->addSourceRef(md->getStartBodyLine(),md->getOuterScope(),md);
}
@@ -8302,7 +8307,7 @@ static void inheritDocumentation()
MemberDef *md;
for (;(md=mni.current());++mni)
{
- //printf("%04d Member `%s'\n",count++,md->name().data());
+ //printf("%04d Member '%s'\n",count++,md->name().data());
if (md->documentation().isEmpty() && md->briefDescription().isEmpty())
{ // no documentation yet
MemberDef *bmd = md->reimplements();
@@ -8518,7 +8523,7 @@ static void flushCachedTemplateRelations()
{
if (fmd->isTypedefValCached())
{
- ClassDef *cd = fmd->getCachedTypedefVal();
+ const ClassDef *cd = fmd->getCachedTypedefVal();
if (cd->isTemplate()) fmd->invalidateTypedefValCache();
}
}
@@ -8532,7 +8537,7 @@ static void flushCachedTemplateRelations()
{
if (fmd->isTypedefValCached())
{
- ClassDef *cd = fmd->getCachedTypedefVal();
+ const ClassDef *cd = fmd->getCachedTypedefVal();
if (cd->isTemplate()) fmd->invalidateTypedefValCache();
}
}
@@ -8595,7 +8600,7 @@ static void findDefineDocumentation(Entry *root)
root->section==Entry::DEFINE_SEC) && !root->name.isEmpty()
)
{
- //printf("found define `%s' `%s' brief=`%s' doc=`%s'\n",
+ //printf("found define '%s' '%s' brief='%s' doc='%s'\n",
// root->name.data(),root->args.data(),root->brief.data(),root->doc.data());
if (root->tagInfo && !root->name.isEmpty()) // define read from a tag file
@@ -8605,7 +8610,7 @@ static void findDefineDocumentation(Entry *root)
Public,Normal,FALSE,Member,MemberType_Define,0,0,"");
md->setTagInfo(root->tagInfo);
md->setLanguage(root->lang);
- //printf("Searching for `%s' fd=%p\n",filePathName.data(),fd);
+ //printf("Searching for '%s' fd=%p\n",filePathName.data(),fd);
md->setFileDef(root->parent()->fileDef());
//printf("Adding member=%s\n",md->name().data());
MemberName *mn;
@@ -8950,7 +8955,7 @@ static void resolveUserReferences()
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
- //printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n",
+ //printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->fileName.data());
PageDef *pd=0;
@@ -9252,7 +9257,7 @@ static void generateConfigFile(const char *configFile,bool shortList,
{
if (!updateOnly)
{
- msg("\n\nConfiguration file `%s' created.\n\n",configFile);
+ msg("\n\nConfiguration file '%s' created.\n\n",configFile);
msg("Now edit the configuration file and enter\n\n");
if (qstrcmp(configFile,"Doxyfile") || qstrcmp(configFile,"doxyfile"))
msg(" doxygen %s\n\n",configFile);
@@ -9262,7 +9267,7 @@ static void generateConfigFile(const char *configFile,bool shortList,
}
else
{
- msg("\n\nConfiguration file `%s' updated.\n\n",configFile);
+ msg("\n\nConfiguration file '%s' updated.\n\n",configFile);
}
}
}
@@ -9325,15 +9330,15 @@ static void readTagFile(Entry *root,const char *tl)
QFileInfo fi(fileName);
if (!fi.exists() || !fi.isFile())
{
- err("Tag file `%s' does not exist or is not a file. Skipping it...\n",
+ err("Tag file '%s' does not exist or is not a file. Skipping it...\n",
fileName.data());
return;
}
if (!destName.isEmpty())
- msg("Reading tag file `%s', location `%s'...\n",fileName.data(),destName.data());
+ msg("Reading tag file '%s', location '%s'...\n",fileName.data(),destName.data());
else
- msg("Reading tag file `%s'...\n",fileName.data());
+ msg("Reading tag file '%s'...\n",fileName.data());
parseTagFile(root,fi.absFilePath().utf8());
}
@@ -9692,8 +9697,8 @@ static QCString resolveSymlink(QCString path)
static QDict<void> g_pathsVisited(1009);
//----------------------------------------------------------------------------
-// Read all files matching at least one pattern in `patList' in the
-// directory represented by `fi'.
+// Read all files matching at least one pattern in 'patList' in the
+// directory represented by 'fi'.
// The directory is read iff the recusiveFlag is set.
// The contents of all files is append to the input string
@@ -9803,7 +9808,7 @@ int readDir(QFileInfo *fi,
//----------------------------------------------------------------------------
// read a file or all files in a directory and append their contents to the
-// input string. The names of the files are appended to the `fiList' list.
+// input string. The names of the files are appended to the 'fiList' list.
int readFileOrDirectory(const char *s,
FileNameList *fnList,
@@ -10033,7 +10038,7 @@ void readAliases()
{
QCString name=alias.left(i).stripWhiteSpace();
QCString value=alias.right(alias.length()-i-1);
- //printf("Alias: found name=`%s' value=`%s'\n",name.data(),value.data());
+ //printf("Alias: found name='%s' value='%s'\n",name.data(),value.data());
if (!name.isEmpty())
{
QCString *dn=Doxygen::aliasDict[name];
@@ -10122,9 +10127,9 @@ static void devUsage()
//----------------------------------------------------------------------------
// print the usage of doxygen
-static void usage(const char *name)
+static void usage(const char *name,const char *versionString)
{
- msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2015\n\n",versionString);
+ msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2019\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);
@@ -10146,17 +10151,17 @@ static void usage(const char *name)
msg(" RTF: %s -e rtf extensionsFile\n\n",name);
msg("7) Use doxygen to compare the used configuration file with the template configuration file\n");
msg(" %s -x [configFile]\n\n",name);
- msg("8) Use doxygen to show a list of build in emoji.\n");
+ msg("8) Use doxygen to show a list of built-in emojis.\n");
msg(" %s -f emoji outputFileName\n\n",name);
msg(" If - is used for outputFileName doxygen will write to standard output.\n\n");
msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n");
- msg("If configName is omitted `Doxyfile' will be used as a default.\n\n");
+ msg("If configName is omitted 'Doxyfile' will be used as a default.\n\n");
msg("-v print version string\n");
}
//----------------------------------------------------------------------------
-// read the argument of option `c' from the comment argument list and
-// update the option index `optind'.
+// read the argument of option 'c' from the comment argument list and
+// update the option index 'optind'.
static const char *getArg(int argc,char **argv,int &optind)
{
@@ -10341,6 +10346,16 @@ static int computeIdealCacheParam(uint v)
void readConfiguration(int argc, char **argv)
{
+ QCString versionString;
+ if (strlen(getGitVersion())>0)
+ {
+ versionString = QCString(getVersion())+" ("+getGitVersion()+")";
+ }
+ else
+ {
+ versionString = getVersion();
+ }
+
/**************************************************************************
* Handle arguments *
**************************************************************************/
@@ -10584,26 +10599,26 @@ void readConfiguration(int argc, char **argv)
g_dumpSymbolMap = TRUE;
break;
case 'v':
- msg("%s\n",versionString);
+ msg("%s\n",versionString.data());
cleanUpDoxygen();
exit(0);
break;
case '-':
if (qstrcmp(&argv[optind][2],"help")==0)
{
- usage(argv[0]);
+ usage(argv[0],versionString);
exit(0);
}
else if (qstrcmp(&argv[optind][2],"version")==0)
{
- msg("%s\n",versionString);
+ msg("%s\n",versionString.data());
cleanUpDoxygen();
exit(0);
}
else
{
err("Unknown option \"-%s\"\n",&argv[optind][1]);
- usage(argv[0]);
+ usage(argv[0],versionString);
exit(1);
}
break;
@@ -10619,12 +10634,12 @@ void readConfiguration(int argc, char **argv)
break;
case 'h':
case '?':
- usage(argv[0]);
+ usage(argv[0],versionString);
exit(0);
break;
default:
err("Unknown option \"-%c\"\n",argv[optind][1]);
- usage(argv[0]);
+ usage(argv[0],versionString);
exit(1);
}
optind++;
@@ -10654,7 +10669,7 @@ void readConfiguration(int argc, char **argv)
else
{
err("Doxyfile not found and no input file specified!\n");
- usage(argv[0]);
+ usage(argv[0],versionString);
exit(1);
}
}
@@ -10668,7 +10683,7 @@ void readConfiguration(int argc, char **argv)
else
{
err("configuration file %s not found!\n",argv[optind]);
- usage(argv[0]);
+ usage(argv[0],versionString);
exit(1);
}
}
@@ -11143,14 +11158,14 @@ void parseInput()
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
- err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
+ err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
"exist and cannot be created\n",outputDirectory.data());
cleanUpDoxygen();
exit(1);
}
else
{
- msg("Notice: Output directory `%s' does not exist. "
+ msg("Notice: Output directory '%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
@@ -11270,9 +11285,7 @@ void parseInput()
if (layoutFile.open(IO_ReadOnly))
{
msg("Parsing layout file %s...\n",layoutFileName.data());
- QTextStream t(&layoutFile);
- t.setEncoding(QTextStream::Latin1);
- LayoutDocManager::instance().parse(t,layoutFileName);
+ LayoutDocManager::instance().parse(layoutFileName);
}
else if (!defaultLayoutUsed)
{
diff --git a/src/doxygen.h b/src/doxygen.h
index 4ff8a56..c8eee7c 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -27,6 +27,7 @@
#include "membergroup.h"
#include "dirdef.h"
#include "memberlist.h"
+#include "docgroup.h"
class RefList;
class PageSList;
@@ -76,10 +77,10 @@ class StringDict : public QDict<QCString>
struct LookupInfo
{
LookupInfo() : classDef(0), typeDef(0) {}
- LookupInfo(ClassDef *cd,MemberDef *td,QCString ts,QCString rt)
+ LookupInfo(const ClassDef *cd,const MemberDef *td,QCString ts,QCString rt)
: classDef(cd), typeDef(td), templSpec(ts),resolvedType(rt) {}
- ClassDef *classDef;
- MemberDef *typeDef;
+ const ClassDef *classDef;
+ const MemberDef *typeDef;
QCString templSpec;
QCString resolvedType;
};
@@ -150,6 +151,7 @@ class Doxygen
static bool generatingXmlOutput;
static bool markdownSupport;
static GenericsSDict *genericsDict;
+ static DocGroup docGroup;
};
void initDoxygen();
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 7a3323d..9a82c8a 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1395,7 +1395,7 @@ void FileDefImpl::insertMember(MemberDef *md)
break;
default:
err("FileDefImpl::insertMembers(): "
- "member `%s' with class scope `%s' inserted in file scope `%s'!\n",
+ "member '%s' with class scope '%s' inserted in file scope '%s'!\n",
md->name().data(),
md->getClassDef() ? md->getClassDef()->name().data() : "<global>",
name().data());
diff --git a/src/filename.cpp b/src/filename.cpp
index ae3b596..637fe33 100644
--- a/src/filename.cpp
+++ b/src/filename.cpp
@@ -70,7 +70,7 @@ void FileName::generateDiskNames()
QCString path = fd->getPath();
if (!fd->isReference())
{
- //printf("i=%d j=%d fd->path=`%s' fd->name=`%s'\n",i,j,fd->path.left(i).data(),fd->name().data());
+ //printf("i=%d j=%d fd->path='%s' fd->name='%s'\n",i,j,fd->path.left(i).data(),fd->name().data());
if (i==(int)path.length())
{
//warning("Input file %s found multiple times!\n"
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 926a3ff..0712afd 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -269,7 +269,7 @@ static void endCodeLine()
g_code->endCodeLine();
}
-/*! write a code fragment `text' that may span multiple lines, inserting
+/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
static void codifyLines(char *text)
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 0ad03e3..ea75836 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -32,7 +32,7 @@
*
* - Do not like constructs like aa{BS} or {BS}bb. Should try to handle blank space
* with separate rule?: It seems it is often necessary, because we may parse something like
- * "functionA" or "MyInterface". So constructs like `(^|[ \t])interface({BS_}{ID})?/[ \t\n]'
+ * "functionA" or "MyInterface". So constructs like '(^|[ \t])interface({BS_}{ID})?/[ \t\n]'
* are desired.
*
* - Must track yyLineNr when using REJECT, unput() or similar commands.
@@ -2304,7 +2304,7 @@ static void initEntry()
current->virt = virt;
current->stat = gstat;
current->lang = SrcLangExt_Fortran;
- initGroupInfo(current);
+ Doxygen::docGroup.initGroupInfo(current);
}
/**
@@ -2712,7 +2712,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
global_scope = rt;
startScope(rt); // implies current_root = rt
initParser();
- groupEnterFile(yyFileName,yyLineNr);
+ Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
current = new Entry;
current->lang = SrcLangExt_Fortran;
@@ -2729,7 +2729,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
}
fortranscannerYYlex();
- groupLeaveFile(yyFileName,yyLineNr);
+ Doxygen::docGroup.leaveFile(yyFileName,yyLineNr);
if (global_scope && global_scope != (Entry *) -1) endScope(current_root, TRUE); // TRUE - global root
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index 4c3f986..9bcaa5b 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -73,7 +73,7 @@ class FTVHelp : public IndexIntf
};
#define JAVASCRIPT_LICENSE_TEXT \
- "/*\n@ @licstart The following is the entire license notice for the\n" \
+ "/*\n@licstart The following is the entire license notice for the\n" \
"JavaScript code in this file.\n\nCopyright (C) 1997-2019 by Dimitri van Heesch\n\n" \
"This program is free software; you can redistribute it and/or modify\n" \
"it under the terms of version 2 of the GNU General Public License as published by\n" \
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 9525053..9baf0aa 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -533,7 +533,7 @@ bool GroupDefImpl::insertMember(MemberDef *md,bool docOnly)
break;
default:
err("GroupDefImpl::insertMembers(): "
- "member `%s' (typeid=%d) with scope `%s' inserted in group scope `%s'!\n",
+ "member '%s' (typeid=%d) with scope '%s' inserted in group scope '%s'!\n",
md->name().data(),md->memberType(),
md->getClassDef() ? md->getClassDef()->name().data() : "",
name().data());
@@ -651,7 +651,7 @@ bool GroupDefImpl::findGroup(const GroupDef *def) const
void GroupDefImpl::addGroup(const GroupDef *def)
{
- //printf("adding group `%s' to group `%s'\n",def->name().data(),name().data());
+ //printf("adding group '%s' to group '%s'\n",def->name().data(),name().data());
//if (Config_getBool(SORT_MEMBER_DOCS))
// groupList->inSort(def);
//else
@@ -1486,7 +1486,7 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd)
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
- //printf("group `%s'\n",s->data());
+ //printf("group '%s'\n",s->data());
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
if (gd->addNamespace(nd)) nd->makePartOfGroup(gd);
@@ -1503,7 +1503,7 @@ void addDirToGroups(Entry *root,DirDef *dd)
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
- //printf("group `%s'\n",g->groupname.data());
+ //printf("group '%s'\n",g->groupname.data());
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
gd->addDir(dd);
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 29298a1..e1ff3e9 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -403,9 +403,15 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Strike:
if (s->enable()) m_t << "<strike" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</strike>";
break;
+ case DocStyleChange::Del:
+ if (s->enable()) m_t << "<del" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</del>";
+ break;
case DocStyleChange::Underline:
if (s->enable()) m_t << "<u" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</u>";
break;
+ case DocStyleChange::Ins:
+ if (s->enable()) m_t << "<ins" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</ins>";
+ break;
case DocStyleChange::Italic:
if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>";
break;
@@ -775,7 +781,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
void HtmlDocVisitor::visit(DocIncOperator *op)
{
- //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
+ //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
@@ -2030,10 +2036,8 @@ void HtmlDocVisitor::visitPre(DocParamList *pl)
m_t << "<td class=\"paramtype\">";
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
- bool first=TRUE;
for (li.toFirst();(type=li.current());++li)
{
- if (!first) m_t << "&#160;|&#160;"; else first=FALSE;
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
@@ -2042,6 +2046,10 @@ void HtmlDocVisitor::visitPre(DocParamList *pl)
{
visit((DocLinkedWord*)type);
}
+ else if (type->kind()==DocNode::Kind_Sep)
+ {
+ m_t << "&#160;" << ((DocSeparator *)type)->chars() << "&#160;";
+ }
}
m_t << "</td>";
}
@@ -2118,14 +2126,6 @@ void HtmlDocVisitor::visitPost(DocInternalRef *)
m_t << " ";
}
-void HtmlDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void HtmlDocVisitor::visitPost(DocCopy *)
-{
-}
-
void HtmlDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h
index 1c08c03..c994bac 100644
--- a/src/htmldocvisitor.h
+++ b/src/htmldocvisitor.h
@@ -127,8 +127,6 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index b3abd09..402b4e4 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -878,7 +878,7 @@ void HtmlGenerator::writeSearchData(const char *dir)
{
searchCss = mgr.getAsString("search.css");
}
- searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",versionString);
+ searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",getVersion());
t << searchCss;
Doxygen::indexList->addStyleSheetFile("search/search.css");
}
@@ -887,20 +887,20 @@ void HtmlGenerator::writeSearchData(const char *dir)
void HtmlGenerator::writeStyleSheetFile(QFile &file)
{
FTextStream t(&file);
- t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",versionString));
+ t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getVersion()));
}
void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/)
{
FTextStream t(&file);
- t << "<!-- HTML header for doxygen " << versionString << "-->" << endl;
+ t << "<!-- HTML header for doxygen " << getVersion() << "-->" << endl;
t << ResourceMgr::instance().getAsString("header.html");
}
void HtmlGenerator::writeFooterFile(QFile &file)
{
FTextStream t(&file);
- t << "<!-- HTML footer for doxygen " << versionString << "-->" << endl;
+ t << "<!-- HTML footer for doxygen " << getVersion() << "-->" << endl;
t << ResourceMgr::instance().getAsString("footer.html");
}
@@ -925,7 +925,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),relPath);
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << versionString << " -->" << endl;
+ << getVersion() << " -->" << endl;
//static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
static bool searchEngine = Config_getBool(SEARCHENGINE);
if (searchEngine /*&& !generateTreeView*/)
@@ -990,7 +990,7 @@ QCString HtmlGenerator::writeLogoAsString(const char *path)
"<img class=\"footer\" src=\"";
result += path;
result += "doxygen.png\" alt=\"doxygen\"/></a> ";
- result += versionString;
+ result += getVersion();
result += " ";
return result;
}
@@ -1043,7 +1043,7 @@ void HtmlGenerator::writeStyleInfo(int part)
//t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
//t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
- t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",versionString));
+ t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getVersion()));
endPlainFile();
Doxygen::indexList->addStyleSheetFile("doxygen.css");
}
@@ -2461,7 +2461,7 @@ void HtmlGenerator::writeSearchPage()
t << substituteHtmlKeywords(g_header,"Search","");
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << versionString << " -->" << endl;
+ << getVersion() << " -->" << endl;
t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "var searchBox = new SearchBox(\"searchBox\", \""
@@ -2515,7 +2515,7 @@ void HtmlGenerator::writeExternalSearchPage()
t << substituteHtmlKeywords(g_header,"Search","");
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << versionString << " -->" << endl;
+ << getVersion() << " -->" << endl;
t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "var searchBox = new SearchBox(\"searchBox\", \""
diff --git a/src/index.cpp b/src/index.cpp
index 5d6c0a5..0631ee4 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -620,7 +620,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv
(tocExpand && // or toc expand and
dd->getFiles() && dd->getFiles()->count()>0 // there are files
);
- //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ //printf("gd='%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
if (addToIndex)
{
Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0,TRUE,TRUE);
@@ -4006,7 +4006,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
}
bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
- //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ //printf("gd='%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
if (addToIndex)
{
Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE);
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index f960333..a0bbf73 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -292,9 +292,11 @@ void LatexDocVisitor::visit(DocStyleChange *s)
if (s->enable()) m_t << "{\\bfseries{"; else m_t << "}}";
break;
case DocStyleChange::Strike:
+ case DocStyleChange::Del:
if (s->enable()) m_t << "\\sout{"; else m_t << "}";
break;
case DocStyleChange::Underline:
+ case DocStyleChange::Ins:
if (s->enable()) m_t << "\\uline{"; else m_t << "}";
break;
case DocStyleChange::Italic:
@@ -557,7 +559,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
void LatexDocVisitor::visit(DocIncOperator *op)
{
- //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
+ //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
@@ -574,7 +576,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -1586,10 +1588,8 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
{
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
- bool first=TRUE;
for (li.toFirst();(type=li.current());++li)
{
- if (!first) m_t << " | "; else first=FALSE;
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
@@ -1598,6 +1598,10 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
{
visit((DocLinkedWord*)type);
}
+ else if (type->kind()==DocNode::Kind_Sep)
+ {
+ m_t << " " << ((DocSeparator *)type)->chars() << " ";
+ }
}
if (useTable) m_t << " & ";
}
@@ -1698,14 +1702,6 @@ void LatexDocVisitor::visitPost(DocInternalRef *ref)
endLink(0,ref->file(),ref->anchor());
}
-void LatexDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void LatexDocVisitor::visitPost(DocCopy *)
-{
-}
-
void LatexDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h
index 7ea8ae1..71fb5be 100644
--- a/src/latexdocvisitor.h
+++ b/src/latexdocvisitor.h
@@ -128,8 +128,6 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 6864e74..e6c6861 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -485,7 +485,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
if (Config_getBool(LATEX_BATCHMODE))
t << "\\batchmode\n";
- // to overcome problems wit too many open files
+ // to overcome problems with too many open files
t << "\\let\\mypdfximage\\pdfximage"
"\\def\\pdfximage{\\immediate\\mypdfximage}";
@@ -497,6 +497,14 @@ static void writeDefaultHeaderPart1(FTextStream &t)
documentClass = "book";
t << "\\documentclass[twoside]{" << documentClass << "}\n"
"\n";
+ t << "%% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package\n"
+ "\\usepackage{ifthen}\n"
+ "\\ifx\\requestedLaTeXdate\\undefined\n"
+ "\\usepackage{array}\n"
+ "\\else\n"
+ "\\usepackage{array}[=2016-10-06]\n"
+ "\\fi\n"
+ "%%\n";
// Load required packages
t << "% Packages required by doxygen\n"
@@ -768,7 +776,7 @@ static void writeDefaultHeaderPart3(FTextStream &t)
{
// part 3
// Finalize project number
- t << " Doxygen " << versionString << "}\\\\\n";
+ t << " Doxygen " << getVersion() << "}\\\\\n";
if (Config_getBool(LATEX_TIMESTAMP))
t << "\\vspace*{0.5cm}\n"
"{\\small " << dateToString(TRUE) << "}\\\\\n";
@@ -837,7 +845,7 @@ static void writeDefaultFooter(FTextStream &t)
void LatexGenerator::writeHeaderFile(QFile &f)
{
FTextStream t(&f);
- t << "% Latex header for doxygen " << versionString << endl;
+ t << "% Latex header for doxygen " << getVersion() << endl;
writeDefaultHeaderPart1(t);
t << "Your title here";
writeDefaultHeaderPart2(t);
@@ -848,14 +856,14 @@ void LatexGenerator::writeHeaderFile(QFile &f)
void LatexGenerator::writeFooterFile(QFile &f)
{
FTextStream t(&f);
- t << "% Latex footer for doxygen " << versionString << endl;
+ t << "% Latex footer for doxygen " << getVersion() << endl;
writeDefaultFooter(t);
}
void LatexGenerator::writeStyleSheetFile(QFile &f)
{
FTextStream t(&f);
- t << "% stylesheet for doxygen " << versionString << endl;
+ t << "% stylesheet for doxygen " << getVersion() << endl;
writeDefaultStyleSheet(t);
}
@@ -1329,6 +1337,15 @@ void LatexGenerator::writeStyleInfo(int part)
startPlainFile("doxygen.sty");
writeDefaultStyleSheet(t);
endPlainFile();
+
+ // workaround for the problem caused by change in LaTeX in version 2019
+ // in the unmaintained tabu package
+ startPlainFile("tabu_doxygen.sty");
+ t << ResourceMgr::instance().getAsString("tabu_doxygen.sty");
+ endPlainFile();
+ startPlainFile("longtable_doxygen.sty");
+ t << ResourceMgr::instance().getAsString("longtable_doxygen.sty");
+ endPlainFile();
}
void LatexGenerator::newParagraph()
@@ -1381,7 +1398,7 @@ void LatexGenerator::startHtmlLink(const char *url)
if (Config_getBool(PDF_HYPERLINKS))
{
t << "\\href{";
- t << url;
+ t << latexFilterURL(url);
t << "}";
}
t << "{\\texttt{ ";
diff --git a/src/layout.cpp b/src/layout.cpp
index a5df6f4..38a55f4 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -1395,7 +1395,7 @@ class LayoutParser : public QXmlDefaultHandler
}
else
{
- err("Unexpected start tag `%s' found in scope='%s'!\n",
+ err("Unexpected start tag '%s' found in scope='%s'!\n",
name.data(),m_scope.data());
}
return TRUE;
@@ -1538,10 +1538,11 @@ void LayoutDocManager::clear(LayoutDocManager::LayoutPart p)
d->docEntries[(int)p].clear();
}
-void LayoutDocManager::parse(QTextStream &t,const char *fileName)
+void LayoutDocManager::parse(const char *fileName)
{
LayoutErrorHandler errorHandler(fileName);
- QXmlInputSource source( t );
+ QXmlInputSource source;
+ source.setData(fileToString(fileName));
QXmlSimpleReader reader;
reader.setContentHandler( &LayoutParser::instance() );
reader.setErrorHandler( &errorHandler );
@@ -1560,7 +1561,7 @@ void writeDefaultLayoutFile(const char *fileName)
return;
}
QTextStream t(&f);
- t << substitute(layout_default,"$doxygenversion",versionString);
+ t << substitute(layout_default,"$doxygenversion",getVersion());
}
//----------------------------------------------------------------------------------
diff --git a/src/layout.h b/src/layout.h
index b25aa4e..b1facf5 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -201,7 +201,7 @@ class LayoutDocManager
LayoutNavEntry *rootNavEntry() const;
/** Parses a user provided layout */
- void parse(QTextStream &t,const char *fileName);
+ void parse(const char *fileName);
void init();
private:
void addEntry(LayoutPart p,LayoutDocEntry*e);
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index e407642..997b24e 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -137,9 +137,11 @@ void ManDocVisitor::visit(DocStyleChange *s)
m_firstCol=FALSE;
break;
case DocStyleChange::Strike:
+ case DocStyleChange::Del:
/* not supported */
break;
case DocStyleChange::Underline: //underline is shown as emphasis
+ case DocStyleChange::Ins:
if (s->enable()) m_t << "\\fI"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
@@ -370,7 +372,7 @@ void ManDocVisitor::visit(DocIncOperator *op)
QCString locLangExt = getFileNameExtension(op->includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
- //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
+ //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
@@ -388,7 +390,7 @@ void ManDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -571,7 +573,7 @@ void ManDocVisitor::visitPre(DocSimpleSect *s)
// special case 1: user defined title
if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
{
- m_t << ":\\fP" << endl;
+ m_t << "\\fP" << endl;
m_t << ".RS 4" << endl;
}
}
@@ -944,7 +946,7 @@ void ManDocVisitor::visitPre(DocParamSect *s)
default:
ASSERT(0);
}
- m_t << ":\\fP" << endl;
+ m_t << "\\fP" << endl;
m_t << ".RS 4" << endl;
}
@@ -1028,14 +1030,6 @@ void ManDocVisitor::visitPost(DocInternalRef *)
m_t << "\\fP";
}
-void ManDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void ManDocVisitor::visitPost(DocCopy *)
-{
-}
-
void ManDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h
index 8efc223..fa65424 100644
--- a/src/mandocvisitor.h
+++ b/src/mandocvisitor.h
@@ -128,8 +128,6 @@ class ManDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 8670642..2cbdcb5 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -979,7 +979,7 @@ static int processCodeSpan(GrowBuf &out, const char *data, int /*offset*/, int s
nl++;
}
else if (data[end]=='\'' && nb==1 && (end==size-1 || (end<size-1 && !isIdChar(end+1))))
- { // look for quoted strings like `some word', but skip strings like `it's cool`
+ { // look for quoted strings like 'some word', but skip strings like `it's cool`
QCString textFragment;
convertStringFragment(textFragment,data+nb,end-nb);
out.addStr("&lsquo;");
@@ -1900,7 +1900,7 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
}
// need at least one space on either side of the cell text in
// order for doxygen to do other formatting
- out.addStr("> " + cellText + " </" + cellTag + ">\n");
+ out.addStr("> " + cellText + "\n</" + cellTag + ">\n");
}
cellTag = "td";
cellClass = "class=\"markdownTableBody";
@@ -1982,7 +1982,7 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size)
out.addStr(data,size);
if (hasLineBreak(data,size))
{
- out.addStr("<br>");
+ out.addStr("<br>\n");
}
}
}
@@ -2590,6 +2590,7 @@ void MarkdownFileParser::parseInput(const char *fileName,
QCString docs = fileBuf;
QCString id;
QCString title=extractPageTitle(docs,id).stripWhiteSpace();
+ if (QString(id).startsWith("autotoc_md")) id = "";
g_indentLevel=title.isEmpty() ? 0 : -1;
QCString titleFn = QFileInfo(fileName).baseName().utf8();
QCString fn = QFileInfo(fileName).fileName().utf8();
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 15da899..4693bdb 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -220,7 +220,7 @@ class MemberDefImpl : public DefinitionImpl, public MemberDef
virtual QCString getScopeString() const;
virtual ClassDef *getClassDefOfAnonymousType() const;
virtual bool isTypedefValCached() const;
- virtual ClassDef *getCachedTypedefVal() const;
+ virtual const ClassDef *getCachedTypedefVal() const;
virtual QCString getCachedTypedefTemplSpec() const;
virtual QCString getCachedResolvedTypedef() const;
virtual MemberDef *memberDefinition() const;
@@ -295,7 +295,7 @@ class MemberDefImpl : public DefinitionImpl, public MemberDef
virtual void addListReference(Definition *d);
virtual void setDocsForDefinition(bool b);
virtual void setGroupAlias(const MemberDef *md);
- virtual void cacheTypedefVal(ClassDef *val,const QCString &templSpec,const QCString &resolvedType);
+ virtual void cacheTypedefVal(const ClassDef *val,const QCString &templSpec,const QCString &resolvedType);
virtual void invalidateTypedefValCache();
virtual void invalidateCachedArgumentTypes();
virtual void setMemberDefinition(MemberDef *md);
@@ -693,7 +693,7 @@ class MemberDefAliasImpl : public DefinitionAliasImpl, public MemberDef
{ return getMdAlias()->getClassDefOfAnonymousType(); }
virtual bool isTypedefValCached() const
{ return getMdAlias()->isTypedefValCached(); }
- virtual ClassDef *getCachedTypedefVal() const
+ virtual const ClassDef *getCachedTypedefVal() const
{ return getMdAlias()->getCachedTypedefVal(); }
virtual QCString getCachedTypedefTemplSpec() const
{ return getMdAlias()->getCachedTypedefTemplSpec(); }
@@ -802,7 +802,7 @@ class MemberDefAliasImpl : public DefinitionAliasImpl, public MemberDef
virtual void addListReference(Definition *d) {}
virtual void setDocsForDefinition(bool b) {}
virtual void setGroupAlias(const MemberDef *md) {}
- virtual void cacheTypedefVal(ClassDef *val,const QCString &templSpec,const QCString &resolvedType) {}
+ virtual void cacheTypedefVal(const ClassDef *val,const QCString &templSpec,const QCString &resolvedType) {}
virtual void invalidateTypedefValCache() {}
virtual void invalidateCachedArgumentTypes() {}
virtual void setMemberDefinition(MemberDef *md) {}
@@ -929,7 +929,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
{
const ArgumentList *defArgList=(md->isDocsForDefinition()) ?
md->argumentList() : md->declArgumentList();
- //printf("writeDefArgumentList `%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
+ //printf("writeDefArgumentList '%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
if (defArgList==0 || md->isProperty())
{
return FALSE; // member has no function like argument list
@@ -1043,7 +1043,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
}
if (hasFuncPtrType) // argument type is a function pointer
{
- //printf("a->type=`%s' a->name=`%s'\n",a->type.data(),a->name.data());
+ //printf("a->type='%s' a->name='%s'\n",a->type.data(),a->name.data());
QCString n=a->type.left(vp);
if (hasFuncPtrType) n=a->type.left(wp);
if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
@@ -1364,7 +1364,7 @@ class MemberDefImpl::IMPL
MemberDef *groupMember;
bool isTypedefValCached;
- ClassDef *cachedTypedefValue;
+ const ClassDef *cachedTypedefValue;
QCString cachedTypedefTemplSpec;
QCString cachedResolvedType;
@@ -1560,7 +1560,7 @@ void MemberDefImpl::IMPL::init(Definition *def,
* \param e A string representing the throw clause of the members.
* \param p The protection context of the member, possible values are:
* \c Public, \c Protected, \c Private.
- * \param v The degree of `virtualness' of the member, possible values are:
+ * \param v The degree of 'virtualness' of the member, possible values are:
* \c Normal, \c Virtual, \c Pure.
* \param s A boolean that is true iff the member is static.
* \param r The relationship between the class and the member.
@@ -2103,13 +2103,13 @@ ClassDef *MemberDefImpl::getClassDefOfAnonymousType() const
cname=getNamespaceDef()->name();
}
QCString ltype(m_impl->type);
- // strip `static' keyword from ltype
+ // strip 'static' keyword from ltype
//if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7);
- // strip `friend' keyword from ltype
+ // strip 'friend' keyword from ltype
ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+");
int l,i=r.match(ltype,0,&l);
- //printf("ltype=`%s' i=%d\n",ltype.data(),i);
+ //printf("ltype='%s' i=%d\n",ltype.data(),i);
// search for the last anonymous scope in the member type
ClassDef *annoClassDef=0;
if (i!=-1) // found anonymous scope in type
@@ -2251,7 +2251,7 @@ QCString MemberDefImpl::getDeclType() const
{
ltype="using";
}
- // strip `friend' keyword from ltype
+ // strip 'friend' keyword from ltype
ltype.stripPrefix("friend ");
if (ltype=="@") // rename type from enum values
{
@@ -2360,7 +2360,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
{
ltype="using";
}
- // strip `friend' keyword from ltype
+ // strip 'friend' keyword from ltype
ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+");
@@ -2368,7 +2368,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
int l,i=r.match(ltype,0,&l);
if (i!=-1) // member has an anonymous type
{
- //printf("annoClassDef=%p annMemb=%p scopeName=`%s' anonymous=`%s'\n",
+ //printf("annoClassDef=%p annMemb=%p scopeName='%s' anonymous='%s'\n",
// annoClassDef,annMemb,cname.data(),ltype.mid(i,l).data());
if (annoClassDef) // type is an anonymous compound
@@ -2385,7 +2385,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
ol.writeNonBreakableSpace(3);
}
QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
- //printf(">>>>>> ltype=`%s' varName=`%s'\n",ltype.data(),varName.data());
+ //printf(">>>>>> ltype='%s' varName='%s'\n",ltype.data(),varName.data());
ol.docify("}");
if (varName.isEmpty() && (name().isEmpty() || name().at(0)=='@'))
{
@@ -3382,7 +3382,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
bool inFile = container->definitionType()==Definition::TypeFile;
bool hasDocs = isDetailedSectionVisible(inGroup,inFile);
- //printf("MemberDefImpl::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
+ //printf("MemberDefImpl::writeDocumentation(): name='%s' hasDocs='%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
// name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
//if ( !hasDocs ) return;
@@ -3424,7 +3424,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
QCString ldef = definition();
QCString title = name();
- //printf("member `%s' def=`%s'\n",name().data(),ldef.data());
+ //printf("member '%s' def='%s'\n",name().data(),ldef.data());
if (isEnumerate())
{
if (title.at(0)=='@')
@@ -3498,7 +3498,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
}
if (!found) // anonymous compound
{
- //printf("Anonymous compound `%s'\n",cname.data());
+ //printf("Anonymous compound '%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(ciname,name(),memAnchor,name(),memCount,memTotal,showInline);
// search for the last anonymous compound name in the definition
@@ -3749,7 +3749,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
// )
)
{
- //printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
+ //printf("md=%s initLines=%d init='%s'\n",name().data(),initLines,init.data());
ol.startBold();
if (m_impl->mtype==MemberType_Define)
ol.parseText(theTranslator->trDefineValue());
@@ -5626,7 +5626,7 @@ bool MemberDefImpl::isTypedefValCached() const
return m_impl->isTypedefValCached;
}
-ClassDef *MemberDefImpl::getCachedTypedefVal() const
+const ClassDef *MemberDefImpl::getCachedTypedefVal() const
{
return m_impl->cachedTypedefValue;
}
@@ -5908,7 +5908,7 @@ QCString MemberDefImpl::enumBaseType() const
}
-void MemberDefImpl::cacheTypedefVal(ClassDef*val, const QCString & templSpec, const QCString &resolvedType)
+void MemberDefImpl::cacheTypedefVal(const ClassDef*val, const QCString & templSpec, const QCString &resolvedType)
{
m_impl->isTypedefValCached=TRUE;
m_impl->cachedTypedefValue=val;
@@ -6053,7 +6053,7 @@ void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef)
)
) /* match found */
{
- //printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n",
+ //printf("Found member %s: definition in %s (doc='%s') and declaration in %s (doc='%s')\n",
// mn->memberName(),
// mdef->getFileDef()->name().data(),mdef->documentation().data(),
// mdec->getFileDef()->name().data(),mdec->documentation().data()
diff --git a/src/memberdef.h b/src/memberdef.h
index a742117..af4fb0a 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -248,7 +248,7 @@ class MemberDef : virtual public Definition
// cached typedef functions
virtual bool isTypedefValCached() const = 0;
- virtual ClassDef *getCachedTypedefVal() const = 0;
+ virtual const ClassDef *getCachedTypedefVal() const = 0;
virtual QCString getCachedTypedefTemplSpec() const = 0;
virtual QCString getCachedResolvedTypedef() const = 0;
@@ -357,7 +357,7 @@ class MemberDef : virtual public Definition
virtual void setDocsForDefinition(bool b) = 0;
virtual void setGroupAlias(const MemberDef *md) = 0;
- virtual void cacheTypedefVal(ClassDef *val,const QCString &templSpec,const QCString &resolvedType) = 0;
+ virtual void cacheTypedefVal(const ClassDef *val,const QCString &templSpec,const QCString &resolvedType) = 0;
virtual void invalidateTypedefValCache() = 0;
virtual void invalidateCachedArgumentTypes() = 0;
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 04689b4..a5852e4 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -59,7 +59,7 @@ MemberGroup::MemberGroup(const Definition *parent,
m_docFile = docFile;
m_docLine = docLine;
m_xrefListItems = 0;
- //printf("Member group docs=`%s'\n",doc.data());
+ //printf("Member group docs='%s'\n",doc.data());
}
MemberGroup::~MemberGroup()
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 94bb916..1869808 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -183,7 +183,7 @@ void MemberList::countDecMembers()
m_numDecMembers++;
break;
default:
- err("Unknown member type found for member `%s'\n!",md->name().data());
+ err("Unknown member type found for member '%s'\n!",md->name().data());
}
}
}
@@ -433,7 +433,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()); ++mli )
{
- //printf(">>> Member `%s' type=%d visible=%d\n",
+ //printf(">>> Member '%s' type=%d visible=%d\n",
// md->name().data(),md->memberType(),md->isBriefSectionVisible());
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
md->isBriefSectionVisible())
@@ -612,7 +612,7 @@ void MemberList::writeDeclarations(OutputList &ol,
if (ctx==0 && gd) ctx = gd;
if (ctx==0 && fd) ctx = fd;
- //printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d inheritedFrom=%p\n",
+ //printf("%p: MemberList::writeDeclaration(title='%s',subtitle='%s')=%d inheritedFrom=%p\n",
// this,title,subtitle,numDecMembers(),inheritedFrom);
int num = numDecMembers();
diff --git a/src/msc.cpp b/src/msc.cpp
index 0137e1b..51e23fa 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -51,7 +51,7 @@ static bool convertMapFile(FTextStream &t,const char *mapName,const QCString rel
bool isRef = FALSE;
int numBytes = f.readLine(buf,maxLineLen);
buf[numBytes-1]='\0';
- //printf("ReadLine `%s'\n",buf);
+ //printf("ReadLine '%s'\n",buf);
if (qstrncmp(buf,"rect",4)==0)
{
// obtain the url and the coordinates in the order used by graphviz-1.5
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 1e526ae..38e5c04 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -518,7 +518,7 @@ void NamespaceDefImpl::insertMember(MemberDef *md)
break;
default:
err("NamespaceDefImpl::insertMembers(): "
- "member `%s' with class scope `%s' inserted in namespace scope `%s'!\n",
+ "member '%s' with class scope '%s' inserted in namespace scope '%s'!\n",
md->name().data(),
md->getClassDef() ? md->getClassDef()->name().data() : "",
name().data());
diff --git a/src/outputgen.h b/src/outputgen.h
index e302f42..322f4b7 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -150,7 +150,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
Examples
};
- virtual bool parseText(const QCString &s) { return s.isEmpty(); }
+ virtual void parseText(const QCString &s) {}
/*! Start of a bullet list: e.g. \c \<ul\> in html. startItemListItem() is
* Used for the bullet items.
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 0306f94..daf3270 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -128,14 +128,14 @@ void OutputList::popGeneratorState()
}
}
-bool OutputList::generateDoc(const char *fileName,int startLine,
+void OutputList::generateDoc(const char *fileName,int startLine,
const Definition *ctx,const MemberDef * md,
const QCString &docStr,bool indexWords,
bool isExample,const char *exampleName,
bool singleLine,bool linkFromIndex)
{
int count=0;
- if (docStr.isEmpty()) return TRUE;
+ if (docStr.isEmpty()) return;
QListIterator<OutputGenerator> it(m_outputs);
OutputGenerator *og;
@@ -143,20 +143,17 @@ bool OutputList::generateDoc(const char *fileName,int startLine,
{
if (og->isEnabled()) count++;
}
- if (count==0) return TRUE; // no output formats enabled.
+ // we want to validate irrespective of the number of output formats
+ // specified as:
+ // - when only XML format there should be warnings as well (XML has its own write routines)
+ // - no formats there should be warnings as well
DocRoot *root=0;
root = validatingParseDoc(fileName,startLine,
ctx,md,docStr,indexWords,isExample,exampleName,
singleLine,linkFromIndex);
-
- writeDoc(root,ctx,md);
-
- bool isEmpty = root->isEmpty();
-
+ if (count>0) writeDoc(root,ctx,md);
delete root;
-
- return isEmpty;
}
void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md)
@@ -172,7 +169,7 @@ void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *m
VhdlDocGen::setFlowMember(0);
}
-bool OutputList::parseText(const QCString &textStr)
+void OutputList::parseText(const QCString &textStr)
{
int count=0;
QListIterator<OutputGenerator> it(m_outputs);
@@ -181,20 +178,22 @@ bool OutputList::parseText(const QCString &textStr)
{
if (og->isEnabled()) count++;
}
- if (count==0) return TRUE; // no output formats enabled.
+ // we want to validate irrespective of the number of output formats
+ // specified as:
+ // - when only XML format there should be warnings as well (XML has its own write routines)
+ // - no formats there should be warnings as well
DocText *root = validatingParseText(textStr);
- for (it.toFirst();(og=it.current());++it)
+ if (count>0)
{
- if (og->isEnabled()) og->writeDoc(root,0,0);
+ for (it.toFirst();(og=it.current());++it)
+ {
+ if (og->isEnabled()) og->writeDoc(root,0,0);
+ }
}
- bool isEmpty = root->isEmpty();
-
delete root;
-
- return isEmpty;
}
diff --git a/src/outputlist.h b/src/outputlist.h
index 35d68a8..2a83020 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -74,13 +74,12 @@ class OutputList : public OutputDocInterface
// OutputDocInterface implementation
//////////////////////////////////////////////////
- bool generateDoc(const char *fileName,int startLine,
+ void generateDoc(const char *fileName,int startLine,
const Definition *ctx,const MemberDef *md,const QCString &docStr,
bool indexWords,bool isExample,const char *exampleName=0,
bool singleLine=FALSE,bool linkFromIndex=FALSE);
void writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md);
- bool parseText(const QCString &textStr);
-
+ void parseText(const QCString &textStr);
void startIndexSection(IndexSections is)
{ forall(&OutputGenerator::startIndexSection,is); }
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 3813c56..a288e0e 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -388,8 +388,6 @@ public:
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
@@ -642,7 +640,9 @@ void PerlModDocVisitor::visit(DocStyleChange *s)
{
case DocStyleChange::Bold: style = "bold"; break;
case DocStyleChange::Strike: style = "strike"; break;
+ case DocStyleChange::Del: style = "del"; break;
case DocStyleChange::Underline: style = "underline"; break;
+ case DocStyleChange::Ins: style = "ins"; break;
case DocStyleChange::Italic: style = "italic"; break;
case DocStyleChange::Code: style = "code"; break;
case DocStyleChange::Subscript: style = "subscript"; break;
@@ -749,7 +749,7 @@ void PerlModDocVisitor::visit(DocInclude *inc)
void PerlModDocVisitor::visit(DocIncOperator *)
{
#if 0
- //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
+ //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
@@ -1385,14 +1385,6 @@ void PerlModDocVisitor::visitPost(DocInternalRef *)
closeItem();
}
-void PerlModDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void PerlModDocVisitor::visitPost(DocCopy *)
-{
-}
-
void PerlModDocVisitor::visitPre(DocText *)
{
}
@@ -2283,13 +2275,13 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir)
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
- err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
+ err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else
{
- msg("Notice: Output directory `%s' does not exist. "
+ msg("Notice: Output directory '%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
diff --git a/src/pre.l b/src/pre.l
index ca2fe2b..596108f 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -694,7 +694,7 @@ static QCString stringize(const QCString &s)
}
}
}
- //printf("stringize `%s'->`%s'\n",s.data(),result.data());
+ //printf("stringize '%s'->'%s'\n",s.data(),result.data());
return result;
}
@@ -705,19 +705,19 @@ static QCString stringize(const QCString &s)
*/
static void processConcatOperators(QCString &expr)
{
- //printf("processConcatOperators: in=`%s'\n",expr.data());
+ //printf("processConcatOperators: in='%s'\n",expr.data());
QRegExp r("[ \\t\\n]*##[ \\t\\n]*");
int l,n,i=0;
if (expr.isEmpty()) return;
while ((n=r.match(expr,i,&l))!=-1)
{
- //printf("Match: `%s'\n",expr.data()+i);
+ //printf("Match: '%s'\n",expr.data()+i);
if (n+l+1<(int)expr.length() && expr.at(n+l)=='@' && expr.at(n+l+1)=='-')
{
// remove no-rescan marker after ID
l+=2;
}
- //printf("found `%s'\n",expr.mid(n,l).data());
+ //printf("found '%s'\n",expr.mid(n,l).data());
// remove the ## operator and the surrounding whitespace
expr=expr.left(n)+expr.right(expr.length()-n-l);
int k=n-1;
@@ -730,7 +730,7 @@ static void processConcatOperators(QCString &expr)
}
i=n;
}
- //printf("processConcatOperators: out=`%s'\n",expr.data());
+ //printf("processConcatOperators: out='%s'\n",expr.data());
}
static void yyunput (int c,char *buf_ptr );
@@ -775,7 +775,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
unputChar(expr,rest,j,' ');
return FALSE;
}
- getNextChar(expr,rest,j); // eat the `(' character
+ getNextChar(expr,rest,j); // eat the '(' character
QDict<QCString> argTable; // list of arguments
argTable.setAutoDelete(TRUE);
@@ -955,13 +955,13 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
if (key.length()>1 && (subst=argTable[key]))
{
QCString substArg=*subst;
- //printf("substArg=`%s'\n",substArg.data());
+ //printf("substArg='%s'\n",substArg.data());
// only if no ## operator is before or after the argument
// marker we do macro expansion.
if (!hash) expandExpression(substArg,0,0);
if (inString)
{
- //printf("`%s'=stringize(`%s')\n",stringize(*subst).data(),subst->data());
+ //printf("'%s'=stringize('%s')\n",stringize(*subst).data(),subst->data());
// if the marker is inside a string (because a # was put
// before the macro name) we must escape " and \ characters
@@ -1000,7 +1000,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
}
len=j-pos;
result=resExpr;
- //printf("result after substitution `%s' expr=`%s'\n",
+ //printf("result after substitution '%s' expr='%s'\n",
// result.data(),expr.mid(pos,len).data());
return TRUE;
}
@@ -1089,7 +1089,12 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
if (g_expandedDict->find(macroName)==0) // expand macro
{
Define *def=DefineManager::instance().isDefined(macroName);
- if (definedTest) // macro name was found after defined
+ if (macroName=="defined")
+ {
+ //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
+ definedTest=TRUE;
+ }
+ else if (definedTest) // macro name was found after defined
{
if (def) expMacro = " 1 "; else expMacro = " 0 ";
replaced=TRUE;
@@ -1099,7 +1104,7 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
else if (def && def->nargs==-1) // simple macro
{
// substitute the definition of the macro
- //printf("macro `%s'->`%s'\n",macroName.data(),def->definition.data());
+ //printf("macro '%s'->'%s'\n",macroName.data(),def->definition.data());
if (g_nospaces)
{
expMacro=def->definition.stripWhiteSpace();
@@ -1111,22 +1116,17 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
//expMacro=def->definition.stripWhiteSpace();
replaced=TRUE;
len=l;
- //printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data());
+ //printf("simple macro expansion='%s'->'%s'\n",macroName.data(),expMacro.data());
}
else if (def && def->nargs>=0) // function macro
{
replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro);
len+=l;
}
- else if (macroName=="defined")
- {
- //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
- definedTest=TRUE;
- }
if (replaced) // expand the macro and rescan the expression
{
- //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data());
+ //printf("replacing '%s'->'%s'\n",expr.mid(p,len).data(),expMacro.data());
QCString resultExpr=expMacro;
QCString restExpr=expr.right(expr.length()-len-p);
processConcatOperators(resultExpr);
@@ -1237,7 +1237,7 @@ QCString removeIdsAndMarkers(const char *s)
{
p = processUntilMatchingTerminator(p,result);
}
- else if (c=='d' && !inNum) // identifier starting with a `d'
+ else if (c=='d' && !inNum) // identifier starting with a 'd'
{
if (qstrncmp(p,"defined ",8)==0 || qstrncmp(p,"defined(",8)==0)
// defined keyword
@@ -1388,10 +1388,10 @@ bool computeExpression(const QCString &expr)
{
QCString e=expr;
expandExpression(e,0,0);
- //printf("after expansion `%s'\n",e.data());
+ //printf("after expansion '%s'\n",e.data());
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
- //printf("parsing `%s'\n",e.data());
+ //printf("parsing '%s'\n",e.data());
return parseconstexp(g_yyFileName,g_yyLineNr,e);
}
@@ -1404,7 +1404,7 @@ QCString expandMacro(const QCString &name)
QCString n=name;
expandExpression(n,0,0);
n=removeMarkers(n);
- //printf("expandMacro `%s'->`%s'\n",name.data(),n.data());
+ //printf("expandMacro '%s'->'%s'\n",name.data(),n.data());
return n;
}
@@ -1421,7 +1421,7 @@ Define *newDefine()
def->varArgs = g_defVarArgs;
//printf("newDefine: %s %s file: %s\n",def->name.data(),def->definition.data(),
// def->fileDef ? def->fileDef->name().data() : def->fileName.data());
- //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data());
+ //printf("newDefine: '%s'->'%s'\n",def->name.data(),def->definition.data());
if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name])
{
def->isPredefined=TRUE;
@@ -1445,11 +1445,11 @@ void addDefine()
if (!g_defArgsStr.isEmpty())
{
ArgumentList *argList = new ArgumentList;
- //printf("addDefine() g_defName=`%s' g_defArgsStr=`%s'\n",g_defName.data(),g_defArgsStr.data());
+ //printf("addDefine() g_defName='%s' g_defArgsStr='%s'\n",g_defName.data(),g_defArgsStr.data());
stringToArgumentList(g_defArgsStr,argList);
md->setArgumentList(argList);
}
- //printf("Setting initializer for `%s' to `%s'\n",g_defName.data(),g_defText.data());
+ //printf("Setting initializer for '%s' to '%s'\n",g_defName.data(),g_defText.data());
int l=g_defLitText.find('\n');
if (l>0 && g_defLitText.left(l).stripWhiteSpace()=="\\")
{
@@ -1529,7 +1529,7 @@ static void readIncludeFile(const QCString &inc)
QCString oldFileName = g_yyFileName;
FileDef *oldFileDef = g_yyFileDef;
int oldLineNr = g_yyLineNr;
- //printf("Searching for `%s'\n",incFileName.data());
+ //printf("Searching for '%s'\n",incFileName.data());
// absIncFileName avoids difficulties for incFileName starting with "../" (bug 641336)
QCString absIncFileName = incFileName;
@@ -2020,7 +2020,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
if (g_roundCount==0)
{
QCString result=expandMacro(g_defArgsStr);
- //printf("g_defArgsStr=`%s'->`%s'\n",g_defArgsStr.data(),result.data());
+ //printf("g_defArgsStr='%s'->'%s'\n",g_defArgsStr.data(),result.data());
if (g_findDefArgContext==CopyLine)
{
outputArray(result,result.length());
@@ -2094,6 +2094,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<ReadString>"//"|"/*" {
g_defArgsStr+=yytext;
}
+<ReadString>\\/\r?\n { // line continuation
+ }
<ReadString>\\. {
g_defArgsStr+=yytext;
}
@@ -2227,7 +2229,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Guard>. { g_guardExpr+=*yytext; }
<Guard>\n {
unput(*yytext);
- //printf("Guard: `%s'\n",
+ //printf("Guard: '%s'\n",
// g_guardExpr.data());
bool guard=computeExpression(g_guardExpr);
setCaseDone(guard);
@@ -2381,7 +2383,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<EndImport>. {
}
<DefName>{ID}/("\\\n")*"(" { // define with argument
- //printf("Define() `%s'\n",yytext);
+ //printf("Define() '%s'\n",yytext);
delete g_argDict;
g_argDict = new QDict<int>(31);
g_argDict->setAutoDelete(TRUE);
@@ -2395,7 +2397,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(DefineArg);
}
<DefName>{ID}{B}+"1"/[ \r\t\n] { // special case: define with 1 -> can be "guard"
- //printf("Define `%s'\n",yytext);
+ //printf("Define '%s'\n",yytext);
delete g_argDict; g_argDict=0;
g_defArgs = -1;
g_defArgsStr.resize(0);
@@ -2453,7 +2455,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_expectGuard=FALSE;
}
<DefName>{ID}/{B}* { // define with content
- //printf("Define `%s'\n",yytext);
+ //printf("Define '%s'\n",yytext);
delete g_argDict; g_argDict=0;
g_defArgs = -1;
g_defArgsStr.resize(0);
@@ -2855,7 +2857,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
outputChar('\n');
Define *def=0;
- //printf("Define name=`%s' text=`%s' litTexti=`%s'\n",g_defName.data(),g_defText.data(),g_defLitText.data());
+ //printf("Define name='%s' text='%s' litTexti='%s'\n",g_defName.data(),g_defText.data(),g_defLitText.data());
if (g_includeStack.isEmpty() || g_curlyCount>0)
{
addDefine();
@@ -3202,7 +3204,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
DefineManager::instance().addDefine(g_yyFileName,def);
}
- //printf("#define `%s' `%s' #nargs=%d\n",
+ //printf("#define '%s' '%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);
}
else if ((i_obrace==-1 || i_obrace>i_equals) &&
@@ -3237,7 +3239,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
delete def;
}
- //printf("#define `%s' `%s' #nargs=%d\n",
+ //printf("#define '%s' '%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);
}
}
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 26bb3e7..6b9bd75 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -108,9 +108,15 @@ class PrintDocVisitor : public DocVisitor
case DocStyleChange::Strike:
if (s->enable()) printf("<strike>"); else printf("</strike>");
break;
+ case DocStyleChange::Del:
+ if (s->enable()) printf("<del>"); else printf("</del>");
+ break;
case DocStyleChange::Underline:
if (s->enable()) printf("<underline>"); else printf("</underline>");
break;
+ case DocStyleChange::Ins:
+ if (s->enable()) printf("<ins>"); else printf("</ins>");
+ break;
case DocStyleChange::Italic:
if (s->enable()) printf("<italic>"); else printf("</italic>");
break;
@@ -616,16 +622,24 @@ class PrintDocVisitor : public DocVisitor
//const char *s;
DocNode *param;
printf("<parameters>");
- for (sli.toFirst();(param=sli.current());++sli)
+ if (sli.count() > 0)
{
printf("<param>");
- if (param->kind()==DocNode::Kind_Word)
+ for (sli.toFirst();(param=sli.current());++sli)
{
- visit((DocWord*)param);
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param);
+ if (param->kind()==DocNode::Kind_Word)
+ {
+ visit((DocWord*)param);
+ }
+ else if (param->kind()==DocNode::Kind_LinkedWord)
+ {
+ visit((DocLinkedWord*)param);
+ }
+ else if (param->kind()==DocNode::Kind_Sep)
+ {
+ printf("</param>");
+ printf("<param>");
+ }
}
printf("</param>");
}
@@ -676,16 +690,6 @@ class PrintDocVisitor : public DocVisitor
indent_post();
printf("</internalref>\n");
}
- void visitPre(DocCopy *c)
- {
- indent_pre();
- printf("<copy link=\"%s\">\n",c->link().data());
- }
- void visitPost(DocCopy *)
- {
- indent_post();
- printf("</copy>\n");
- }
void visitPre(DocText *)
{
indent_pre();
diff --git a/src/pycode.l b/src/pycode.l
index 1a87bca..3d57727 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -162,7 +162,7 @@ void PyVariableContext::addVariable(const QCString &type,const QCString &name)
QCString lname = name.simplifyWhiteSpace();
Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast();
- ClassDef *varType;
+ const ClassDef *varType;
if (
(varType=g_codeClassSDict[ltype]) || // look for class definitions inside the code block
(varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions
@@ -212,7 +212,7 @@ class PyCallContext
Ctx() : name(g_name), type(g_type), cd(0) {}
QCString name;
QCString type;
- ClassDef *cd;
+ const ClassDef *cd;
};
PyCallContext()
@@ -223,7 +223,7 @@ class PyCallContext
virtual ~PyCallContext() {}
- void setClass(ClassDef *cd)
+ void setClass(const ClassDef *cd)
{
Ctx *ctx = m_classList.getLast();
if (ctx)
@@ -259,7 +259,7 @@ class PyCallContext
m_classList.append(new Ctx);
}
- ClassDef *getClass() const
+ const ClassDef *getClass() const
{
Ctx *ctx = m_classList.getLast();
@@ -320,7 +320,7 @@ static void addToSearchIndex(const char *text)
}
-static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
+static const ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
{
int pos=0;
QCString type = s;
@@ -330,7 +330,7 @@ static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
{
QCString clName=className+templSpec;
- ClassDef *cd=0;
+ const ClassDef *cd=0;
if (!g_classScope.isEmpty())
{
cd=getResolvedClass(d,g_sourceFileDef,g_classScope+"::"+clName);
@@ -376,7 +376,7 @@ static void startCodeLine()
g_searchingForBody = TRUE;
g_realScope = d->name().copy();
g_classScope = d->name().copy();
- //printf("Real scope: `%s'\n",g_realScope.data());
+ //printf("Real scope: '%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
QCString lineAnchor;
lineAnchor.sprintf("l%05d",g_yyLineNr);
@@ -549,7 +549,7 @@ static bool getLinkInScope(const QCString &c, // scope
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
- //printf("Trying `%s'::`%s'\n",c.data(),m.data());
+ //printf("Trying '%s'::'%s'\n",c.data(),m.data());
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
md->isLinkable())
{
@@ -571,7 +571,7 @@ static bool getLinkInScope(const QCString &c, // scope
{
addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
}
- //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
+ //printf("d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
writeMultiLineCodeLink(ol,md, text ? text : memberText);
addToSearchIndex(text ? text : memberText);
@@ -616,8 +616,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data()));
- ClassDef *cd=0,*lcd=0; /** Class def that we may find */
- MemberDef *md=0; /** Member def that we may find */
+ const ClassDef *cd=0,*lcd=0; /** Class def that we may find */
+ const MemberDef *md=0; /** Member def that we may find */
//bool isLocal=FALSE;
if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable
@@ -669,7 +669,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
if (d && d->isLinkable() && md->isLinkable() &&
g_currentMemberDef && g_collectXRefs)
{
- addDocCrossReference(g_currentMemberDef,md);
+ addDocCrossReference(g_currentMemberDef,const_cast<MemberDef*>(md));
}
}
}
@@ -753,7 +753,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
locScope=locFunc.left(i);
locFunc=locFunc.right(locFunc.length()-i-2).stripWhiteSpace();
}
- //printf("generateFunctionLink(%s) classScope=`%s'\n",locFunc.data(),locScope.data());
+ //printf("generateFunctionLink(%s) classScope='%s'\n",locFunc.data(),locScope.data());
if (!locScope.isEmpty() && (ccd=g_codeClassSDict[locScope]))
{
//printf("using classScope %s\n",g_classScope.data());
@@ -1091,7 +1091,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
char *s=g_curClassBases.first();
while (s)
{
- ClassDef *baseDefToAdd=g_codeClassSDict[s];
+ const ClassDef *baseDefToAdd=g_codeClassSDict[s];
// Try to find class in global
// scope
@@ -1102,7 +1102,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
if (baseDefToAdd && baseDefToAdd!=classDefToAdd)
{
- classDefToAdd->insertBaseClass(baseDefToAdd,s,Public,Normal);
+ classDefToAdd->insertBaseClass(const_cast<ClassDef*>(baseDefToAdd),s,Public,Normal);
}
s=g_curClassBases.next();
diff --git a/src/pyscanner.l b/src/pyscanner.l
index fe94e64..787c10a 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -95,6 +95,7 @@ static int g_stringContext;
static QGString * g_copyString;
static int g_indent = 0;
static int g_curIndent = 0;
+static bool g_importTuple;
static QDict<QCString> g_packageNameCache(257);
@@ -102,6 +103,7 @@ static char g_atomStart;
static char g_atomEnd;
static int g_atomCount;
+
//static bool g_insideConstructor;
static QCString g_moduleScope;
@@ -143,7 +145,7 @@ static void initEntry()
current->stat = gstat;
current->lang = SrcLangExt_Python;
current->setParent(current_root);
- initGroupInfo(current);
+ Doxygen::docGroup.initGroupInfo(current);
gstat = FALSE;
}
@@ -230,6 +232,17 @@ static QCString findPackageScope(const char *fileName)
return findPackageScopeFromPath(fi.dirPath(TRUE).data());
}
+static void addFrom(bool all)
+{
+ QCString item=all ? g_packageName : g_packageName+"."+yytext;
+ current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
+ current->fileName = yyFileName;
+ //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
+ current->section=all ? Entry::USINGDIR_SEC : Entry::USINGDECL_SEC;
+ current_root->addSubEntry(current);
+ current = new Entry ;
+ initEntry();
+}
//-----------------------------------------------------------------------------
static void lineCount()
@@ -702,45 +715,45 @@ STARTDOCSYMS "##"
<FromModItem>{
"*" { // import all
- QCString item=g_packageName;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using directive: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDIR_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
+ addFrom(TRUE);
BEGIN(Search);
}
{IDENTIFIER}/{B}","{B} {
- QCString item=g_packageName+"."+yytext;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDECL_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
+ addFrom(FALSE);
}
+ {IDENTIFIER}/{B}")"
+ {
+ g_importTuple=FALSE;
+ addFrom(FALSE);
+ }
{IDENTIFIER} {
- QCString item=g_packageName+"."+yytext;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDECL_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
- BEGIN(Search);
+ addFrom(FALSE);
+ if (!g_importTuple)
+ {
+ BEGIN(Search);
+ }
}
\n {
incLineNr();
- BEGIN(Search);
+ if (!g_importTuple)
+ {
+ BEGIN(Search);
+ }
}
{B} {
}
- "," {
+ "(" {
+ g_importTuple=TRUE;
+ }
+ ")" {
+ g_importTuple=FALSE;
+ BEGIN(Search);
+ }
+ "," {
}
+ "\\"{B}\n { // line continuation
+ incLineNr();
+ }
. {
unput(*yytext);
BEGIN(Search);
@@ -1772,14 +1785,14 @@ static void parseCompounds(Entry *rt)
current = new Entry;
initEntry();
- groupEnterCompound(yyFileName,yyLineNr,ce->name);
+ Doxygen::docGroup.enterCompound(yyFileName,yyLineNr,ce->name);
pyscannerYYlex() ;
g_lexInit=TRUE;
delete current; current=0;
ce->program.resize(0);
- groupLeaveCompound(yyFileName,yyLineNr,ce->name);
+ Doxygen::docGroup.leaveCompound(yyFileName,yyLineNr,ce->name);
}
parseCompounds(ce);
@@ -1839,7 +1852,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
initParser();
current = new Entry;
- groupEnterFile(yyFileName,yyLineNr);
+ Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
current->reset();
initEntry();
@@ -1848,7 +1861,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
pyscannerYYlex();
g_lexInit=TRUE;
- groupLeaveFile(yyFileName,yyLineNr);
+ Doxygen::docGroup.leaveFile(yyFileName,yyLineNr);
current_root->program.resize(0);
delete current; current=0;
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index ab7422a..8cb831e 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -144,7 +144,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
}
else
{
- t << substitute(buf,"$doxygenversion",versionString);
+ t << substitute(buf,"$doxygenversion",getVersion());
}
return TRUE;
}
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 040375d..43ac362 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -236,9 +236,11 @@ void RTFDocVisitor::visit(DocStyleChange *s)
if (s->enable()) m_t << "{\\b "; else m_t << "} ";
break;
case DocStyleChange::Strike:
+ case DocStyleChange::Del:
if (s->enable()) m_t << "{\\strike "; else m_t << "} ";
break;
case DocStyleChange::Underline:
+ case DocStyleChange::Ins:
if (s->enable()) m_t << "{\\ul "; else m_t << "} ";
break;
case DocStyleChange::Italic:
@@ -529,7 +531,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
void RTFDocVisitor::visit(DocIncOperator *op)
{
- //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
+ //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
QCString locLangExt = getFileNameExtension(op->includeFileName());
@@ -551,7 +553,7 @@ void RTFDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -784,7 +786,6 @@ void RTFDocVisitor::visitPre(DocSimpleSect *s)
// special case 1: user defined title
if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
{
- m_t << ":";
m_t << "\\par";
m_t << "}"; // end bold
incIndentLevel();
@@ -1379,7 +1380,6 @@ void RTFDocVisitor::visitPre(DocParamSect *s)
default:
ASSERT(0);
}
- m_t << ":";
m_t << "\\par";
m_t << "}" << endl;
bool useTable = s->type()==DocParamSect::Param ||
@@ -1495,10 +1495,8 @@ void RTFDocVisitor::visitPre(DocParamList *pl)
}
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
- bool first=TRUE;
for (li.toFirst();(type=li.current());++li)
{
- if (!first) m_t << " | "; else first=FALSE;
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
@@ -1507,6 +1505,10 @@ void RTFDocVisitor::visitPre(DocParamList *pl)
{
visit((DocLinkedWord*)type);
}
+ else if (type->kind()==DocNode::Kind_Sep)
+ {
+ m_t << " " << ((DocSeparator *)type)->chars() << " ";
+ }
}
if (useTable)
{
@@ -1657,18 +1659,6 @@ void RTFDocVisitor::visitPost(DocInternalRef *)
m_t << " ";
}
-void RTFDocVisitor::visitPre(DocCopy *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCopy)}\n");
-}
-
-void RTFDocVisitor::visitPost(DocCopy *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocCopy)}\n");
-}
-
void RTFDocVisitor::visitPre(DocText *)
{
if (m_hide) return;
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index b7cc3ea..82e4453 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -126,8 +126,6 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 2f24ca7..229a817 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -102,7 +102,7 @@ RTFGenerator::~RTFGenerator()
void RTFGenerator::writeStyleSheetFile(QFile &file)
{
FTextStream t(&file);
- t << "# Generated by doxygen " << versionString << "\n\n";
+ t << "# Generated by doxygen " << getVersion() << "\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";
t << "# Remove a hash to activate a line.\n\n";
@@ -119,7 +119,7 @@ void RTFGenerator::writeStyleSheetFile(QFile &file)
void RTFGenerator::writeExtensionsFile(QFile &file)
{
FTextStream t(&file);
- t << "# Generated by doxygen " << versionString << "\n\n";
+ t << "# Generated by doxygen " << getVersion() << "\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";
t << "# Remove a hash to activate a line.\n\n";
@@ -1538,7 +1538,7 @@ void RTFGenerator::startMemberDoc(const char *clname,
t << rtf_Style_Reset << rtf_Style[showInline ? "Heading5" : "Heading4"]->reference;
//styleStack.push(rtf_Style_Heading4);
t << "{" << endl;
- //printf("RTFGenerator::startMemberDoc() `%s'\n",rtf_Style["Heading4"]->reference);
+ //printf("RTFGenerator::startMemberDoc() '%s'\n",rtf_Style["Heading4"]->reference);
startBold();
t << endl;
}
@@ -1547,7 +1547,7 @@ void RTFGenerator::endMemberDoc(bool)
{
DBG_RTF(t << "{\\comment endMemberDoc}" << endl)
//const char *style = styleStack.pop();
- //printf("RTFGenerator::endMemberDoc() `%s'\n",style);
+ //printf("RTFGenerator::endMemberDoc() '%s'\n",style);
//ASSERT(style==rtf_Style["Heading4"]->reference);
endBold();
t << "}" << endl;
diff --git a/src/scanner.l b/src/scanner.l
index 42058d8..970b1e8 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -247,7 +247,7 @@ static void initEntry()
// //printf("Appending group %s\n",autoGroupStack.top()->groupname.data());
// current->groups->append(new Grouping(*autoGroupStack.top()));
//}
- initGroupInfo(current);
+ Doxygen::docGroup.initGroupInfo(current);
isTypedef=FALSE;
}
@@ -614,6 +614,7 @@ PRE [pP][rR][eE]
CODE [cC][oO][dD][eE]
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
+PHPUSEKW ("public"|"private"|"protected")
IDLATTR ("["[^\]]*"]"){BN}*
TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
@@ -867,12 +868,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<FindMembersPHP>. { // Non-PHP code text, ignore
}
-<FindMembers>"?>"|"</script>" { // PHP code end
- if (insidePHP)
- BEGIN( FindMembersPHP );
- else
- REJECT;
- }
<FindMembers>{PHPKW} { if (insidePHP)
BEGIN( NextSemi );
else
@@ -1148,9 +1143,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<ObjCReturnType>")" {
BEGIN( ObjCMethod );
}
-<ObjCParams>({ID})?":" { // Keyword of parameter
+<ObjCParams>({ID})?{BN}*":" { // Keyword of parameter
QCString keyw = yytext;
- keyw=keyw.left(keyw.length()-1); // strip :
+ keyw=keyw.left(keyw.length()-1).stripWhiteSpace(); // strip :
if (keyw.isEmpty())
{
current->name += " :";
@@ -2012,11 +2007,16 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<PHPUseAs>{BN}+"as"{BN}+ {
lineCount();
}
+<PHPUseAs>{PHPUSEKW} {
+ }
<PHPUseAs>{ID} {
//printf("PHP: adding use as relation: %s->%s\n",yytext,aliasName.data());
- Doxygen::namespaceAliasDict.insert(yytext,
- new QCString(removeRedundantWhiteSpace(
- substitute(aliasName,"\\","::"))));
+ if (!aliasName.isEmpty())
+ {
+ Doxygen::namespaceAliasDict.insert(yytext,
+ new QCString(removeRedundantWhiteSpace(
+ substitute(aliasName,"\\","::"))));
+ }
aliasName.resize(0);
}
<PHPUse,PHPUseAs>[,;] {
@@ -2316,6 +2316,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<CopyHereDocEnd>\n {
*pCopyHereDocGString += yytext;
}
+<CopyHereDocEnd>{ID} {
+ *pCopyHereDocGString += yytext;
+ }
<CopyHereDocEnd>. {
*pCopyHereDocGString += yytext;
}
@@ -2674,7 +2677,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
*/
<Define>{ID} {
- //printf("Define `%s' without args\n",yytext);
+ //printf("Define '%s' without args\n",yytext);
if (insideCpp || insideObjC)
{
current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
@@ -2849,17 +2852,17 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
-<FindMembers,FindFields>("//"([!/]?){B}*{CMD}"{")|("/*"([!*]?){B}*{CMD}"{") {
+<FindMembers,FindFields>("//"([!/]){B}*{CMD}"{")|("/*"([!*]){B}*{CMD}"{") {
//handleGroupStartCommand(current->name);
if (previous && previous->section==Entry::GROUPDOC_SEC)
{
// link open command to the group defined in the previous entry
- openGroup(previous,yyFileName,yyLineNr);
+ Doxygen::docGroup.open(previous,yyFileName,yyLineNr);
}
else
{
// link open command to the current entry
- openGroup(current,yyFileName,yyLineNr);
+ Doxygen::docGroup.open(current,yyFileName,yyLineNr);
}
//current = tmp;
initEntry();
@@ -2901,9 +2904,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
}
-<FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}".*|"/*"([!*]?){B}*{CMD}"}"[^*]*"*/" {
+<FindMembers,FindFields,ReadInitializer>"//"([!/]){B}*{CMD}"}".*|"/*"([!*]){B}*{CMD}"}"[^*]*"*/" {
bool insideEnum = YY_START==FindFields || (YY_START==ReadInitializer && lastInitializerContext==FindFields); // see bug746226
- closeGroup(current,yyFileName,yyLineNr,insideEnum);
+ Doxygen::docGroup.close(current,yyFileName,yyLineNr,insideEnum);
}
<FindMembers>"=" { // in PHP code this could also be due to "<?="
current->bodyLine = yyLineNr;
@@ -2945,7 +2948,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(GCopyCurly);
}
<ReadInitializer>[;,] {
- //printf(">> initializer `%s' <<\n",current->initializer.data());
+ //printf(">> initializer '%s' <<\n",current->initializer.data());
if (*yytext==';' && (current_root->spec&Entry::Enum))
{
current->fileName = yyFileName;
@@ -3853,7 +3856,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<SkipRemainder>[^\n]*
<FindFields>"," {
- //printf("adding `%s' `%s' `%s' to enum `%s' (mGrpId=%d)\n",
+ //printf("adding '%s' '%s' '%s' to enum '%s' (mGrpId=%d)\n",
// current->type.data(), current->name.data(),
// current->args.data(), current_root->name.data(),current->mGrpId);
if (!current->name.isEmpty())
@@ -3999,7 +4002,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
QCString &cn = current->name;
QCString rn = current_root->name.copy();
- //printf("cn=`%s' rn=`%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef);
+ //printf("cn='%s' rn='%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef);
if (!cn.isEmpty() && !rn.isEmpty())
{
prependScope();
@@ -4020,7 +4023,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
// was: current->args.simplifyWhiteSpace();
current->type = current->type.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
- //printf("adding `%s' `%s' `%s' brief=%s insideObjC=%d %x\n",current->type.data(),current->name.data(),current->args.data(),current->brief.data(),insideObjC,current->section);
+ //printf("adding '%s' '%s' '%s' brief=%s insideObjC=%d %x\n",current->type.data(),current->name.data(),current->args.data(),current->brief.data(),insideObjC,current->section);
if (insideObjC &&
((current->spec&Entry::Interface) || (current->spec==Entry::Category))
) // method definition follows
@@ -4166,7 +4169,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
// see if the compound does not have a name or is inside another
// anonymous compound. If so we insert a
- // special `anonymous' variable.
+ // special 'anonymous' variable.
//Entry *p=current_root;
Entry *p=current;
while (p)
@@ -4174,7 +4177,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
// only look for class scopes, not namespace scopes
if ((p->section & Entry::COMPOUND_MASK) && !p->name.isEmpty())
{
- //printf("Trying scope `%s'\n",p->name.data());
+ //printf("Trying scope '%s'\n",p->name.data());
int i=p->name.findRev("::");
int pi = (i==-1) ? 0 : i+2;
if (p->name.at(pi)=='@')
@@ -4259,7 +4262,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
- //printf("Add: type=`%s',name=`%s',args=`%s' brief=%s doc=%s\n",
+ //printf("Add: type='%s',name='%s',args='%s' brief=%s doc=%s\n",
// varEntry->type.data(),varEntry->name.data(),
// varEntry->args.data(),varEntry->brief.data(),varEntry->doc.data());
current_root->addSubEntry(varEntry);
@@ -4361,7 +4364,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FuncPtr>. {
- //printf("error: FuncPtr `%c' unexpected at line %d of %s\n",*yytext,yyLineNr,yyFileName);
+ //printf("error: FuncPtr '%c' unexpected at line %d of %s\n",*yytext,yyLineNr,yyFileName);
}
<FuncPtrOperator>"("{BN}*")"{BN}*/"(" {
current->name += yytext;
@@ -4615,7 +4618,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( SkipCxxComment );
}
*/
- /* `)' followed by a special comment */
+ /* ')' followed by a special comment */
<ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" {
lineCount();
if (currentArgumentContext==DefineEnd)
@@ -5146,7 +5149,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
if (!current->type.isEmpty() &&
(!isFunction || current->type.left(8)=="typedef "))
{
- //printf("Scanner.l: found in class variable: `%s' `%s' `%s'\n", current->type.data(),current->name.data(),current->args.data());
+ //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", current->type.data(),current->name.data(),current->args.data());
if (isTypedef && current->type.left(8)!="typedef ")
{
current->type.prepend("typedef ");
@@ -5155,14 +5158,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
else
{
- //printf("Scanner.l: found in class function: `%s' `%s' `%s'\n", current->type.data(),current->name.data(),current->args.data());
+ //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", current->type.data(),current->name.data(),current->args.data());
current->section = Entry::FUNCTION_SEC ;
current->proto = *yytext==';';
}
}
else // a global function prototype or function variable
{
- //printf("Scanner.l: prototype? type=`%s' name=`%s' args=`%s'\n",current->type.data(),current->name.data(),current->args.data());
+ //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",current->type.data(),current->name.data(),current->args.data());
if (!current->type.isEmpty() &&
(current->type.find(re,0)!=-1 || current->type.left(8)=="typedef "))
{
@@ -5180,7 +5183,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->proto = TRUE;
}
}
- //printf("Adding entry `%s'\n",current->name.data());
+ //printf("Adding entry '%s'\n",current->name.data());
if ( insidePHP)
{
if (findAndRemoveWord(current->type,"final"))
@@ -5377,7 +5380,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
lineCount();
//addToBody(yytext);
}
-<SkipCurly,SkipCurlyCpp>"<<<" {
+<SkipCurly,SkipCurlyCpp,ReadInitializer>"<<<" {
if (!insidePHP)
{
REJECT;
@@ -5588,7 +5591,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->name=current->name.left(current->name.length()-1).stripWhiteSpace();
//printf("template class declaration for %s!\n",current->name.data());
QCString rn = current_root->name.copy();
- //printf("cn=`%s' rn=`%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef);
+ //printf("cn='%s' rn='%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef);
if (!current->name.isEmpty() && !rn.isEmpty())
{
prependScope();
@@ -6804,7 +6807,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<DocCopyBlock><<EOF>> {
warn(yyFileName,yyLineNr,
- "reached end of file while inside a `%s' block!\n"
+ "reached end of file while inside a '%s' block!\n"
"The command that should end the block seems to be missing!\n",
docBlockName.data());
yyterminate();
@@ -6882,7 +6885,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
- /* ------------ Generic rules -------------- */
<SkipCxxComment>.*"\\\n" { // line continuation
@@ -6900,6 +6902,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<SkipComment>[^\*\n]+
+ /* ------------ Generic rules -------------- */
+
+<*>"?>"|"</script>" { // PHP code end
+ if (insidePHP)
+ BEGIN( FindMembersPHP );
+ else
+ REJECT;
+ }
+
<*>"[[" { // C++11 attribute
if (!insideCpp) REJECT;
if (YY_START == CopyGString || YY_START == CopyGString) REJECT;
@@ -7207,13 +7218,13 @@ static void parseCompounds(Entry *rt)
//memberGroupId = DOX_NOGROUP;
//memberGroupRelates.resize(0);
//memberGroupInside.resize(0);
- groupEnterCompound(yyFileName,yyLineNr,ce->name);
+ Doxygen::docGroup.enterCompound(yyFileName,yyLineNr,ce->name);
scannerYYlex() ;
g_lexInit=TRUE;
//forceEndGroup();
- groupLeaveCompound(yyFileName,yyLineNr,ce->name);
+ Doxygen::docGroup.leaveCompound(yyFileName,yyLineNr,ce->name);
delete current; current=0;
ce->program.resize(0);
@@ -7273,7 +7284,7 @@ static void parseMain(const char *fileName,
current_root = rt ;
initParser();
- groupEnterFile(yyFileName,yyLineNr);
+ Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
current = new Entry;
//printf("current=%p current_root=%p\n",current,current_root);
int sec=guessSection(yyFileName);
@@ -7305,7 +7316,7 @@ static void parseMain(const char *fileName,
}
//forceEndGroup();
- groupLeaveFile(yyFileName,yyLineNr);
+ Doxygen::docGroup.leaveFile(yyFileName,yyLineNr);
//if (depthIf>0)
//{
@@ -7457,7 +7468,7 @@ bool CLanguageScanner::needsPreprocessing(const QCString &extension)
SrcLangExt lang = getLanguageFromFileName(extension);
return (SrcLangExt_Cpp == lang) ||
!( fe==".java" || fe==".as" || fe==".d" || fe==".php" ||
- fe==".php4" || fe==".inc" || fe==".phtml"
+ fe==".php4" || fe==".inc" || fe==".phtml"|| fe==".php5"
);
}
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index babefe9..b21d587 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -956,6 +956,7 @@ void createJavascriptSearchIndex()
void writeJavascriptSearchIndex()
{
int i;
+ int cnt = 0;
// write index files
QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
@@ -983,7 +984,7 @@ void writeJavascriptSearchIndex()
" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
t << "<html><head><title></title>" << endl;
t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" << endl;
- t << "<meta name=\"generator\" content=\"Doxygen " << versionString << "\"/>" << endl;
+ t << "<meta name=\"generator\" content=\"Doxygen " << getVersion() << "\"/>" << endl;
t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" << endl;
t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>" << endl;
t << "<script type=\"text/javascript\" src=\"search.js\"></script>" << endl;
@@ -1043,7 +1044,7 @@ void writeJavascriptSearchIndex()
}
firstEntry=FALSE;
- ti << " ['" << dl->id() << "',['" << convertToXML(dl->name()) << "',[";
+ ti << " ['" << dl->id() << "_" << cnt++ << "',['" << convertToXML(dl->name()) << "',[";
if (dl->count()==1) // item with a unique name
{
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index 5a8e81d..012a0c0 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -924,7 +924,7 @@ static int insertPath(QCString name, bool local=TRUE, bool found=TRUE, int type=
static void recordMetadata()
{
- bindTextParameter(meta_insert,":doxygen_version",versionString);
+ bindTextParameter(meta_insert,":doxygen_version",getVersion());
bindTextParameter(meta_insert,":schema_version","0.2.0"); //TODO: this should be a constant somewhere; not sure where
bindTextParameter(meta_insert,":generated_at",dateToString(TRUE), FALSE);
bindTextParameter(meta_insert,":generated_on",dateToString(FALSE), FALSE);
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index da2f3f1..56dbe7d 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -384,7 +384,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unknown compound attribute `%s' found!",kind.data());
+ warn("Unknown compound attribute '%s' found!",kind.data());
m_state = Invalid;
}
if (isObjC=="yes" && m_curClass)
@@ -412,7 +412,7 @@ class TagFileParser : public QXmlDefaultHandler
case InPackage: m_tagFilePackages.append(m_curPackage);
m_curPackage=0; break;
default:
- warn("tag `compound' was not expected!");
+ warn("tag 'compound' was not expected!");
}
}
@@ -458,7 +458,7 @@ class TagFileParser : public QXmlDefaultHandler
case InNamespace: m_curNamespace->members.append(m_curMember); break;
case InGroup: m_curGroup->members.append(m_curMember); break;
case InPackage: m_curPackage->members.append(m_curMember); break;
- default: warn("Unexpected tag `member' found"); break;
+ default: warn("Unexpected tag 'member' found"); break;
}
}
@@ -476,7 +476,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Found `enumvalue' tag outside of member tag");
+ warn("Found 'enumvalue' tag outside of member tag");
}
}
@@ -504,7 +504,7 @@ class TagFileParser : public QXmlDefaultHandler
case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
- default: warn("Unexpected tag `docanchor' found"); break;
+ default: warn("Unexpected tag 'docanchor' found"); break;
}
}
@@ -517,7 +517,7 @@ class TagFileParser : public QXmlDefaultHandler
case InNamespace: m_curNamespace->classList.append(m_curString); break;
case InGroup: m_curGroup->classList.append(m_curString); break;
case InPackage: m_curPackage->classList.append(m_curString); break;
- default: warn("Unexpected tag `class' found"); break;
+ default: warn("Unexpected tag 'class' found"); break;
}
}
@@ -528,7 +528,7 @@ class TagFileParser : public QXmlDefaultHandler
case InNamespace: m_curNamespace->classList.append(m_curString); break;
case InFile: m_curFile->namespaceList.append(m_curString); break;
case InGroup: m_curGroup->namespaceList.append(m_curString); break;
- default: warn("Unexpected tag `namespace' found"); break;
+ default: warn("Unexpected tag 'namespace' found"); break;
}
}
@@ -538,7 +538,7 @@ class TagFileParser : public QXmlDefaultHandler
{
case InGroup: m_curGroup->fileList.append(m_curString); break;
case InDir: m_curDir->fileList.append(m_curString); break;
- default: warn("Unexpected tag `file' found"); break;
+ default: warn("Unexpected tag 'file' found"); break;
}
}
@@ -547,7 +547,7 @@ class TagFileParser : public QXmlDefaultHandler
switch(m_state)
{
case InGroup: m_curGroup->fileList.append(m_curString); break;
- default: warn("Unexpected tag `page' found"); break;
+ default: warn("Unexpected tag 'page' found"); break;
}
}
@@ -556,7 +556,7 @@ class TagFileParser : public QXmlDefaultHandler
switch(m_state)
{
case InDir: m_curDir->subdirList.append(m_curString); break;
- default: warn("Unexpected tag `dir' found"); break;
+ default: warn("Unexpected tag 'dir' found"); break;
}
}
@@ -580,7 +580,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `type' found");
+ warn("Unexpected tag 'type' found");
}
}
@@ -596,7 +596,7 @@ class TagFileParser : public QXmlDefaultHandler
case InDir: m_curDir->name = m_curString; break;
case InMember: m_curMember->name = m_curString; break;
case InPackage: m_curPackage->name = m_curString; break;
- default: warn("Unexpected tag `name' found"); break;
+ default: warn("Unexpected tag 'name' found"); break;
}
}
@@ -630,7 +630,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `base' found");
+ warn("Unexpected tag 'base' found");
}
}
@@ -642,7 +642,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `base' found");
+ warn("Unexpected tag 'base' found");
}
}
@@ -659,7 +659,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `includes' found");
+ warn("Unexpected tag 'includes' found");
}
m_curString="";
}
@@ -682,7 +682,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `templarg' found");
+ warn("Unexpected tag 'templarg' found");
}
}
@@ -697,7 +697,7 @@ class TagFileParser : public QXmlDefaultHandler
case InPage: m_curPage->filename = m_curString; break;
case InPackage: m_curPackage->filename = m_curString; break;
case InDir: m_curDir->filename = m_curString; break;
- default: warn("Unexpected tag `filename' found"); break;
+ default: warn("Unexpected tag 'filename' found"); break;
}
}
@@ -707,7 +707,7 @@ class TagFileParser : public QXmlDefaultHandler
{
case InFile: m_curFile->path = m_curString; break;
case InDir: m_curDir->path = m_curString; break;
- default: warn("Unexpected tag `path' found"); break;
+ default: warn("Unexpected tag 'path' found"); break;
}
}
@@ -723,7 +723,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `anchor' found");
+ warn("Unexpected tag 'anchor' found");
}
}
@@ -743,7 +743,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `clangid' found");
+ warn("Unexpected tag 'clangid' found");
}
}
@@ -757,7 +757,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `anchorfile' found");
+ warn("Unexpected tag 'anchorfile' found");
}
}
@@ -769,7 +769,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `arglist' found");
+ warn("Unexpected tag 'arglist' found");
}
}
void endTitle()
@@ -778,7 +778,7 @@ class TagFileParser : public QXmlDefaultHandler
{
case InGroup: m_curGroup->title = m_curString; break;
case InPage: m_curPage->title = m_curString; break;
- default: warn("Unexpected tag `title' found"); break;
+ default: warn("Unexpected tag 'title' found"); break;
}
}
@@ -790,7 +790,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unexpected tag `subgroup' found");
+ warn("Unexpected tag 'subgroup' found");
}
}
@@ -877,7 +877,7 @@ class TagFileParser : public QXmlDefaultHandler
bool startElement( const QString&, const QString&,
const QString&name, const QXmlAttributes& attrib )
{
- //printf("startElement `%s'\n",name.data());
+ //printf("startElement '%s'\n",name.data());
StartElementHandler *handler = m_startElementHandlers[name.utf8()];
if (handler)
{
@@ -885,14 +885,14 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unknown tag `%s' found!",name.data());
+ warn("Unknown tag '%s' found!",name.data());
}
return TRUE;
}
bool endElement( const QString&, const QString&, const QString& name )
{
- //printf("endElement `%s'\n",name.data());
+ //printf("endElement '%s'\n",name.data());
EndElementHandler *handler = m_endElementHandlers[name.utf8()];
if (handler)
{
@@ -900,7 +900,7 @@ class TagFileParser : public QXmlDefaultHandler
}
else
{
- warn("Unknown tag `%s' found!",name.data());
+ warn("Unknown tag '%s' found!",name.data());
}
return TRUE;
}
@@ -986,8 +986,8 @@ void TagFileParser::dump()
TagClassInfo *cd;
for (;(cd=lci.current());++lci)
{
- msg("class `%s'\n",cd->name.data());
- msg(" filename `%s'\n",cd->filename.data());
+ msg("class '%s'\n",cd->name.data());
+ msg(" filename '%s'\n",cd->filename.data());
if (cd->bases)
{
QListIterator<BaseInfo> bii(*cd->bases);
@@ -1003,10 +1003,10 @@ void TagFileParser::dump()
for (;(md=mci.current());++mci)
{
msg(" member:\n");
- msg(" kind: `%s'\n",md->kind.data());
- msg(" name: `%s'\n",md->name.data());
- msg(" anchor: `%s'\n",md->anchor.data());
- msg(" arglist: `%s'\n",md->arglist.data());
+ msg(" kind: '%s'\n",md->kind.data());
+ msg(" name: '%s'\n",md->name.data());
+ msg(" anchor: '%s'\n",md->anchor.data());
+ msg(" arglist: '%s'\n",md->arglist.data());
}
}
//============== NAMESPACES
@@ -1014,8 +1014,8 @@ void TagFileParser::dump()
TagNamespaceInfo *nd;
for (;(nd=lni.current());++lni)
{
- msg("namespace `%s'\n",nd->name.data());
- msg(" filename `%s'\n",nd->filename.data());
+ msg("namespace '%s'\n",nd->name.data());
+ msg(" filename '%s'\n",nd->filename.data());
QCStringList::Iterator it;
for ( it = nd->classList.begin();
it != nd->classList.end(); ++it )
@@ -1028,10 +1028,10 @@ void TagFileParser::dump()
for (;(md=mci.current());++mci)
{
msg(" member:\n");
- msg(" kind: `%s'\n",md->kind.data());
- msg(" name: `%s'\n",md->name.data());
- msg(" anchor: `%s'\n",md->anchor.data());
- msg(" arglist: `%s'\n",md->arglist.data());
+ msg(" kind: '%s'\n",md->kind.data());
+ msg(" name: '%s'\n",md->name.data());
+ msg(" anchor: '%s'\n",md->anchor.data());
+ msg(" arglist: '%s'\n",md->arglist.data());
}
}
//============== FILES
@@ -1039,8 +1039,8 @@ void TagFileParser::dump()
TagFileInfo *fd;
for (;(fd=lfi.current());++lfi)
{
- msg("file `%s'\n",fd->name.data());
- msg(" filename `%s'\n",fd->filename.data());
+ msg("file '%s'\n",fd->name.data());
+ msg(" filename '%s'\n",fd->filename.data());
QCStringList::Iterator it;
for ( it = fd->namespaceList.begin();
it != fd->namespaceList.end(); ++it )
@@ -1058,10 +1058,10 @@ void TagFileParser::dump()
for (;(md=mci.current());++mci)
{
msg(" member:\n");
- msg(" kind: `%s'\n",md->kind.data());
- msg(" name: `%s'\n",md->name.data());
- msg(" anchor: `%s'\n",md->anchor.data());
- msg(" arglist: `%s'\n",md->arglist.data());
+ msg(" kind: '%s'\n",md->kind.data());
+ msg(" name: '%s'\n",md->name.data());
+ msg(" anchor: '%s'\n",md->anchor.data());
+ msg(" arglist: '%s'\n",md->arglist.data());
}
QListIterator<TagIncludeInfo> mii(fd->includes);
@@ -1077,8 +1077,8 @@ void TagFileParser::dump()
TagGroupInfo *gd;
for (;(gd=lgi.current());++lgi)
{
- msg("group `%s'\n",gd->name.data());
- msg(" filename `%s'\n",gd->filename.data());
+ msg("group '%s'\n",gd->name.data());
+ msg(" filename '%s'\n",gd->filename.data());
QCStringList::Iterator it;
for ( it = gd->namespaceList.begin();
it != gd->namespaceList.end(); ++it )
@@ -1111,10 +1111,10 @@ void TagFileParser::dump()
for (;(md=mci.current());++mci)
{
msg(" member:\n");
- msg(" kind: `%s'\n",md->kind.data());
- msg(" name: `%s'\n",md->name.data());
- msg(" anchor: `%s'\n",md->anchor.data());
- msg(" arglist: `%s'\n",md->arglist.data());
+ msg(" kind: '%s'\n",md->kind.data());
+ msg(" name: '%s'\n",md->name.data());
+ msg(" anchor: '%s'\n",md->anchor.data());
+ msg(" arglist: '%s'\n",md->arglist.data());
}
}
//============== PAGES
@@ -1122,17 +1122,17 @@ void TagFileParser::dump()
TagPageInfo *pd;
for (;(pd=lpi.current());++lpi)
{
- msg("page `%s'\n",pd->name.data());
- msg(" title `%s'\n",pd->title.data());
- msg(" filename `%s'\n",pd->filename.data());
+ msg("page '%s'\n",pd->name.data());
+ msg(" title '%s'\n",pd->title.data());
+ msg(" filename '%s'\n",pd->filename.data());
}
//============== DIRS
QListIterator<TagDirInfo> ldi(m_tagFileDirs);
TagDirInfo *dd;
for (;(dd=ldi.current());++ldi)
{
- msg("dir `%s'\n",dd->name.data());
- msg(" path `%s'\n",dd->path.data());
+ msg("dir '%s'\n",dd->name.data());
+ msg(" path '%s'\n",dd->path.data());
QCStringList::Iterator it;
for ( it = dd->fileList.begin();
it != dd->fileList.end(); ++it )
@@ -1527,7 +1527,7 @@ void TagFileParser::addIncludes()
TagIncludeInfo *ii;
for (;(ii=mii.current());++mii)
{
- //printf("ii->name=`%s'\n",ii->name.data());
+ //printf("ii->name='%s'\n",ii->name.data());
FileName *ifn = Doxygen::inputNameDict->find(ii->name);
ASSERT(ifn!=0);
if (ifn)
diff --git a/src/tclscanner.l b/src/tclscanner.l
index df52201..88bd474 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -486,7 +486,7 @@ Entry* tcl_entry_new()
// myEntry->stat = FALSE;
myEntry->fileName = tcl.file_name;
myEntry->lang = SrcLangExt_Tcl;
- initGroupInfo(myEntry);
+ Doxygen::docGroup.initGroupInfo(myEntry);
// collect entries
if (!tcl.code)
{
@@ -1049,7 +1049,7 @@ D
tcl.string_commentcodify = "";
tcl.string_commentline = "";
tcl.line_body1=yylineno;
- tcl_command(-1,"");
+ tcl_command(-1,yytext);
}
<COMMAND>{ws}*; {
D
@@ -2274,21 +2274,22 @@ D
}
//! Handle \c namespace statements.
-static void tcl_command_NAMESPACE()
+static bool tcl_command_NAMESPACE()
{
D
QCString myNs, myName, myStr;
//Entry *myEntryNs=NULL;
tcl_scan *myScan = tcl.scan.at(0);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(4)),myNs,myName);
+ if (myName.isEmpty()) return false; // not a namespace
tcl_codify_cmd("keyword",0);
tcl_codify_cmd(NULL,1);
tcl_codify_cmd("keyword",2);
tcl_codify_cmd(NULL,3);
tcl_codify_cmd(NULL,4);
tcl_codify_cmd(NULL,5);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(4)),myNs,myName);
- if (myNs.length())
+ if (!myNs.isEmpty())
{
myName = myNs+"::"+myName;
}
@@ -2310,6 +2311,7 @@ D
tcl.word_is=' ';
}
myScan = tcl_scan_start(tcl.word_is,myStr, myName, NULL, NULL);
+ return true;
}
//! Handle \c itcl::class statements.
@@ -2636,11 +2638,16 @@ tcl_inf("->\n");
if ((*tcl.list_commandwords.at(2))=="eval")
{
if (tcl.list_commandwords.count() < 7) {myLine=__LINE__;goto command_warn;}
- tcl_command_NAMESPACE();
+ if (tcl_command_NAMESPACE())
+ {
+ goto command_end;
+ }
+ }
+ else
+ {
+ tcl_command_OTHER();
goto command_end;
}
- tcl_command_OTHER();
- goto command_end;
}
if (myStr=="itcl::class")
{
@@ -2950,7 +2957,7 @@ tcl_inf("%s\n",fileName);
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
msg("Parsing %s...\n",fileName);
- groupEnterFile(fileName,yylineno);
+ Doxygen::docGroup.enterFile(fileName,yylineno);
tcl_init();
tcl.code = NULL;
@@ -2958,7 +2965,7 @@ tcl_inf("%s\n",fileName);
tcl.this_parser = this;
tcl.entry_main = root; /* toplevel entry */
tcl_parse("","");
- groupLeaveFile(tcl.file_name,yylineno);
+ Doxygen::docGroup.leaveFile(tcl.file_name,yylineno);
root->program.resize(0);
myFile.close();
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
diff --git a/src/template.cpp b/src/template.cpp
index b1435ce..228da4d 100644
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -2832,7 +2832,7 @@ template<class T> class TemplateNodeCreator : public TemplateNode
rootDir.setPath(QDir::currentDirPath());
if (!rootDir.mkdir(outputDir))
{
- err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
+ err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
"exist and cannot be created\n",outputDir.data());
return;
}
diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h
index bbc70e8..c4ba3d7 100644
--- a/src/textdocvisitor.h
+++ b/src/textdocvisitor.h
@@ -125,8 +125,6 @@ class TextDocVisitor : public DocVisitor
void visitPost(DocXRefItem *) {}
void visitPre(DocInternalRef *) {}
void visitPost(DocInternalRef *) {}
- void visitPre(DocCopy *) {}
- void visitPost(DocCopy *) {}
void visitPre(DocText *) {}
void visitPost(DocText *) {}
void visitPre(DocHtmlBlockQuote *) {}
diff --git a/src/util.cpp b/src/util.cpp
index e5b9c5c..e028660 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -184,7 +184,7 @@ QCString removeAnonymousScopes(const QCString &s)
p=i+l;
}
result+=s.right(sl-p);
- //printf("removeAnonymousScopes(`%s')=`%s'\n",s.data(),result.data());
+ //printf("removeAnonymousScopes('%s')='%s'\n",s.data(),result.data());
return result;
}
@@ -210,7 +210,7 @@ QCString replaceAnonymousScopes(const QCString &s,const char *replacement)
p=i+l;
}
result+=s.right(sl-p);
- //printf("replaceAnonymousScopes(`%s')=`%s'\n",s.data(),result.data());
+ //printf("replaceAnonymousScopes('%s')='%s'\n",s.data(),result.data());
return result;
}
@@ -241,7 +241,7 @@ QCString stripAnonymousNamespaceScope(const QCString &s)
p=i+l;
}
done:
- //printf("stripAnonymousNamespaceScope(`%s')=`%s'\n",s.data(),newScope.data());
+ //printf("stripAnonymousNamespaceScope('%s')='%s'\n",s.data(),newScope.data());
return newScope;
}
@@ -383,7 +383,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
{
// split-off scope part
QCString resScopeName = qualifiedName.left(scopeIndex);
- //printf("resScopeName=`%s'\n",resScopeName.data());
+ //printf("resScopeName='%s'\n",resScopeName.data());
// look-up scope in context
int is,ps=0;
@@ -394,7 +394,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
QCString tmp = resolveTypeDef(mContext,qualScopePart);
if (!tmp.isEmpty()) qualScopePart=tmp;
resScope = resScope->findInnerCompound(qualScopePart);
- //printf("qualScopePart=`%s' resScope=%p\n",qualScopePart.data(),resScope);
+ //printf("qualScopePart='%s' resScope=%p\n",qualScopePart.data(),resScope);
if (resScope==0) break;
ps=is+l;
}
@@ -444,7 +444,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
// step 3: get the member's type
if (md)
{
- //printf(">>resolveTypeDef: Found typedef name `%s' in scope `%s' value=`%s' args='%s'\n",
+ //printf(">>resolveTypeDef: Found typedef name '%s' in scope '%s' value='%s' args='%s'\n",
// qualifiedName.data(),context->name().data(),md->typeString(),md->argsString()
// );
result=md->typeString();
@@ -461,7 +461,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
}
else
{
- //printf(">>resolveTypeDef: Typedef `%s' not found in scope `%s'!\n",
+ //printf(">>resolveTypeDef: Typedef '%s' not found in scope '%s'!\n",
// qualifiedName.data(),context ? context->name().data() : "<global>");
}
return result;
@@ -518,10 +518,10 @@ static QDict<MemberDef> g_resolvedTypedefs;
static QDict<Definition> g_visitedNamespaces;
// forward declaration
-static ClassDef *getResolvedClassRec(const Definition *scope,
+static const ClassDef *getResolvedClassRec(const Definition *scope,
const FileDef *fileScope,
const char *n,
- MemberDef **pTypeDef,
+ const MemberDef **pTypeDef,
QCString *pTemplSpec,
QCString *pResolvedType
);
@@ -535,10 +535,12 @@ int isAccessibleFromWithExpScope(const Definition *scope,const FileDef *fileScop
*
* Example: typedef int T; will return 0, since "int" is not a class.
*/
-ClassDef *newResolveTypedef(const FileDef *fileScope,MemberDef *md,
- MemberDef **pMemType,QCString *pTemplSpec,
- QCString *pResolvedType,
- ArgumentList *actTemplParams)
+const ClassDef *newResolveTypedef(const FileDef *fileScope,
+ const MemberDef *md,
+ const MemberDef **pMemType,
+ QCString *pTemplSpec,
+ QCString *pResolvedType,
+ ArgumentList *actTemplParams)
{
//printf("newResolveTypedef(md=%p,cachedVal=%p)\n",md,md->getCachedTypedefVal());
bool isCached = md->isTypedefValCached(); // value already cached
@@ -581,8 +583,8 @@ ClassDef *newResolveTypedef(const FileDef *fileScope,MemberDef *md,
int sp=0;
tl=type.length(); // length may have been changed
while (sp<tl && type.at(sp)==' ') sp++;
- MemberDef *memTypeDef = 0;
- ClassDef *result = getResolvedClassRec(md->getOuterScope(),
+ const MemberDef *memTypeDef = 0;
+ const ClassDef *result = getResolvedClassRec(md->getOuterScope(),
fileScope,type,&memTypeDef,0,pResolvedType);
// if type is a typedef then return what it resolves to.
if (memTypeDef && memTypeDef->isTypedef())
@@ -652,7 +654,7 @@ done:
//printf("setting cached typedef %p in result %p\n",md,result);
//printf("==> %s (%s,%d)\n",result->name().data(),result->getDefFileName().data(),result->getDefLine());
//printf("*pResolvedType=%s\n",pResolvedType?pResolvedType->data():"<none>");
- md->cacheTypedefVal(result,
+ const_cast<MemberDef*>(md)->cacheTypedefVal(result,
pTemplSpec ? *pTemplSpec : QCString(),
pResolvedType ? *pResolvedType : QCString()
);
@@ -667,7 +669,7 @@ done:
* value of the typedef or \a name if no typedef was found.
*/
static QCString substTypedef(const Definition *scope,const FileDef *fileScope,const QCString &name,
- MemberDef **pTypeDef=0)
+ const MemberDef **pTypeDef=0)
{
QCString result=name;
if (name.isEmpty()) return result;
@@ -763,12 +765,12 @@ static const Definition *followPath(const Definition *start,const FileDef *fileS
while ((is=getScopeFragment(path,ps,&l))!=-1)
{
// try to resolve the part if it is a typedef
- MemberDef *typeDef=0;
+ const MemberDef *typeDef=0;
QCString qualScopePart = substTypedef(current,fileScope,path.mid(is,l),&typeDef);
//printf(" qualScopePart=%s\n",qualScopePart.data());
if (typeDef)
{
- ClassDef *type = newResolveTypedef(fileScope,typeDef);
+ const ClassDef *type = newResolveTypedef(fileScope,typeDef);
if (type)
{
//printf("Found type %s\n",type->name().data());
@@ -1218,8 +1220,8 @@ static void getResolvedSymbol(const Definition *scope,
const QCString &explicitScopePart,
ArgumentList *actTemplParams,
int &minDistance,
- ClassDef *&bestMatch,
- MemberDef *&bestTypedef,
+ const ClassDef *&bestMatch,
+ const MemberDef *&bestTypedef,
QCString &bestTemplSpec,
QCString &bestResolvedType
)
@@ -1306,8 +1308,8 @@ static void getResolvedSymbol(const Definition *scope,
QCString spec;
QCString type;
minDistance=distance;
- MemberDef *enumType = 0;
- ClassDef *cd = newResolveTypedef(fileScope,md,&enumType,&spec,&type,actTemplParams);
+ const MemberDef *enumType = 0;
+ const ClassDef *cd = newResolveTypedef(fileScope,md,&enumType,&spec,&type,actTemplParams);
if (cd) // type resolves to a class
{
//printf(" bestTypeDef=%p spec=%s type=%s\n",md,spec.data(),type.data());
@@ -1377,10 +1379,10 @@ static void getResolvedSymbol(const Definition *scope,
* match against the input name. Can recursively call itself when
* resolving typedefs.
*/
-static ClassDef *getResolvedClassRec(const Definition *scope,
+static const ClassDef *getResolvedClassRec(const Definition *scope,
const FileDef *fileScope,
const char *n,
- MemberDef **pTypeDef,
+ const MemberDef **pTypeDef,
QCString *pTemplSpec,
QCString *pResolvedType
)
@@ -1499,8 +1501,8 @@ static ClassDef *getResolvedClassRec(const Definition *scope,
Doxygen::lookupCache->insert(key,new LookupInfo);
}
- ClassDef *bestMatch=0;
- MemberDef *bestTypedef=0;
+ const ClassDef *bestMatch=0;
+ const MemberDef *bestTypedef=0;
QCString bestTemplSpec;
QCString bestResolvedType;
int minDistance=10000; // init at "infinite"
@@ -1566,10 +1568,10 @@ static ClassDef *getResolvedClassRec(const Definition *scope,
* Loops through scope and each of its parent scopes looking for a
* match against the input name.
*/
-ClassDef *getResolvedClass(const Definition *scope,
+const ClassDef *getResolvedClass(const Definition *scope,
const FileDef *fileScope,
const char *n,
- MemberDef **pTypeDef,
+ const MemberDef **pTypeDef,
QCString *pTemplSpec,
bool mayBeUnlinkable,
bool mayBeHidden,
@@ -1593,7 +1595,7 @@ ClassDef *getResolvedClass(const Definition *scope,
// n,
// mayBeUnlinkable
// );
- ClassDef *result;
+ const ClassDef *result;
if (optimizeOutputVhdl)
{
result = getClass(n);
@@ -2016,7 +2018,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
const char *text, bool autoBreak,bool external,
bool keepSpaces,int indentLevel)
{
- //printf("linkify=`%s'\n",text);
+ //printf("linkify='%s'\n",text);
static QRegExp regExp("[a-z_A-Z\\x80-\\xFF][~!a-z_A-Z0-9$\\\\.:\\x80-\\xFF]*");
static QRegExp regExpSplit("(?!:),");
QCString txtStr=text;
@@ -2032,12 +2034,17 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
int floatingIndex=0;
if (strLen==0) return;
// read a word from the text string
- while ((newIndex=regExp.match(txtStr,index,&matchLen))!=-1 &&
- (newIndex==0 || !(txtStr.at(newIndex-1)>='0' && txtStr.at(newIndex-1)<='9')) // avoid matching part of hex numbers
- )
+ while ((newIndex=regExp.match(txtStr,index,&matchLen))!=-1)
{
- // add non-word part to the result
floatingIndex+=newIndex-skipIndex+matchLen;
+ if (newIndex>0 && txtStr.at(newIndex-1)=='0') // ignore hex numbers (match x00 in 0x00)
+ {
+ out.writeString(txtStr.mid(skipIndex,newIndex+matchLen-skipIndex),keepSpaces);
+ skipIndex=index=newIndex+matchLen;
+ continue;
+ }
+
+ // add non-word part to the result
bool insideString=FALSE;
int i;
for (i=index;i<newIndex;i++)
@@ -2088,7 +2095,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
const GroupDef *gd=0;
//printf("** Match word '%s'\n",matchWord.data());
- MemberDef *typeDef=0;
+ const MemberDef *typeDef=0;
cd=getResolvedClass(scope,fileScope,matchWord,&typeDef);
if (typeDef) // First look at typedef then class, see bug 584184.
{
@@ -2560,7 +2567,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
QFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
{
- err("file `%s' not found\n",name);
+ err("file '%s' not found\n",name);
return "";
}
BufStr buf(fi.size());
@@ -2578,7 +2585,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
}
if (!fileOpened)
{
- err("cannot open file `%s' for reading\n",name);
+ err("cannot open file '%s' for reading\n",name);
}
return "";
}
@@ -2635,7 +2642,7 @@ QCString yearToString()
//----------------------------------------------------------------------
// recursive function that returns the number of branches in the
-// inheritance tree that the base class `bcd' is below the class `cd'
+// inheritance tree that the base class 'bcd' is below the class 'cd'
int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level)
{
@@ -2706,7 +2713,7 @@ exit:
// printf("(");
// for (;(a=ali.current());++ali)
// {
-// printf("t=`%s' n=`%s' v=`%s' ",a->type.data(),!a->name.isEmpty()>0?a->name.data():"",!a->defval.isEmpty()>0?a->defval.data():"");
+// printf("t='%s' n='%s' v='%s' ",a->type.data(),!a->name.isEmpty()>0?a->name.data():"",!a->defval.isEmpty()>0?a->defval.data():"");
// }
// printf(")");
//}
@@ -2852,7 +2859,7 @@ static QCString trimScope(const QCString &name,const QCString &s)
{
QCString tmp;
QCString scope=name.left(scopeOffset)+"::";
- //printf("Trying with scope=`%s'\n",scope.data());
+ //printf("Trying with scope='%s'\n",scope.data());
int i,p=0,l;
while ((i=findScopePattern(scope,result,p,&l))!=-1) // for each occurrence
@@ -2872,7 +2879,7 @@ static QCString trimScope(const QCString &name,const QCString &s)
void trimBaseClassScope(BaseClassList *bcl,QCString &s,int level=0)
{
- //printf("trimBaseClassScope level=%d `%s'\n",level,s.data());
+ //printf("trimBaseClassScope level=%d '%s'\n",level,s.data());
BaseClassListIterator bcli(*bcl);
BaseClassDef *bcd;
for (;(bcd=bcli.current());++bcli)
@@ -2886,7 +2893,7 @@ void trimBaseClassScope(BaseClassList *bcl,QCString &s,int level=0)
s.length()-spos-cd->name().length()-2
);
}
- //printf("base class `%s'\n",cd->name().data());
+ //printf("base class '%s'\n",cd->name().data());
if (cd->baseClasses())
trimBaseClassScope(cd->baseClasses(),s,level+1);
}
@@ -3043,7 +3050,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
NamespaceSDict *usingNamespaces,
SDict<Definition> *usingClasses)
{
- //printf("match argument start `%s|%s' <-> `%s|%s' using nsp=%p class=%p\n",
+ //printf("match argument start '%s|%s' <-> '%s|%s' using nsp=%p class=%p\n",
// srcA->type.data(),srcA->name.data(),
// dstA->type.data(),dstA->name.data(),
// usingNamespaces,
@@ -3105,7 +3112,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
//srcAType=stripTemplateSpecifiersFromScope(srcAType,FALSE);
//dstAType=stripTemplateSpecifiersFromScope(dstAType,FALSE);
- //printf("srcA=`%s|%s' dstA=`%s|%s'\n",srcAType.data(),srcAName.data(),
+ //printf("srcA='%s|%s' dstA='%s|%s'\n",srcAType.data(),srcAName.data(),
// dstAType.data(),dstAName.data());
if (srcA->array!=dstA->array) // nomatch for char[] against char
@@ -3130,7 +3137,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{
srcAType=trimScope(className,srcAType);
dstAType=trimScope(className,dstAType);
- //printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
+ //printf("trimScope: '%s' <=> '%s'\n",srcAType.data(),dstAType.data());
ClassDef *cd;
if (!namespaceName.isEmpty())
cd=getClass(namespaceName+"::"+className);
@@ -3141,7 +3148,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
trimBaseClassScope(cd->baseClasses(),srcAType);
trimBaseClassScope(cd->baseClasses(),dstAType);
}
- //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
+ //printf("trimBaseClassScope: '%s' <=> '%s'\n",srcAType.data(),dstAType.data());
}
if (!namespaceName.isEmpty())
{
@@ -3234,7 +3241,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
while (dstPos<dstATypeLen && isId(dstAType.at(dstPos))) dstPos++;
// if nothing more follows for both types then we assume we have
- // found a match. Note that now `signed int' and `signed' match, but
+ // found a match. Note that now 'signed int' and 'signed' match, but
// seeing that int is not a name can only be done by looking at the
// semantics.
@@ -3496,8 +3503,8 @@ static QCString getCanonicalTypeForIdentifier(
//printf("getCanonicalTypeForIdentifier(%s,[%s->%s]) start\n",
// word.data(),tSpec?tSpec->data():"<none>",templSpec.data());
- ClassDef *cd = 0;
- MemberDef *mType = 0;
+ const ClassDef *cd = 0;
+ const MemberDef *mType = 0;
QCString ts;
QCString resolvedType;
@@ -3709,7 +3716,7 @@ static bool matchArgument2(
const Definition *dstScope,const FileDef *dstFileScope,Argument *dstA
)
{
- //printf(">> match argument: %s::`%s|%s' (%s) <-> %s::`%s|%s' (%s)\n",
+ //printf(">> match argument: %s::'%s|%s' (%s) <-> %s::'%s|%s' (%s)\n",
// srcScope ? srcScope->name().data() : "",
// srcA->type.data(),srcA->name.data(),srcA->canType.data(),
// dstScope ? dstScope->name().data() : "",
@@ -3858,7 +3865,7 @@ bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,cons
// pre: the types of the arguments in the list should match.
void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwrite)
{
- //printf("mergeArguments `%s', `%s'\n",
+ //printf("mergeArguments '%s', '%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data());
if (srcAl==0 || dstAl==0 || srcAl->count()!=dstAl->count())
@@ -3872,12 +3879,12 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
{
if (srcA->defval.isEmpty() && !dstA->defval.isEmpty())
{
- //printf("Defval changing `%s'->`%s'\n",srcA->defval.data(),dstA->defval.data());
+ //printf("Defval changing '%s'->'%s'\n",srcA->defval.data(),dstA->defval.data());
srcA->defval=dstA->defval.copy();
}
else if (!srcA->defval.isEmpty() && dstA->defval.isEmpty())
{
- //printf("Defval changing `%s'->`%s'\n",dstA->defval.data(),srcA->defval.data());
+ //printf("Defval changing '%s'->'%s'\n",dstA->defval.data(),srcA->defval.data());
dstA->defval=srcA->defval.copy();
}
@@ -3899,15 +3906,15 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
//printf("1. merging %s:%s <-> %s:%s\n",srcA->type.data(),srcA->name.data(),dstA->type.data(),dstA->name.data());
if (srcA->name.isEmpty() && !dstA->name.isEmpty())
{
- //printf("type: `%s':=`%s'\n",srcA->type.data(),dstA->type.data());
- //printf("name: `%s':=`%s'\n",srcA->name.data(),dstA->name.data());
+ //printf("type: '%s':='%s'\n",srcA->type.data(),dstA->type.data());
+ //printf("name: '%s':='%s'\n",srcA->name.data(),dstA->name.data());
srcA->type = dstA->type.copy();
srcA->name = dstA->name.copy();
}
else if (!srcA->name.isEmpty() && dstA->name.isEmpty())
{
- //printf("type: `%s':=`%s'\n",dstA->type.data(),srcA->type.data());
- //printf("name: `%s':=`%s'\n",dstA->name.data(),srcA->name.data());
+ //printf("type: '%s':='%s'\n",dstA->type.data(),srcA->type.data());
+ //printf("name: '%s':='%s'\n",dstA->name.data(),srcA->name.data());
dstA->type = srcA->type.copy();
dstA->name = dstA->name.copy();
}
@@ -3961,15 +3968,15 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
j2=dstA->type.length()-i2-2;
if (i1!=-1 && i2==-1 && srcA->type.right(j1)==dstA->type)
{
- //printf("type: `%s':=`%s'\n",dstA->type.data(),srcA->type.data());
- //printf("name: `%s':=`%s'\n",dstA->name.data(),srcA->name.data());
+ //printf("type: '%s':='%s'\n",dstA->type.data(),srcA->type.data());
+ //printf("name: '%s':='%s'\n",dstA->name.data(),srcA->name.data());
dstA->type = srcA->type.left(i1+2)+dstA->type;
dstA->name = dstA->name.copy();
}
else if (i1==-1 && i2!=-1 && dstA->type.right(j2)==srcA->type)
{
- //printf("type: `%s':=`%s'\n",srcA->type.data(),dstA->type.data());
- //printf("name: `%s':=`%s'\n",dstA->name.data(),srcA->name.data());
+ //printf("type: '%s':='%s'\n",srcA->type.data(),dstA->type.data());
+ //printf("name: '%s':='%s'\n",dstA->name.data(),srcA->name.data());
srcA->type = dstA->type.left(i2+2)+srcA->type;
srcA->name = dstA->name.copy();
}
@@ -3981,7 +3988,7 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
{
dstA->docs = srcA->docs.copy();
}
- //printf("Merge argument `%s|%s' `%s|%s'\n",
+ //printf("Merge argument '%s|%s' '%s|%s'\n",
// srcA->type.data(),srcA->name.data(),
// dstA->type.data(),dstA->name.data());
}
@@ -3995,7 +4002,7 @@ static void findMembersWithSpecificName(MemberName *mn,
const char *forceTagFile,
QList<MemberDef> &members)
{
- //printf(" Function with global scope name `%s' args=`%s'\n",
+ //printf(" Function with global scope name '%s' args='%s'\n",
// mn->memberName(),args);
MemberNameIterator mli(*mn);
const MemberDef *md = 0;
@@ -4003,7 +4010,7 @@ static void findMembersWithSpecificName(MemberName *mn,
{
const FileDef *fd=md->getFileDef();
const GroupDef *gd=md->getGroupDef();
- //printf(" md->name()=`%s' md->args=`%s' fd=%p gd=%p current=%p ref=%s\n",
+ //printf(" md->name()='%s' md->args='%s' fd=%p gd=%p current=%p ref=%s\n",
// md->name().data(),args,fd,gd,currentFile,md->getReference().data());
if (
((gd && gd->isLinkable()) || (fd && fd->isLinkable()) || md->isReference()) &&
@@ -4035,11 +4042,11 @@ static void findMembersWithSpecificName(MemberName *mn,
}
/*!
- * Searches for a member definition given its name `memberName' as a string.
+ * Searches for a member definition given its name 'memberName' as a string.
* memberName may also include a (partial) scope to indicate the scope
* in which the member is located.
*
- * The parameter `scName' is a string representing the name of the scope in
+ * The parameter 'scName' is a string representing the name of the scope in
* which the link was found.
*
* In case of a function args contains a string representation of the
@@ -4048,12 +4055,12 @@ static void findMembersWithSpecificName(MemberName *mn,
*
* The function returns TRUE if the member is known and documented or
* FALSE if it is not.
- * If TRUE is returned parameter `md' contains a pointer to the member
- * definition. Furthermore exactly one of the parameter `cd', `nd', or `fd'
+ * If TRUE is returned parameter 'md' contains a pointer to the member
+ * definition. Furthermore exactly one of the parameter 'cd', 'nd', or 'fd'
* will be non-zero:
- * - if `cd' is non zero, the member was found in a class pointed to by cd.
- * - if `nd' is non zero, the member was found in a namespace pointed to by nd.
- * - if `fd' is non zero, the member was found in the global namespace of
+ * - if 'cd' is non zero, the member was found in a class pointed to by cd.
+ * - if 'nd' is non zero, the member was found in a namespace pointed to by nd.
+ * - if 'fd' is non zero, the member was found in the global namespace of
* file fd.
*/
bool getDefs(const QCString &scName,
@@ -4108,7 +4115,7 @@ bool getDefs(const QCString &scName,
// handle special the case where both scope name and member scope are equal
if (mScope==scopeName) scopeName.resize(0);
- //printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data());
+ //printf("mScope='%s' mName='%s'\n",mScope.data(),mName.data());
MemberName *mn = Doxygen::memberNameSDict->find(mName);
//printf("mName=%s mn=%p\n",mName.data(),mn);
@@ -4130,8 +4137,8 @@ bool getDefs(const QCString &scName,
className=mScope;
}
- MemberDef *tmd=0;
- ClassDef *fcd=getResolvedClass(Doxygen::globalScope,0,className,&tmd);
+ const MemberDef *tmd=0;
+ const ClassDef *fcd=getResolvedClass(Doxygen::globalScope,0,className,&tmd);
if (fcd==0 && className.find('<')!=-1) // try without template specifiers as well
{
QCString nameWithoutTemplates = stripTemplateSpecifiersFromScope(className,FALSE);
@@ -4309,7 +4316,7 @@ bool getDefs(const QCString &scName,
// maybe an namespace, file or group member ?
- //printf("Testing for global symbol scopeName=`%s' mScope=`%s' :: mName=`%s'\n",
+ //printf("Testing for global symbol scopeName='%s' mScope='%s' :: mName='%s'\n",
// scopeName.data(),mScope.data(),mName.data());
if ((mn=Doxygen::functionNameSDict->find(mName))) // name is known
{
@@ -4333,7 +4340,7 @@ bool getDefs(const QCString &scName,
fnd->isLinkable()
)
{
- //printf("Symbol inside existing namespace `%s' count=%d\n",
+ //printf("Symbol inside existing namespace '%s' count=%d\n",
// namespaceName.data(),mn->count());
bool found=FALSE;
MemberNameIterator mmli(*mn);
@@ -4474,8 +4481,8 @@ bool getDefs(const QCString &scName,
MemberNameIterator mni(*mn);
for (mni.toLast();(md=mni.current());--mni)
{
- //printf("Found member `%s'\n",md->name().data());
- //printf("member is linkable md->name()=`%s'\n",md->name().data());
+ //printf("Found member '%s'\n",md->name().data());
+ //printf("member is linkable md->name()='%s'\n",md->name().data());
fd=md->getFileDef();
gd=md->getGroupDef();
const MemberDef *tmd = md->getEnumScope();
@@ -4548,7 +4555,7 @@ static bool getScopeDefs(const char *docScope,const char *scope,
cd=0;nd=0;
QCString scopeName=scope;
- //printf("getScopeDefs: docScope=`%s' scope=`%s'\n",docScope,scope);
+ //printf("getScopeDefs: docScope='%s' scope='%s'\n",docScope,scope);
if (scopeName.isEmpty()) return FALSE;
bool explicitGlobalScope=FALSE;
@@ -4557,6 +4564,10 @@ static bool getScopeDefs(const char *docScope,const char *scope,
scopeName=scopeName.right(scopeName.length()-2);
explicitGlobalScope=TRUE;
}
+ if (scopeName.isEmpty())
+ {
+ return FALSE;
+ }
QCString docScopeName=docScope;
int scopeOffset=explicitGlobalScope ? 0 : docScopeName.length();
@@ -4809,10 +4820,10 @@ QCString linkToText(SrcLangExt lang,const char *link,bool isFileName)
#if 0
/*
* generate a reference to a class, namespace or member.
- * `scName' is the name of the scope that contains the documentation
+ * 'scName' is the name of the scope that contains the documentation
* string that is returned.
- * `name' is the name that we want to link to.
- * `name' may have five formats:
+ * 'name' is the name that we want to link to.
+ * 'name' may have the following formats:
* 1) "ScopeName"
* 2) "memberName()" one of the (overloaded) function or define
* with name memberName.
@@ -4984,8 +4995,8 @@ bool resolveLink(/* in */ const char *scName,
//----------------------------------------------------------------------
// General function that generates the HTML code for a reference to some
-// file, class or member from text `lr' within the context of class `clName'.
-// This link has the text 'lt' (if not 0), otherwise `lr' is used as a
+// file, class or member from text 'lr' within the context of class 'clName'.
+// This link has the text 'lt' (if not 0), otherwise 'lr' is used as a
// basis for the link's text.
// returns TRUE if a link could be generated.
@@ -5330,7 +5341,7 @@ QCString substituteKeywords(const QCString &s,const char *title,
result = substitute(result,"$datetime",dateToString(TRUE));
result = substitute(result,"$date",dateToString(FALSE));
result = substitute(result,"$year",yearToString());
- result = substitute(result,"$doxygenversion",versionString);
+ result = substitute(result,"$doxygenversion",getVersion());
result = substitute(result,"$projectname",projName);
result = substitute(result,"$projectnumber",projNum);
result = substitute(result,"$projectbrief",projBrief);
@@ -5722,7 +5733,7 @@ done:
className=namespaceName.copy();
namespaceName.resize(0);
}
- //printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(),
+ //printf("extractNamespace '%s' => '%s|%s'\n",scopeName.data(),
// className.data(),namespaceName.data());
if (/*className.right(2)=="-g" ||*/ className.right(2)=="-p")
{
@@ -5743,7 +5754,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
((cd=getClass(scope.left(si)))==0 || cd->templateArguments()==0)
)
{
- //printf("Tried `%s'\n",(scope.left(si)+templ).data());
+ //printf("Tried '%s'\n",(scope.left(si)+templ).data());
pi=si+2;
}
if (si==-1) // not nested => append template specifier
@@ -5755,7 +5766,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
result=scope.left(si) + templ + scope.right(scope.length()-si);
}
}
- //printf("insertTemplateSpecifierInScope(`%s',`%s')=%s\n",
+ //printf("insertTemplateSpecifierInScope('%s','%s')=%s\n",
// scope.data(),templ.data(),result.data());
return result;
}
@@ -6361,7 +6372,7 @@ QCString normalizeNonTemplateArgumentsInString(
if (!found)
{
// try to resolve the type
- ClassDef *cd = getResolvedClass(context,0,n);
+ const ClassDef *cd = getResolvedClass(context,0,n);
if (cd)
{
result+=cd->name();
@@ -6675,7 +6686,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
{
// append documentation block to the page.
pd->setDocumentation(doc,fileName,startLine);
- //printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pd,name);
+ //printf("Adding page docs '%s' pi=%p name=%s\n",doc.data(),pd,name);
// append (x)refitems to the page.
pd->setRefItems(sli);
}
@@ -6699,7 +6710,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
pd->setFileName(tagInfo->fileName);
}
- //printf("Appending page `%s'\n",baseName.data());
+ //printf("Appending page '%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pd);
if (gd) gd->addPage(pd);
@@ -6734,7 +6745,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
{
si=new SectionInfo(
file,-1,pd->name(),pd->title(),SectionInfo::Page,0,pd->getReference());
- //printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n",
+ //printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->fileName.data());
//printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
@@ -7082,6 +7093,7 @@ QCString latexFilterURL(const char *s)
switch (c)
{
case '#': t << "\\#"; break;
+ case '%': t << "\\%"; break;
default:
t << c;
break;
@@ -7417,20 +7429,16 @@ void addCodeOnlyMappings()
SrcLangExt getLanguageFromFileName(const QCString& fileName)
{
- int i = fileName.findRev('.');
- if (i!=-1) // name has an extension
- {
- QCString extStr=fileName.right(fileName.length()-i).lower();
- if (!extStr.isEmpty()) // non-empty extension
+ QFileInfo fi(fileName);
+ QCString extName = fi.extension().lower().data();
+ if (extName.isEmpty()) extName=".no_extension";
+ if (extName.at(0)!='.') extName.prepend(".");
+ int *pVal=g_extLookup.find(extName.data());
+ if (pVal) // listed extension
{
- int *pVal=g_extLookup.find(extStr);
- if (pVal) // listed extension
- {
- //printf("getLanguageFromFileName(%s)=%x\n",extStr.data(),*pVal);
- return (SrcLangExt)*pVal;
- }
+ //printf("getLanguageFromFileName(%s)=%x\n",fi.extension().data(),*pVal);
+ return (SrcLangExt)*pVal;
}
- }
//printf("getLanguageFromFileName(%s) not found!\n",fileName.data());
return SrcLangExt_Cpp; // not listed => assume C-ish language.
}
@@ -8140,8 +8148,8 @@ QCString filterTitle(const QCString &title)
}
//----------------------------------------------------------------------------
-// returns TRUE if the name of the file represented by `fi' matches
-// one of the file patterns in the `patList' list.
+// returns TRUE if the name of the file represented by 'fi' matches
+// one of the file patterns in the 'patList' list.
bool patternMatch(const QFileInfo &fi,const QStrList *patList)
{
@@ -8175,7 +8183,7 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList)
re.match(fp)!=-1 ||
re.match(afp)!=-1;
if (found) break;
- //printf("Matching `%s' against pattern `%s' found=%d\n",
+ //printf("Matching '%s' against pattern '%s' found=%d\n",
// fi->fileName().data(),pattern.data(),found);
}
}
diff --git a/src/util.h b/src/util.h
index 81a3b0b..ad062d0 100644
--- a/src/util.h
+++ b/src/util.h
@@ -206,10 +206,10 @@ QCString resolveDefines(const char *n);
ClassDef *getClass(const char *key);
-ClassDef *getResolvedClass(const Definition *scope,
+const ClassDef *getResolvedClass(const Definition *scope,
const FileDef *fileScope,
const char *key,
- MemberDef **pTypeDef=0,
+ const MemberDef **pTypeDef=0,
QCString *pTemplSpec=0,
bool mayBeUnlinkable=FALSE,
bool mayBeHidden=FALSE,
@@ -397,10 +397,12 @@ MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fileScope,
const char *n);
bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const char *n);
-ClassDef *newResolveTypedef(const FileDef *fileScope,MemberDef *md,
- MemberDef **pMemType=0,QCString *pTemplSpec=0,
- QCString *pResolvedType=0,
- ArgumentList *actTemplParams=0);
+const ClassDef *newResolveTypedef(const FileDef *fileScope,
+ const MemberDef *md,
+ const MemberDef **pMemType=0,
+ QCString *pTemplSpec=0,
+ QCString *pResolvedType=0,
+ ArgumentList *actTemplParams=0);
QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
diff --git a/src/version.h b/src/version.h
deleted file mode 100644
index 16bf9df..0000000
--- a/src/version.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * 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
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#ifndef VERSION_H
-#define VERSION_H
-
-extern char versionString[];
-
-#endif
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 7c6cfa4..5f668c6 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -347,7 +347,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}// writeWord
-/*! write a code fragment `text' that may span multiple lines, inserting
+/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE,bool comment=FALSE)
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 4a312bd..aeed048 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -146,7 +146,7 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
oldEntry = 0;
VhdlParser::current=new Entry();
VhdlParser::initEntry(VhdlParser::current);
- groupEnterFile(fileName,yyLineNr);
+ Doxygen::docGroup.enterFile(fileName,yyLineNr);
vhdlFileName = fileName;
lineParse=new int[200]; // Dimitri: dangerous constant: should be bigger than largest token id in VhdlParserConstants.h
VhdlParserIF::parseVhdlfile(fileBuf,inLine);
@@ -193,7 +193,7 @@ void VhdlParser::initEntry(Entry *e)
e->fileName = yyFileName;
e->lang = SrcLangExt_VHDL;
isVhdlDocPending();
- initGroupInfo(e);
+ Doxygen::docGroup.initGroupInfo(e);
}
void VhdlParser::newEntry()
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 0f11315..a0afa9d 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -190,9 +190,15 @@ void XmlDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Strike:
if (s->enable()) m_t << "<strike>"; else m_t << "</strike>";
break;
+ case DocStyleChange::Del:
+ if (s->enable()) m_t << "<del>"; else m_t << "</del>";
+ break;
case DocStyleChange::Underline:
if (s->enable()) m_t << "<underline>"; else m_t << "</underline>";
break;
+ case DocStyleChange::Ins:
+ if (s->enable()) m_t << "<ins>"; else m_t << "</ins>";
+ break;
case DocStyleChange::Italic:
if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
break;
@@ -404,7 +410,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
void XmlDocVisitor::visit(DocIncOperator *op)
{
- //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
+ //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
@@ -423,7 +429,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -992,9 +998,9 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
{
QListIterator<DocNode> li(pl->paramTypes());
DocNode *type;
+ m_t << "<parametertype>";
for (li.toFirst();(type=li.current());++li)
{
- m_t << "<parametertype>";
if (type->kind()==DocNode::Kind_Word)
{
visit((DocWord*)type);
@@ -1003,8 +1009,13 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
{
visit((DocLinkedWord*)type);
}
- m_t << "</parametertype>" << endl;
+ else if (type->kind()==DocNode::Kind_Sep)
+ {
+ m_t << "</parametertype>" << endl;
+ m_t << "<parametertype>";
+ }
}
+ m_t << "</parametertype>" << endl;
}
m_t << "<parametername";
if (pl->direction()!=DocParamSect::Unspecified)
@@ -1080,18 +1091,6 @@ void XmlDocVisitor::visitPost(DocInternalRef *)
m_t << " ";
}
-void XmlDocVisitor::visitPre(DocCopy *c)
-{
- if (m_hide) return;
- m_t << "<copydoc link=\"" << convertToXML(c->link()) << "\">";
-}
-
-void XmlDocVisitor::visitPost(DocCopy *)
-{
- if (m_hide) return;
- m_t << "</copydoc>" << endl;
-}
-
void XmlDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h
index c2c6537..6fa1392 100644
--- a/src/xmldocvisitor.h
+++ b/src/xmldocvisitor.h
@@ -130,8 +130,6 @@ class XmlDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index b992b81..d05adf0 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -154,7 +154,7 @@ static void writeXMLHeader(FTextStream &t)
t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
- t << "version=\"" << versionString << "\">" << endl;
+ t << "version=\"" << getVersion() << "\">" << endl;
}
static void writeCombineScript()
@@ -568,7 +568,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
{
t << memberOutputFileBase(md);
}
- t << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ t << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
<< md->anchor();
t << "\" prot=\"";
switch(md->protection())
@@ -1981,7 +1981,7 @@ void generateXML()
t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
- t << "version=\"" << versionString << "\">" << endl;
+ t << "version=\"" << getVersion() << "\">" << endl;
{
ClassSDict::Iterator cli(*Doxygen::classSDict);