summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp2
-rw-r--r--src/commentcnv.l1
-rw-r--r--src/commentscan.l10
-rw-r--r--src/defargs.l12
-rw-r--r--src/definition.cpp7
-rw-r--r--src/docparser.cpp4
-rw-r--r--src/doctokenizer.l2
-rw-r--r--src/doxygen.cpp185
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/fortranscanner.l2
-rw-r--r--src/index.cpp2
-rw-r--r--src/latexdocvisitor.cpp21
-rw-r--r--src/latexgen.cpp6
-rw-r--r--src/mangen.cpp1
-rw-r--r--src/markdown.cpp10
-rw-r--r--src/memberdef.cpp10
-rw-r--r--src/memberlist.cpp2
-rw-r--r--src/message.cpp8
-rw-r--r--src/portable.cpp2
-rw-r--r--src/pre.l32
-rw-r--r--src/rtfgen.cpp4
-rw-r--r--src/scanner.l21
-rw-r--r--src/sqlite3gen.cpp15
-rw-r--r--src/tclscanner.l10
-rw-r--r--src/util.cpp10
25 files changed, 216 insertions, 165 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index d48efd0..95428d6 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -3714,7 +3714,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName,
ClassDef *templateClass=m_impl->templateInstances->find(templSpec);
if (templateClass==0)
{
- Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",name().data(),templSpec.data());
+ Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec));
QCString tcname = removeRedundantWhiteSpace(localName()+templSpec);
templateClass = new ClassDef(
fileName,startLine,startColumn,tcname,ClassDef::Class);
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 8c73ecb..979e6ee 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -1028,6 +1028,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
"Nesting level %d %s",g_nestingCount+1,tmp.data()); // add one for "normal" expected end of comment
}
g_commentStack.clear();
+ g_nestingCount = 0;
if (Debug::isFlagSet(Debug::CommentCnv))
{
g_outBuf->at(g_outBuf->curPos())='\0';
diff --git a/src/commentscan.l b/src/commentscan.l
index a85358c..54adbd8 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -2915,7 +2915,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
}
Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\n"
- "input=[\n%s]\n",fileName.data(),lineNr,comment.data()
+ "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(comment)
);
commentscanYYrestart( commentscanYYin );
@@ -2962,9 +2962,9 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
Debug::print(Debug::CommentScan,0,
"brief=[line=%d\n%s]\ndocs=[line=%d\n%s]\ninbody=[line=%d\n%s]\n===========\n",
- current->briefLine,current->brief.data(),
- current->docLine,current->doc.data(),
- current->inbodyLine,current->inbodyDocs.data()
+ current->briefLine,qPrint(current->brief),
+ current->docLine,qPrint(current->doc),
+ current->inbodyLine,qPrint(current->inbodyDocs)
);
checkFormula();
@@ -3114,7 +3114,7 @@ void closeGroup(Entry *e,const char *fileName,int,bool foundInline)
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
g_memberGroupDocs.resize(0);
- e->mGrpId=DOX_NOGROUP;
+ if (!foundInline) e->mGrpId=DOX_NOGROUP;
//printf("new group id=%d\n",g_memberGroupId);
}
else if (!g_autoGroupStack.isEmpty()) // end of auto group
diff --git a/src/defargs.l b/src/defargs.l
index 7b8248c..40a77fb 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -370,18 +370,18 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (a->type.left(6)=="const ") sv=6;
else if (a->type.left(9)=="volatile ") sv=9;
- if (a->type.mid(sv)=="struct" ||
- a->type.mid(sv)=="union" ||
- a->type.mid(sv)=="class" ||
- a->type.mid(sv)=="typename" ||
- a->type=="const" ||
+ if (a->type.mid(sv,6)=="struct" ||
+ a->type.mid(sv,5)=="union" ||
+ a->type.mid(sv,5)=="class" ||
+ a->type.mid(sv,8)=="typename" ||
+ a->type=="const" ||
a->type=="volatile"
)
{
a->type = a->type + " " + a->name;
a->name.resize(0);
}
- //printf(" --> a->type='%s'\n",a->type.data());
+ //printf(" --> a->type='%s' a->name='%s'\n",a->type.data(),a->name.data());
}
else // assume only the type was specified, try to determine name later
{
diff --git a/src/definition.cpp b/src/definition.cpp
index 1381ea5..457c6ea 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -741,7 +741,7 @@ bool readCodeFragment(const char *fileName,
else // use filter
{
QCString cmd=filter+" \""+fileName+"\"";
- Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data());
+ Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
f = portable_popen(cmd,"r");
}
bool found = lang==SrcLangExt_VHDL ||
@@ -868,7 +868,7 @@ bool readCodeFragment(const char *fileName,
{
portable_pclose(f);
Debug::print(Debug::FilterOutput, 0, "Filter output\n");
- Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",result.data());
+ Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",qPrint(result));
}
else
{
@@ -1667,7 +1667,8 @@ void Definition::writeToc(OutputList &ol)
}
cs[0]='0'+nextLevel;
if (inLi[nextLevel]) ol.writeString("</li>\n");
- ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:si->title)+"</a>");
+ QCString titleDoc = convertToHtml(si->title);
+ ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:titleDoc)+"</a>");
inLi[nextLevel]=TRUE;
level = nextLevel;
}
diff --git a/src/docparser.cpp b/src/docparser.cpp
index fa77784..7944bf7 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -519,8 +519,8 @@ static void checkUndocumentedParams()
}
else
{
- warn_doc_error(g_memberDef->docFile(),
- g_memberDef->docLine(),
+ warn_doc_error(g_memberDef->getDefFileName(),
+ g_memberDef->getDefLine(),
substitute(errMsg,"%","%%"));
}
}
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 3f2ad94..c642fc1 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -1035,7 +1035,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
<St_IntRef>{BLANK}+"\"" {
BEGIN(St_Ref2);
}
-<St_SetScope>{SCOPEMASK}{BLANK} {
+<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK} {
g_token->name = yytext;
g_token->name = g_token->name.stripWhiteSpace();
return TK_WORD;
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index fbad9d1..c3d2063 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1265,12 +1265,12 @@ static void addClassToContext(EntryNav *rootNav)
ClassDef *cd = getClass(qualifiedName);
Debug::print(Debug::Classes,0, " Found class with name %s (qualifiedName=%s -> cd=%p)\n",
- cd ? cd->name().data() : root->name.data(), qualifiedName.data(),cd);
+ cd ? qPrint(cd->name()) : qPrint(root->name), qPrint(qualifiedName),cd);
if (cd)
{
fullName=cd->name();
- Debug::print(Debug::Classes,0," Existing class %s!\n",cd->name().data());
+ Debug::print(Debug::Classes,0," Existing class %s!\n",qPrint(cd->name()));
//if (cd->templateArguments()==0)
//{
// //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
@@ -1341,7 +1341,7 @@ static void addClassToContext(EntryNav *rootNav)
cd=new ClassDef(tagInfo?tagName:root->fileName,root->startLine,root->startColumn,
fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum);
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p\n",
- fullName.data(),sec,root->tArgLists ? (int)root->tArgLists->count() : -1, tagInfo);
+ qPrint(fullName),sec,root->tArgLists ? (int)root->tArgLists->count() : -1, tagInfo);
cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->setLanguage(root->lang);
@@ -1353,7 +1353,7 @@ static void addClassToContext(EntryNav *rootNav)
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
//printf("class %s template args=%s\n",fullName.data(),
- // tArgList ? tempArgListToString(tArgList).data() : "<none>");
+ // tArgList ? tempArgListToString(tArgList,root->lang).data() : "<none>");
cd->setTemplateArguments(tArgList);
cd->setProtection(root->protection);
cd->setIsStatic(root->stat);
@@ -2056,7 +2056,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
if (usingCd==0) // definition not in the input => add an artificial class
{
Debug::print(Debug::Classes,0," New using class `%s' (sec=0x%08x)! #tArgLists=%d\n",
- name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
+ qPrint(name),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
usingCd = new ClassDef(
"<using>",1,1,
name,
@@ -2068,7 +2068,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
else
{
Debug::print(Debug::Classes,0," Found used class %s in scope=%s\n",
- usingCd->name().data(),nd?nd->name().data():fd->name().data());
+ qPrint(usingCd->name()),nd?qPrint(nd->name()):qPrint(fd->name()));
}
if (nd)
@@ -2249,13 +2249,13 @@ static MemberDef *addVariableToClass(
Debug::print(Debug::Variables,0,
" class variable:\n"
" `%s' `%s'::`%s' `%s' prot=`%d ann=%d init=`%s'\n",
- root->type.data(),
- qualScope.data(),
- name.data(),
- root->args.data(),
+ qPrint(root->type),
+ qPrint(qualScope),
+ qPrint(name),
+ qPrint(root->args),
root->protection,
fromAnnScope,
- root->initializer.data()
+ qPrint(root->initializer)
);
QCString def;
@@ -2416,10 +2416,10 @@ static MemberDef *addVariableToFile(
Debug::print(Debug::Variables,0,
" global variable:\n"
" type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d lang=%d\n",
- root->type.data(),
- scope.data(),
- name.data(),
- root->args.data(),
+ qPrint(root->type),
+ qPrint(scope),
+ qPrint(name),
+ qPrint(root->args),
root->protection,
mtype,
root->lang
@@ -2561,7 +2561,7 @@ static MemberDef *addVariableToFile(
{
Debug::print(Debug::Variables,0,
- " variable already found: scope=%s\n",md->getOuterScope()->name().data());
+ " variable already found: scope=%s\n",qPrint(md->getOuterScope()->name()));
addMemberDocs(rootNav,md,def,0,FALSE);
md->setRefItems(root->sli);
return md;
@@ -2577,7 +2577,7 @@ static MemberDef *addVariableToFile(
}
Debug::print(Debug::Variables,0,
- " new variable, nd=%s!\n",nd?nd->name().data():"<global>");
+ " new variable, nd=%s!\n",nd?qPrint(nd->name()):"<global>");
// new global variable, enum value or typedef
MemberDef *md=new MemberDef(
fileName,root->startLine,root->startColumn,
@@ -2804,12 +2804,12 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
Debug::print(Debug::Variables,0,
"VARIABLE_SEC: \n"
" type=`%s' name=`%s' args=`%s' bodyLine=`%d' mGrpId=%d relates=%s\n",
- root->type.data(),
- root->name.data(),
- root->args.data(),
+ qPrint(root->type),
+ qPrint(root->name),
+ qPrint(root->args),
root->bodyLine,
root->mGrpId,
- root->relates.data()
+ qPrint(root->relates)
);
//printf("root->parent->name=%s\n",root->parent->name.data());
@@ -3120,10 +3120,10 @@ static void addInterfaceOrServiceToServiceOrSingleton(
" Interface Member:\n"
" `%s' `%s' proto=%d\n"
" def=`%s'\n",
- root->type.data(),
- rname.data(),
+ qPrint(root->type),
+ qPrint(rname),
root->proto,
- def.data()
+ qPrint(def)
);
// add member to the global list of all members
@@ -3166,20 +3166,20 @@ static void buildInterfaceAndServiceList(EntryNav *const rootNav)
Debug::print(Debug::Functions,0,
"EXPORTED_INTERFACE_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' relatesType=`%d' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d spec=%lld proto=%d docFile=%s\n",
- root->type.data(),
- rootNav->parent()->name().data(),
- root->name.data(),
- root->args.data(),
- root->relates.data(),
+ qPrint(root->type),
+ qPrint(rootNav->parent()->name()),
+ qPrint(root->name),
+ qPrint(root->args),
+ qPrint(root->relates),
root->relatesType,
- root->fileName.data(),
+ qPrint(root->fileName),
root->startLine,
root->bodyLine,
root->tArgLists ? (int)root->tArgLists->count() : -1,
root->mGrpId,
root->spec,
root->proto,
- root->docFile.data()
+ qPrint(root->docFile)
);
QCString const rname = removeRedundantWhiteSpace(root->name);
@@ -3372,12 +3372,12 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
" Func Member:\n"
" `%s' `%s'::`%s' `%s' proto=%d\n"
" def=`%s'\n",
- root->type.data(),
- qualScope.data(),
- rname.data(),
- root->args.data(),
+ qPrint(root->type),
+ qPrint(qualScope),
+ qPrint(rname),
+ qPrint(root->args),
root->proto,
- def.data()
+ qPrint(def)
);
// add member to the global list of all members
@@ -3415,20 +3415,20 @@ static void buildFunctionList(EntryNav *rootNav)
Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' relatesType=`%d' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d spec=%lld proto=%d docFile=%s\n",
- root->type.data(),
- rootNav->parent()->name().data(),
- root->name.data(),
- root->args.data(),
- root->relates.data(),
+ qPrint(root->type),
+ qPrint(rootNav->parent()->name()),
+ qPrint(root->name),
+ qPrint(root->args),
+ qPrint(root->relates),
root->relatesType,
- root->fileName.data(),
+ qPrint(root->fileName),
root->startLine,
root->bodyLine,
root->tArgLists ? (int)root->tArgLists->count() : -1,
root->mGrpId,
root->spec,
root->proto,
- root->docFile.data()
+ qPrint(root->docFile)
);
bool isFriend=root->type.find("friend ")!=-1;
@@ -3498,7 +3498,7 @@ static void buildFunctionList(EntryNav *rootNav)
)
{
Debug::print(Debug::Functions,0," --> member %s of class %s!\n",
- rname.data(),cd->name().data());
+ qPrint(rname),qPrint(cd->name()));
addMethodToClass(rootNav,cd,rname,isFriend);
}
else if (!((rootNav->parent()->section() & Entry::COMPOUND_MASK)
@@ -3519,7 +3519,7 @@ static void buildFunctionList(EntryNav *rootNav)
MemberDef *md=0;
if ((mn=Doxygen::functionNameSDict->find(rname)))
{
- Debug::print(Debug::Functions,0," --> function %s already found!\n",rname.data());
+ Debug::print(Debug::Functions,0," --> function %s already found!\n",qPrint(rname));
MemberNameIterator mni(*mn);
for (mni.toFirst();(!found && (md=mni.current()));++mni)
{
@@ -3662,7 +3662,7 @@ static void buildFunctionList(EntryNav *rootNav)
}
if (!found) /* global function is unique with respect to the file */
{
- Debug::print(Debug::Functions,0," --> new function %s found!\n",rname.data());
+ Debug::print(Debug::Functions,0," --> new function %s found!\n",qPrint(rname));
//printf("New function type=`%s' name=`%s' args=`%s' bodyLine=%d\n",
// root->type.data(),rname.data(),root->args.data(),root->bodyLine);
@@ -3743,12 +3743,12 @@ static void buildFunctionList(EntryNav *rootNav)
" Global Function:\n"
" `%s' `%s'::`%s' `%s' proto=%d\n"
" def=`%s'\n",
- root->type.data(),
- rootNav->parent()->name().data(),
- rname.data(),
- root->args.data(),
+ qPrint(root->type),
+ qPrint(rootNav->parent()->name()),
+ qPrint(rname),
+ qPrint(root->args),
root->proto,
- def.data()
+ qPrint(def)
);
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
@@ -3811,7 +3811,7 @@ static void buildFunctionList(EntryNav *rootNav)
}
else
{
- Debug::print(Debug::Functions,0," --> %s not processed!\n",rname.data());
+ Debug::print(Debug::Functions,0," --> %s not processed!\n",qPrint(rname));
}
}
else if (rname.isEmpty())
@@ -4250,7 +4250,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
if (arg->name==usedName) // type is a template argument
{
found=TRUE;
- Debug::print(Debug::Classes,0," New used class `%s'\n", usedName.data());
+ Debug::print(Debug::Classes,0," New used class `%s'\n", qPrint(usedName));
ClassDef *usedCd = Doxygen::hiddenClasses->find(usedName);
if (usedCd==0)
@@ -4267,7 +4267,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
Doxygen::hiddenClasses->append(usedName,usedCd);
}
if (isArtificial) usedCd->setArtificial(TRUE);
- Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", usedCd->name().data());
+ Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", qPrint(usedCd->name()));
instanceCd->addUsedClass(usedCd,md->name(),md->protection());
usedCd->addUsedByClass(instanceCd,md->name(),md->protection());
}
@@ -4283,7 +4283,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
if (usedCd)
{
found=TRUE;
- Debug::print(Debug::Classes,0," Adding used class `%s' (2)\n", usedCd->name().data());
+ Debug::print(Debug::Classes,0," Adding used class `%s' (2)\n", qPrint(usedCd->name()));
instanceCd->addUsedClass(usedCd,md->name(),md->protection()); // class exists
usedCd->addUsedByClass(instanceCd,md->name(),md->protection());
}
@@ -4303,7 +4303,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
{
type+=md->argsString();
}
- Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", type.data());
+ Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", qPrint(type));
usedCd = new ClassDef(
masterCd->getDefFileName(),masterCd->getDefLine(),
masterCd->getDefColumn(),
@@ -4315,7 +4315,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
if (usedCd)
{
if (isArtificial) usedCd->setArtificial(TRUE);
- Debug::print(Debug::Classes,0," Adding used class `%s' (3)\n", usedCd->name().data());
+ Debug::print(Debug::Classes,0," Adding used class `%s' (3)\n", qPrint(usedCd->name()));
instanceCd->addUsedClass(usedCd,md->name(),md->protection());
usedCd->addUsedByClass(instanceCd,md->name(),md->protection());
}
@@ -4401,7 +4401,7 @@ static bool findTemplateInstanceRelation(Entry *root,
bool isArtificial)
{
Debug::print(Debug::Classes,0," derived from template %s with parameters %s\n",
- templateClass->name().data(),templSpec.data());
+ qPrint(templateClass->name()),qPrint(templSpec));
//printf("findTemplateInstanceRelation(base=%s templSpec=%s templateNames=",
// templateClass->name().data(),templSpec.data());
//if (templateNames)
@@ -4428,7 +4428,7 @@ static bool findTemplateInstanceRelation(Entry *root,
if (freshInstance)
{
- Debug::print(Debug::Classes,0," found fresh instance '%s'!\n",instanceClass->name().data());
+ Debug::print(Debug::Classes,0," found fresh instance '%s'!\n",qPrint(instanceClass->name()));
Doxygen::classSDict->append(instanceClass->name(),instanceClass);
instanceClass->setTemplateBaseClassNames(templateNames);
@@ -4448,7 +4448,7 @@ static bool findTemplateInstanceRelation(Entry *root,
}
Debug::print(Debug::Classes,0," template root found %s templSpec=%s!\n",
- templateRoot->name.data(),templSpec.data());
+ qPrint(templateRoot->name),qPrint(templSpec));
ArgumentList *templArgs = new ArgumentList;
stringToArgumentList(templSpec,templArgs);
findBaseClassesForClass(templateRootNav,context,templateClass,instanceClass,
@@ -4658,11 +4658,11 @@ static bool findClassRelation(
{
Debug::print(
Debug::Classes,0," class relation %s inherited/used by %s found (%s and %s) templSpec='%s'\n",
- baseClassName.data(),
- rootNav->name().data(),
+ qPrint(baseClassName),
+ qPrint(rootNav->name()),
(bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"),
(bi->virt==Normal)?"normal":"virtual",
- templSpec.data()
+ qPrint(templSpec)
);
int i=baseClassName.find('<');
@@ -4768,7 +4768,7 @@ static bool findClassRelation(
//printf("3. found=%d\n",found);
if (found)
{
- Debug::print(Debug::Classes,0," Documented base class `%s' templSpec=%s\n",biName.data(),templSpec.isEmpty()?"":templSpec.data());
+ Debug::print(Debug::Classes,0," Documented base class `%s' templSpec=%s\n",qPrint(biName),qPrint(templSpec));
// add base class to this class
// if templSpec is not empty then we should "instantiate"
@@ -4824,7 +4824,7 @@ static bool findClassRelation(
{
Debug::print(Debug::Classes,0,
" New undocumented base class `%s' baseClassName=%s templSpec=%s isArtificial=%d\n",
- biName.data(),baseClassName.data(),templSpec.data(),isArtificial
+ qPrint(biName),qPrint(baseClassName),qPrint(templSpec),isArtificial
);
baseClass=0;
if (isATemplateArgument)
@@ -4883,7 +4883,7 @@ static bool findClassRelation(
}
else
{
- Debug::print(Debug::Classes,0," Base class `%s' not found\n",biName.data());
+ Debug::print(Debug::Classes,0," Base class `%s' not found\n",qPrint(biName));
}
}
else
@@ -4992,7 +4992,7 @@ static void findInheritedTemplateInstances()
{
ClassDef *cd;
QCString bName = extractClassName(rootNav);
- Debug::print(Debug::Classes,0," Inheritance: Class %s : \n",bName.data());
+ Debug::print(Debug::Classes,0," Inheritance: Class %s : \n",qPrint(bName));
if ((cd=getClass(bName)))
{
rootNav->loadEntry(g_storage);
@@ -5013,7 +5013,7 @@ static void findUsedTemplateInstances()
{
ClassDef *cd;
QCString bName = extractClassName(rootNav);
- Debug::print(Debug::Classes,0," Usage: Class %s : \n",bName.data());
+ Debug::print(Debug::Classes,0," Usage: Class %s : \n",qPrint(bName));
if ((cd=getClass(bName)))
{
rootNav->loadEntry(g_storage);
@@ -5037,7 +5037,7 @@ static void computeClassRelations()
rootNav->loadEntry(g_storage);
Entry *root = rootNav->entry();
QCString bName = extractClassName(rootNav);
- Debug::print(Debug::Classes,0," Relations: Class %s : \n",bName.data());
+ Debug::print(Debug::Classes,0," Relations: Class %s : \n",qPrint(bName));
if ((cd=getClass(bName)))
{
findBaseClassesForClass(rootNav,cd,cd,cd,DocumentedOnly,FALSE);
@@ -5079,12 +5079,12 @@ static void computeTemplateClassRelations()
QDict<ClassDef> *templInstances = 0;
if (cd && (templInstances=cd->getTemplateInstances()))
{
- Debug::print(Debug::Classes,0," Template class %s : \n",cd->name().data());
+ Debug::print(Debug::Classes,0," Template class %s : \n",qPrint(cd->name()));
QDictIterator<ClassDef> tdi(*templInstances);
ClassDef *tcd;
for (tdi.toFirst();(tcd=tdi.current());++tdi) // for each template instance
{
- Debug::print(Debug::Classes,0," Template instance %s : \n",tcd->name().data());
+ Debug::print(Debug::Classes,0," Template instance %s : \n",qPrint(tcd->name()));
QCString templSpec = tdi.currentKey();
ArgumentList *templArgs = new ArgumentList;
stringToArgumentList(templSpec,templArgs);
@@ -5453,7 +5453,7 @@ static bool findGlobalMember(EntryNav *rootNav,
Entry *root = rootNav->entry();
Debug::print(Debug::FindMembers,0,
"2. findGlobalMember(namespace=%s,type=%s,name=%s,tempArg=%s,decl=%s)\n",
- namespaceName.data(),type,name,tempArg,decl);
+ qPrint(namespaceName),qPrint(type),qPrint(name),qPrint(tempArg),qPrint(decl));
QCString n=name;
if (n.isEmpty()) return FALSE;
if (n.find("::")!=-1) return FALSE; // skip undefined class members
@@ -5492,7 +5492,7 @@ static bool findGlobalMember(EntryNav *rootNav,
)
{
Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n",
- md->name().data(),namespaceName.data());
+ qPrint(md->name()),qPrint(namespaceName));
NamespaceDef *rnd = 0;
if (!namespaceName.isEmpty()) rnd = Doxygen::namespaceSDict->find(namespaceName);
@@ -5772,7 +5772,7 @@ static void findMember(EntryNav *rootNav,
"findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,"
"isFunc=%d mGrpId=%d tArgList=%p (#=%d) "
"spec=%lld lang=%x\n",
- root,funcDecl.data(),root->relates.data(),overloaded,isFunc,root->mGrpId,
+ root,qPrint(funcDecl),qPrint(root->relates),overloaded,isFunc,root->mGrpId,
root->tArgLists,root->tArgLists ? root->tArgLists->count() : 0,
root->spec,root->lang
);
@@ -6060,9 +6060,9 @@ static void findMember(EntryNav *rootNav,
" isMemberOf=%d\n"
" isFriend=%d\n"
" isFunc=%d\n\n",
- namespaceName.data(),className.data(),
- funcType.data(),funcSpec.data(),funcName.data(),funcArgs.data(),funcTempList.data(),
- funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isMemberOf,isFriend,
+ qPrint(namespaceName),qPrint(className),
+ qPrint(funcType),qPrint(funcSpec),qPrint(funcName),qPrint(funcArgs),qPrint(funcTempList),
+ qPrint(funcDecl),qPrint(root->relates),qPrint(exceptions),isRelated,isMemberOf,isFriend,
isFunc
);
@@ -6102,9 +6102,9 @@ static void findMember(EntryNav *rootNav,
Debug::print(Debug::FindMembers,0,
"3. member definition found, "
"scope needed=`%s' scope=`%s' args=`%s' fileName=%s\n",
- scopeName.data(),cd ? cd->name().data() : "<none>",
- md->argsString(),
- root->fileName.data());
+ qPrint(scopeName),cd ? qPrint(cd->name()) : "<none>",
+ qPrint(md->argsString()),
+ qPrint(root->fileName));
//printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data());
FileDef *fd=rootNav->fileDef();
NamespaceDef *nd=0;
@@ -6171,8 +6171,8 @@ static void findMember(EntryNav *rootNav,
Debug::print(Debug::FindMembers,0,
"5. matching `%s'<=>`%s' className=%s namespaceName=%s\n",
- argListToString(argList,TRUE).data(),argListToString(root->argList,TRUE).data(),
- className.data(),namespaceName.data()
+ qPrint(argListToString(argList,TRUE)),qPrint(argListToString(root->argList,TRUE)),
+ qPrint(className),qPrint(namespaceName)
);
bool matching=
@@ -6197,7 +6197,7 @@ static void findMember(EntryNav *rootNav,
className+"::",""); // see bug700693 & bug732594
Debug::print(Debug::FindMembers,0,
"5b. Comparing return types '%s'<->'%s' #args %d<->%d\n",
- md->typeString(),funcType.data(),
+ qPrint(md->typeString()),qPrint(funcType),
md->templateArguments()->count(),root->tArgLists->getLast()->count());
if (md->templateArguments()->count()!=root->tArgLists->getLast()->count() ||
qstrcmp(memType,funcType))
@@ -6298,7 +6298,7 @@ static void findMember(EntryNav *rootNav,
umd = emd = cmd;
Debug::print(Debug::FindMembers,0,
"7. new candidate className=%s scope=%s args=%s exact match\n",
- className.data(),ccd->name().data(),md->argsString());
+ qPrint(className),qPrint(ccd->name()),qPrint(md->argsString()));
}
else // arguments do not match, but member name and scope do -> remember
{
@@ -6306,7 +6306,7 @@ static void findMember(EntryNav *rootNav,
umd = cmd;
Debug::print(Debug::FindMembers,0,
"7. new candidate className=%s scope=%s args=%s no match\n",
- className.data(),ccd->name().data(),md->argsString());
+ qPrint(className),qPrint(ccd->name()),qPrint(md->argsString()));
}
candidates++;
}
@@ -6427,6 +6427,7 @@ static void findMember(EntryNav *rootNav,
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
md->setDocumentation(root->doc,root->docFile,root->docLine);
+ md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
md->setDocsForDefinition(!root->proto);
md->setPrototype(root->proto);
@@ -6494,6 +6495,7 @@ static void findMember(EntryNav *rootNav,
doc+="<p>";
doc+=root->doc;
md->setDocumentation(doc,root->docFile,root->docLine);
+ md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
md->setDocsForDefinition(!root->proto);
md->setPrototype(root->proto);
@@ -6525,7 +6527,7 @@ static void findMember(EntryNav *rootNav,
else if (isRelated && !root->relates.isEmpty())
{
Debug::print(Debug::FindMembers,0,"2. related function\n"
- " scopeName=%s className=%s\n",scopeName.data(),className.data());
+ " scopeName=%s className=%s\n",qPrint(scopeName),qPrint(className));
if (className.isEmpty()) className=root->relates;
ClassDef *cd;
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
@@ -6750,7 +6752,7 @@ localObjCMethod:
if (Config_getBool("EXTRACT_LOCAL_METHODS") && (cd=getClass(scopeName)))
{
Debug::print(Debug::FindMembers,0,"4. Local objective C method %s\n"
- " scopeName=%s className=%s\n",root->name.data(),scopeName.data(),className.data());
+ " scopeName=%s className=%s\n",qPrint(root->name),qPrint(scopeName),qPrint(className));
//printf("Local objective C method `%s' of class `%s' found\n",root->name.data(),cd->name().data());
MemberDef *md=new MemberDef(
root->fileName,root->startLine,root->startColumn,
@@ -6832,7 +6834,7 @@ static void filterMemberDocumentation(EntryNav *rootNav)
int i=-1,l;
Debug::print(Debug::FindMembers,0,
"findMemberDocumentation(): root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->spec=%lld root->mGrpId=%d\n",
- root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->spec,root->mGrpId
+ qPrint(root->type),qPrint(root->inside),qPrint(root->name),qPrint(root->args),root->section,root->spec,root->mGrpId
);
//printf("rootNav->parent()->name()=%s\n",rootNav->parent()->name().data());
bool isFunc=TRUE;
@@ -8726,9 +8728,8 @@ static void findMainPage(EntryNav *rootNav)
{
Entry *root = rootNav->entry();
warn(root->fileName,root->startLine,
- "found more than one \\mainpage comment block! Skipping this "
- "block."
- );
+ "found more than one \\mainpage comment block! (first occurrence: %s, line %d), Skipping current block!",
+ Doxygen::mainPage->docFile().data(),Doxygen::mainPage->docLine());
}
rootNav->releaseEntry();
@@ -11673,7 +11674,7 @@ void generateOutput()
QString oldDir = QDir::currentDirPath();
QDir::setCurrent(Config_getString("HTML_OUTPUT"));
portable_sysTimerStart();
- if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", FALSE))
+ if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", Debug::isFlagSet(Debug::ExtCmd)))
{
err("failed to run html help compiler on index.hhp\n");
}
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 1fee7bb..d6e49a2 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1741,7 +1741,7 @@ void FileDef::acquireFileVersion()
{
msg("Version of %s : ",m_filePath.data());
QCString cmd = vercmd+" \""+m_filePath+"\"";
- Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data());
+ Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
FILE *f=portable_popen(cmd,"r");
if (!f)
{
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 1cfa13d..094bfb1 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -485,7 +485,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<InterfaceBody>^{BS}end{BS}interface({BS_}{ID})? {
// end scope only if GENERIC interface
- last_entry->parent()->endBodyLine = yyLineNr - 1;
+ if (ifType == IF_GENERIC)last_entry->parent()->endBodyLine = yyLineNr - 1;
if (ifType == IF_GENERIC && !endScope(current_root))
yyterminate();
diff --git a/src/index.cpp b/src/index.cpp
index 2cb7de2..e7ba8e7 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -4140,7 +4140,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
case LayoutNavEntry::Classes:
if (annotatedClasses>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,"annotated",0);
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 0699960..37c2130 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -1578,22 +1578,11 @@ void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const Q
{
if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) // internal PDF link
{
- if (ref.isEmpty()) {
- m_t << "\\hyperlink{";
- if (!file.isEmpty()) m_t << stripPath(file);
- if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
- if (!anchor.isEmpty()) m_t << anchor;
- m_t << "}{";
- }
- else
- {
- QCString *dest;
- m_t << "\\href{";
- if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/";
- if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension;
- if (!anchor.isEmpty()) m_t << "#" << anchor;
- m_t << "}{";
- }
+ m_t << "\\hyperlink{";
+ if (!file.isEmpty()) m_t << stripPath(file);
+ if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
+ if (!anchor.isEmpty()) m_t << anchor;
+ m_t << "}{";
}
else if (ref.isEmpty()) // internal non-PDF link
{
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 1e2589e..042dd7c 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1444,18 +1444,18 @@ void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
void LatexGenerator::writeAnchor(const char *fName,const char *name)
{
//printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
- t << "\\label{" << name << "}" << endl;
+ t << "\\label{" << stripPath(name) << "}" << endl;
static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
if (usePDFLatex && pdfHyperlinks)
{
if (fName)
{
- t << "\\hypertarget{" << stripPath(fName) << "_" << name << "}{}" << endl;
+ t << "\\hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}{}" << endl;
}
else
{
- t << "\\hypertarget{" << name << "}{}" << endl;
+ t << "\\hypertarget{" << stripPath(name) << "}{}" << endl;
}
}
}
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 77aa07d..a88ac26 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -306,6 +306,7 @@ void ManGenerator::docify(const char *str)
{
switch(c)
{
+ case '-': t << "\\-"; break; // see bug747780
case '.': t << "\\&."; break; // see bug652277
case '\\': t << "\\\\"; col++; break;
case '\n': t << "\n"; col=0; break;
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 5ecb198..02d1416 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1366,7 +1366,9 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent,
int startTildes=0;
while (i<size && data[i]==' ') indent++,i++;
if (indent>=refIndent+4) return FALSE; // part of code block
- while (i<size && data[i]=='~') startTildes++,i++;
+ char tildaChar='~';
+ if (i<size && data[i]=='`') tildaChar='`';
+ while (i<size && data[i]==tildaChar) startTildes++,i++;
if (startTildes<3) return FALSE; // not enough tildes
if (i<size && data[i]=='{') i++; // skip over optional {
int startLang=i;
@@ -1376,11 +1378,11 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent,
start=i;
while (i<size)
{
- if (data[i]=='~')
+ if (data[i]==tildaChar)
{
end=i-1;
int endTildes=0;
- while (i<size && data[i]=='~') endTildes++,i++;
+ while (i<size && data[i]==tildaChar) endTildes++,i++;
while (i<size && data[i]==' ') i++;
if (i==size || data[i]=='\n')
{
@@ -2316,7 +2318,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons
// finally process the inline markup (links, emphasis and code spans)
processInline(out,s,s.length());
out.addChar(0);
- Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",input.data(),out.get());
+ Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",qPrint(input),qPrint(out.get()));
return out.get();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index f27a579..23c171a 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -2591,6 +2591,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ldef=ldef.mid(2);
}
}
+ else if (isFunction())
+ {
+ title+=argsString();
+ }
int i=0,l;
static QRegExp r("@[0-9]+");
@@ -2991,13 +2995,13 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if (!hasDocumentedParams())
{
- warn_doc_error(docFile(),docLine(),
+ warn_doc_error(getDefFileName(),getDefLine(),
"parameters of member %s are not (all) documented",
qPrint(qualifiedName()));
}
if (!hasDocumentedReturnType() && isFunction() && hasDocumentation())
{
- warn_doc_error(docFile(),docLine(),
+ warn_doc_error(getDefFileName(),getDefLine(),
"return type of member %s is not documented",
qPrint(qualifiedName()));
}
@@ -3230,7 +3234,7 @@ void MemberDef::warnIfUndocumented()
!isReference()
)
{
- warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
+ warn_undoc(d->getDefFileName(),d->getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),t,qPrint(d->name()));
}
}
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index fae285f..64fe44a 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -409,7 +409,6 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{
ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor());
}
- ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
DocRoot *rootNode = validatingParseDoc(
@@ -437,6 +436,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
delete rootNode;
}
ol.endMemberDeclaration(md->anchor(),inheritId);
+ ol.endMemberItem();
}
md->warnIfUndocumented();
break;
diff --git a/src/message.cpp b/src/message.cpp
index df0a2dc..8f89c11 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -238,15 +238,15 @@ void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
if (dbg)
{
if (fileName)
- fprintf(stderr,"--%s lexical analyzer: %s (for: %s)\n",enter_txt, lexName, fileName);
+ fprintf(stderr,"--%s lexical analyzer: %s (for: %s)\n",enter_txt, qPrint(lexName), qPrint(fileName));
else
- fprintf(stderr,"--%s lexical analyzer: %s\n",enter_txt, lexName);
+ fprintf(stderr,"--%s lexical analyzer: %s\n",enter_txt, qPrint(lexName));
}
else
{
if (fileName)
- Debug::print(Debug::Lex,0,"%s lexical analyzer: %s (for: %s)\n",enter_txt_uc, lexName, fileName);
+ Debug::print(Debug::Lex,0,"%s lexical analyzer: %s (for: %s)\n",enter_txt_uc, qPrint(lexName), qPrint(fileName));
else
- Debug::print(Debug::Lex,0,"%s lexical analyzer: %s\n",enter_txt_uc, lexName);
+ Debug::print(Debug::Lex,0,"%s lexical analyzer: %s\n",enter_txt_uc, qPrint(lexName));
}
}
diff --git a/src/portable.cpp b/src/portable.cpp
index ff29303..5886793 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -45,7 +45,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
fullCmd += " ";
fullCmd += args;
#ifndef NODEBUG
- Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",fullCmd.data());
+ Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",qPrint(fullCmd));
#endif
#if !defined(_WIN32) || defined(__CYGWIN__)
diff --git a/src/pre.l b/src/pre.l
index 7c2ec2b..e56b8ab 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1618,11 +1618,11 @@ static void readIncludeFile(const QCString &inc)
{
if (alreadyIncluded)
{
- Debug::print(Debug::Preprocessor,0,"#include %s: already included! skipping...\n",incFileName.data());
+ Debug::print(Debug::Preprocessor,0,"#include %s: already included! skipping...\n",qPrint(incFileName));
}
else
{
- Debug::print(Debug::Preprocessor,0,"#include %s: not found! skipping...\n",incFileName.data());
+ Debug::print(Debug::Preprocessor,0,"#include %s: not found! skipping...\n",qPrint(incFileName));
}
//printf("error: include file %s not found\n",yytext);
}
@@ -2452,7 +2452,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
outputArray(yytext,(int)yyleng);
}
-<SkipCComment>"~~~"[~]* {
+<SkipCComment>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
+ static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ if (!markdownSupport)
+ {
+ REJECT;
+ }
+ else
+ {
+ outputArray(yytext,(int)yyleng);
+ g_fenceSize=yyleng;
+ BEGIN(SkipVerbatim);
+ }
+ }
+<SkipCComment>^({B}*"*"+)?{B}{0,3}"```"[`]* {
static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
if (!markdownSupport)
{
@@ -2599,7 +2612,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipCComment);
}
}
-<SkipVerbatim>"~~~"[~]* {
+<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
+ outputArray(yytext,(int)yyleng);
+ if (g_fenceSize==yyleng)
+ {
+ BEGIN(SkipCComment);
+ }
+ }
+<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"```"[`]* {
outputArray(yytext,(int)yyleng);
if (g_fenceSize==yyleng)
{
@@ -2609,7 +2629,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipVerbatim>"*/"|"/*" {
outputArray(yytext,(int)yyleng);
}
-<SkipCComment,SkipVerbatim>[^*\\@\x06~\n\/]+ {
+<SkipCComment,SkipVerbatim>[^*\\@\x06~`\n\/]+ {
outputArray(yytext,(int)yyleng);
}
<SkipCComment,SkipVerbatim>\n {
@@ -3179,7 +3199,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
Define *def;
for (di.toFirst();(def=di.current());++di)
{
- Debug::print(Debug::Preprocessor,0,"%s ",def->name.data());
+ Debug::print(Debug::Preprocessor,0,"%s ",qPrint(def->name));
}
Debug::print(Debug::Preprocessor,0,"\n---------\n");
}
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 15c421a..7baaa3c 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -95,7 +95,7 @@ RTFGenerator::~RTFGenerator()
void RTFGenerator::writeStyleSheetFile(QFile &file)
{
- QTextStream t(&file);
+ FTextStream t(&file);
t << "# Generated by doxygen " << versionString << "\n\n";
t << "# This file describes styles used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
@@ -112,7 +112,7 @@ void RTFGenerator::writeStyleSheetFile(QFile &file)
void RTFGenerator::writeExtensionsFile(QFile &file)
{
- QTextStream t(&file);
+ FTextStream t(&file);
t << "# Generated by doxygen " << versionString << "\n\n";
t << "# This file describes extensions used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
diff --git a/src/scanner.l b/src/scanner.l
index 2e111cb..9529c34 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -2805,7 +2805,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}".*|"/*"([!*]?){B}*{CMD}"}"[^*]*"*/" {
- closeGroup(current,yyFileName,yyLineNr);
+ bool insideEnum = YY_START==FindFields || (YY_START==ReadInitializer && lastInitializerContext==FindFields); // see bug746226
+ closeGroup(current,yyFileName,yyLineNr,insideEnum);
}
<FindMembers>"=" { // in PHP code this could also be due to "<?="
current->bodyLine = yyLineNr;
@@ -6264,13 +6265,20 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
g_nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
-<DocBlock>"~~~"[~]* {
+<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
docBlock+=yytext;
docBlockName="~~~";
g_fencedSize=yyleng;
g_nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
+<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
+ docBlock+=yytext;
+ docBlockName="```";
+ g_fencedSize=yyleng;
+ g_nestedComment=FALSE;
+ BEGIN(DocCopyBlock);
+ }
<DocBlock>{B}*"<code>" {
if (insideCS)
{
@@ -6382,7 +6390,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
REJECT;
}
}
-<DocCopyBlock>"~~~"[~]* {
+<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
+ docBlock+=yytext;
+ if (g_fencedSize==yyleng)
+ {
+ BEGIN(DocBlock);
+ }
+ }
+<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
docBlock+=yytext;
if (g_fencedSize==yyleng)
{
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index acd3995..40d744a 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -754,7 +754,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
bindIntParameter(memberdef_insert,":new",md->isNew());
bindIntParameter(memberdef_insert,":optional",md->isOptional());
bindIntParameter(memberdef_insert,":required",md->isRequired());
-
+
bindIntParameter(memberdef_insert,":virt",md->virtualness());
}
// place in the arguments and linkify the arguments
@@ -1027,9 +1027,16 @@ static void generateSqlite3ForClass(sqlite3 *db, ClassDef *cd)
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
- bindTextParameter(derivedcompoundref_insert,":base",cd->displayName());
- bindTextParameter(derivedcompoundref_insert,":dervied",bcd->classDef->displayName());
- bindTextParameter(derivedcompoundref_insert,":refid",bcd->classDef->getOutputFileBase());
+ bindTextParameter(derivedcompoundref_insert,":base",cd->displayName(),FALSE);
+ if (!bcd->templSpecifiers.isEmpty())
+ {
+ bindTextParameter(derivedcompoundref_insert,":derived",insertTemplateSpecifierInScope(bcd->classDef->name(),bcd->templSpecifiers),FALSE);
+ }
+ else
+ {
+ bindTextParameter(derivedcompoundref_insert,":derived",bcd->classDef->displayName(),FALSE);
+ }
+ bindTextParameter(derivedcompoundref_insert,":refid",bcd->classDef->getOutputFileBase(),FALSE);
bindIntParameter(derivedcompoundref_insert,":prot",bcd->prot);
bindIntParameter(derivedcompoundref_insert,":virt",bcd->virt);
step(db,derivedcompoundref_insert);
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 6ad2e26..7befd40 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -666,7 +666,9 @@ static void tcl_codify(const char *s,const char *str)
tcl.code->startFontClass(s);
tcl.code_font=s;
}
- const char *p=str,*sp=p;
+ char *tmp = (char *) malloc(strlen(str)+1);
+ strcpy(tmp, str);
+ char *p=tmp,*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -676,7 +678,10 @@ static void tcl_codify(const char *s,const char *str)
if (c=='\n')
{
tcl.code_line++;
- // *(p-1)='\0'; // Dimitri: is this really needed?
+ *(p-1)='\0'; // Dimitri: is this really needed?
+ // wtschueller: As far as I can see: yes.
+ // Deletes that \n that would produce ugly source listings otherwise.
+ // However, there may exist more sophisticated solutions.
tcl.code->codify(sp);
if (tcl.code_font)
{
@@ -699,6 +704,7 @@ static void tcl_codify(const char *s,const char *str)
done=TRUE;
}
}
+ free(tmp);
tcl_font_end();
}
diff --git a/src/util.cpp b/src/util.cpp
index ffa03e1..9bb1632 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1724,7 +1724,7 @@ nextChar:
growBuf.addChar(' ');
}
else if (i>0 && c=='>' && // current char is a >
- (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space
+ (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&' || s.at(i-1)=='.') && // prev char is an id char or space
(i<8 || !findOperator(s,i)) // string in front is not "operator"
)
{
@@ -2225,6 +2225,10 @@ QCString tempArgListToString(ArgumentList *al,SrcLangExt lang)
if (i>0)
{
result+=a->type.right(a->type.length()-i-1);
+ if (a->type.find("...")!=-1)
+ {
+ result+="...";
+ }
}
else // nothing found -> take whole name
{
@@ -7517,7 +7521,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
else
{
QCString cmd=filterName+" \""+fileName+"\"";
- Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data());
+ Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
FILE *f=portable_popen(cmd,"r");
if (!f)
{
@@ -7535,7 +7539,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
portable_pclose(f);
inBuf.at(inBuf.curPos()) ='\0';
Debug::print(Debug::FilterOutput, 0, "Filter output\n");
- Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",inBuf.data());
+ Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",qPrint(inBuf));
}
int start=0;