ReactOS 0.4.15-dev-7918-g2a2556c
tree.c File Reference
#include "libxml.h"
#include <string.h>
#include <stddef.h>
#include <limits.h>
#include <ctype.h>
#include <stdlib.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/uri.h>
#include <libxml/entities.h>
#include <libxml/valid.h>
#include <libxml/xmlerror.h>
#include <libxml/parserInternals.h>
#include <libxml/globals.h>
#include "buf.h"
#include "save.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)
 

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
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
Definition: dict.c:867
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:1220
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:67
unsigned char xmlChar
Definition: xmlstring.h:28

◆ 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
Definition: tree.h:489
struct _xmlNode * next
Definition: tree.h:496
struct _xmlNode * parent
Definition: tree.h:495

◆ 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
struct define * next
Definition: compiler.c:65

◆ 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)) { \
} \
}
#define BAD_CAST
Definition: xmlstring.h:35

◆ 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{
77 __xmlSimpleError(XML_FROM_TREE, XML_ERR_NO_MEMORY, NULL, NULL, extra);
78}
@ extra
Definition: id3.c:95
@ XML_FROM_TREE
Definition: xmlerror.h:39
@ XML_ERR_NO_MEMORY
Definition: xmlerror.h:102

Variable Documentation

◆ __xmlRegisterCallbacks