ReactOS 0.4.16-dev-2207-geb15453
globals.c File Reference
#include "libxml.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/globals.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlIO.h>
#include <libxml/HTMLparser.h>
#include <libxml/parser.h>
#include <libxml/threads.h>
#include <libxml/tree.h>
#include <libxml/SAX.h>
#include <libxml/SAX2.h>
#include "private/error.h"
#include "private/globals.h"
#include "private/threads.h"
#include "private/tree.h"
Include dependency graph for globals.c:

Go to the source code of this file.

Classes

struct  _xmlGlobalState
 

Macros

#define IN_LIBXML
 
#define XML_GLOBALS_NO_REDEFINITION
 
#define IS_MAIN_THREAD   1
 
#define XML_DECLARE_MEMBER(name, type, attrs)    type gs_##name;
 
#define XML_OP   XML_DECLARE_MEMBER
 

Functions

static charxmlPosixStrdup (const char *cur)
 
void xmlInitGlobals (void)
 
void xmlInitGlobalsInternal (void)
 
void xmlCleanupGlobals (void)
 
void xmlCleanupGlobalsInternal (void)
 
void xmlInitializeGlobalState (xmlGlobalStatePtr gs ATTRIBUTE_UNUSED)
 
xmlGlobalStatePtr xmlGetGlobalState (void)
 
static int xmlIsMainThreadInternal (void)
 
int xmlIsMainThread (void)
 
int xmlCheckThreadLocalStorage (void)
 
void xmlThrDefSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler)
 
void xmlThrDefSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler)
 
xmlBufferAllocationScheme xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v)
 
int xmlThrDefDefaultBufferSize (int v)
 
int xmlThrDefDoValidityCheckingDefaultValue (int v)
 
int xmlThrDefGetWarningsDefaultValue (int v)
 
int xmlThrDefKeepBlanksDefaultValue (int v)
 
int xmlThrDefLineNumbersDefaultValue (int v)
 
int xmlThrDefLoadExtDtdDefaultValue (int v)
 
int xmlThrDefParserDebugEntities (int v)
 
int xmlThrDefPedanticParserDefaultValue (int v)
 
int xmlThrDefSubstituteEntitiesDefaultValue (int v)
 
xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault (xmlRegisterNodeFunc func)
 
xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault (xmlDeregisterNodeFunc func)
 
xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func)
 
xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func)
 

Variables

static int parserInitialized
 
static xmlMutex xmlThrDefMutex
 
xmlFreeFunc xmlFree = free
 
xmlMallocFunc xmlMalloc = malloc
 
xmlMallocFunc xmlMallocAtomic = malloc
 
xmlReallocFunc xmlRealloc = realloc
 
xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup
 
xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT
 
static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT
 
int xmlDefaultBufferSize = BASE_BUFFER_SIZE
 
static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE
 
int oldXMLWDcompatibility = 0
 
int xmlParserDebugEntities = 0
 
static int xmlParserDebugEntitiesThrDef = 0
 
int xmlDoValidityCheckingDefaultValue = 0
 
static int xmlDoValidityCheckingDefaultValueThrDef = 0
 
int xmlGetWarningsDefaultValue = 1
 
static int xmlGetWarningsDefaultValueThrDef = 1
 
int xmlLoadExtDtdDefaultValue = 0
 
static int xmlLoadExtDtdDefaultValueThrDef = 0
 
int xmlPedanticParserDefaultValue = 0
 
static int xmlPedanticParserDefaultValueThrDef = 0
 
int xmlLineNumbersDefaultValue = 0
 
static int xmlLineNumbersDefaultValueThrDef = 0
 
int xmlKeepBlanksDefaultValue = 1
 
static int xmlKeepBlanksDefaultValueThrDef = 1
 
int xmlSubstituteEntitiesDefaultValue = 0
 
static int xmlSubstituteEntitiesDefaultValueThrDef = 0
 
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL
 
static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL
 
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL
 
static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL
 
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue = NULL
 
static xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef = NULL
 
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL
 
static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef = NULL
 
xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc
 
static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc
 
xmlStructuredErrorFunc xmlStructuredError = NULL
 
static xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL
 
voidxmlGenericErrorContext = NULL
 
static voidxmlGenericErrorContextThrDef = NULL
 
voidxmlStructuredErrorContext = NULL
 
static voidxmlStructuredErrorContextThrDef = NULL
 
xmlError xmlLastError
 
xmlSAXLocator xmlDefaultSAXLocator
 

Macro Definition Documentation

◆ IN_LIBXML

#define IN_LIBXML

Definition at line 11 of file globals.c.

◆ IS_MAIN_THREAD

#define IS_MAIN_THREAD   1

Definition at line 64 of file globals.c.

◆ XML_DECLARE_MEMBER

#define XML_DECLARE_MEMBER (   name,
  type,
  attrs 
)     type gs_##name;

Definition at line 67 of file globals.c.

◆ XML_GLOBALS_NO_REDEFINITION

#define XML_GLOBALS_NO_REDEFINITION

Definition at line 18 of file globals.c.

◆ XML_OP

#define XML_OP   XML_DECLARE_MEMBER

