ReactOS 0.4.16-dev-2232-gc2aaa52
tree.c File Reference
#include "libxml.h"
#include <string.h>
#include <stddef.h>
#include <limits.h>
#include <ctype.h>
#include <stdlib.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/uri.h>
#include <libxml/entities.h>
#include <libxml/xmlerror.h>
#include <libxml/parserInternals.h>
#include "private/buf.h"
#include "private/entities.h"
#include "private/error.h"
#include "private/tree.h"
#include <libxml/hash.h>
Include dependency graph for tree.c:

Go to the source code of this file.

Macros

#define IN_LIBXML
 
#define UPDATE_LAST_CHILD_AND_PARENT(n)
 
#define IS_STR_XML(str)
 
#define CUR_SCHAR(s, l)   xmlStringCurrentChar(NULL, s, &l)
 
#define DICT_FREE(str)
 
#define DICT_COPY(str, cpy)
 
#define DICT_CONST_COPY(str, cpy)
 
#define XML_TREE_NSMAP_PARENT   -1
 
#define XML_TREE_NSMAP_XML   -2
 
#define XML_TREE_NSMAP_DOC   -3
 
#define XML_TREE_NSMAP_CUSTOM   -4
 
#define XML_NSMAP_NOTEMPTY(m)   (((m) != NULL) && ((m)->first != NULL))
 
#define XML_NSMAP_FOREACH(m, i)   for (i = (m)->first; i != NULL; i = (i)->next)
 
#define XML_NSMAP_POP(m, i)
 
#define XML_TREE_ADOPT_STR(str)
 
#define XML_TREE_ADOPT_STR_2(str)
 
#define XHTML_STRICT_PUBLIC_ID
 
#define XHTML_STRICT_SYSTEM_ID
 
#define XHTML_FRAME_PUBLIC_ID
 
#define XHTML_FRAME_SYSTEM_ID
 
#define XHTML_TRANS_PUBLIC_ID
 
#define XHTML_TRANS_SYSTEM_ID
 

Functions

static xmlNsPtr xmlNewReconciledNs (xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns)
 
static xmlCharxmlGetPropNodeValueInternal (const xmlAttr *prop)
 
static void xmlTreeErrMemory (const char *extra)
 

Variables

int __xmlRegisterCallbacks = 0
 

Macro Definition Documentation

◆ CUR_SCHAR

#define CUR_SCHAR (   s,
  l 
)    xmlStringCurrentChar(NULL, s, &l)

◆ DICT_CONST_COPY

#define DICT_CONST_COPY (   str,
  cpy 
)
Value:
if (str) { \
if (dict) { \
if (xmlDictOwns(dict, (const xmlChar *)(str))) \
cpy = (const xmlChar *) (str); \
else \
cpy = xmlDictLookup((dict), (const xmlChar *)(str), -1); \
} else \
cpy = (const xmlChar *) xmlStrdup((const xmlChar *)(str)); }
const WCHAR * str
int xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:376
const xmlChar * xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
Definition: dict.c:824
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:69

◆ DICT_COPY

#define DICT_COPY (   str,
  cpy 
)
Value:
if (str) { \
if (dict) { \
if (xmlDictOwns(dict, (const xmlChar *)(str))) \
cpy = (xmlChar *) (str); \
else \
cpy = (xmlChar *) xmlDictLookup((dict), (const xmlChar *)(str), -1); \
} else \
cpy = xmlStrdup((const xmlChar *)(str)); }

◆ DICT_FREE

