mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
format with astyle
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@278 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -598,8 +598,7 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
XML_Char c=XML_T('\n');
|
XML_Char c=XML_T('\n');
|
||||||
CharacterDataHandler(&c, 1);
|
CharacterDataHandler(&c, 1);
|
||||||
}
|
}
|
||||||
else
|
else if (defaultHandler)
|
||||||
if (defaultHandler)
|
|
||||||
reportDefault(enc, s, end);
|
reportDefault(enc, s, end);
|
||||||
|
|
||||||
if (!startTagLevel) return XML_ERROR_NO_ELEMENTS;
|
if (!startTagLevel) return XML_ERROR_NO_ELEMENTS;
|
||||||
@@ -757,7 +756,7 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
if (!tag) return XML_ERROR_NO_MEMORY;
|
if (!tag) return XML_ERROR_NO_MEMORY;
|
||||||
|
|
||||||
tag->buf=new char[INIT_TAG_BUF_SIZE];
|
tag->buf=new char[INIT_TAG_BUF_SIZE];
|
||||||
if (!tag->buf){
|
if (!tag->buf) {
|
||||||
delete tag;
|
delete tag;
|
||||||
return XML_ERROR_NO_MEMORY;
|
return XML_ERROR_NO_MEMORY;
|
||||||
}
|
}
|
||||||
@@ -777,7 +776,7 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
int bufSize=ROUND_UP(tag->rawNameLength*4, sizeof(XML_Char));
|
int bufSize=ROUND_UP(tag->rawNameLength*4, sizeof(XML_Char));
|
||||||
|
|
||||||
tag->buf=(char *) realloc(tag->buf, bufSize);
|
tag->buf=(char *) realloc(tag->buf, bufSize);
|
||||||
if (!tag->buf){
|
if (!tag->buf) {
|
||||||
delete tag;
|
delete tag;
|
||||||
return XML_ERROR_NO_MEMORY;
|
return XML_ERROR_NO_MEMORY;
|
||||||
}
|
}
|
||||||
@@ -816,7 +815,7 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
bufSize=(tag->bufEnd-tag->buf) << 1;
|
bufSize=(tag->bufEnd-tag->buf) << 1;
|
||||||
tag->buf=(char *) realloc(tag->buf, bufSize);
|
tag->buf=(char *) realloc(tag->buf, bufSize);
|
||||||
|
|
||||||
if (!tag->buf){
|
if (!tag->buf) {
|
||||||
delete tag;
|
delete tag;
|
||||||
return XML_ERROR_NO_MEMORY;
|
return XML_ERROR_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
@@ -83,8 +83,14 @@ XMLAttribute::XMLAttribute(XMLAttribute *prv, char *nam, char *val, XMLAttribute
|
|||||||
|
|
||||||
XMLAttribute::~XMLAttribute()
|
XMLAttribute::~XMLAttribute()
|
||||||
{
|
{
|
||||||
if (name) { free(name); name=0; };
|
if (name) {
|
||||||
if (value) { free(value); value=0; };
|
free(name);
|
||||||
|
name=0;
|
||||||
|
};
|
||||||
|
if (value) {
|
||||||
|
free(value);
|
||||||
|
value=0;
|
||||||
|
};
|
||||||
|
|
||||||
next=prev=0;
|
next=prev=0;
|
||||||
}
|
}
|
||||||
@@ -181,8 +187,14 @@ XMLTreeNode::~XMLTreeNode()
|
|||||||
DeleteAttributes();
|
DeleteAttributes();
|
||||||
DeleteChildren();
|
DeleteChildren();
|
||||||
|
|
||||||
if (type) { free(type); type=0; };
|
if (type) {
|
||||||
if (data) { delete[] data; dataSize=0; };
|
free(type);
|
||||||
|
type=0;
|
||||||
|
};
|
||||||
|
if (data) {
|
||||||
|
delete[] data;
|
||||||
|
dataSize=0;
|
||||||
|
};
|
||||||
|
|
||||||
next=0;
|
next=0;
|
||||||
}
|
}
|
||||||
@@ -368,7 +380,8 @@ void XMLTreeNode::DeleteAttributes()
|
|||||||
|
|
||||||
while (a)
|
while (a)
|
||||||
{
|
{
|
||||||
b=a->GetNext(); delete a;
|
b=a->GetNext();
|
||||||
|
delete a;
|
||||||
a=b;
|
a=b;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,7 +397,8 @@ void XMLTreeNode::DeleteChildren()
|
|||||||
|
|
||||||
while (a)
|
while (a)
|
||||||
{
|
{
|
||||||
b=a->next; delete a;
|
b=a->next;
|
||||||
|
delete a;
|
||||||
a=b;
|
a=b;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,7 +414,10 @@ void XMLTreeParser::StartElementHandler(const XML_Char *name, const XML_Char **p
|
|||||||
|
|
||||||
if (a)
|
if (a)
|
||||||
{
|
{
|
||||||
while (*a) { n->SetAttribute((char *) a[0], (char *) a[1]); a+=2; };
|
while (*a) {
|
||||||
|
n->SetAttribute((char *) a[0], (char *) a[1]);
|
||||||
|
a+=2;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current)
|
if (current)
|
||||||
|
Reference in New Issue
Block a user