Definition at line 79 of file globals.c.

Function Documentation

◆ xmlCheckThreadLocalStorage()

int xmlCheckThreadLocalStorage ( void  )

xmlCheckThreadLocalStorage:

Check whether thread-local storage could be allocated.

In cross-platform code running in multithreaded environments, this function should be called once in each thread before calling other library functions to make sure that thread-local storage was allocated properly.

Returns 0 on success or -1 if a memory allocation failed. A failed allocation signals a typically fatal and irrecoverable out-of-memory situation. Don't call any library functions in this case.

This function never fails if the library is compiled with support for thread-local storage.

This function never fails for the "main" thread which is the first thread calling xmlInitParser.

Available since v2.12.0.

Definition at line 945 of file globals.c.

945 {
946#if defined(LIBXML_THREAD_ENABLED) && !defined(USE_TLS)
947 if ((!xmlIsMainThreadInternal()) && (xmlGetThreadLocalStorage(1) == NULL))
948 return(-1);
949#endif
950 return(0);
951}
#define NULL
Definition: types.h:112
static int xmlIsMainThreadInternal(void)
Definition: globals.c:665

◆ xmlCleanupGlobals()

void xmlCleanupGlobals ( void  )

xmlCleanupGlobals:

DEPRECATED: This function is a no-op. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all.

Definition at line 609 of file globals.c.

609 {
610}

◆ xmlCleanupGlobalsInternal()

void xmlCleanupGlobalsInternal ( void  )

xmlCleanupGlobalsInternal:

Additional cleanup for multi-threading

Definition at line 617 of file globals.c.

617 {
619
621
622#ifdef HAVE_POSIX_THREADS
623#ifdef XML_PTHREAD_WEAK
624 if (libxml_is_threaded == 0)
625 return;
626#endif /* XML_PTHREAD_WEAK */
627 pthread_key_delete(globalkey);
628#elif defined(HAVE_WIN32_THREADS)
629#ifndef USE_TLS
630 if (globalkey != TLS_OUT_OF_INDEXES) {
631 TlsFree(globalkey);
632 globalkey = TLS_OUT_OF_INDEXES;
633 }
634#endif
635#endif
636
638}
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166
XML_HIDDEN void xmlCleanupMutex(xmlMutexPtr mutex)
Definition: threads.c:166
xmlError xmlLastError
Definition: globals.c:419
static int parserInitialized
Definition: globals.c:89
static xmlMutex xmlThrDefMutex
Definition: globals.c:94
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:529
XMLPUBFUN void xmlResetError(xmlErrorPtr err)

Referenced by xmlCleanupParser().

◆ xmlGetGlobalState()

xmlGlobalStatePtr xmlGetGlobalState ( void  )

xmlGetGlobalState:

DEPRECATED

Returns NULL.

Definition at line 659 of file globals.c.

660{
661 return(NULL);
662}

◆ xmlInitGlobals()

void xmlInitGlobals ( void  )

xmlInitGlobals:

DEPRECATED: Alias for xmlInitParser.

Definition at line 562 of file globals.c.

562 {
564}
XML_GLOBALS_PARSER XMLPUBFUN void xmlInitParser(void)
Definition: threads.c:569

◆ xmlInitGlobalsInternal()

void xmlInitGlobalsInternal ( void  )

xmlInitGlobalsInternal:

Additional initialisation for multi-threading

Definition at line 571 of file globals.c.

571 {
573
574#ifdef HAVE_POSIX_THREADS
575#ifdef XML_PTHREAD_WEAK
576 if (libxml_is_threaded == -1)
577 libxml_is_threaded =
578 (pthread_getspecific != NULL) &&
579 (pthread_setspecific != NULL) &&
580 (pthread_key_create != NULL) &&
581 (pthread_key_delete != NULL) &&
582 /*
583 * pthread_equal can be inline, resuting in -Waddress warnings.
584 * Let's assume it's available if all the other functions are.
585 */
586 /* (pthread_equal != NULL) && */
587 (pthread_self != NULL);
588 if (libxml_is_threaded == 0)
589 return;
590#endif /* XML_PTHREAD_WEAK */
591 pthread_key_create(&globalkey, xmlFreeGlobalState);
592 mainthread = pthread_self();
593#elif defined(HAVE_WIN32_THREADS)
594#ifndef USE_TLS
595 globalkey = TlsAlloc();
596#endif
597 mainthread = GetCurrentThreadId();
598#endif
599}
DWORD WINAPI DECLSPEC_HOTPATCH TlsAlloc(void)
Definition: thread.c:657
XML_HIDDEN void xmlInitMutex(xmlMutexPtr mutex)
Definition: threads.c:128
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459

Referenced by xmlInitParser().

◆ xmlInitializeGlobalState()

void xmlInitializeGlobalState ( xmlGlobalStatePtr gs  ATTRIBUTE_UNUSED)

xmlInitializeGlobalState: @gs: a pointer to a newly allocated global state

DEPRECATED: No-op.

Definition at line 647 of file globals.c.

648{
649}

◆ xmlIsMainThread()

int xmlIsMainThread ( void  )

xmlIsMainThread:

