ReactOS  0.4.13-dev-479-gec9c8fd
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 "elfgcchack.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 bottom_tree
 

Functions

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

Variables

int __xmlRegisterCallbacks = 0
 

Macro Definition Documentation

◆ bottom_tree

#define bottom_tree

◆ 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:858
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:1211
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:66

◆ 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)); }
const WCHAR * str
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
Definition: dict.c:858
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:1211
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:66

◆ DICT_FREE

#define DICT_FREE (   str)
Value:
if ((str) && ((!dict) || \
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
xmlFree((char *)(str));
const WCHAR * str
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:1211

◆ 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))
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416

◆ 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; \
}}
POINT last
Definition: font.c:46
GLdouble n
Definition: glext.h:7729
smooth NULL
Definition: ftsmooth.c:416

◆ 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;
POINT last
Definition: font.c:46
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
smooth NULL
Definition: ftsmooth.c:416

◆ 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)) { \
} \
}
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define BAD_CAST
Definition: xmlstring.h:35
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
Definition: dict.c:858
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:1211
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:66

◆ 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); \
}
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define BAD_CAST
Definition: xmlstring.h:35
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
Definition: dict.c:858
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN int XMLCALL xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:1211
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:66

◆ 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

◆ xmlNewReconciliedNs()

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

◆ xmlTreeErrMemory()

static void xmlTreeErrMemory ( const char extra)
static

xmlTreeErrMemory: @extra: extra informations

Handle an out of memory condition

Definition at line 78 of file tree.c.

79 {
80  __xmlSimpleError(XML_FROM_TREE, XML_ERR_NO_MEMORY, NULL, NULL, extra);
81 }
smooth NULL
Definition: ftsmooth.c:416
Definition: id3.c:18

Variable Documentation

◆ __xmlRegisterCallbacks