summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorMoritz 'Morty' Strübe <moritz.struebe@redheads.de>2020-03-21 15:33:06 (GMT)
committerMoritz 'Morty' Strübe <moritz.struebe@redheads.de>2020-03-21 20:27:43 (GMT)
commitdcd90f9779e3d2608e4c1e9225d1c0e5c12249f9 (patch)
tree067728e03795aeb6eb95905dd5f706a3ff7c6027 /src/docparser.cpp
parent8aead913d6a8285c2949f93147efaec5f7b357d8 (diff)
downloadDoxygen-dcd90f9779e3d2608e4c1e9225d1c0e5c12249f9.zip
Doxygen-dcd90f9779e3d2608e4c1e9225d1c0e5c12249f9.tar.gz
Doxygen-dcd90f9779e3d2608e4c1e9225d1c0e5c12249f9.tar.bz2
Fix not correctly formatted messages
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp452
1 files changed, 227 insertions, 225 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 0cc7080..a9be280 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1,13 +1,13 @@
/******************************************************************************
*
- *
+ *
*
*
* 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
+ * 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.
*
@@ -70,11 +70,11 @@
//#define DBG(x) myprintf x
#define INTERNAL_ASSERT(x) do {} while(0)
-//#define INTERNAL_ASSERT(x) if (!(x)) DBG(("INTERNAL_ASSERT(%s) failed retval=0x%x: file=%s line=%d\n",#x,retval,__FILE__,__LINE__));
+//#define INTERNAL_ASSERT(x) if (!(x)) DBG(("INTERNAL_ASSERT(%s) failed retval=0x%x: file=%s line=%d\n",#x,retval,__FILE__,__LINE__));
//---------------------------------------------------------------------------
-static const char *sectionLevelToName[] =
+static const char *sectionLevelToName[] =
{
"page",
"section",
@@ -116,7 +116,7 @@ static int g_includeFileLine;
static bool g_includeFileShowLineNo;
-/** Parser's context to store all global variables.
+/** Parser's context to store all global variables.
*/
struct DocParserContext
{
@@ -196,7 +196,7 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
ctx->includeFileLength = g_includeFileLength;
ctx->includeFileLine = g_includeFileLine;
ctx->includeFileLineNo = g_includeFileShowLineNo;
-
+
ctx->token = g_token;
g_token = new TokenInfo;
@@ -291,7 +291,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
text+="Possible candidates:\n";
text+=showFileDefMatches(Doxygen::imageNameDict,fileName);
- warn_doc_error(g_fileName,doctokenizerYYlineno,text);
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"%s", text.data());
}
QCString inputFile = fd->absFilePath();
@@ -364,7 +364,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
"could not open image %s",qPrint(fileName));
}
- if (type==DocImage::Latex && Config_getBool(USE_PDFLATEX) &&
+ if (type==DocImage::Latex && Config_getBool(USE_PDFLATEX) &&
fd->name().right(4)==".eps"
)
{ // we have an .eps image in pdflatex mode => convert it to a pdf.
@@ -389,7 +389,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
if (result.left(5)!="http:" && result.left(6)!="https:" && dowarn)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,
- "image file %s is not found in IMAGE_PATH: "
+ "image file %s is not found in IMAGE_PATH: "
"assuming external image.",qPrint(fileName)
);
}
@@ -404,7 +404,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
* are disabled altogether).
*/
static void checkArgumentName(const QCString &name)
-{
+{
if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
if (g_memberDef==0) return; // not a member
const ArgumentList &al=g_memberDef->isDocsForDefinition() ?
@@ -474,9 +474,10 @@ static void checkRetvalName(const QCString &name)
{
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
- "return value '" + name + "' of " +
+ "%s",
+ ("return value '" + name + "' of " +
QCString(g_memberDef->qualifiedName()) +
- " has multiple documentation sections");
+ " has multiple documentation sections").data());
}
g_retvalsFound.insert(name,(void *)(0x8));
}
@@ -510,7 +511,7 @@ static void checkUnOrMultipleDocumentedParams()
{
// allow undocumented self / cls parameter for Python
}
- else if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a.docs.isEmpty())
+ else if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a.docs.isEmpty())
{
notArgCnt++;
}
@@ -527,10 +528,11 @@ static void checkUnOrMultipleDocumentedParams()
{
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
- "argument '" + aName +
+ "%s",
+ ("argument '" + aName +
"' from the argument list of " +
QCString(g_memberDef->qualifiedName()) +
- " has multiple @param documentation sections");
+ " has multiple @param documentation sections").data());
}
}
if (notArgCnt>0)
@@ -540,7 +542,7 @@ static void checkUnOrMultipleDocumentedParams()
"The following parameter";
errMsg+= (notArgCnt>1 ? "s" : "");
errMsg+=" of "+
- QCString(g_memberDef->qualifiedName()) +
+ QCString(g_memberDef->qualifiedName()) +
QCString(argListToString(al)) +
(notArgCnt>1 ? " are" : " is") + " not documented:\n";
for (const Argument &a : al)
@@ -567,7 +569,8 @@ static void checkUnOrMultipleDocumentedParams()
}
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
- substitute(errMsg,"%","%%"));
+ "%s",
+ substitute(errMsg,"%","%%").data());
}
}
}
@@ -584,7 +587,7 @@ static QCString stripKnownExtensions(const char *text)
result=result.left(result.length()-4);
}
else if (result.right(Doxygen::htmlFileExtension.length())==
- QCString(Doxygen::htmlFileExtension))
+ QCString(Doxygen::htmlFileExtension))
{
result=result.left(result.length()-Doxygen::htmlFileExtension.length());
}
@@ -625,7 +628,7 @@ static bool insideUL(DocNode *n)
{
while (n)
{
- if (n->kind()==DocNode::Kind_HtmlList &&
+ if (n->kind()==DocNode::Kind_HtmlList &&
((DocHtmlList *)n)->type()==DocHtmlList::Unordered) return TRUE;
n=n->parent();
}
@@ -639,7 +642,7 @@ static bool insideOL(DocNode *n)
{
while (n)
{
- if (n->kind()==DocNode::Kind_HtmlList &&
+ if (n->kind()==DocNode::Kind_HtmlList &&
((DocHtmlList *)n)->type()==DocHtmlList::Ordered) return TRUE;
n=n->parent();
}
@@ -683,7 +686,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
if (l==0) return FALSE;
int funcStart=cmdArg.find('(');
- if (funcStart==-1)
+ if (funcStart==-1)
{
funcStart=l;
}
@@ -693,9 +696,9 @@ static bool findDocsForMemberOrCompound(const char *commandName,
// beware of scenarios like operator()((foo)bar)
int secondParen = cmdArg.find('(', funcStart+1);
int leftParen = cmdArg.find(')', funcStart+1);
- if (leftParen!=-1 && secondParen!=-1)
+ if (leftParen!=-1 && secondParen!=-1)
{
- if (leftParen<secondParen)
+ if (leftParen<secondParen)
{
funcStart=secondParen;
}
@@ -738,7 +741,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
// try class, namespace, group, page, file reference
cd = Doxygen::classSDict->find(fullName);
- if (cd) // class
+ if (cd) // class
{
*pDoc=cd->documentation();
*pBrief=cd->briefDescription();
@@ -790,7 +793,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
}
} while (scopeOffset>=0);
-
+
return FALSE;
}
//---------------------------------------------------------------------------
@@ -821,7 +824,7 @@ inline void errorHandleDefaultToken(DocNode *parent,int tok,
//---------------------------------------------------------------------------
// forward declaration
-static bool defaultHandleToken(DocNode *parent,int tok,
+static bool defaultHandleToken(DocNode *parent,int tok,
QList<DocNode> &children,bool
handleWord=TRUE);
@@ -837,15 +840,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
qPrint(saveCmdName));
return tok;
}
- while ((tok=doctokenizerYYlex()) &&
- tok!=TK_WHITESPACE &&
+ while ((tok=doctokenizerYYlex()) &&
+ tok!=TK_WHITESPACE &&
tok!=TK_NEWPARA &&
- tok!=TK_LISTITEM &&
+ tok!=TK_LISTITEM &&
tok!=TK_ENDLIST
)
{
static QRegExp specialChar("[.,|()\\[\\]:;\\?]");
- if (tok==TK_WORD && g_token->name.length()==1 &&
+ if (tok==TK_WORD && g_token->name.length()==1 &&
g_token->name.find(specialChar)!=-1)
{
// special character that ends the markup command
@@ -858,7 +861,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
case TK_HTMLTAG:
if (insideLI(parent) && Mappers::htmlTagMapper->map(g_token->name) && g_token->endTag)
{ // ignore </li> as the end of a style command
- continue;
+ continue;
}
return tok;
break;
@@ -871,7 +874,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
}
DBG(("handleStyleArgument(%s) end tok=%x\n",qPrint(saveCmdName),tok));
return (tok==TK_NEWPARA || tok==TK_LISTITEM || tok==TK_ENDLIST
- ) ? tok : RetVal_OK;
+ ) ? tok : RetVal_OK;
}
/*! Called when a style change starts. For instance a \<b\> command is
@@ -938,7 +941,7 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children)
if (!g_styleStack.isEmpty())
{
DocStyleChange *sc = g_styleStack.top();
- while (sc && sc->position()>=g_nodeStack.count())
+ while (sc && sc->position()>=g_nodeStack.count())
{ // there are unclosed style modifiers in the paragraph
children.append(new DocStyleChange(parent,g_nodeStack.count(),sc->style(),sc->tagName(),FALSE));
g_initialStyleStack.push(sc);
@@ -1059,7 +1062,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
bool ambig;
FileDef *fd = findFileDef(Doxygen::inputNameDict,g_fileName,ambig);
//printf("handleLinkedWord(%s) g_context=%s\n",g_token->name.data(),g_context.data());
- if (!g_insideHtmlLink &&
+ if (!g_insideHtmlLink &&
(resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member,TRUE,fd,TRUE)
|| (!g_context.isEmpty() && // also try with global scope
resolveRef("",g_token->name,g_inSeeBlock,&compound,&member,FALSE,0,TRUE))
@@ -1069,12 +1072,12 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
//printf("resolveRef %s = %p (linkable?=%d)\n",qPrint(g_token->name),member,member ? member->isLinkable() : FALSE);
if (member && member->isLinkable()) // member link
{
- if (member->isObjCMethod())
+ if (member->isObjCMethod())
{
bool localLink = g_memberDef ? member->getClassDef()==g_memberDef->getClassDef() : FALSE;
name = member->objCMethodName(localLink,g_inSeeBlock);
}
- children.append(new
+ children.append(new
DocLinkedWord(parent,name,
member->getReference(),
member->getOutputFileBase(),
@@ -1094,7 +1097,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
{
name=(dynamic_cast<const GroupDef*>(compound))->groupTitle();
}
- children.append(new
+ children.append(new
DocLinkedWord(parent,name,
compound->getReference(),
compound->getOutputFileBase(),
@@ -1107,7 +1110,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
(dynamic_cast<const FileDef*>(compound))->generateSourceFile()
) // undocumented file that has source code we can link to
{
- children.append(new
+ children.append(new
DocLinkedWord(parent,g_token->name,
compound->getReference(),
compound->getSourceFileBase(),
@@ -1123,7 +1126,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
}
else if (!g_insideHtmlLink && len>1 && g_token->name.at(len-1)==':')
{
- // special case, where matching Foo: fails to be an Obj-C reference,
+ // special case, where matching Foo: fails to be an Obj-C reference,
// but Foo itself might be linkable.
g_token->name=g_token->name.left(len-1);
handleLinkedWord(parent,children,ignoreAutoLinkFlag);
@@ -1133,7 +1136,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
{
// special case 2, where the token name is not a class, but could
// be a Obj-C protocol
- children.append(new
+ children.append(new
DocLinkedWord(parent,name,
cd->getReference(),
cd->getOutputFileBase(),
@@ -1145,7 +1148,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignor
// {
// // special case 3, where the token name is not a class, but could
// // be a C# generic
-// children.append(new
+// children.append(new
// DocLinkedWord(parent,name,
// cd->getReference(),
// cd->getOutputFileBase(),
@@ -1397,7 +1400,7 @@ reparsetoken:
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Italic,tokenName,FALSE));
if (tok!=TK_WORD) children.append(new DocWhiteSpace(parent," "));
if (tok==TK_NEWPARA) goto handlepara;
- else if (tok==TK_WORD || tok==TK_HTMLTAG)
+ else if (tok==TK_WORD || tok==TK_HTMLTAG)
{
DBG(("CMD_EMPHASIS: reparsing command %s\n",qPrint(g_token->name)));
goto reparsetoken;
@@ -1411,7 +1414,7 @@ reparsetoken:
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Bold,tokenName,FALSE));
if (tok!=TK_WORD) children.append(new DocWhiteSpace(parent," "));
if (tok==TK_NEWPARA) goto handlepara;
- else if (tok==TK_WORD || tok==TK_HTMLTAG)
+ else if (tok==TK_WORD || tok==TK_HTMLTAG)
{
DBG(("CMD_BOLD: reparsing command %s\n",qPrint(g_token->name)));
goto reparsetoken;
@@ -1425,7 +1428,7 @@ reparsetoken:
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Code,tokenName,FALSE));
if (tok!=TK_WORD) children.append(new DocWhiteSpace(parent," "));
if (tok==TK_NEWPARA) goto handlepara;
- else if (tok==TK_WORD || tok==TK_HTMLTAG)
+ else if (tok==TK_WORD || tok==TK_HTMLTAG)
{
DBG(("CMD_CODE: reparsing command %s\n",qPrint(g_token->name)));
goto reparsetoken;
@@ -1464,7 +1467,7 @@ reparsetoken:
doctokenizerYYsetStateLatexOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_exampleName));
- if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"latexonly section ended without end marker",doctokenizerYYlineno);
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"latexonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -1473,7 +1476,7 @@ reparsetoken:
doctokenizerYYsetStateXmlOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName));
- if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"xmlonly section ended without end marker",doctokenizerYYlineno);
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"xmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -1482,7 +1485,7 @@ reparsetoken:
doctokenizerYYsetStateDbOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::DocbookOnly,g_isExample,g_exampleName));
- if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"docbookonly section ended without end marker",doctokenizerYYlineno);
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"docbookonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -1670,7 +1673,7 @@ reparsetoken:
}
}
break;
- case TK_SYMBOL:
+ case TK_SYMBOL:
{
DocSymbol::SymType s = DocSymbol::decodeSymbol(tokenName);
if (s!=DocSymbol::Sym_Unknown)
@@ -1683,15 +1686,15 @@ reparsetoken:
}
}
break;
- case TK_WHITESPACE:
- case TK_NEWPARA:
+ case TK_WHITESPACE:
+ case TK_NEWPARA:
handlepara:
if (insidePRE(parent) || !children.isEmpty())
{
children.append(new DocWhiteSpace(parent,g_token->chars));
}
break;
- case TK_LNKWORD:
+ case TK_LNKWORD:
if (handleWord)
{
handleLinkedWord(parent,children);
@@ -1699,7 +1702,7 @@ handlepara:
else
return FALSE;
break;
- case TK_WORD:
+ case TK_WORD:
if (handleWord)
{
children.append(new DocWord(parent,g_token->name));
@@ -1806,7 +1809,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
DocPara *par = new DocPara(parent);
if (isFirst) { par->markFirst(); isFirst=FALSE; }
retval=par->parse();
- if (!par->isEmpty())
+ if (!par->isEmpty())
{
children.append(par);
if (lastPar) lastPar->markLast(FALSE);
@@ -1849,7 +1852,7 @@ static void readTextFileByName(const QCString &file,QCString &text)
text = fileToString(absFileName,Config_getBool(FILTER_SOURCE_FILES));
return;
}
- s=examplePathList.next();
+ s=examplePathList.next();
}
// as a fallback we also look in the exampleNameDict
@@ -1875,10 +1878,10 @@ static void readTextFileByName(const QCString &file,QCString &text)
//---------------------------------------------------------------------------
-DocWord::DocWord(DocNode *parent,const QCString &word) :
- m_word(word)
+DocWord::DocWord(DocNode *parent,const QCString &word) :
+ m_word(word)
{
- m_parent = parent;
+ m_parent = parent;
//printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
if (Doxygen::searchIndex && !g_searchUrl.isEmpty())
{
@@ -1890,12 +1893,12 @@ DocWord::DocWord(DocNode *parent,const QCString &word) :
DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word,
const QCString &ref,const QCString &file,
- const QCString &anchor,const QCString &tooltip) :
- m_word(word), m_ref(ref),
+ const QCString &anchor,const QCString &tooltip) :
+ m_word(word), m_ref(ref),
m_file(file), m_relPath(g_relPath), m_anchor(anchor),
m_tooltip(tooltip)
{
- m_parent = parent;
+ m_parent = parent;
//printf("DocLinkedWord: new word %s url=%s tooltip='%s'\n",
// word.data(),g_searchUrl.data(),tooltip.data());
if (Doxygen::searchIndex && !g_searchUrl.isEmpty())
@@ -1908,7 +1911,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word,
DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
{
- m_parent = parent;
+ m_parent = parent;
if (id.isEmpty())
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Empty anchor label");
@@ -1925,7 +1928,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
m_anchor = id;
}
- else
+ else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid cite anchor id '%s'",qPrint(id));
m_anchor = "invalid";
@@ -1990,7 +1993,7 @@ void DocInclude::parse()
g_includeFileShowLineNo = (m_type == DontIncWithLines || m_type == IncWithLines);
//printf("g_includeFile=<<%s>>\n",g_includeFileText.data());
break;
- case VerbInclude:
+ case VerbInclude:
// fall through
case HtmlInclude:
case LatexInclude:
@@ -2012,8 +2015,8 @@ void DocInclude::parse()
m_blockId.data(),m_file.data(),count);
}
break;
- case DocInclude::SnippetDoc:
- case DocInclude::IncludeDoc:
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
"Please create a bug report\n",__FILE__);
break;
@@ -2045,7 +2048,7 @@ void DocIncOperator::parse()
while (o<l)
{
char c = p[o];
- if (c=='\n')
+ if (c=='\n')
{
g_includeFileLine++;
if (nonEmpty) break; // we have a pattern to match
@@ -2162,10 +2165,10 @@ void DocIncOperator::parse()
//---------------------------------------------------------------------------
-DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
+DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
m_id(id), m_key(key), m_relPath(g_relPath)
{
- m_parent = parent;
+ m_parent = parent;
}
bool DocXRefItem::parse()
@@ -2370,10 +2373,10 @@ endsecreflist:
//---------------------------------------------------------------------------
-DocInternalRef::DocInternalRef(DocNode *parent,const QCString &ref)
+DocInternalRef::DocInternalRef(DocNode *parent,const QCString &ref)
: m_relPath(g_relPath)
{
- m_parent = parent;
+ m_parent = parent;
int i=ref.find('#');
if (i!=-1)
{
@@ -2408,10 +2411,10 @@ void DocInternalRef::parse()
//---------------------------------------------------------------------------
-DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
+DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_refType(Unknown), m_isSubPage(FALSE)
{
- m_parent = parent;
+ m_parent = parent;
const Definition *compound = 0;
QCString anchor;
//printf("DocRef::DocRef(target=%s,context=%s)\n",target.data(),context.data());
@@ -2455,9 +2458,9 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
}
else if (resolveLink(context,target,TRUE,&compound,anchor))
{
- bool isFile = compound ?
+ bool isFile = compound ?
(compound->definitionType()==Definition::TypeFile ||
- compound->definitionType()==Definition::TypePage ? TRUE : FALSE) :
+ compound->definitionType()==Definition::TypePage ? TRUE : FALSE) :
FALSE;
m_text = linkToText(compound?compound->getLanguage():SrcLangExt_Unknown,target,isFile);
m_anchor = anchor;
@@ -2496,7 +2499,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",
- qPrint(target));
+ qPrint(target));
}
static void flattenParagraphs(DocNode *root,QList<DocNode> &children)
@@ -2560,7 +2563,7 @@ void DocRef::parse()
}
handlePendingStyleCommands(this,m_children);
-
+
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
}
@@ -2606,7 +2609,7 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
//---------------------------------------------------------------------------
-DocLink::DocLink(DocNode *parent,const QCString &target)
+DocLink::DocLink(DocNode *parent,const QCString &target)
{
m_parent = parent;
const Definition *compound = 0;
@@ -2638,7 +2641,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",
- qPrint(target));
+ qPrint(target));
}
@@ -2674,7 +2677,7 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink)
break;
}
break;
- case TK_SYMBOL:
+ case TK_SYMBOL:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found as part of a \\link",
qPrint(g_token->name));
break;
@@ -2685,8 +2688,8 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink)
qPrint(g_token->name));
}
goto endlink;
- case TK_LNKWORD:
- case TK_WORD:
+ case TK_LNKWORD:
+ case TK_WORD:
if (isJavaLink) // special case to detect closing }
{
QCString w = g_token->name;
@@ -2718,7 +2721,7 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink)
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end of comment while inside"
- " link command\n");
+ " link command\n");
}
endlink:
@@ -2737,10 +2740,10 @@ endlink:
//---------------------------------------------------------------------------
-DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &context) :
+DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &context) :
m_name(name), m_relPath(g_relPath), m_context(context)
{
- m_parent = parent;
+ m_parent = parent;
}
bool DocDotFile::parse()
@@ -2774,10 +2777,10 @@ bool DocDotFile::parse()
return ok;
}
-DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &context) :
+DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &context) :
m_name(name), m_relPath(g_relPath), m_context(context)
{
- m_parent = parent;
+ m_parent = parent;
}
bool DocMscFile::parse()
@@ -2932,7 +2935,7 @@ int DocHtmlHeader::parse()
if (m_level!=1)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"<h%d> ended with </h1>",
- m_level);
+ m_level);
}
goto endheader;
}
@@ -2941,7 +2944,7 @@ int DocHtmlHeader::parse()
if (m_level!=2)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"<h%d> ended with </h2>",
- m_level);
+ m_level);
}
goto endheader;
}
@@ -2950,7 +2953,7 @@ int DocHtmlHeader::parse()
if (m_level!=3)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"<h%d> ended with </h3>",
- m_level);
+ m_level);
}
goto endheader;
}
@@ -2959,7 +2962,7 @@ int DocHtmlHeader::parse()
if (m_level!=4)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"<h%d> ended with </h4>",
- m_level);
+ m_level);
}
goto endheader;
}
@@ -2968,7 +2971,7 @@ int DocHtmlHeader::parse()
if (m_level!=5)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"<h%d> ended with </h5>",
- m_level);
+ m_level);
}
goto endheader;
}
@@ -2977,7 +2980,7 @@ int DocHtmlHeader::parse()
if (m_level!=6)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"<h%d> ended with </h6>",
- m_level);
+ m_level);
}
goto endheader;
}
@@ -3010,7 +3013,7 @@ int DocHtmlHeader::parse()
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end of comment while inside"
- " <h%d> tag\n",m_level);
+ " <h%d> tag\n",m_level);
}
endheader:
handlePendingStyleCommands(this,m_children);
@@ -3045,7 +3048,7 @@ int DocHRef::parse()
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected html tag <%s%s> found within <a href=...> context",
- g_token->endTag?"/":"",qPrint(g_token->name),doctokenizerYYlineno);
+ g_token->endTag?"/":"",qPrint(g_token->name));
}
}
break;
@@ -3058,7 +3061,7 @@ int DocHRef::parse()
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end of comment while inside"
- " <a href=...> tag",doctokenizerYYlineno);
+ " <a href=...> tag");
}
endhref:
handlePendingStyleCommands(this,m_children);
@@ -3084,7 +3087,7 @@ int DocInternal::parse(int level)
DocPara *par = new DocPara(this);
if (isFirst) { par->markFirst(); isFirst=FALSE; }
retval=par->parse();
- if (!par->isEmpty())
+ if (!par->isEmpty())
{
m_children.append(par);
lastPar=par;
@@ -3095,9 +3098,9 @@ int DocInternal::parse(int level)
}
if (retval==TK_LISTITEM)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid list item found",doctokenizerYYlineno);
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Invalid list item found");
}
- } while (retval!=0 &&
+ } while (retval!=0 &&
retval!=RetVal_Section &&
retval!=RetVal_Subsection &&
retval!=RetVal_Subsubsection &&
@@ -3107,7 +3110,7 @@ int DocInternal::parse(int level)
if (lastPar) lastPar->markLast();
// then parse any number of level-n sections
- while ((level==1 && retval==RetVal_Section) ||
+ while ((level==1 && retval==RetVal_Section) ||
(level==2 && retval==RetVal_Subsection) ||
(level==3 && retval==RetVal_Subsubsection) ||
(level==4 && retval==RetVal_Paragraph)
@@ -3152,8 +3155,8 @@ int DocIndexEntry::parse()
case TK_WHITESPACE:
m_entry+=" ";
break;
- case TK_WORD:
- case TK_LNKWORD:
+ case TK_WORD:
+ case TK_LNKWORD:
m_entry+=g_token->name;
break;
case TK_SYMBOL:
@@ -3293,7 +3296,7 @@ int DocHtmlCaption::parse()
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end of comment while inside"
- " <caption> tag",doctokenizerYYlineno);
+ " <caption> tag");
}
endcaption:
handlePendingStyleCommands(this,m_children);
@@ -3384,7 +3387,7 @@ uint DocHtmlCell::rowSpan() const
uint retval = 0;
HtmlAttribList attrs = attribs();
uint i;
- for (i=0; i<attrs.count(); ++i)
+ for (i=0; i<attrs.count(); ++i)
{
if (attrs.at(i)->name.lower()=="rowspan")
{
@@ -3400,7 +3403,7 @@ uint DocHtmlCell::colSpan() const
uint retval = 1;
HtmlAttribList attrs = attribs();
uint i;
- for (i=0; i<attrs.count(); ++i)
+ for (i=0; i<attrs.count(); ++i)
{
if (attrs.at(i)->name.lower()=="colspan")
{
@@ -3587,7 +3590,7 @@ int DocHtmlTable::parse()
int retval=RetVal_OK;
g_nodeStack.push(this);
DBG(("DocHtmlTable::parse() start\n"));
-
+
getrow:
// get next token
int tok=doctokenizerYYlex();
@@ -3635,14 +3638,14 @@ getrow:
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected <tr> tag but found %s token instead!",
tokToString(tok));
}
-
+
// parse one or more rows
while (retval==RetVal_TableRow)
{
DocHtmlRow *tr=new DocHtmlRow(this,g_token->attribs);
m_children.append(tr);
retval=tr->parse();
- }
+ }
computeTableGrid();
@@ -3657,7 +3660,7 @@ int DocHtmlTable::parseXml()
int retval=RetVal_OK;
g_nodeStack.push(this);
DBG(("DocHtmlTable::parseXml() start\n"));
-
+
// get next token
int tok=doctokenizerYYlex();
// skip whitespace
@@ -3686,7 +3689,7 @@ int DocHtmlTable::parseXml()
m_children.append(tr);
retval=tr->parseXml(isHeader);
isHeader=FALSE;
- }
+ }
computeTableGrid();
@@ -3702,7 +3705,7 @@ struct ActiveRowSpan
{
ActiveRowSpan(uint rows,uint col) : rowsLeft(rows), column(col) {}
uint rowsLeft;
- uint column;
+ uint column;
};
/** List of ActiveRowSpan classes. */
@@ -3741,8 +3744,8 @@ void DocHtmlTable::computeTableGrid()
for (i=0;i<rowSpans.count();i++)
{
- if (rowSpans.at(i)->rowsLeft>0 &&
- rowSpans.at(i)->column==colIdx)
+ if (rowSpans.at(i)->rowsLeft>0 &&
+ rowSpans.at(i)->column==colIdx)
{
colIdx=rowSpans.at(i)->column+1;
cells++;
@@ -3752,7 +3755,7 @@ void DocHtmlTable::computeTableGrid()
//printf("found cell at (%d,%d)\n",rowIdx,colIdx);
cell->setRowIndex(rowIdx);
cell->setColumnIndex(colIdx);
- colIdx+=cs;
+ colIdx+=cs;
cells++;
}
}
@@ -3769,9 +3772,9 @@ void DocHtmlTable::computeTableGrid()
m_numCols = maxCols;
}
-void DocHtmlTable::accept(DocVisitor *v)
-{
- v->visitPre(this);
+void DocHtmlTable::accept(DocVisitor *v)
+{
+ v->visitPre(this);
// for HTML output we put the caption first
//if (m_caption && v->id()==DocVisitor_Html) m_caption->accept(v);
// doxygen 1.8.11: always put the caption first
@@ -3781,7 +3784,7 @@ void DocHtmlTable::accept(DocVisitor *v)
for (cli.toFirst();(n=cli.current());++cli) n->accept(v);
// for other output formats we put the caption last
//if (m_caption && v->id()!=DocVisitor_Html) m_caption->accept(v);
- v->visitPost(this);
+ v->visitPost(this);
}
//---------------------------------------------------------------------------
@@ -3877,7 +3880,7 @@ int DocHtmlDescTitle::parse()
}
}
break;
- case TK_SYMBOL:
+ case TK_SYMBOL:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol \\%s found as part of a <dt> tag",
qPrint(g_token->name));
break;
@@ -3928,7 +3931,7 @@ int DocHtmlDescTitle::parse()
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end of comment while inside"
- " <dt> tag");
+ " <dt> tag");
}
endtitle:
handlePendingStyleCommands(this,m_children);
@@ -3958,7 +3961,7 @@ int DocHtmlDescData::parse()
}
while (retval==TK_NEWPARA);
if (par) par->markLast();
-
+
DBG(("DocHtmlDescData::parse() end\n"));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
@@ -4163,7 +4166,7 @@ int DocHtmlList::parse()
m_children.append(li);
retval=li->parse();
} while (retval==RetVal_ListItem);
-
+
if (retval==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected end of comment while inside <%cl> block",
@@ -4226,7 +4229,7 @@ int DocHtmlList::parseXml()
if (retval==0) break;
//printf("retval=%x g_token->name=%s\n",retval,qPrint(g_token->name));
} while (retval==RetVal_ListItem);
-
+
if (retval==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected end of comment while inside <list type=\"%s\"> block",
@@ -4237,8 +4240,8 @@ endlist:
DBG(("DocHtmlList::parseXml() end retval=%x\n",retval));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
- return retval==RetVal_EndList ||
- (retval==RetVal_CloseXml || g_token->name=="list") ?
+ return retval==RetVal_EndList ||
+ (retval==RetVal_CloseXml || g_token->name=="list") ?
RetVal_OK : retval;
}
@@ -4250,7 +4253,7 @@ int DocHtmlBlockQuote::parse()
int retval=0;
g_nodeStack.push(this);
- // parse one or more paragraphs
+ // parse one or more paragraphs
bool isFirst=TRUE;
DocPara *par=0;
do
@@ -4277,7 +4280,7 @@ int DocParBlock::parse()
int retval=0;
g_nodeStack.push(this);
- // parse one or more paragraphs
+ // parse one or more paragraphs
bool isFirst=TRUE;
DocPara *par=0;
do
@@ -4328,17 +4331,17 @@ int DocSimpleList::parse()
//--------------------------------------------------------------------------
-DocAutoListItem::DocAutoListItem(DocNode *parent,int indent,int num)
+DocAutoListItem::DocAutoListItem(DocNode *parent,int indent,int num)
: m_indent(indent), m_itemNum(num)
-{
- m_parent = parent;
+{
+ m_parent = parent;
}
int DocAutoListItem::parse()
{
int retval = RetVal_OK;
g_nodeStack.push(this);
-
+
// first parse any number of paragraphs
bool isFirst=TRUE;
DocPara *lastPar=0;
@@ -4347,7 +4350,7 @@ int DocAutoListItem::parse()
DocPara *par = new DocPara(this);
if (isFirst) { par->markFirst(); isFirst=FALSE; }
retval=par->parse();
- if (!par->isEmpty())
+ if (!par->isEmpty())
{
m_children.append(par);
if (lastPar) lastPar->markLast(FALSE);
@@ -4371,11 +4374,11 @@ int DocAutoListItem::parse()
//--------------------------------------------------------------------------
DocAutoList::DocAutoList(DocNode *parent,int indent,bool isEnumList,
- int depth) :
+ int depth) :
m_indent(indent), m_isEnumList(isEnumList),
m_depth(depth)
-{
- m_parent = parent;
+{
+ m_parent = parent;
}
int DocAutoList::parse()
@@ -4395,11 +4398,11 @@ int DocAutoList::parse()
m_children.append(li);
retval=li->parse();
//printf("DocAutoList::parse(): retval=0x%x g_token->indent=%d m_indent=%d "
- // "m_isEnumList=%d g_token->isEnumList=%d g_token->name=%s\n",
+ // "m_isEnumList=%d g_token->isEnumList=%d g_token->name=%s\n",
// retval,g_token->indent,m_indent,m_isEnumList,g_token->isEnumList,
// g_token->name.data());
//printf("num=%d g_token->id=%d\n",num,g_token->id);
- }
+ }
while (retval==TK_LISTITEM && // new list item
m_indent==g_token->indent && // at same indent level
m_isEnumList==g_token->isEnumList && // of the same kind
@@ -4441,16 +4444,16 @@ void DocTitle::parseFromString(const QCString &text)
//--------------------------------------------------------------------------
-DocSimpleSect::DocSimpleSect(DocNode *parent,Type t) :
+DocSimpleSect::DocSimpleSect(DocNode *parent,Type t) :
m_type(t)
-{
- m_parent = parent;
- m_title=0;
+{
+ m_parent = parent;
+ m_title=0;
}
DocSimpleSect::~DocSimpleSect()
-{
- delete m_title;
+{
+ delete m_title;
}
void DocSimpleSect::accept(DocVisitor *v)
@@ -4474,10 +4477,10 @@ int DocSimpleSect::parse(bool userTitle,bool needsSeparator)
m_title = new DocTitle(this);
m_title->parse();
}
-
+
// add new paragraph as child
DocPara *par = new DocPara(this);
- if (m_children.isEmpty())
+ if (m_children.isEmpty())
{
par->markFirst();
}
@@ -4489,7 +4492,7 @@ int DocSimpleSect::parse(bool userTitle,bool needsSeparator)
par->markLast();
if (needsSeparator) m_children.append(new DocSimpleSectSep(this));
m_children.append(par);
-
+
// parse the contents of the paragraph
int retval = par->parse();
@@ -4515,7 +4518,7 @@ int DocSimpleSect::parseRcs()
DBG(("DocSimpleSect::parseRcs()\n"));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
- return RetVal_OK;
+ return RetVal_OK;
}
int DocSimpleSect::parseXml()
@@ -4524,11 +4527,11 @@ int DocSimpleSect::parseXml()
g_nodeStack.push(this);
int retval = RetVal_OK;
- for (;;)
+ for (;;)
{
// add new paragraph as child
DocPara *par = new DocPara(this);
- if (m_children.isEmpty())
+ if (m_children.isEmpty())
{
par->markFirst();
}
@@ -4543,17 +4546,17 @@ int DocSimpleSect::parseXml()
// parse the contents of the paragraph
retval = par->parse();
if (retval == 0) break;
- if (retval == RetVal_CloseXml)
+ if (retval == RetVal_CloseXml)
{
retval = RetVal_OK;
break;
}
}
-
+
DBG(("DocSimpleSect::parseXml() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
- return retval;
+ return retval;
}
void DocSimpleSect::appendLinkWord(const QCString &word)
@@ -4567,12 +4570,12 @@ void DocSimpleSect::appendLinkWord(const QCString &word)
else
{
p = (DocPara *)m_children.getLast();
-
+
// Comma-separate <seealso> links.
p->injectToken(TK_WORD,",");
p->injectToken(TK_WHITESPACE," ");
}
-
+
g_inSeeBlock=TRUE;
p->injectToken(TK_LNKWORD,word);
g_inSeeBlock=FALSE;
@@ -4698,7 +4701,7 @@ int DocParamList::parseXml(const QCString &paramName)
g_hasReturnCommand=TRUE;
checkRetvalName(g_token->name);
}
-
+
handleLinkedWord(this,m_params);
do
@@ -4727,11 +4730,11 @@ int DocParamList::parseXml(const QCString &paramName)
if (retval == 0) break;
- } while (retval==RetVal_CloseXml &&
+ } while (retval==RetVal_CloseXml &&
Mappers::htmlTagMapper->map(g_token->name)!=XML_PARAM &&
Mappers::htmlTagMapper->map(g_token->name)!=XML_TYPEPARAM &&
Mappers::htmlTagMapper->map(g_token->name)!=XML_EXCEPTION);
-
+
if (retval==0) /* premature end of comment block */
{
@@ -4787,7 +4790,7 @@ int DocParamSect::parse(const QCString &cmdName,bool xmlContext, Direction d)
{
retval = RetVal_OK;
}
-
+
DBG(("DocParamSect::parse() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
@@ -4922,7 +4925,7 @@ int DocPara::handleXRefItem()
{
m_children.append(ref);
}
- else
+ else
{
delete ref;
}
@@ -5316,7 +5319,7 @@ int DocPara::handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level)
// For XML tags whose content is stored in attributes rather than
// contained within the element, we need a way to inject the attribute
// text into the current paragraph.
-bool DocPara::injectToken(int tok,const QCString &tokText)
+bool DocPara::injectToken(int tok,const QCString &tokText)
{
g_token->name = tokText;
return defaultHandleToken(this,tok,m_children);
@@ -5389,19 +5392,19 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
break;
case CMD_EMPHASIS:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,cmdName,TRUE));
- retval=handleStyleArgument(this,m_children,cmdName);
+ retval=handleStyleArgument(this,m_children,cmdName);
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,cmdName,FALSE));
if (retval!=TK_WORD) m_children.append(new DocWhiteSpace(this," "));
break;
case CMD_BOLD:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Bold,cmdName,TRUE));
- retval=handleStyleArgument(this,m_children,cmdName);
+ retval=handleStyleArgument(this,m_children,cmdName);
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Bold,cmdName,FALSE));
if (retval!=TK_WORD) m_children.append(new DocWhiteSpace(this," "));
break;
case CMD_CODE:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,cmdName,TRUE));
- retval=handleStyleArgument(this,m_children,cmdName);
+ retval=handleStyleArgument(this,m_children,cmdName);
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,cmdName,FALSE));
if (retval!=TK_WORD) m_children.append(new DocWhiteSpace(this," "));
break;
@@ -5597,7 +5600,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
doctokenizerYYsetStateDbOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::DocbookOnly,g_isExample,g_exampleName));
- if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"docbookonly section ended without end marker",doctokenizerYYlineno);
+ if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"docbookonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -5687,7 +5690,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
case CMD_ENDMSC:
case CMD_ENDUML:
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected command %s",qPrint(g_token->name));
- break;
+ break;
case CMD_PARAM:
retval = handleParamSection(cmdName,DocParamSect::Param,FALSE,g_token->paramDir);
break;
@@ -5873,26 +5876,26 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
ASSERT(0);
break;
}
- INTERNAL_ASSERT(retval==0 || retval==RetVal_OK || retval==RetVal_SimpleSec ||
+ INTERNAL_ASSERT(retval==0 || retval==RetVal_OK || retval==RetVal_SimpleSec ||
retval==TK_LISTITEM || retval==TK_ENDLIST || retval==TK_NEWPARA ||
- retval==RetVal_Section || retval==RetVal_EndList ||
- retval==RetVal_Internal || retval==RetVal_SwitchLang ||
+ retval==RetVal_Section || retval==RetVal_EndList ||
+ retval==RetVal_Internal || retval==RetVal_SwitchLang ||
retval==RetVal_EndInternal
);
DBG(("handleCommand(%s) end retval=%x\n",qPrint(cmdName),retval));
return retval;
}
-static bool findAttribute(const HtmlAttribList &tagHtmlAttribs,
- const char *attrName,
- QCString *result)
+static bool findAttribute(const HtmlAttribList &tagHtmlAttribs,
+ const char *attrName,
+ QCString *result)
{
HtmlAttribListIterator li(tagHtmlAttribs);
HtmlAttrib *opt;
for (li.toFirst();(opt=li.current());++li)
{
- if (opt->name==attrName)
+ if (opt->name==attrName)
{
*result = opt->value;
return TRUE;
@@ -5906,7 +5909,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
DBG(("handleHtmlStartTag(%s,%d)\n",qPrint(tagName),tagHtmlAttribs.count()));
int retval=RetVal_OK;
int tagId = Mappers::htmlTagMapper->map(tagName);
- if (g_token->emptyTag && !(tagId&XML_CmdMask) &&
+ if (g_token->emptyTag && !(tagId&XML_CmdMask) &&
tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_HR && tagId!=HTML_P)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"HTML tag ('<%s/>') may not use the 'empty tag' XHTML syntax.",
@@ -5914,7 +5917,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
}
switch (tagId)
{
- case HTML_UL:
+ case HTML_UL:
if (!g_token->emptyTag)
{
DocHtmlList *list = new DocHtmlList(this,tagHtmlAttribs,DocHtmlList::Unordered);
@@ -5922,7 +5925,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
retval=list->parse();
}
break;
- case HTML_OL:
+ case HTML_OL:
if (!g_token->emptyTag)
{
DocHtmlList *list = new DocHtmlList(this,tagHtmlAttribs,DocHtmlList::Ordered);
@@ -5961,8 +5964,8 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
break;
case HTML_CODE:
if (g_token->emptyTag) break;
- if (/*getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp ||*/ g_xmlComment)
- // for C# source or inside a <summary> or <remark> section we
+ if (/*getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp ||*/ g_xmlComment)
+ // for C# source or inside a <summary> or <remark> section we
// treat <code> as an XML tag (so similar to @code)
{
doctokenizerYYsetStateXmlCode();
@@ -6140,7 +6143,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
{
//printf("paramName=%s\n",paramName.data());
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,tagName,TRUE));
- m_children.append(new DocWord(this,paramName));
+ m_children.append(new DocWord(this,paramName));
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,tagName,FALSE));
if (retval!=TK_WORD) m_children.append(new DocWhiteSpace(this," "));
}
@@ -6195,7 +6198,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
case XML_SEE:
// I'm not sure if <see> is the same as <seealso> or if it
// should you link a member without producing a section. The
- // C# specification is extremely vague about this (but what else
+ // C# specification is extremely vague about this (but what else
// can we expect from Microsoft...)
{
QCString cref;
@@ -6327,7 +6330,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName)
int retval=RetVal_OK;
switch (tagId)
{
- case HTML_UL:
+ case HTML_UL:
if (!insideUL(this))
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"found </ul> tag without matching <ul>");
@@ -6337,7 +6340,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName)
retval=RetVal_EndList;
}
break;
- case HTML_OL:
+ case HTML_OL:
if (!insideOL(this))
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"found </ol> tag without matching <ol>");
@@ -6555,8 +6558,8 @@ reparsetoken:
DocNode::Kind k;
if (insidePRE(this) || // all whitespace is relevant
(
- // remove leading whitespace
- !m_children.isEmpty() &&
+ // remove leading whitespace
+ !m_children.isEmpty() &&
// and whitespace after certain constructs
(k=m_children.getLast()->kind())!=DocNode::Kind_HtmlDescList &&
k!=DocNode::Kind_HtmlTable &&
@@ -6585,7 +6588,7 @@ reparsetoken:
{
DocAutoList *al = (DocAutoList *)n;
DBG(("previous list item at %d\n",al->indent()));
- if (al->indent()>=g_token->indent)
+ if (al->indent()>=g_token->indent)
// new item at the same or lower indent level
{
retval=TK_LISTITEM;
@@ -6596,9 +6599,9 @@ reparsetoken:
// determine list depth
int depth = 0;
n=parent();
- while(n)
+ while(n)
{
- if (n->kind() == DocNode::Kind_AutoList &&
+ if (n->kind() == DocNode::Kind_AutoList &&
((DocAutoList*)n)->isEnumList()) depth++;
n=n->parent();
}
@@ -6651,7 +6654,7 @@ reparsetoken:
}
}
break;
- case TK_ENDLIST:
+ case TK_ENDLIST:
DBG(("Found end of list inside of paragraph at line %d\n",doctokenizerYYlineno));
if (parent()->kind()==DocNode::Kind_AutoListItem)
{
@@ -6682,10 +6685,10 @@ reparsetoken:
// see if we have to start a simple section
int cmd = Mappers::cmdMapper->map(g_token->name);
DocNode *n=parent();
- while (n &&
- n->kind()!=DocNode::Kind_SimpleSect &&
+ while (n &&
+ n->kind()!=DocNode::Kind_SimpleSect &&
n->kind()!=DocNode::Kind_ParamSect
- )
+ )
{
n=n->parent();
}
@@ -6736,25 +6739,25 @@ reparsetoken:
DBG(("reparsing command %s\n",qPrint(g_token->name)));
goto reparsetoken;
}
- else if (retval==RetVal_OK)
+ else if (retval==RetVal_OK)
{
// the command ended normally, keep scanning for new tokens.
retval = 0;
}
else if (retval>0 && retval<RetVal_OK)
- {
+ {
// the command ended with a new command, reparse this token
tok = retval;
goto reparsetoken;
}
- else // end of file, end of paragraph, start or end of section
+ else // end of file, end of paragraph, start or end of section
// or some auto list marker
{
goto endparagraph;
}
}
break;
- case TK_HTMLTAG:
+ case TK_HTMLTAG:
{
if (!g_token->endTag) // found a start tag
{
@@ -6764,7 +6767,7 @@ reparsetoken:
{
retval = handleHtmlEndTag(g_token->name);
}
- if (retval==RetVal_OK)
+ if (retval==RetVal_OK)
{
// the command ended normally, keep scanner for new tokens.
retval = 0;
@@ -6775,7 +6778,7 @@ reparsetoken:
}
}
break;
- case TK_SYMBOL:
+ case TK_SYMBOL:
{
DocSymbol::SymType s = DocSymbol::decodeSymbol(g_token->name);
if (s!=DocSymbol::Sym_Unknown)
@@ -6789,16 +6792,16 @@ reparsetoken:
}
break;
}
- case TK_NEWPARA:
+ case TK_NEWPARA:
retval=TK_NEWPARA;
goto endparagraph;
case TK_RCSTAG:
{
DocNode *n=parent();
- while (n &&
- n->kind()!=DocNode::Kind_SimpleSect &&
+ while (n &&
+ n->kind()!=DocNode::Kind_SimpleSect &&
n->kind()!=DocNode::Kind_ParamSect
- )
+ )
{
n=n->parent();
}
@@ -6835,11 +6838,11 @@ endparagraph:
{
((DocPara *)n)->setAttribs(g_token->attribs);
}
- INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
- retval==TK_ENDLIST || retval>RetVal_OK
+ INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
+ retval==TK_ENDLIST || retval>RetVal_OK
);
- return retval;
+ return retval;
}
//--------------------------------------------------------------------------
@@ -6870,7 +6873,7 @@ int DocSection::parse()
DocPara *par = new DocPara(this);
if (isFirst) { par->markFirst(); isFirst=FALSE; }
retval=par->parse();
- if (!par->isEmpty())
+ if (!par->isEmpty())
{
m_children.append(par);
lastPar=par;
@@ -6893,7 +6896,7 @@ int DocSection::parse()
retval=RetVal_OK;
}
}
- } while (retval!=0 &&
+ } while (retval!=0 &&
retval!=RetVal_Section &&
retval!=RetVal_Subsection &&
retval!=RetVal_Subsubsection &&
@@ -6945,7 +6948,7 @@ int DocSection::parse()
m_children.append(s);
retval = s->parse();
}
- if (!(m_level<Doxygen::subpageNestingLevel+3 && (retval == RetVal_Subsection || retval == RetVal_Subsubsection))) break;
+ if (!(m_level<Doxygen::subpageNestingLevel+3 && (retval == RetVal_Subsection || retval == RetVal_Subsubsection))) break;
}
else
{
@@ -6953,11 +6956,11 @@ int DocSection::parse()
}
}
- INTERNAL_ASSERT(retval==0 ||
- retval==RetVal_Section ||
- retval==RetVal_Subsection ||
- retval==RetVal_Subsubsection ||
- retval==RetVal_Paragraph ||
+ INTERNAL_ASSERT(retval==0 ||
+ retval==RetVal_Section ||
+ retval==RetVal_Subsection ||
+ retval==RetVal_Subsubsection ||
+ retval==RetVal_Paragraph ||
retval==RetVal_Internal ||
retval==RetVal_EndInternal
);
@@ -6975,19 +6978,19 @@ void DocText::parse()
DBG(("DocText::parse() start\n"));
g_nodeStack.push(this);
doctokenizerYYsetStateText();
-
+
int tok;
while ((tok=doctokenizerYYlex())) // get the next token
{
switch(tok)
{
- case TK_WORD:
+ case TK_WORD:
m_children.append(new DocWord(this,g_token->name));
break;
- case TK_WHITESPACE:
+ case TK_WHITESPACE:
m_children.append(new DocWhiteSpace(this,g_token->chars));
break;
- case TK_SYMBOL:
+ case TK_SYMBOL:
{
DocSymbol::SymType s = DocSymbol::decodeSymbol(g_token->name);
if (s!=DocSymbol::Sym_Unknown)
@@ -7262,7 +7265,7 @@ static QCString extractCopyDocId(const char *data, uint &j, uint len)
case '\'': insideSQuote=TRUE; break;
case ' ': // fall through
case '\t': // fall through
- case '\n':
+ case '\n':
found=(round==0);
break;
}
@@ -7581,10 +7584,10 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
docParserPushContext();
if (ctx && ctx!=Doxygen::globalScope &&
- (ctx->definitionType()==Definition::TypeClass ||
+ (ctx->definitionType()==Definition::TypeClass ||
ctx->definitionType()==Definition::TypeNamespace
- )
- )
+ )
+ )
{
g_context = ctx->name();
}
@@ -7622,7 +7625,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
{
g_searchUrl=md->getOutputFileBase();
Doxygen::searchIndex->setCurrentDoc(
- (md->getLanguage()==SrcLangExt_Fortran ?
+ (md->getLanguage()==SrcLangExt_Fortran ?
theTranslator->trSubprogram(TRUE,TRUE):
theTranslator->trMember(TRUE,TRUE))+" "+md->qualifiedName(),
g_searchUrl,
@@ -7702,8 +7705,8 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
}
g_fileName = fileName;
- g_relPath = (!linkFromIndex && ctx) ?
- QCString(relativePathToRoot(ctx->getOutputFileBase())) :
+ g_relPath = (!linkFromIndex && ctx) ?
+ QCString(relativePathToRoot(ctx->getOutputFileBase())) :
QCString("");
//printf("ctx->name=%s relPath=%s\n",ctx->name().data(),g_relPath.data());
g_memberDef = md;
@@ -7724,7 +7727,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_retvalsFound.clear();
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
-
+
//printf("Starting comment block at %s:%d\n",g_fileName.data(),startLine);
doctokenizerYYlineno=startLine;
uint inpLen=qstrlen(input);
@@ -7762,7 +7765,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
//printf(">>>>>> end validatingParseDoc(%s,%s)\n",ctx?ctx->name().data():"<none>",
// md?md->name().data():"<none>");
-
+
return root;
}
@@ -7827,4 +7830,3 @@ void docFindSections(const char *input,
{
doctokenizerYYFindSections(input,d,fileName);
}
-