DEPRECATED: Internal function, do not use.

Check whether the current thread is the main thread.

Returns 1 if the current thread is the main thread, 0 otherwise

Definition at line 694 of file globals.c.

694 {
695 return(xmlIsMainThreadInternal());
696}

◆ xmlIsMainThreadInternal()

static int xmlIsMainThreadInternal ( void  )
static

Definition at line 665 of file globals.c.

665 {
666 if (parserInitialized == 0) {
669 }
670
671#ifdef HAVE_POSIX_THREADS
672#ifdef XML_PTHREAD_WEAK
673 if (libxml_is_threaded == 0)
674 return (1);
675#endif
676 return (pthread_equal(mainthread, pthread_self()));
677#elif defined HAVE_WIN32_THREADS
678 return (mainthread == GetCurrentThreadId());
679#else
680 return (1);
681#endif
682}

Referenced by xmlCheckThreadLocalStorage(), and xmlIsMainThread().

◆ xmlPosixStrdup()

static char * xmlPosixStrdup ( const char cur)
static

xmlPosixStrdup @cur: the input char *

a strdup implementation with a type signature matching POSIX

Returns a new xmlChar * or NULL

Definition at line 224 of file globals.c.

224 {
225 return((char*) xmlCharStrdup(cur));
226}
FxCollectionEntry * cur
XMLPUBFUN xmlChar * xmlCharStrdup(const char *cur)
Definition: xmlstring.c:116

◆ xmlThrDefBufferAllocScheme()

xmlBufferAllocationScheme xmlThrDefBufferAllocScheme ( xmlBufferAllocationScheme  v)

Definition at line 1026 of file globals.c.

1026 {
1027 xmlBufferAllocationScheme ret;
1032 return ret;
1033}
return ret
Definition: mutex.c:146
const GLdouble * v
Definition: gl.h:2040
XMLPUBFUN void xmlMutexLock(xmlMutexPtr tok)
Definition: threads.c:201
XMLPUBFUN void xmlMutexUnlock(xmlMutexPtr tok)
Definition: threads.c:225
static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef
Definition: globals.c:247

◆ xmlThrDefDefaultBufferSize()

int xmlThrDefDefaultBufferSize ( int  v)

Definition at line 1035 of file globals.c.

1035 {
1036 int ret;
1041 return ret;
1042}
static int xmlDefaultBufferSizeThrDef
Definition: globals.c:256

◆ xmlThrDefDeregisterNodeDefault()

xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault ( xmlDeregisterNodeFunc  func)

Definition at line 1161 of file globals.c.

1162{
1163 xmlDeregisterNodeFunc old;
1164
1167
1171
1172 return(old);
1173}
GLenum func
Definition: glext.h:6028
static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef
Definition: globals.c:373
XML_HIDDEN int __xmlRegisterCallbacks
Definition: tree.c:50

◆ xmlThrDefDoValidityCheckingDefaultValue()

int xmlThrDefDoValidityCheckingDefaultValue ( int  v)

Definition at line 1044 of file globals.c.

1044 {
1045 int ret;
1050 return ret;
1051}
static int xmlDoValidityCheckingDefaultValueThrDef
Definition: globals.c:288

◆ xmlThrDefGetWarningsDefaultValue()

int xmlThrDefGetWarningsDefaultValue ( int  v)

Definition at line 1053 of file globals.c.

1053 {
1054 int ret;
1059 return ret;
1060}
static int xmlGetWarningsDefaultValueThrDef
Definition: globals.c:298

◆ xmlThrDefKeepBlanksDefaultValue()

int xmlThrDefKeepBlanksDefaultValue ( int  v)

Definition at line 1091 of file globals.c.

1091 {
1092 int ret;
1097 return ret;
1098}
static int xmlKeepBlanksDefaultValueThrDef
Definition: globals.c:344

◆ xmlThrDefLineNumbersDefaultValue()

int xmlThrDefLineNumbersDefaultValue ( int  v)

Definition at line 1100 of file globals.c.

1100 {
1101 int ret;
1106 return ret;
1107}
static int xmlLineNumbersDefaultValueThrDef
Definition: globals.c:331

◆ xmlThrDefLoadExtDtdDefaultValue()

int xmlThrDefLoadExtDtdDefaultValue ( int  v)

Definition at line 1109 of file globals.c.

1109 {
1110 int ret;
1115 return ret;
1116}
static int xmlLoadExtDtdDefaultValueThrDef
Definition: globals.c:309

◆ xmlThrDefOutputBufferCreateFilenameDefault()

xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault ( xmlOutputBufferCreateFilenameFunc  func)

Definition at line 1193 of file globals.c.

1194{
1196
1199#ifdef LIBXML_OUTPUT_ENABLED
1200 if (old == NULL) {
1201 old = __xmlOutputBufferCreateFilename;
1202 }
1203#endif
1206
1207 return(old);
1208}
static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef
Definition: globals.c:389
xmlOutputBufferPtr(* xmlOutputBufferCreateFilenameFunc)(const char *URI, xmlCharEncodingHandlerPtr encoder, int compression)
Definition: xmlIO.h:143

◆ xmlThrDefParserDebugEntities()

