libxml
typedef const xmlChar *LPCXSTR;
typedef xmlChar *LPXSTR;
†
LPXSTR xmlConcat(LPCXSTR str1, LPCXSTR str2, LPCXSTR str3)
{
LPXSTR ret;
int len = xmlStrlen(str1) + xmlStrlen(str2) + xmlStrlen(str3) + 1;
ret = (LPXSTR)xmlMalloc(sizeof(xmlChar) * len);
*ret = '\0';
xmlStrcat(ret, str1);
xmlStrcat(ret, str2);
xmlStrcat(ret, str3);
return ret;
}
NsPtr?
int xmlGetNSListSize(xmlNsPtr ns)
{
int i = 0;
if ( ns != NULL )
{
for( i = 1; ns->next != NULL; i++ )
ns = ns->next;
}
return i;
}
NsPtr?
xmlNsPtr *xmlChainNsList(xmlNsPtr *list)
{
int i;
xmlNsPtr *l = list;
if ( list != NULL )
{
for ( i = 1; list[i] != NULL; i++ )
list[ i - 1 ]->next = list[i];
}
return list;
}