summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-12-16 20:08:24 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-12-16 20:08:24 (GMT)
commitfb864720e5a808a6e9052b2cc5a1a942cb7665ab (patch)
tree0de7715d3a2308f07d2c97970d88def415c52ae4 /src
parenta641157ea8fc582d539e35bed962018c58c0d407 (diff)
downloadDoxygen-fb864720e5a808a6e9052b2cc5a1a942cb7665ab.zip
Doxygen-fb864720e5a808a6e9052b2cc5a1a942cb7665ab.tar.gz
Doxygen-fb864720e5a808a6e9052b2cc5a1a942cb7665ab.tar.bz2
Release-1.3-rc2
Diffstat (limited to 'src')
-rw-r--r--src/definition.cpp23
-rw-r--r--src/docparser.cpp73
-rw-r--r--src/docparser.h87
-rw-r--r--src/doctokenizer.l2
-rw-r--r--src/doxygen.cpp6
-rw-r--r--src/filedef.cpp12
-rw-r--r--src/groupdef.cpp14
-rw-r--r--src/htmlgen.cpp2
-rw-r--r--src/membergroup.cpp6
-rw-r--r--src/membergroup.h2
-rw-r--r--src/namespacedef.cpp12
-rw-r--r--src/util.cpp15
-rw-r--r--src/util.h2
-rw-r--r--src/xmlgen.cpp12
14 files changed, 143 insertions, 125 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index f3b556a..46d66a9 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -122,7 +122,28 @@ void Definition::setDocumentation(const char *d,const char *docFile,int docLine,
if (d==0) return;
//printf("Definition::setDocumentation(%s,%s,%d)\n",d,docFile,docLine);
if (stripWhiteSpace)
- m_doc=((QCString)d).stripWhiteSpace();
+ {
+ // strip leading empty lines in front of the text, but not the
+ // leading spaces in front of the first line, so list items are
+ // parsed with the correct indent
+ const char *p=d;
+ char c;
+ int s=0,so=0;
+ while ((c=*p) && (c==' ' || c=='\r' || c=='\n'))
+ {
+ if (c=='\n') so=s;
+ p++;
+ s++;
+ }
+ m_doc=d+so;
+ // zero any trailing whitespace
+ int e=m_doc.length()-1;
+ while (e>=0 && (c=m_doc.at(e)) && (c==' ' || c=='\r' || c=='\n'))
+ {
+ m_doc.at(e)='\0';
+ e--;
+ }
+ }
else
m_doc=d;
m_docFile = docFile;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index ded0692..2f9bda7 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -518,6 +518,7 @@ static bool defaultHandleToken(DocNode *parent,int tok,
static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
const QString &cmdName)
{
+ DBG(("handleStyleArgument(%s)\n",cmdName.data()));
QString tokenName = g_token->name;
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
@@ -527,7 +528,10 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
return tok;
}
while ((tok=doctokenizerYYlex()) &&
- tok!=TK_WHITESPACE && tok!=TK_NEWPARA && tok!=TK_LISTITEM && tok!=TK_ENDLIST
+ tok!=TK_WHITESPACE &&
+ tok!=TK_NEWPARA &&
+ tok!=TK_LISTITEM &&
+ tok!=TK_ENDLIST
)
{
if (!defaultHandleToken(parent,tok,children))
@@ -547,9 +551,12 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
tokToString(tok));
break;
}
+ break;
}
}
- return tok==TK_NEWPARA ? TK_NEWPARA : RetVal_OK;
+ DBG(("handleStyleArgument(%s) end tok=%x\n",cmdName.data(),tok));
+ return (tok==TK_NEWPARA || tok==TK_LISTITEM || tok==TK_ENDLIST
+ ) ? tok : RetVal_OK;
}
static void handleStyleEnter(DocNode *parent,QList<DocNode> &children,
@@ -699,45 +706,45 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case CMD_EMPHASIS:
{
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Italic,TRUE));
- int retval=handleStyleArgument(parent,children,tokenName);
+ tok=handleStyleArgument(parent,children,tokenName);
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Italic,FALSE));
children.append(new DocWhiteSpace(parent," "));
- if (retval==TK_NEWPARA) goto handlepara;
+ if (tok==TK_NEWPARA) goto handlepara;
}
break;
case CMD_BOLD:
{
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Bold,TRUE));
- int retval=handleStyleArgument(parent,children,tokenName);
+ tok=handleStyleArgument(parent,children,tokenName);
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Bold,FALSE));
children.append(new DocWhiteSpace(parent," "));
- if (retval==TK_NEWPARA) goto handlepara;
+ if (tok==TK_NEWPARA) goto handlepara;
}
break;
case CMD_CODE:
{
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Code,TRUE));
- int retval=handleStyleArgument(parent,children,tokenName);
+ tok=handleStyleArgument(parent,children,tokenName);
children.append(new DocStyleChange(parent,g_nodeStack.count(),DocStyleChange::Code,FALSE));
children.append(new DocWhiteSpace(parent," "));
- if (retval==TK_NEWPARA) goto handlepara;
+ if (tok==TK_NEWPARA) goto handlepara;
}
break;
case CMD_HTMLONLY:
{
doctokenizerYYsetStateHtmlOnly();
- int retval = doctokenizerYYlex();
+ tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
- if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker");
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
- int retval = doctokenizerYYlex();
+ tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
- if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker",doctokenizerYYlineno);
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara();
}
break;
@@ -749,7 +756,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
break;
case CMD_ANCHOR:
{
- int tok=doctokenizerYYlex();
+ tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
@@ -775,7 +782,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
break;
case CMD_INTERNALREF:
{
- int tok=doctokenizerYYlex();
+ tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
@@ -1005,6 +1012,8 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
{
int retval = RetVal_OK;
+ if (doc.isEmpty()) return retval;
+
doctokenizerYYinit(doc,g_fileName);
// first parse any number of paragraphs
@@ -2531,32 +2540,6 @@ enddesclist:
//---------------------------------------------------------------------------
-#if 0
-int DocHtmlPre::parse()
-{
- int rv;
- g_nodeStack.push(this);
-
- bool isFirst=FALSE;
- DocPara *par=0;
- do
- {
- par = new DocPara(this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.append(par);
- rv=par->parse();
- }
- while (rv==TK_NEWPARA);
- if (par) par->markLast();
-
- DocNode *n=g_nodeStack.pop();
- ASSERT(n==this);
- return rv==RetVal_EndPre ? RetVal_OK : rv;
-}
-#endif
-
-//---------------------------------------------------------------------------
-
int DocHtmlListItem::parse()
{
DBG(("DocHtmlListItem::parse() start\n"));
@@ -2822,7 +2805,7 @@ int DocSimpleSect::parseRcs()
internalValidatingParseDoc(this,m_children,g_token->text);
docParserPopContext();
- DBG(("DocSimpleSect::parseRcs() end retval=%d\n",retval));
+ DBG(("DocSimpleSect::parseRcs()\n"));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
return RetVal_OK;
@@ -3246,6 +3229,7 @@ void DocPara::handleSection(const QString &cmdName)
int DocPara::handleCommand(const QString &cmdName)
{
+ DBG(("handleCommand(%s)\n",cmdName.data()));
int retval = RetVal_OK;
switch (CmdMapper::map(cmdName))
{
@@ -3579,6 +3563,7 @@ int DocPara::handleCommand(const QString &cmdName)
retval==RetVal_Section || retval==RetVal_EndList ||
retval==RetVal_Internal || retval==RetVal_SwitchLang
);
+ DBG(("handleCommand(%s) end retval=%x\n",cmdName.data(),retval));
return retval;
}
@@ -4103,6 +4088,7 @@ reparsetoken:
// handle the command
retval=handleCommand(g_token->name.copy());
+ DBG(("handleCommand returns %x\n",retval));
// check the return value
if (retval==RetVal_SimpleSec)
@@ -4120,6 +4106,11 @@ reparsetoken:
// the command ended normally, keep scanner for new tokens.
retval = 0;
}
+ else if (retval==TK_LISTITEM || retval==TK_ENDLIST)
+ {
+ tok = retval;
+ goto reparsetoken;
+ }
else // end of file, end of paragraph, start or end of section
// or some auto list marker
{
diff --git a/src/docparser.h b/src/docparser.h
index e20d3b3..a505a6d 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -86,52 +86,57 @@ class DocNode
Kind_XRefItem = 15,
Kind_HtmlList = 16,
Kind_HtmlListItem = 17,
- //Kind_HtmlPre = 18,
- Kind_HtmlDescList = 19,
- Kind_HtmlDescData = 20,
- Kind_HtmlDescTitle = 21,
- Kind_HtmlTable = 22,
- Kind_HtmlRow = 23,
- Kind_HtmlCell = 24,
- Kind_HtmlCaption = 25,
- Kind_LineBreak = 26,
- Kind_HorRuler = 27,
- Kind_Anchor = 28,
- Kind_IndexEntry = 29,
- Kind_Internal = 30,
- Kind_HRef = 31,
- Kind_Include = 32,
- Kind_IncOperator = 33,
- Kind_HtmlHeader = 34,
- Kind_Image = 35,
- Kind_DotFile = 36,
- Kind_Link = 37,
- Kind_Ref = 38,
- Kind_Formula = 39,
- Kind_SecRefItem = 40,
- Kind_SecRefList = 41,
- Kind_Language = 42,
- Kind_LinkedWord = 43,
- Kind_ParamSect = 44,
- Kind_ParamList = 45,
- Kind_InternalRef = 46,
- Kind_Copy = 47,
- Kind_Text = 48
+ Kind_HtmlDescList = 18,
+ Kind_HtmlDescData = 19,
+ Kind_HtmlDescTitle = 20,
+ Kind_HtmlTable = 21,
+ Kind_HtmlRow = 22,
+ Kind_HtmlCell = 23,
+ Kind_HtmlCaption = 24,
+ Kind_LineBreak = 25,
+ Kind_HorRuler = 26,
+ Kind_Anchor = 27,
+ Kind_IndexEntry = 28,
+ Kind_Internal = 29,
+ Kind_HRef = 30,
+ Kind_Include = 31,
+ Kind_IncOperator = 32,
+ Kind_HtmlHeader = 33,
+ Kind_Image = 34,
+ Kind_DotFile = 35,
+ Kind_Link = 36,
+ Kind_Ref = 37,
+ Kind_Formula = 38,
+ Kind_SecRefItem = 39,
+ Kind_SecRefList = 40,
+ Kind_Language = 41,
+ Kind_LinkedWord = 42,
+ Kind_ParamSect = 43,
+ Kind_ParamList = 44,
+ Kind_InternalRef = 45,
+ Kind_Copy = 46,
+ Kind_Text = 47
};
/*! Creates a new node */
DocNode() : m_insidePre(FALSE) {}
+
/*! Destroys a node. */
virtual ~DocNode() {}
+
/*! Returns the kind of node. Provides runtime type information */
virtual Kind kind() const = 0;
+
/*! Returns the parent of this node or 0 for the root node. */
virtual DocNode *parent() const = 0;
+
/*! Acceptor function for node visitors. Part of the visitor pattern.
* @param v Abstract visitor.
*/
virtual void accept(DocVisitor *v) = 0;
+
/*! Returns TRUE iff this node is inside a preformatted section */
bool isPreformatted() const { return m_insidePre; }
+
/*! Sets whether or not this item is inside a preformatted section */
void setInsidePreformatted(bool p) { m_insidePre = p; }
private:
@@ -156,7 +161,6 @@ template<class T> class CompAccept
protected:
QList<DocNode> m_children;
- QList<DocNode> &getChildren() const { return m_children; }
};
@@ -1048,25 +1052,6 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
HtmlAttribList m_attribs;
};
-#if 0
-/*! @brief Node representing a preformatted HTML section */
-class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
-{
- public:
- DocHtmlPre(DocNode *parent,const HtmlAttribList &attribs)
- : m_parent(parent), m_attribs(attribs) {}
- int parse();
- Kind kind() const { return Kind_HtmlPre; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- DocNode *parent() const { return m_parent; }
- void accept(DocVisitor *v) { CompAccept<DocHtmlPre>::accept(this,v); }
-
- private:
- DocNode * m_parent;
- HtmlAttribList m_attribs;
-};
-#endif
-
/*! @brief Node representing a HTML table cell */
class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
{
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index c65f9b8..390a666 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -378,7 +378,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
g_token->isEMailAddr=FALSE;
return TK_URL;
}
-<St_Para>[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ { // Mail address
+<St_Para>[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-])+[a-z_A-Z0-9\-]+ { // Mail address
g_token->name=yytext;
g_token->isEMailAddr=TRUE;
return TK_URL;
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 30c3f15..bf74941 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1064,9 +1064,9 @@ static void findUsingDeclarations(Entry *root)
!(root->parent->section&Entry::COMPOUND_MASK) // not a class/struct member
)
{
- printf("Found using declaration %s at line %d of %s inside section %x\n",
- root->name.data(),root->startLine,root->fileName.data(),
- root->parent->section);
+ //printf("Found using declaration %s at line %d of %s inside section %x\n",
+ // root->name.data(),root->startLine,root->fileName.data(),
+ // root->parent->section);
bool ambig;
if (!root->name.isEmpty())
{
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 2f7cde2..01289e9 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -485,12 +485,12 @@ void FileDef::writeSource(OutputList &ol)
void FileDef::addMembersToMemberGroup()
{
- ::addMembersToMemberGroup(&decDefineMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decProtoMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decTypedefMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decEnumMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decFuncMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decVarMembers,memberGroupSDict);
+ ::addMembersToMemberGroup(&decDefineMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decProtoMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decTypedefMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decEnumMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decFuncMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decVarMembers,memberGroupSDict,this);
}
/*! Adds member definition \a md to the list of all members of this file */
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 8b118f1..4ddc35f 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -160,13 +160,13 @@ void GroupDef::addExample(const PageInfo *def)
void GroupDef::addMembersToMemberGroup()
{
- ::addMembersToMemberGroup(&decDefineMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decProtoMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decTypedefMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decEnumMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decEnumValMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decFuncMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decVarMembers,memberGroupSDict);
+ ::addMembersToMemberGroup(&decDefineMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decProtoMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decTypedefMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decEnumMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decEnumValMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decFuncMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decVarMembers,memberGroupSDict,this);
//printf("GroupDef::addMembersToMemberGroup() memberGroupList=%d\n",memberGroupList->count());
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 7b24074..020f57e 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -62,7 +62,7 @@ static const char *defaultStyleSheet =
"TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
-"BODY { background: white }\n"
+"BODY { background: white; color: black }\n"
"TD.indexkey { \n"
" background-color: #eeeeff; \n"
" font-weight: bold; \n"
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index d6567ee..a7f82a4 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -58,7 +58,7 @@ MemberGroup::~MemberGroup()
delete memberList;
}
-void MemberGroup::insertMember(Definition *d,MemberDef *md)
+void MemberGroup::insertMember(MemberDef *md)
{
//printf("MemberGroup::insertMember memberList=%p count=%d"
// " member section list: %p\n",
@@ -67,13 +67,13 @@ void MemberGroup::insertMember(Definition *d,MemberDef *md)
// md->getSectionList());
MemberDef *firstMd = memberList->first();
if (inSameSection && memberList->count()>0 &&
- firstMd->getSectionList(d)!=md->getSectionList(d))
+ firstMd->getSectionList(m_parent)!=md->getSectionList(m_parent))
{
inSameSection=FALSE;
}
else if (inDeclSection==0)
{
- inDeclSection = md->getSectionList(d);
+ inDeclSection = md->getSectionList(m_parent);
}
memberList->append(md);
diff --git a/src/membergroup.h b/src/membergroup.h
index e468436..d3062ec 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -41,7 +41,7 @@ class MemberGroup
~MemberGroup();
QCString header() const { return grpHeader; }
int groupId() const { return grpId; }
- void insertMember(Definition *d,MemberDef *md);
+ void insertMember(MemberDef *md);
void setAnchors(ClassDef *);
void writePlainDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index fb20986..fa73bc0 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -129,12 +129,12 @@ void NamespaceDef::insertNamespace(NamespaceDef *nd)
void NamespaceDef::addMembersToMemberGroup()
{
- ::addMembersToMemberGroup(&decDefineMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decProtoMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decTypedefMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decEnumMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decFuncMembers,memberGroupSDict);
- ::addMembersToMemberGroup(&decVarMembers,memberGroupSDict);
+ ::addMembersToMemberGroup(&decDefineMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decProtoMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decTypedefMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decEnumMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decFuncMembers,memberGroupSDict,this);
+ ::addMembersToMemberGroup(&decVarMembers,memberGroupSDict,this);
}
void NamespaceDef::insertMember(MemberDef *md)
diff --git a/src/util.cpp b/src/util.cpp
index 0ced904..7487af3 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -2475,6 +2475,16 @@ bool resolveRef(/* in */ const char *scName,
*resContext=gd;
return TRUE;
}
+ else if (tsName.find('.')!=-1) // maybe a link to a file
+ {
+ bool ambig;
+ fd=findFileDef(Doxygen::inputNameDict,tsName,ambig);
+ if (fd && !ambig)
+ {
+ *resContext=fd;
+ return TRUE;
+ }
+ }
return FALSE;
}
@@ -3135,6 +3145,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroupSDict *memberGroupSDict,
Definition *context)
{
+ ASSERT(context!=0);
//printf("addMemberToMemberGroup()\n");
MemberListIterator mli(*ml);
MemberDef *md;
@@ -3169,7 +3180,7 @@ void addMembersToMemberGroup(MemberList *ml,
);
memberGroupSDict->append(groupId,mg);
}
- mg->insertMember(context,fmd); // insert in member group
+ mg->insertMember(fmd); // insert in member group
fmd->setMemberGroup(mg);
}
}
@@ -3198,7 +3209,7 @@ void addMembersToMemberGroup(MemberList *ml,
memberGroupSDict->append(groupId,mg);
}
md = ml->take(index); // remove from member list
- mg->insertMember(context,md); // insert in member group
+ mg->insertMember(md); // insert in member group
md->setMemberGroup(mg);
continue;
}
diff --git a/src/util.h b/src/util.h
index c5dcc86..19c6640 100644
--- a/src/util.h
+++ b/src/util.h
@@ -171,7 +171,7 @@ QCString convertToXML(const char *s);
const char * getOverloadDocs();
void addMembersToMemberGroup(MemberList *ml,
MemberGroupSDict *memberGroupSDict,
- Definition *context=0);
+ Definition *context);
bool extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec);
QCString substituteTemplateArgumentsInString(
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index bb73ca5..c1574eb 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -53,6 +53,16 @@ inline void writeXMLString(QTextStream &t,const char *s)
t << convertToXML(s);
}
+inline void writeXMLCodeString(QTextStream &t,const char *s)
+{
+ char c;
+ while ((c=*s++))
+ {
+ if (c==' ') t << "<sp/>"; else t << c;
+ }
+}
+
+
static void writeXMLHeader(QTextStream &t)
{
QCString dtdName = Config_getString("XML_DTD");
@@ -178,7 +188,7 @@ class XMLCodeGenerator : public BaseCodeDocInterface
m_t << "<highlight class=\"normal\">";
m_normalHLNeedStartTag=FALSE;
}
- writeXMLString(m_t,text);
+ writeXMLCodeString(m_t,text);
}
void writeCodeLink(const char *ref,const char *file,
const char *anchor,const char *text)