int xmlThrDefParserDebugEntities ( int  v)

Definition at line 1118 of file globals.c.

1118 {
1119 int ret;
1124 return ret;
1125}
static int xmlParserDebugEntitiesThrDef
Definition: globals.c:278

◆ xmlThrDefParserInputBufferCreateFilenameDefault()

xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault ( xmlParserInputBufferCreateFilenameFunc  func)

Definition at line 1176 of file globals.c.

1177{
1179
1182 if (old == NULL) {
1184 }
1185
1188
1189 return(old);
1190}
static xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef
Definition: globals.c:381
xmlParserInputBufferPtr(* xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc)
Definition: xmlIO.h:129
xmlParserInputBufferPtr __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc)

◆ xmlThrDefPedanticParserDefaultValue()

int xmlThrDefPedanticParserDefaultValue ( int  v)

Definition at line 1127 of file globals.c.

1127 {
1128 int ret;
1133 return ret;
1134}
static int xmlPedanticParserDefaultValueThrDef
Definition: globals.c:319

◆ xmlThrDefRegisterNodeDefault()

xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault ( xmlRegisterNodeFunc  func)

Definition at line 1146 of file globals.c.

1147{
1148 xmlRegisterNodeFunc old;
1149
1152
1156
1157 return(old);
1158}
static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef
Definition: globals.c:365

◆ xmlThrDefSetGenericErrorFunc()

void xmlThrDefSetGenericErrorFunc ( void ctx,
xmlGenericErrorFunc  handler 
)

DllMain: @hinstDLL: handle to DLL instance @fdwReason: Reason code for entry @lpvReserved: generic pointer (depends upon reason code)

Entry point for Windows library. It is being used to free thread-specific storage.

Returns TRUE always

Definition at line 1008 of file globals.c.

1008 {
1011 if (handler != NULL)
1013 else
1016}
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
void xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...)
Definition: error.c:70
static void * xmlGenericErrorContextThrDef
Definition: globals.c:411
static xmlGenericErrorFunc xmlGenericErrorThrDef
Definition: globals.c:397

◆ xmlThrDefSetStructuredErrorFunc()

void xmlThrDefSetStructuredErrorFunc ( void ctx,
xmlStructuredErrorFunc  handler 
)

Definition at line 1019 of file globals.c.

1019 {
1024}
static xmlStructuredErrorFunc xmlStructuredErrorThrDef
Definition: globals.c:404
static void * xmlStructuredErrorContextThrDef
Definition: globals.c:418

◆ xmlThrDefSubstituteEntitiesDefaultValue()

int xmlThrDefSubstituteEntitiesDefaultValue ( int  v)

Definition at line 1136 of file globals.c.

1136 {
1137 int ret;
1142 return ret;
1143}
static int xmlSubstituteEntitiesDefaultValueThrDef
Definition: globals.c:357

Variable Documentation

◆ oldXMLWDcompatibility

int oldXMLWDcompatibility = 0

oldXMLWDcompatibility:

Global setting, DEPRECATED.

Definition at line 267 of file globals.c.

◆ parserInitialized

int parserInitialized
static

Definition at line 89 of file globals.c.

Referenced by xmlCleanupGlobalsInternal(), and xmlIsMainThreadInternal().

◆ xmlBufferAllocScheme

xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT

xmlBufferAllocScheme:

DEPRECATED: Don't use.

Global setting, default allocation policy for buffers, default is XML_BUFFER_ALLOC_EXACT

Definition at line 246 of file globals.c.

Referenced by xmlBufCreate(), and xmlBufCreateSize().

◆ xmlBufferAllocSchemeThrDef

xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT
static

Definition at line 247 of file globals.c.

Referenced by xmlThrDefBufferAllocScheme().

◆ xmlDefaultBufferSize

int xmlDefaultBufferSize = BASE_BUFFER_SIZE

xmlDefaultBufferSize:

DEPRECATED: Don't use.

Global setting, default buffer size. Default value is BASE_BUFFER_SIZE

Definition at line 255 of file globals.c.

Referenced by xmlBufCreate().

◆ xmlDefaultBufferSizeThrDef

int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE
static

Definition at line 256 of file globals.c.

Referenced by xmlThrDefDefaultBufferSize().

◆ xmlDefaultSAXLocator

xmlSAXLocator xmlDefaultSAXLocator
Initial value:
= {
}
XMLPUBFUN const xmlChar * xmlSAX2GetPublicId(void *ctx)
XMLPUBFUN int xmlSAX2GetLineNumber(void *ctx)
Definition: SAX2.c:243
XMLPUBFUN int xmlSAX2GetColumnNumber(void *ctx)
Definition: SAX2.c:259
XMLPUBFUN const xmlChar * xmlSAX2GetSystemId(void *ctx)
Definition: SAX2.c:227

xmlDefaultSAXLocator:

DEPRECATED: Don't use

The default SAX Locator { getPublicId, getSystemId, getLineNumber, getColumnNumber}

Definition at line 503 of file globals.c.

Referenced by xmlParseDocument(), and xmlParseExtParsedEnt().

◆ xmlDeregisterNodeDefaultValue

xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL

xmlDeregisterNodeDefaultValue:

DEPRECATED: Don't use

Definition at line 372 of file globals.c.

◆ xmlDeregisterNodeDefaultValueThrDef

xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL
static

Definition at line 373 of file globals.c.

Referenced by xmlThrDefDeregisterNodeDefault().

◆ xmlDoValidityCheckingDefaultValue

int xmlDoValidityCheckingDefaultValue = 0

xmlDoValidityCheckingDefaultValue:

DEPRECATED: Use the modern options API with XML_PARSE_DTDVALID.

Global setting, indicate that the parser should work in validating mode. Disabled by default.

Definition at line 287 of file globals.c.

Referenced by xmlInitSAXParserCtxt().

◆ xmlDoValidityCheckingDefaultValueThrDef

int xmlDoValidityCheckingDefaultValueThrDef = 0
static

Definition at line 288 of file globals.c.

Referenced by xmlThrDefDoValidityCheckingDefaultValue().

◆ xmlFree

xmlFreeFunc xmlFree = free

xmlFree: @mem: an already allocated block of memory

The variable holding the libxml free() implementation

Definition at line 184 of file globals.c.

Referenced by copy_prop_ignore_ns(), create_selection(), do_get_text(), domdoc_createNode(), domdoc_getElementsByTagName(), domelem_get_named_item(), domelem_get_nodeTypedValue(), domelem_get_tagName(), domelem_getAttribute(), domelem_getAttributeNode(), domelem_getElementsByTagName(), domelem_put_dataType(), domelem_remove_named_item(), domelem_setAttribute(), doparse(), element_get_dt(), get_child_with_attr(), internal_parseBuffer(), node_get_content(), node_get_text(), node_put_text(), node_set_content_escaped(), QName_from_xmlChar(), SchemaCache_get_node_dt(), tagName_to_XPath(), XDR_A_dt_type(), XDR_A_maxOccurs(), XDR_A_required(), XDR_A_type(), XDR_E_attribute(), XDR_E_AttributeType(), XDR_E_ElementType(), XDR_E_group(), xmlAddDefAttrs(), xmlAddElementDecl(), xmlAddEncodingAlias(), xmlAddRef(), xmlBufBackToBuffer(), xmlBufCreate(), xmlBufCreateSize(), xmlBufFree(), xmlBufResize(), xmlBuildURI(), xmlCanonicPath(), xmlCleanupCharEncodingHandlers(), xmlCleanupEncodingAliases(), xmlCleanURI(), xmlClearNodeInfoSeq(), xmlCreateEntityParserCtxtInternal(), xmlCtxtGrowAttrs(), xmlDelEncodingAlias(), xmlDictFree(), xmlDictGrow(), xmlelem_get_text(), xmlelem_getAttribute(), xmlEscapeFormatString(), xmlFindCharEncodingHandler(), xmlFreeAttribute(), xmlFreeDocElementContent(), xmlFreeElement(), xmlFreeEnumeration(), xmlFreeID(), xmlFreeInputStream(), xmlFreeNotation(), xmlFreeParserCtxt(), xmlFreeRef(), xmlFreeURI(), xmlGcMemGet(), xmlGcMemSetup(), xmlGetDtdAttrDesc(), xmlGetDtdElementDesc(), xmlGetDtdElementDesc2(), xmlHashCreate(), xmlHashDefaultDeallocator(), xmlHashFree(), xmlHashGrow(), xmlHashRemoveEntry3(), xmlHashUpdateInternal(), xmlInitParser(), xmlIsID(), xmlLinkDeallocator(), xmlListCreate(), xmlListDelete(), xmlLoadEntityContent(), xmlMemGet(), xmlMemSetup(), xmlNewCharEncodingHandler(), xmlNewInputFromFile(), xmlParse3986Fragment(), xmlParse3986HierPart(), xmlParse3986Host(), xmlParse3986PathAbEmpty(), xmlParse3986PathAbsolute(), xmlParse3986PathNoScheme(), xmlParse3986PathRootless(), xmlParse3986Query(), xmlParse3986RelativeRef(), xmlParse3986Scheme(), xmlParse3986Userinfo(), xmlParseAttribute2(), xmlParseAttributeListDecl(), xmlParseAttValueComplex(), xmlParseCDSect(), xmlParseComment(), xmlParseCommentComplex(), xmlParseConditionalSections(), xmlParseEncName(), xmlParseEncodingDecl(), xmlParseEntityDecl(), xmlParseEntityValue(), xmlParseEnumerationType(), xmlParseNmtoken(), xmlParseNotationDecl(), xmlParseNotationType(), xmlParsePI(), xmlParsePubidLiteral(), xmlParseQNameHashed(), xmlParserNsFree(), xmlParserNsPush(), xmlParseStartTag2(), xmlParseStringEntityRef(), xmlParseStringName(), xmlParseStringPEReference(), xmlParseSystemLiteral(), xmlParseVersionNum(), xmlParseXMLDecl(), xmlPathToURI(), xmlPrintURI(), xmlRegisterCharEncodingHandler(), xmlRemoveID(), xmlRemoveRef(), xmlSaveUri(), xmlSAX2AttributeDecl(), xmlSAX2AttributeNs(), xmlSAX2ExternalSubset(), xmlSAX2ResolveEntity(), xmlSAX2StartElementNs(), xmlSAX2TextNode(), xmlSetDeclaredEncoding(), xmlSplitQName(), xmlStringDecodeEntitiesInt(), xmlURIEscape(), xmlURIEscapeStr(), XSLPattern_OP_IEq(), XSLPattern_OP_IGEq(), XSLPattern_OP_IGt(), XSLPattern_OP_ILEq(), XSLPattern_OP_ILt(), XSLPattern_OP_INEq(), xsltAddKey(), xsltAttribute(), xsltAttrTemplateValueProcessNode(), xsltCheckWritePath(), xsltComment(), xsltCompileAttr(), xsltCompileIdKeyPattern(), xsltCompileLocationPathPattern(), xsltCompileStepPattern(), xsltComputeSortResultInternal(), xsltCopyAttrListNoOverwrite(), xsltCopyOf(), xsltCopyTree(), xsltDefaultSortFunction(), xsltDocumentElem(), xsltDocumentFunction(), xsltElement(), xsltElementAvailableFunction(), xsltEvalAttrValueTemplate(), xsltEvalAVT(), xsltEvalStaticAttrValueTemplate(), xsltFormatNumberFunction(), xsltFreeAttrElem(), xsltFreeAttrSet(), xsltFreeAttrVT(), xsltFreeCompMatch(), xsltFreeDecimalFormat(), xsltFreeDocuments(), xsltFreeElemPreComp(), xsltFreeExtData(), xsltFreeExtDef(), xsltFreeExtElement(), xsltFreeExtModule(), xsltFreeKeyDef(), xsltFreeKeyTable(), xsltFreeLocales(), xsltFreeParserContext(), xsltFreeRVTs(), xsltFreeSecurityPrefs(), xsltFreeStackElem(), xsltFreeStyleDocuments(), xsltFreeStylePreComp(), xsltFreeStylesheet(), xsltFreeTemplate(), xsltFreeTransformContext(), xsltFreeUseAttrSet(), xsltFunctionAvailableFunction(), xsltGetCNsProp(), xsltGetInheritedNsList(), xsltGetQNameURI(), xsltGetQNameURI2(), xsltInitCtxtKey(), xsltKeyFunction(), xsltLoadStylesheetPI(), xsltMessage(), xsltNamespaceAlias(), xsltNewCompMatch(), xsltNumberFormat(), xsltParseStylesheetAttributeSet(), xsltParseStylesheetDecimalFormat(), xsltParseStylesheetExcludePrefix(), xsltParseStylesheetExtPrefix(), xsltParseStylesheetImport(), xsltParseStylesheetInclude(), xsltParseStylesheetKey(), xsltParseStylesheetOutput(), xsltParseStylesheetPI(), xsltParseStylesheetPreserveSpace(), xsltParseStylesheetProcess(), xsltParseStylesheetStripSpace(), xsltParseStylesheetTemplate(), xsltParseStylesheetTop(), xsltParseTemplateContent(), xsltProcessingInstruction(), xsltReleaseRVT(), xsltReverseCompMatch(), xsltShallowCopyAttr(), xsltStrxfrm(), xsltSystemPropertyFunction(), xsltTestCompMatch(), xsltTransformCacheFree(), xsltTransformError(), and xsltValueOf().

