SF Patch tracker [ 1587272 ] const-ified ixml

Submitted By: Erik Johansson



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@105 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2006-12-23 21:30:32 +00:00
parent 4abbd5a8a4
commit 3b12ced1f8
14 changed files with 155 additions and 151 deletions

View File

@ -1,3 +1,7 @@
2006-12-23 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Erik Johansson's patch for const-ified ixml
2006-12-23 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* David Maass's patch for VStudio2005 compilation failure.

View File

@ -260,7 +260,7 @@ ixmlNode_getNodeName(IXML_Node *nodeptr
* @return [DOMString] A {\bf DOMString} of the {\bf Node} value.
*/
EXPORT_SPEC DOMString
EXPORT_SPEC const DOMString
ixmlNode_getNodeValue(IXML_Node *nodeptr
/** Pointer to the {\bf Node} to retrieve the value. */
);
@ -282,7 +282,7 @@ ixmlNode_getNodeValue(IXML_Node *nodeptr
EXPORT_SPEC int
ixmlNode_setNodeValue(IXML_Node *nodeptr,
/** The {\bf Node} to which to assign a new value. */
char *newNodeValue
const char *newNodeValue
/** The new value of the {\bf Node}. */
);
@ -439,7 +439,7 @@ ixmlNode_getNamespaceURI(IXML_Node *nodeptr
* or {\tt NULL}.
*/
EXPORT_SPEC DOMString
EXPORT_SPEC const DOMString
ixmlNode_getPrefix(IXML_Node *nodeptr
/** The {\bf Node} from which to retrieve the prefix. */
);
@ -867,7 +867,7 @@ EXPORT_SPEC int
ixmlDocument_createCDATASectionEx(IXML_Document *doc,
/** The owner {\bf Document} of the new
node. */
DOMString data,
const DOMString data,
/** The data to associate with the new
{\bf CDATASection} node. */
IXML_CDATASection** cdNode
@ -886,7 +886,7 @@ EXPORT_SPEC IXML_CDATASection*
ixmlDocument_createCDATASection(IXML_Document *doc,
/** The owner {\bf Document} of the new
node. */
DOMString data
const DOMString data
/** The data to associate with the new {\bf
CDATASection} node. */
);
@ -899,7 +899,7 @@ ixmlDocument_createCDATASection(IXML_Document *doc,
EXPORT_SPEC IXML_Attr*
ixmlDocument_createAttribute(IXML_Document *doc,
/** The owner {\bf Document} of the new node. */
char *name
const char *name
/** The name of the new attribute. */
);
@ -924,7 +924,7 @@ EXPORT_SPEC int
ixmlDocument_createAttributeEx(IXML_Document *doc,
/** The owner {\bf Document} of the new
node. */
char *name,
const char *name,
/** The name of the new attribute. */
IXML_Attr** attrNode
/** A pointer to a {\bf Attr} where the new
@ -943,7 +943,7 @@ ixmlDocument_createAttributeEx(IXML_Document *doc,
EXPORT_SPEC IXML_NodeList*
ixmlDocument_getElementsByTagName(IXML_Document *doc,
/** The {\bf Document} to search. */
DOMString tagName
const DOMString tagName
/** The tag name to find. */
);
@ -970,10 +970,10 @@ EXPORT_SPEC int
ixmlDocument_createElementNSEx(IXML_Document *doc,
/** The owner {\bf Document} of the new
node. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI for the new {\bf
Element}. */
DOMString qualifiedName,
const DOMString qualifiedName,
/** The qualified name of the new {\bf
Element}. */
IXML_Element** rtElement
@ -992,10 +992,10 @@ ixmlDocument_createElementNSEx(IXML_Document *doc,
EXPORT_SPEC IXML_Element*
ixmlDocument_createElementNS(IXML_Document *doc,
/** The owner {\bf Document} of the new node. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI for the new {\bf
Element}. */
DOMString qualifiedName
const DOMString qualifiedName
/** The qualified name of the new {\bf
Element}. */
);
@ -1021,9 +1021,9 @@ EXPORT_SPEC int
ixmlDocument_createAttributeNSEx(IXML_Document *doc,
/** The owner {\bf Document} of the new
{\bf Attr}. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI for the attribute. */
DOMString qualifiedName,
const DOMString qualifiedName,
/** The qualified name of the attribute. */
IXML_Attr** attrNode
/** A pointer to an {\bf Attr} where the
@ -1040,9 +1040,9 @@ EXPORT_SPEC IXML_Attr*
ixmlDocument_createAttributeNS(IXML_Document *doc,
/** The owner {\bf Document} of the new
{\bf Attr}. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI for the attribute. */
DOMString qualifiedName
const DOMString qualifiedName
/** The qualified name of the attribute. */
);
@ -1059,11 +1059,11 @@ ixmlDocument_createAttributeNS(IXML_Document *doc,
EXPORT_SPEC IXML_NodeList*
ixmlDocument_getElementsByTagNameNS(IXML_Document* doc,
/** The {\bf Document} to search. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace of the elements to
find or {\tt "*"} to match any
namespace. */
DOMString localName
const DOMString localName
/** The local name of the elements to
find or {\tt "*"} to match any local
name. */
@ -1079,7 +1079,7 @@ EXPORT_SPEC IXML_Element*
ixmlDocument_getElementById(IXML_Document* doc,
/** The owner {\bf Document} of the {\bf
Element}. */
DOMString tagName
const DOMString tagName
/** The name of the {\bf Element}.*/
);
@ -1174,11 +1174,11 @@ ixmlElement_getTagName(IXML_Element* element
* attribute.
*/
EXPORT_SPEC DOMString
EXPORT_SPEC const DOMString
ixmlElement_getAttribute(IXML_Element* element,
/** The {\bf Element} from which to retrieve the
attribute. */
DOMString name
const DOMString name
/** The name of the attribute to retrieve. */
);
@ -1202,9 +1202,9 @@ EXPORT_SPEC int
ixmlElement_setAttribute(IXML_Element* element,
/** The {\bf Element} on which to set the
attribute. */
DOMString name,
const DOMString name,
/** The name of the attribute. */
DOMString value
const DOMString value
/** The value of the attribute. Note that this is
a non-parsed string and any markup must be
escaped. */
@ -1224,7 +1224,7 @@ EXPORT_SPEC int
ixmlElement_removeAttribute(IXML_Element* element,
/** The {\bf Element} from which to remove the
attribute. */
DOMString name
const DOMString name
/** The name of the attribute to remove. */
);
@ -1240,7 +1240,7 @@ EXPORT_SPEC IXML_Attr*
ixmlElement_getAttributeNode(IXML_Element* element,
/** The {\bf Element} from which to get the
attribute node. */
DOMString name
const DOMString name
/** The name of the attribute node to find. */
);
@ -1309,7 +1309,7 @@ EXPORT_SPEC IXML_NodeList*
ixmlElement_getElementsByTagName(IXML_Element* element,
/** The {\bf Element} from which to start
the search. */
DOMString tagName
const DOMString tagName
/** The name of the tag for which to
search. */
);
@ -1322,13 +1322,13 @@ ixmlElement_getElementsByTagName(IXML_Element* element,
* matching attribute.
*/
EXPORT_SPEC DOMString
EXPORT_SPEC const DOMString
ixmlElement_getAttributeNS(IXML_Element* element,
/** The {\bf Element} from which to get the
attribute value. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the attribute. */
DOMString localname
const DOMString localname
/** The local name of the attribute. */
);
@ -1358,11 +1358,11 @@ EXPORT_SPEC int
ixmlElement_setAttributeNS(IXML_Element* element,
/** The {\bf Element} on which to set the
attribute. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the new attribute. */
DOMString qualifiedName,
const DOMString qualifiedName,
/** The qualified name of the attribute. */
DOMString value
const DOMString value
/** The new value for the attribute. */
);
@ -1380,9 +1380,9 @@ EXPORT_SPEC int
ixmlElement_removeAttributeNS(IXML_Element* element,
/** The {\bf Element} from which to remove the
the attribute. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the attribute. */
DOMString localName
const DOMString localName
/** The local name of the attribute.*/
);
@ -1395,9 +1395,9 @@ EXPORT_SPEC IXML_Attr*
ixmlElement_getAttributeNodeNS(IXML_Element* element,
/** The {\bf Element} from which to get the
attribute. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the attribute. */
DOMString localName
const DOMString localName
/** The local name of the attribute. */
);
@ -1441,10 +1441,10 @@ EXPORT_SPEC IXML_NodeList*
ixmlElement_getElementsByTagNameNS(IXML_Element* element,
/** The {\bf Element} from which to start
the search. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the {\bf
Element}s to find. */
DOMString localName
const DOMString localName
/** The local name of the {\bf Element}s
to find. */
);
@ -1461,7 +1461,7 @@ EXPORT_SPEC BOOL
ixmlElement_hasAttribute(IXML_Element* element,
/** The {\bf Element} on which to check for an
attribute. */
DOMString name
const DOMString name
/** The name of the attribute for which to check. */
);
@ -1477,9 +1477,9 @@ EXPORT_SPEC BOOL
ixmlElement_hasAttributeNS(IXML_Element* element,
/** The {\bf Element} on which to check for the
attribute. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the attribute. */
DOMString localName
const DOMString localName
/** The local name of the attribute. */
);
@ -1529,7 +1529,7 @@ ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap
EXPORT_SPEC IXML_Node*
ixmlNamedNodeMap_getNamedItem(IXML_NamedNodeMap *nnMap,
/** The {\bf NamedNodeMap} to search. */
DOMString name
const DOMString name
/** The name of the {\bf Node} to find. */
);
@ -1560,7 +1560,7 @@ EXPORT_SPEC IXML_Node*
ixmlNamedNodeMap_removeNamedItem(IXML_NamedNodeMap *nnMap,
/** The {\bf NamedNodeMap} from which to
remove the item. */
DOMString name
const DOMString name
/** The name of the item to remove. */
);
@ -1592,10 +1592,10 @@ EXPORT_SPEC IXML_Node*
ixmlNamedNodeMap_getNamedItemNS(IXML_NamedNodeMap *nnMap,
/** The {\bf NamedNodeMap} from which to
remove the {\bf Node}. */
DOMString *namespaceURI,
const DOMString *namespaceURI,
/** The namespace URI of the {\bf Node} to
remove. */
DOMString localName
const DOMString localName
/** The local name of the {\bf Node} to
remove. */
);
@ -1627,10 +1627,10 @@ EXPORT_SPEC IXML_Node*
ixmlNamedNodeMap_removeNamedItemNS(IXML_NamedNodeMap *nnMap,
/** The {\bf NamedNodeMap} from which to
remove the {\bf Node}. */
DOMString namespaceURI,
const DOMString namespaceURI,
/** The namespace URI of the {\bf Node}
to remove. */
DOMString localName
const DOMString localName
/** The local name of the {\bf Node} to
remove. */
);
@ -1819,7 +1819,7 @@ ixmlRelaxParser(char errorChar);
* {\tt NULL} on an error.
*/
EXPORT_SPEC IXML_Document*
ixmlParseBuffer(char *buffer
ixmlParseBuffer(const char *buffer
/** The buffer that contains the XML text to convert to a
{\bf Document}. */
);
@ -1842,7 +1842,7 @@ ixmlParseBuffer(char *buffer
*/
EXPORT_SPEC int
ixmlParseBufferEx(char *buffer,
ixmlParseBufferEx(const char *buffer,
/** The buffer that contains the XML text to convert to a
{\bf Document}. */
IXML_Document** doc
@ -1857,7 +1857,7 @@ ixmlParseBufferEx(char *buffer,
*/
EXPORT_SPEC IXML_Document*
ixmlLoadDocument(char* xmlFile
ixmlLoadDocument(const char* xmlFile
/** The filename of the XML text to convert to a {\bf
Document}. */
);
@ -1879,7 +1879,7 @@ ixmlLoadDocument(char* xmlFile
*/
EXPORT_SPEC int
ixmlLoadDocumentEx(char* xmlFile,
ixmlLoadDocumentEx(const char* xmlFile,
/** The filename of the XML text to convert to a {\bf
Document}. */
IXML_Document** doc

View File

@ -373,7 +373,7 @@ ixmlDocument_createTextNode( IN IXML_Document * doc,
================================================================*/
int
ixmlDocument_createAttributeEx( IN IXML_Document * doc,
IN char *name,
IN const char *name,
OUT IXML_Attr ** rtAttr )
{
IXML_Attr *attrNode = NULL;
@ -427,7 +427,7 @@ ixmlDocument_createAttributeEx( IN IXML_Document * doc,
================================================================*/
IXML_Attr *
ixmlDocument_createAttribute( IN IXML_Document * doc,
IN char *name )
IN const char *name )
{
IXML_Attr *attrNode = NULL;
@ -451,8 +451,8 @@ ixmlDocument_createAttribute( IN IXML_Document * doc,
*=================================================================*/
int
ixmlDocument_createAttributeNSEx( IN IXML_Document * doc,
IN DOMString namespaceURI,
IN DOMString qualifiedName,
IN const DOMString namespaceURI,
IN const DOMString qualifiedName,
OUT IXML_Attr ** rtAttr )
{
IXML_Attr *attrNode = NULL;
@ -507,8 +507,8 @@ ixmlDocument_createAttributeNSEx( IN IXML_Document * doc,
*=================================================================*/
IXML_Attr *
ixmlDocument_createAttributeNS( IN IXML_Document * doc,
IN DOMString namespaceURI,
IN DOMString qualifiedName )
IN const DOMString namespaceURI,
IN const DOMString qualifiedName )
{
IXML_Attr *attrNode = NULL;
@ -531,7 +531,7 @@ ixmlDocument_createAttributeNS( IN IXML_Document * doc,
*=================================================================*/
int
ixmlDocument_createCDATASectionEx( IN IXML_Document * doc,
IN DOMString data,
IN const DOMString data,
OUT IXML_CDATASection ** rtCD )
{
int errCode = IXML_SUCCESS;
@ -588,7 +588,7 @@ ixmlDocument_createCDATASectionEx( IN IXML_Document * doc,
*=================================================================*/
IXML_CDATASection *
ixmlDocument_createCDATASection( IN IXML_Document * doc,
IN DOMString data )
IN const DOMString data )
{
IXML_CDATASection *cDSectionNode = NULL;
@ -613,8 +613,8 @@ ixmlDocument_createCDATASection( IN IXML_Document * doc,
*=================================================================*/
int
ixmlDocument_createElementNSEx( IN IXML_Document * doc,
IN DOMString namespaceURI,
IN DOMString qualifiedName,
IN const DOMString namespaceURI,
IN const DOMString qualifiedName,
OUT IXML_Element ** rtElement )
{
@ -673,8 +673,8 @@ ixmlDocument_createElementNSEx( IN IXML_Document * doc,
*=================================================================*/
IXML_Element *
ixmlDocument_createElementNS( IN IXML_Document * doc,
IN DOMString namespaceURI,
IN DOMString qualifiedName )
IN const DOMString namespaceURI,
IN const DOMString qualifiedName )
{
IXML_Element *newElement = NULL;
@ -698,7 +698,7 @@ ixmlDocument_createElementNS( IN IXML_Document * doc,
*=================================================================*/
IXML_NodeList *
ixmlDocument_getElementsByTagName( IN IXML_Document * doc,
IN char *tagName )
IN const char *tagName )
{
IXML_NodeList *returnNodeList = NULL;
@ -728,8 +728,8 @@ ixmlDocument_getElementsByTagName( IN IXML_Document * doc,
*=================================================================*/
IXML_NodeList *
ixmlDocument_getElementsByTagNameNS( IN IXML_Document * doc,
IN DOMString namespaceURI,
IN DOMString localName )
IN const DOMString namespaceURI,
IN const DOMString localName )
{
IXML_NodeList *returnNodeList = NULL;
@ -756,7 +756,7 @@ ixmlDocument_getElementsByTagNameNS( IN IXML_Document * doc,
*=================================================================*/
IXML_Element *
ixmlDocument_getElementById( IN IXML_Document * doc,
IN DOMString tagName )
IN const DOMString tagName )
{
IXML_Element *rtElement = NULL;
IXML_Node *nodeptr = ( IXML_Node * ) doc;

View File

@ -71,7 +71,7 @@ ixmlElement_getTagName( IN IXML_Element * element )
*=================================================================*/
int
ixmlElement_setTagName( IN IXML_Element * element,
IN char *tagName )
IN const char *tagName )
{
int rc = IXML_SUCCESS;
@ -104,9 +104,9 @@ ixmlElement_setTagName( IN IXML_Element * element,
* does not have a specified value.
*
*=================================================================*/
DOMString
const DOMString
ixmlElement_getAttribute( IN IXML_Element * element,
IN DOMString name )
IN const DOMString name )
{
IXML_Node *attrNode;
@ -142,8 +142,8 @@ ixmlElement_getAttribute( IN IXML_Element * element,
*=================================================================*/
int
ixmlElement_setAttribute( IN IXML_Element * element,
IN char *name,
IN char *value )
IN const char *name,
IN const char *value )
{
IXML_Node *attrNode;
IXML_Attr *newAttrNode;
@ -221,7 +221,7 @@ ixmlElement_setAttribute( IN IXML_Element * element,
*=================================================================*/
int
ixmlElement_removeAttribute( IN IXML_Element * element,
IN char *name )
IN const char *name )
{
IXML_Node *attrNode;
@ -262,7 +262,7 @@ ixmlElement_removeAttribute( IN IXML_Element * element,
*=================================================================*/
IXML_Attr *
ixmlElement_getAttributeNode( IN IXML_Element * element,
IN char *name )
IN const char *name )
{
IXML_Node *attrNode;
@ -483,7 +483,7 @@ ixmlElement_removeAttributeNode( IN IXML_Element * element,
*=================================================================*/
IXML_NodeList *
ixmlElement_getElementsByTagName( IN IXML_Element * element,
IN char *tagName )
IN const char *tagName )
{
IXML_NodeList *returnNodeList = NULL;
@ -508,10 +508,10 @@ ixmlElement_getElementsByTagName( IN IXML_Element * element,
* not have the specified value.
*
*=================================================================*/
DOMString
const DOMString
ixmlElement_getAttributeNS( IN IXML_Element * element,
IN DOMString namespaceURI,
IN DOMString localName )
IN const DOMString namespaceURI,
IN const DOMString localName )
{
IXML_Node *attrNode;
@ -553,9 +553,9 @@ ixmlElement_getAttributeNS( IN IXML_Element * element,
*=================================================================*/
int
ixmlElement_setAttributeNS( IN IXML_Element * element,
IN DOMString namespaceURI,
IN DOMString qualifiedName,
IN DOMString value )
IN const DOMString namespaceURI,
IN const DOMString qualifiedName,
IN const DOMString value )
{
IXML_Node *attrNode = NULL;
IXML_Node newAttrNode;
@ -672,8 +672,8 @@ ixmlElement_setAttributeNS( IN IXML_Element * element,
*=================================================================*/
int
ixmlElement_removeAttributeNS( IN IXML_Element * element,
IN DOMString namespaceURI,
IN DOMString localName )
IN const DOMString namespaceURI,
IN const DOMString localName )
{
IXML_Node *attrNode;
@ -719,8 +719,8 @@ ixmlElement_removeAttributeNS( IN IXML_Element * element,
*=================================================================*/
IXML_Attr *
ixmlElement_getAttributeNodeNS( IN IXML_Element * element,
IN DOMString namespaceURI,
IN DOMString localName )
IN const DOMString namespaceURI,
IN const DOMString localName )
{
IXML_Node *attrNode;
@ -861,8 +861,8 @@ ixmlElement_setAttributeNodeNS( IN IXML_Element * element,
*=================================================================*/
IXML_NodeList *
ixmlElement_getElementsByTagNameNS( IN IXML_Element * element,
IN DOMString namespaceURI,
IN DOMString localName )
IN const DOMString namespaceURI,
IN const DOMString localName )
{
IXML_Node *node = ( IXML_Node * ) element;
IXML_NodeList *nodeList = NULL;
@ -892,7 +892,7 @@ ixmlElement_getElementsByTagNameNS( IN IXML_Element * element,
*=================================================================*/
BOOL
ixmlElement_hasAttribute( IN IXML_Element * element,
IN DOMString name )
IN const DOMString name )
{
IXML_Node *attrNode;
@ -930,8 +930,8 @@ ixmlElement_hasAttribute( IN IXML_Element * element,
*=================================================================*/
BOOL
ixmlElement_hasAttributeNS( IN IXML_Element * element,
IN DOMString namespaceURI,
IN DOMString localName )
IN const DOMString namespaceURI,
IN const DOMString localName )
{
IXML_Node *attrNode;

View File

@ -88,8 +88,8 @@ typedef struct _Parser
int Parser_LoadDocument( IXML_Document **retDoc, char * xmlFile, BOOL file);
BOOL Parser_isValidXmlName( DOMString name);
int Parser_LoadDocument( IXML_Document **retDoc, const char * xmlFile, BOOL file);
BOOL Parser_isValidXmlName( const DOMString name);
int Parser_setNodePrefixAndLocalName(IXML_Node *newIXML_NodeIXML_Attr);
void Parser_freeNodeContent( IXML_Node *IXML_Nodeptr);
@ -98,7 +98,7 @@ void Parser_setErrorChar( char c );
void ixmlAttr_free(IXML_Attr *attrNode);
void ixmlAttr_init(IXML_Attr *attrNode);
int ixmlElement_setTagName(IXML_Element *element, char *tagName);
int ixmlElement_setTagName(IXML_Element *element, const char *tagName);
void ixmlNamedNodeMap_init(IXML_NamedNodeMap *nnMap);
int ixmlNamedNodeMap_addToNamedNodeMap(IXML_NamedNodeMap **nnMap, IXML_Node *add);
@ -106,12 +106,12 @@ int ixmlNamedNodeMap_addToNamedNodeMap(IXML_NamedNodeMap **nnMap, IXML_Node
void ixmlNode_init(IXML_Node *IXML_Nodeptr);
BOOL ixmlNode_compare(IXML_Node *srcIXML_Node, IXML_Node *destIXML_Node);
void ixmlNode_getElementsByTagName( IXML_Node *n, char *tagname, IXML_NodeList **list);
void ixmlNode_getElementsByTagNameNS( IXML_Node *IXML_Node, char *namespaceURI,
char *localName, IXML_NodeList **list);
void ixmlNode_getElementsByTagName( IXML_Node *n, const char *tagname, IXML_NodeList **list);
void ixmlNode_getElementsByTagNameNS( IXML_Node *IXML_Node, const char *namespaceURI,
const char *localName, IXML_NodeList **list);
int ixmlNode_setNodeProperties(IXML_Node* node, IXML_Node *src);
int ixmlNode_setNodeName( IXML_Node* node, DOMString qualifiedName);
int ixmlNode_setNodeName( IXML_Node* node, const DOMString qualifiedName);
void ixmlNodeList_init(IXML_NodeList *nList);
int ixmlNodeList_addToNodeList(IXML_NodeList **nList, IXML_Node *add);

View File

@ -39,7 +39,7 @@
*=================================================================*/
static void
copy_with_escape( INOUT ixml_membuf * buf,
IN char *p )
IN const char *p )
{
int i;
int plen;
@ -87,13 +87,13 @@ void
ixmlPrintDomTreeRecursive( IN IXML_Node * nodeptr,
IN ixml_membuf * buf )
{
char *nodeName = NULL;
char *nodeValue = NULL;
const char *nodeName = NULL;
const char *nodeValue = NULL;
IXML_Node *child = NULL,
*sibling = NULL;
if( nodeptr != NULL ) {
nodeName = ( char * )ixmlNode_getNodeName( nodeptr );
nodeName = ( const char * )ixmlNode_getNodeName( nodeptr );
nodeValue = ixmlNode_getNodeValue( nodeptr );
switch ( ixmlNode_getNodeType( nodeptr ) ) {
@ -188,15 +188,15 @@ void
ixmlPrintDomTree( IN IXML_Node * nodeptr,
IN ixml_membuf * buf )
{
char *nodeName = NULL;
char *nodeValue = NULL;
const char *nodeName = NULL;
const char *nodeValue = NULL;
IXML_Node *child = NULL;
if( ( nodeptr == NULL ) || ( buf == NULL ) ) {
return;
}
nodeName = ( char * )ixmlNode_getNodeName( nodeptr );
nodeName = ( const char * )ixmlNode_getNodeName( nodeptr );
nodeValue = ixmlNode_getNodeValue( nodeptr );
switch ( ixmlNode_getNodeType( nodeptr ) ) {
@ -259,15 +259,15 @@ void
ixmlDomTreetoString( IN IXML_Node * nodeptr,
IN ixml_membuf * buf )
{
char *nodeName = NULL;
char *nodeValue = NULL;
const char *nodeName = NULL;
const char *nodeValue = NULL;
IXML_Node *child = NULL;
if( ( nodeptr == NULL ) || ( buf == NULL ) ) {
return;
}
nodeName = ( char * )ixmlNode_getNodeName( nodeptr );
nodeName = ( const char * )ixmlNode_getNodeName( nodeptr );
nodeValue = ixmlNode_getNodeValue( nodeptr );
switch ( ixmlNode_getNodeType( nodeptr ) ) {
@ -325,7 +325,7 @@ ixmlDomTreetoString( IN IXML_Node * nodeptr,
*
*=================================================================*/
int
ixmlLoadDocumentEx( IN char *xmlFile,
ixmlLoadDocumentEx( IN const char *xmlFile,
IXML_Document ** doc )
{
@ -343,7 +343,7 @@ ixmlLoadDocumentEx( IN char *xmlFile,
*
*=================================================================*/
IXML_Document *
ixmlLoadDocument( IN char *xmlFile )
ixmlLoadDocument( IN const char *xmlFile )
{
IXML_Document *doc = NULL;
@ -470,7 +470,7 @@ ixmlRelaxParser(char errorChar)
*
*=================================================================*/
int
ixmlParseBufferEx( IN char *buffer,
ixmlParseBufferEx( IN const char *buffer,
IXML_Document ** retDoc )
{
@ -478,7 +478,7 @@ ixmlParseBufferEx( IN char *buffer,
return IXML_INVALID_PARAMETER;
}
if( strlen( buffer ) == 0 ) {
if( buffer[0] == '\0' ) {
return IXML_INVALID_PARAMETER;
}
@ -492,7 +492,7 @@ ixmlParseBufferEx( IN char *buffer,
*
*=================================================================*/
IXML_Document *
ixmlParseBuffer( IN char *buffer )
ixmlParseBuffer( IN const char *buffer )
{
IXML_Document *doc = NULL;

View File

@ -232,13 +232,13 @@ static BOOL Parser_ElementPrefixDefined( Parser * myParser,
IXML_Node * newNode,
char **nsURI );
static int Parser_setElementNamespace( IXML_Element * newElement,
char *nsURI );
const char *nsURI );
static int Parser_parseDocument( IXML_Document ** retDoc,
Parser * domParser );
static BOOL Parser_hasDefaultNamespace( Parser * xmlParser,
IXML_Node * newNode,
char **nsURI );
static int Parser_getChar( IN char *src,
static int Parser_getChar( IN const char *src,
INOUT int *cLen );
/*==============================================================================*
@ -312,9 +312,9 @@ Parser_isNameChar( IN int c,
*
*===============================================================================*/
BOOL
Parser_isValidXmlName( IN DOMString name )
Parser_isValidXmlName( IN const DOMString name )
{
char *pstr = NULL;
const char *pstr = NULL;
int i = 0,
nameLen = 0;
@ -419,11 +419,11 @@ Parser_intToUTF8( IN int c,
*
*===============================================================================*/
static int
Parser_UTF8ToInt( IN char *ss,
Parser_UTF8ToInt( IN const char *ss,
OUT int *len )
{
unsigned char *s = ( unsigned char * )ss;
const unsigned char *s = ( const unsigned char * )ss;
int c = *s;
if( c <= 127 ) { // if c<=127, c is just the character.
@ -602,7 +602,7 @@ Parser_popElement( IN Parser * xmlParser )
*=================================================================*/
static int
Parser_readFileOrBuffer( IN Parser * xmlParser,
IN char *xmlFileName,
IN const char *xmlFileName,
IN BOOL file )
{
int fileSize = 0;
@ -651,7 +651,7 @@ Parser_readFileOrBuffer( IN Parser * xmlParser,
*=================================================================*/
int
Parser_LoadDocument( OUT IXML_Document ** retDoc,
IN char *xmlFileName,
IN const char *xmlFileName,
IN BOOL file )
{
int rc = IXML_SUCCESS;
@ -1117,10 +1117,10 @@ Parser_skipWhiteSpaces( IN Parser * xmlParser )
*
*===============================================================================*/
static int
Parser_getChar( IN char *src,
Parser_getChar( IN const char *src,
INOUT int *cLen )
{
char *pnum;
const char *pnum;
int sum;
char c;
int i;
@ -1213,13 +1213,13 @@ fail_entity:
*===============================================================================*/
static int
Parser_copyToken( IN Parser * xmlParser,
IN char *src,
IN const char *src,
IN int len )
{
int i,
c,
cl;
char *psrc,
const char *psrc,
*pend;
utf8char uch;
@ -1563,7 +1563,7 @@ Parser_getNextToken( IN Parser * xmlParser )
*===============================================================================*/
static char *
Parser_getNameSpace( IN Parser * xmlParser,
IN char *prefix )
IN const char *prefix )
{
IXML_ElementStack *pCur;
IXML_NamespaceURI *pNsUri;
@ -1597,7 +1597,7 @@ Parser_addNamespace( IN Parser * xmlParser )
{
IXML_Node *pNode;
IXML_ElementStack *pCur;
char *namespaceUri;
const char *namespaceUri;
pNode = xmlParser->pNeedPrefixNode;
pCur = xmlParser->pCurElement;
@ -2002,7 +2002,7 @@ Parser_processCDSect( IN char **pSrc,
*===============================================================================*/
static int
Parser_setElementNamespace( IN IXML_Element * newElement,
IN char *nsURI )
IN const char *nsURI )
{
if( newElement != NULL ) {
if( newElement->n.namespaceURI != NULL ) {

View File

@ -41,7 +41,7 @@
*=================================================================*/
unsigned long
ixmlNamedNodeMap_getItemNumber( IN IXML_NamedNodeMap * nnMap,
IN char *name )
IN const char *name )
{
IXML_Node *tempNode;
unsigned long returnItemNo = 0;
@ -92,7 +92,7 @@ ixmlNamedNodeMap_init( IN IXML_NamedNodeMap * nnMap )
*=================================================================*/
IXML_Node *
ixmlNamedNodeMap_getNamedItem( IN IXML_NamedNodeMap * nnMap,
IN char *name )
IN const char *name )
{
long index;

View File

@ -175,7 +175,7 @@ ixmlNode_getLocalName( IN IXML_Node * nodeptr )
*=================================================================*/
int
ixmlNode_setNamespaceURI( IN IXML_Node * nodeptr,
IN char *namespaceURI )
IN const char *namespaceURI )
{
if( nodeptr == NULL ) {
@ -207,7 +207,7 @@ ixmlNode_setNamespaceURI( IN IXML_Node * nodeptr,
*=================================================================*/
int
ixmlNode_setPrefix( IN IXML_Node * nodeptr,
IN char *prefix )
IN const char *prefix )
{
if( nodeptr == NULL ) {
@ -240,7 +240,7 @@ ixmlNode_setPrefix( IN IXML_Node * nodeptr,
*=================================================================*/
int
ixmlNode_setLocalName( IN IXML_Node * nodeptr,
IN char *localName )
IN const char *localName )
{
assert( nodeptr != NULL );
@ -288,10 +288,10 @@ ixmlNode_getNamespaceURI( IN IXML_Node * nodeptr )
* the prefix of the node.
*
*=================================================================*/
DOMString
const DOMString
ixmlNode_getPrefix( IN IXML_Node * nodeptr )
{
DOMString prefix = NULL;
const DOMString prefix = NULL;
if( nodeptr != NULL ) {
prefix = nodeptr->prefix;
@ -309,7 +309,7 @@ ixmlNode_getPrefix( IN IXML_Node * nodeptr )
* the nodeValue of the node.
*
*=================================================================*/
DOMString
const DOMString
ixmlNode_getNodeValue( IN IXML_Node * nodeptr )
{
@ -330,7 +330,7 @@ ixmlNode_getNodeValue( IN IXML_Node * nodeptr )
*=================================================================*/
int
ixmlNode_setNodeValue( IN IXML_Node * nodeptr,
IN char *newNodeValue )
IN const char *newNodeValue )
{
int rc = IXML_SUCCESS;
@ -1425,7 +1425,7 @@ ixmlNode_hasAttributes( IXML_Node * nodeptr )
*=================================================================*/
void
ixmlNode_getElementsByTagNameRecursive( IN IXML_Node * n,
IN char *tagname,
IN const char *tagname,
OUT IXML_NodeList ** list )
{
const char *name;
@ -1457,7 +1457,7 @@ ixmlNode_getElementsByTagNameRecursive( IN IXML_Node * n,
*=================================================================*/
void
ixmlNode_getElementsByTagName( IN IXML_Node * n,
IN char *tagname,
IN const char *tagname,
OUT IXML_NodeList ** list )
{
const char *name;
@ -1484,8 +1484,8 @@ ixmlNode_getElementsByTagName( IN IXML_Node * n,
*=================================================================*/
void
ixmlNode_getElementsByTagNameNSRecursive( IN IXML_Node * n,
IN char *namespaceURI,
IN char *localName,
IN const char *namespaceURI,
IN const char *localName,
OUT IXML_NodeList ** list )
{
const DOMString nsURI;
@ -1525,8 +1525,8 @@ ixmlNode_getElementsByTagNameNSRecursive( IN IXML_Node * n,
*=================================================================*/
void
ixmlNode_getElementsByTagNameNS( IN IXML_Node * n,
IN char *namespaceURI,
IN char *localName,
IN const char *namespaceURI,
IN const char *localName,
OUT IXML_NodeList ** list )
{
const DOMString nsURI;
@ -1560,7 +1560,7 @@ ixmlNode_getElementsByTagNameNS( IN IXML_Node * n,
*=================================================================*/
int
ixmlNode_setNodeName( IN IXML_Node * node,
IN DOMString qualifiedName )
IN const DOMString qualifiedName )
{
int rc = IXML_SUCCESS;

View File

@ -664,7 +664,7 @@ DOMString
getElementValue( IXML_Node * node )
{
IXML_Node *child = ( IXML_Node * ) ixmlNode_getFirstChild( node );
DOMString temp = NULL;
const DOMString temp = NULL;
if( ( child != 0 ) && ( ixmlNode_getNodeType( child ) == eTEXT_NODE ) ) {
temp = ixmlNode_getNodeValue( child );

View File

@ -212,11 +212,11 @@ dom_find_deep_node( IN char *names[],
*
* Note :The given node must have a text node as its first child
****************************************************************************/
static DOMString
static const DOMString
get_node_value( IN IXML_Node * node )
{
IXML_Node *text_node = NULL;
DOMString text_value = NULL;
const DOMString text_value = NULL;
text_node = ixmlNode_getFirstChild( node );
if( text_node == NULL ) {
@ -414,12 +414,12 @@ get_response_value( IN http_message_t * hmsg,
IXML_Node *error_node = NULL;
IXML_Document *doc = NULL;
char *node_str = NULL;
char *temp_str = NULL;
const char *temp_str = NULL;
DOMString error_node_str = NULL;
int err_code;
xboolean done = FALSE;
char *names[5];
DOMString nodeValue;
const DOMString nodeValue;
err_code = UPNP_E_BAD_RESPONSE; // default error

View File

@ -780,7 +780,7 @@ get_var_name( IN IXML_Document * TempDoc,
IXML_Node *VarNameNode = NULL;
IXML_Node *VarNode = NULL;
const DOMString StNodeName = NULL;
DOMString Temp = NULL;
const DOMString Temp = NULL;
int ret_val = -1;
// Got the Envelop node here

View File

@ -112,7 +112,7 @@ CLIENTONLY( SOCKET gSsdpReqSocket = 0;
IXML_Node *tmpNode = NULL;
IXML_Node *tmpNode2 = NULL;
IXML_Node *textNode = NULL;
DOMString tmpStr;
const DOMString tmpStr;
char SERVER[200];
DBGONLY( const DOMString dbgStr;

View File

@ -213,7 +213,7 @@ config_description_doc( INOUT IXML_Document * doc,
IXML_Node *rootNode = NULL;
IXML_Node *urlbase_node = NULL;
char *urlBaseStr = "URLBase";
DOMString domStr = NULL;
const DOMString domStr = NULL;
uri_type uri;
int err_code;
int len;