#define DICT_FREE (   str)
Value:
if ((str) && ((!dict) || \
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
xmlFree((char *)(str));

◆ IN_LIBXML

#define IN_LIBXML

Definition at line 18 of file tree.c.

◆ IS_STR_XML

#define IS_STR_XML (   str)
Value:
((str != NULL) && (str[0] == 'x') && \
(str[1] == 'm') && (str[2] == 'l') && (str[3] == 0))
#define NULL
Definition: types.h:112

◆ UPDATE_LAST_CHILD_AND_PARENT

#define UPDATE_LAST_CHILD_AND_PARENT (   n)
Value:
if ((n) != NULL) { \
xmlNodePtr ulccur = (n)->children; \
if (ulccur == NULL) { \
(n)->last = NULL; \
} else { \
while (ulccur->next != NULL) { \
ulccur->parent = (n); \
ulccur = ulccur->next; \
} \
ulccur->parent = (n); \
(n)->last = ulccur; \
}}
GLdouble n
Definition: glext.h:7729
static UINT UINT last
Definition: font.c:45
struct define * next
Definition: compiler.c:65

◆ XHTML_FRAME_PUBLIC_ID

#define XHTML_FRAME_PUBLIC_ID
Value:
"-//W3C//DTD XHTML 1.0 Frameset//EN"
#define BAD_CAST
Definition: xmlstring.h:35

◆ XHTML_FRAME_SYSTEM_ID

#define XHTML_FRAME_SYSTEM_ID
Value:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"

◆ XHTML_STRICT_PUBLIC_ID

#define XHTML_STRICT_PUBLIC_ID
Value:
"-//W3C//DTD XHTML 1.0 Strict//EN"

◆ XHTML_STRICT_SYSTEM_ID

#define XHTML_STRICT_SYSTEM_ID
Value:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

◆ XHTML_TRANS_PUBLIC_ID

#define XHTML_TRANS_PUBLIC_ID
Value:
"-//W3C//DTD XHTML 1.0 Transitional//EN"

◆ XHTML_TRANS_SYSTEM_ID

#define XHTML_TRANS_SYSTEM_ID
Value:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

◆ XML_NSMAP_FOREACH

#define XML_NSMAP_FOREACH (   m,
  i 
)    for (i = (m)->first; i != NULL; i = (i)->next)

◆ XML_NSMAP_NOTEMPTY

#define XML_NSMAP_NOTEMPTY (   m)    (((m) != NULL) && ((m)->first != NULL))

◆ XML_NSMAP_POP

#define XML_NSMAP_POP (   m,
  i 
)
Value:
i = (m)->last; \
(m)->last = (i)->prev; \
if ((m)->last == NULL) \
(m)->first = NULL; \
else \
(m)->last->next = NULL; \
(i)->next = (m)->pool; \
(m)->pool = i;
const GLint * first
Definition: glext.h:5794
const GLfloat * m
Definition: glext.h:10848
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

◆ XML_TREE_ADOPT_STR

#define XML_TREE_ADOPT_STR (   str)
Value:
if (adoptStr && (str != NULL)) { \
if (destDoc->dict) { \
const xmlChar *old = str; \
str = xmlDictLookup(destDoc->dict, str, -1); \
if ((sourceDoc == NULL) || (sourceDoc->dict == NULL) || \
(!xmlDictOwns(sourceDoc->dict, old))) \
xmlFree((char *)old); \
} else if ((sourceDoc) && (sourceDoc->dict) && \
xmlDictOwns(sourceDoc->dict, str)) { \
} \
}

◆ XML_TREE_ADOPT_STR_2

#define XML_TREE_ADOPT_STR_2 (   str)
Value:
if (adoptStr && (str != NULL) && (sourceDoc != NULL) && \
(sourceDoc->dict != NULL) && \
xmlDictOwns(sourceDoc->dict, cur->content)) { \
if (destDoc->dict) \
cur->content = (xmlChar *) \
xmlDictLookup(destDoc->dict, cur->content, -1); \
else \
cur->content = xmlStrdup(BAD_CAST cur->content); \
}
FxCollectionEntry * cur

◆ XML_TREE_NSMAP_CUSTOM

#define XML_TREE_NSMAP_CUSTOM   -4

◆ XML_TREE_NSMAP_DOC

#define XML_TREE_NSMAP_DOC   -3

◆ XML_TREE_NSMAP_PARENT

#define XML_TREE_NSMAP_PARENT   -1

◆ XML_TREE_NSMAP_XML

#define XML_TREE_NSMAP_XML   -2

Function Documentation

◆ xmlGetPropNodeValueInternal()

static xmlChar * xmlGetPropNodeValueInternal ( const xmlAttr *  prop)
static

◆ xmlNewReconciledNs()

static xmlNsPtr xmlNewReconciledNs ( xmlDocPtr  doc,
xmlNodePtr  tree,
xmlNsPtr  ns 
)
static

◆ xmlTreeErrMemory()

static void xmlTreeErrMemory ( const char extra)
static

xmlTreeErrMemory: @extra: extra information

Handle an out of memory condition

Definition at line 75 of file tree.c.

76{
78}
@ extra
Definition: id3.c:95
XML_HIDDEN void XML_HIDDEN void __xmlSimpleError(int domain, int code, struct _xmlNode *node, const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4
@ XML_FROM_TREE
Definition: xmlerror.h:39
@ XML_ERR_NO_MEMORY
Definition: xmlerror.h:102

Variable Documentation

◆ __xmlRegisterCallbacks