◆ xmlGenericError

◆ xmlGenericErrorContext

◆ xmlGenericErrorContextThrDef

void* xmlGenericErrorContextThrDef = NULL
static

Definition at line 411 of file globals.c.

Referenced by xmlThrDefSetGenericErrorFunc().

◆ xmlGenericErrorThrDef

xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc
static

Definition at line 397 of file globals.c.

Referenced by xmlThrDefSetGenericErrorFunc().

◆ xmlGetWarningsDefaultValue

int xmlGetWarningsDefaultValue = 1

xmlGetWarningsDefaultValue:

DEPRECATED: Don't use

Global setting, indicate that the DTD validation should provide warnings. Activated by default.

Definition at line 297 of file globals.c.

Referenced by xmlInitSAXParserCtxt().

◆ xmlGetWarningsDefaultValueThrDef

int xmlGetWarningsDefaultValueThrDef = 1
static

Definition at line 298 of file globals.c.

Referenced by xmlThrDefGetWarningsDefaultValue().

◆ xmlKeepBlanksDefaultValue

int xmlKeepBlanksDefaultValue = 1

xmlKeepBlanksDefaultValue:

DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS.

Global setting, indicate that the parser should keep all blanks nodes found in the content Activated by default, this is actually needed to have the parser conformant to the XML Recommendation, however the option is kept for some applications since this was libxml1 default behaviour.

Definition at line 343 of file globals.c.

Referenced by xmlInitSAXParserCtxt(), and xmlKeepBlanksDefault().

◆ xmlKeepBlanksDefaultValueThrDef

int xmlKeepBlanksDefaultValueThrDef = 1
static

Definition at line 344 of file globals.c.

Referenced by xmlThrDefKeepBlanksDefaultValue().

◆ xmlLastError

xmlError xmlLastError

Definition at line 419 of file globals.c.

Referenced by xmlCleanupGlobalsInternal().

◆ xmlLineNumbersDefaultValue

int xmlLineNumbersDefaultValue = 0

xmlLineNumbersDefaultValue:

DEPRECATED: The modern options API always enables line numbers.

Global setting, indicate that the parser should store the line number in the content field of elements in the DOM tree. Disabled by default since this may not be safe for old classes of application.

Definition at line 330 of file globals.c.

Referenced by xmlInitSAXParserCtxt(), and xmlLineNumbersDefault().

◆ xmlLineNumbersDefaultValueThrDef

int xmlLineNumbersDefaultValueThrDef = 0
static

Definition at line 331 of file globals.c.

Referenced by xmlThrDefLineNumbersDefaultValue().

◆ xmlLoadExtDtdDefaultValue

int xmlLoadExtDtdDefaultValue = 0

xmlLoadExtDtdDefaultValue:

DEPRECATED: Use the modern options API with XML_PARSE_DTDLOAD.

Global setting, indicate that the parser should load DTD while not validating. Disabled by default.

Definition at line 308 of file globals.c.

Referenced by xmlInitSAXParserCtxt().

◆ xmlLoadExtDtdDefaultValueThrDef

int xmlLoadExtDtdDefaultValueThrDef = 0
static

Definition at line 309 of file globals.c.

Referenced by xmlThrDefLoadExtDtdDefaultValue().

◆ xmlMalloc

xmlMallocFunc xmlMalloc = malloc

xmlMalloc: @size: the size requested in bytes

The variable holding the libxml malloc() implementation

Returns a pointer to the newly allocated block or NULL in case of error

Definition at line 193 of file globals.c.

Referenced by nameNsPush(), tagName_to_XPath(), xmlAddAttributeDecl(), xmlAddElementDecl(), xmlAddID(), xmlAddNotationDecl(), xmlAddRef(), xmlBufCreate(), xmlBufCreateSize(), xmlBufFromBuffer(), xmlchar_from_wcharn(), xmlCopyDocElementContent(), xmlCreateEnumeration(), xmlCreateURI(), xmlCtxtGrowAttrs(), xmlDictAddQString(), xmlDictAddString(), xmlDictCreate(), xmlDictGrow(), xmlFindCharEncodingHandler(), xmlGcMemGet(), xmlGcMemSetup(), xmlGetDtdElementDesc2(), xmlHashCreate(), xmlHashGrow(), xmlHashUpdateInternal(), xmlInitSAXParserCtxt(), xmlListAppend(), xmlListCreate(), xmlListInsert(), xmlListPushBack(), xmlListPushFront(), xmlLoadEntityContent(), xmlMemGet(), xmlMemSetup(), xmlNewCharEncodingHandler(), xmlNewDocElementContent(), xmlNewInputStream(), xmlNewSAXParserCtxt(), xmlParserAddNodeInfo(), xmlParserNsCreate(), xmlParserNsPush(), xmlRegisterCharEncodingHandler(), xmlSAX2AttributeNs(), xmlSAX2ExternalSubset(), xmlSAX2TextNode(), xmlStrncatNew(), xsltAllocateExtraCtxt(), xsltComputeSortResultInternal(), xsltCopyStackElem(), xsltGenerateIdFunction(), xsltNewAttrElem(), xsltNewAttrSet(), xsltNewAttrVT(), xsltNewCompMatch(), xsltNewDecimalFormat(), xsltNewDocument(), xsltNewElemPreComp(), xsltNewExtData(), xsltNewExtDef(), xsltNewExtElement(), xsltNewExtModule(), xsltNewKeyDef(), xsltNewKeyTable(), xsltNewParserContext(), xsltNewSecurityPrefs(), xsltNewStackElem(), xsltNewStyleDocument(), xsltNewStylePreComp(), xsltNewStylesheetInternal(), xsltNewTemplate(), xsltNewTransformContext(), xsltNewUseAttrSet(), xsltStrxfrm(), and xsltTransformCacheCreate().

◆ xmlMallocAtomic

xmlMallocFunc xmlMallocAtomic = malloc

xmlMallocAtomic: @size: the size requested in bytes

The variable holding the libxml malloc() implementation for atomic data (i.e. blocks not containing pointers), useful when using a garbage collecting allocator.

Returns a pointer to the newly allocated block or NULL in case of error

Definition at line 204 of file globals.c.

Referenced by xmlBufCreate(), xmlBufCreateSize(), xmlBufResize(), xmlBuildURI(), xmlCanonicPath(), xmlCharStrndup(), xmlEscapeFormatString(), xmlGcMemGet(), xmlGcMemSetup(), xmlMemSetup(), xmlParseAttValueComplex(), xmlParseCDSect(), xmlParseComment(), xmlParseCommentComplex(), xmlParseEncName(), xmlParseEntityValue(), xmlParseNmtoken(), xmlParsePI(), xmlParsePubidLiteral(), xmlParseStringName(), xmlParseSystemLiteral(), xmlParseVersionNum(), xmlSaveUri(), xmlSplitQName(), xmlStringDecodeEntitiesInt(), xmlStrndup(), xmlURIEscapeStr(), xmlURIUnescapeString(), and xmlUTF8Strndup().

◆ xmlMemStrdup

xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup

xmlMemStrdup: @str: a zero terminated string

The variable holding the libxml strdup() implementation

Returns the copy of the string or NULL in case of error

Definition at line 235 of file globals.c.

Referenced by xmlAddEncodingAlias(), xmlBuildURI(), xmlFindCharEncodingHandler(), xmlGcMemGet(), xmlGcMemSetup(), xmlMemGet(), xmlMemSetup(), and xmlNewCharEncodingHandler().

◆ xmlOutputBufferCreateFilenameValue

xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL

xmlOutputBufferCreateFilenameValue:

DEPRECATED: Don't use

Definition at line 388 of file globals.c.

◆ xmlOutputBufferCreateFilenameValueThrDef

xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef = NULL
static

Definition at line 389 of file globals.c.

Referenced by xmlThrDefOutputBufferCreateFilenameDefault().

◆ xmlParserDebugEntities

int xmlParserDebugEntities = 0

xmlParserDebugEntities:

DEPRECATED: Don't use

Global setting, asking the parser to print out debugging information. while handling entities. Disabled by default

Definition at line 277 of file globals.c.

Referenced by xmlLoadEntityContent(), xmlNewEntityInputStream(), xmlNewInputFromFile(), xmlNewIOInputStream(), xmlNewStringInputStream(), xmlParsePEReference(), xmlPopInput(), xmlPushInput(), and xmlStringDecodeEntitiesInt().

◆ xmlParserDebugEntitiesThrDef

int xmlParserDebugEntitiesThrDef = 0
static

Definition at line 278 of file globals.c.

Referenced by xmlThrDefParserDebugEntities().

◆ xmlParserInputBufferCreateFilenameValue

xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue = NULL

xmlParserInputBufferCreateFilenameValue:

DEPRECATED: Don't use

Definition at line 380 of file globals.c.

◆ xmlParserInputBufferCreateFilenameValueThrDef

xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef = NULL
static

Definition at line 381 of file globals.c.

Referenced by xmlThrDefParserInputBufferCreateFilenameDefault().

◆ xmlPedanticParserDefaultValue

int xmlPedanticParserDefaultValue = 0

xmlPedanticParserDefaultValue:

DEPRECATED: Use the modern options API with XML_PARSE_PEDANTIC.

Global setting, indicate that the parser be pedantic Disabled by default.

Definition at line 318 of file globals.c.

Referenced by xmlInitSAXParserCtxt(), and xmlPedanticParserDefault().

◆ xmlPedanticParserDefaultValueThrDef

int xmlPedanticParserDefaultValueThrDef = 0
static

Definition at line 319 of file globals.c.

Referenced by xmlThrDefPedanticParserDefaultValue().

◆ xmlRealloc

◆ xmlRegisterNodeDefaultValue

xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL

xmlRegisterNodeDefaultValue:

DEPRECATED: Don't use

Definition at line 364 of file globals.c.

Referenced by xmlSAX2AttributeNs(), xmlSAX2StartElementNs(), and xmlSAX2TextNode().

◆ xmlRegisterNodeDefaultValueThrDef

xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL
static

Definition at line 365 of file globals.c.

Referenced by xmlThrDefRegisterNodeDefault().

◆ xmlStructuredError

xmlStructuredErrorFunc xmlStructuredError = NULL

xmlStructuredError:

Global setting: function used for structured error callbacks

Definition at line 403 of file globals.c.

Referenced by xmlSetStructuredErrorFunc().

◆ xmlStructuredErrorContext

void* xmlStructuredErrorContext = NULL

xmlStructuredErrorContext:

Global setting passed to structured error callbacks

Definition at line 417 of file globals.c.

Referenced by xmlSetStructuredErrorFunc().

◆ xmlStructuredErrorContextThrDef

void* xmlStructuredErrorContextThrDef = NULL
static

Definition at line 418 of file globals.c.

Referenced by xmlThrDefSetStructuredErrorFunc().

◆ xmlStructuredErrorThrDef

xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL
static

Definition at line 404 of file globals.c.

Referenced by xmlThrDefSetStructuredErrorFunc().

◆ xmlSubstituteEntitiesDefaultValue

int xmlSubstituteEntitiesDefaultValue = 0

xmlSubstituteEntitiesDefaultValue:

DEPRECATED: Use the modern options API with XML_PARSE_NOENT.

Global setting, indicate that the parser should not generate entity references but replace them with the actual content of the entity Disabled by default, this should be activated when using XPath since the XPath data model requires entities replacement and the XPath engine does not handle entities references transparently.

Definition at line 356 of file globals.c.

Referenced by xmlInitSAXParserCtxt(), and xmlSubstituteEntitiesDefault().

◆ xmlSubstituteEntitiesDefaultValueThrDef

int xmlSubstituteEntitiesDefaultValueThrDef = 0
static

Definition at line 357 of file globals.c.

Referenced by xmlThrDefSubstituteEntitiesDefaultValue().

◆ xmlThrDefMutex