ReactOS 0.4.15-dev-5666-gc548b97
globals.c File Reference
#include "libxml.h"
#include <stdlib.h>
#include <string.h>
#include <libxml/globals.h>
#include <libxml/xmlmemory.h>
#include <libxml/threads.h>
#include <libxml/SAX.h>
Include dependency graph for globals.c:

Go to the source code of this file.

Macros

#define IN_LIBXML
 
#define IS_MAIN_THREAD   1
 

Functions

void xmlInitGlobals (void)
 
static charxmlPosixStrdup (const char *cur)
 
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, const char *msg,...)
 
void xmlInitializeGlobalState (xmlGlobalStatePtr gs)
 
void xmlCleanupGlobals (void)
 
void xmlThrDefSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler)
 
void xmlThrDefSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler)
 
xmlRegisterNodeFunc xmlRegisterNodeDefault (xmlRegisterNodeFunc func)
 
xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault (xmlRegisterNodeFunc func)
 
xmlDeregisterNodeFunc xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func)
 
xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault (xmlDeregisterNodeFunc func)
 
xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func)
 
xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func)
 
xmlError__xmlLastError (void)
 
int__oldXMLWDcompatibility (void)
 
xmlBufferAllocationScheme__xmlBufferAllocScheme (void)
 
xmlBufferAllocationScheme xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v)
 
int__xmlDefaultBufferSize (void)
 
int xmlThrDefDefaultBufferSize (int v)
 
xmlSAXLocator__xmlDefaultSAXLocator (void)
 
int__xmlDoValidityCheckingDefaultValue (void)
 
int xmlThrDefDoValidityCheckingDefaultValue (int v)
 
xmlGenericErrorFunc__xmlGenericError (void)
 
xmlStructuredErrorFunc__xmlStructuredError (void)
 
void ** __xmlGenericErrorContext (void)
 
void ** __xmlStructuredErrorContext (void)
 
int__xmlGetWarningsDefaultValue (void)
 
int xmlThrDefGetWarningsDefaultValue (int v)
 
int__xmlIndentTreeOutput (void)
 
int xmlThrDefIndentTreeOutput (int v)
 
const char ** __xmlTreeIndentString (void)
 
const charxmlThrDefTreeIndentString (const char *v)
 
int__xmlKeepBlanksDefaultValue (void)
 
int xmlThrDefKeepBlanksDefaultValue (int v)
 
int__xmlLineNumbersDefaultValue (void)
 
int xmlThrDefLineNumbersDefaultValue (int v)
 
int__xmlLoadExtDtdDefaultValue (void)
 
int xmlThrDefLoadExtDtdDefaultValue (int v)
 
int__xmlParserDebugEntities (void)
 
int xmlThrDefParserDebugEntities (int v)
 
const char ** __xmlParserVersion (void)
 
int__xmlPedanticParserDefaultValue (void)
 
int xmlThrDefPedanticParserDefaultValue (int v)
 
int__xmlSaveNoEmptyTags (void)
 
int xmlThrDefSaveNoEmptyTags (int v)
 
int__xmlSubstituteEntitiesDefaultValue (void)
 
int xmlThrDefSubstituteEntitiesDefaultValue (int v)
 
xmlRegisterNodeFunc__xmlRegisterNodeDefaultValue (void)
 
xmlDeregisterNodeFunc__xmlDeregisterNodeDefaultValue (void)
 
xmlParserInputBufferCreateFilenameFunc__xmlParserInputBufferCreateFilenameValue (void)
 
xmlOutputBufferCreateFilenameFunc__xmlOutputBufferCreateFilenameValue (void)
 

Variables

static xmlMutexPtr xmlThrDefMutex = NULL
 
xmlFreeFunc xmlFree = free
 
xmlMallocFunc xmlMalloc = malloc
 
xmlMallocFunc xmlMallocAtomic = malloc
 
xmlReallocFunc xmlRealloc = realloc
 
xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup
 
const charxmlParserVersion = LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA
 
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
 
int xmlIndentTreeOutput = 1
 
static int xmlIndentTreeOutputThrDef = 1
 
const charxmlTreeIndentString = " "
 
static const charxmlTreeIndentStringThrDef = " "
 
int xmlSaveNoEmptyTags = 0
 
static int xmlSaveNoEmptyTagsThrDef = 0
 
xmlSAXLocator xmlDefaultSAXLocator
 

Macro Definition Documentation

◆ IN_LIBXML

#define IN_LIBXML

Definition at line 14 of file globals.c.

◆ IS_MAIN_THREAD

#define IS_MAIN_THREAD   1

Definition at line 32 of file globals.c.

Function Documentation

◆ __oldXMLWDcompatibility()

int * __oldXMLWDcompatibility ( void  )

Definition at line 751 of file globals.c.

751 {
752 if (IS_MAIN_THREAD)
753 return (&oldXMLWDcompatibility);
754 else
756}
int oldXMLWDcompatibility
Definition: globals.c:200
#define IS_MAIN_THREAD
Definition: globals.c:32
XMLPUBFUN xmlGlobalStatePtr XMLCALL xmlGetGlobalState(void)
Definition: threads.c:640

◆ __xmlBufferAllocScheme()

xmlBufferAllocationScheme * __xmlBufferAllocScheme ( void  )

Definition at line 760 of file globals.c.

760 {
761 if (IS_MAIN_THREAD)
762 return (&xmlBufferAllocScheme);
763 else
765}
xmlBufferAllocationScheme xmlBufferAllocScheme
Definition: globals.c:181

◆ __xmlDefaultBufferSize()

int * __xmlDefaultBufferSize ( void  )

Definition at line 777 of file globals.c.

777 {
778 if (IS_MAIN_THREAD)
779 return (&xmlDefaultBufferSize);
780 else
782}
int xmlDefaultBufferSize
Definition: globals.c:188

◆ __xmlDefaultSAXLocator()

xmlSAXLocator * __xmlDefaultSAXLocator ( void  )

Definition at line 805 of file globals.c.

805 {
806 if (IS_MAIN_THREAD)
807 return (&xmlDefaultSAXLocator);
808 else
810}
xmlSAXLocator xmlDefaultSAXLocator
Definition: globals.c:401

◆ __xmlDeregisterNodeDefaultValue()

xmlDeregisterNodeFunc * __xmlDeregisterNodeDefaultValue ( void  )

Definition at line 1055 of file globals.c.

1055 {
1056 if (IS_MAIN_THREAD)
1058 else
1060}
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue
Definition: globals.c:278

◆ __xmlDoValidityCheckingDefaultValue()

int * __xmlDoValidityCheckingDefaultValue ( void  )

Definition at line 814 of file globals.c.

814 {
815 if (IS_MAIN_THREAD)
817 else
819}
int xmlDoValidityCheckingDefaultValue
Definition: globals.c:216

◆ __xmlGenericError()

xmlGenericErrorFunc * __xmlGenericError ( void  )

Definition at line 831 of file globals.c.

831 {
832 if (IS_MAIN_THREAD)
833 return (&xmlGenericError);
834 else
836}
xmlGenericErrorFunc xmlGenericError
Definition: globals.c:301

◆ __xmlGenericErrorContext()

void ** __xmlGenericErrorContext ( void  )

Definition at line 849 of file globals.c.

849 {
850 if (IS_MAIN_THREAD)
851 return (&xmlGenericErrorContext);
852 else
854}
void * xmlGenericErrorContext
Definition: globals.c:315

◆ __xmlGetWarningsDefaultValue()

int * __xmlGetWarningsDefaultValue ( void  )

Definition at line 867 of file globals.c.

867 {
868 if (IS_MAIN_THREAD)
870 else
872}
int xmlGetWarningsDefaultValue
Definition: globals.c:224

◆ __xmlIndentTreeOutput()

int * __xmlIndentTreeOutput ( void  )

Definition at line 884 of file globals.c.

884 {
885 if (IS_MAIN_THREAD)
886 return (&xmlIndentTreeOutput);
887 else
889}
int xmlIndentTreeOutput
Definition: globals.c:335

◆ __xmlKeepBlanksDefaultValue()

int * __xmlKeepBlanksDefaultValue ( void  )

Definition at line 918 of file globals.c.

918 {
919 if (IS_MAIN_THREAD)
921 else
923}
int xmlKeepBlanksDefaultValue
Definition: globals.c:262

◆ __xmlLastError()

xmlError * __xmlLastError ( void  )

Definition at line 683 of file globals.c.

683 {
684 if (IS_MAIN_THREAD)
685 return (&xmlLastError);
686 else
687 return (&xmlGetGlobalState()->xmlLastError);
688}
xmlError xmlLastError
Definition: globals.c:324

◆ __xmlLineNumbersDefaultValue()

int * __xmlLineNumbersDefaultValue ( void  )

Definition at line 935 of file globals.c.

935 {
936 if (IS_MAIN_THREAD)
938 else
940}
int xmlLineNumbersDefaultValue
Definition: globals.c:251

◆ __xmlLoadExtDtdDefaultValue()

int * __xmlLoadExtDtdDefaultValue ( void  )

Definition at line 952 of file globals.c.

952 {
953 if (IS_MAIN_THREAD)
955 else
957}
int xmlLoadExtDtdDefaultValue
Definition: globals.c:233

◆ __xmlOutputBufferCreateFilenameValue()

xmlOutputBufferCreateFilenameFunc * __xmlOutputBufferCreateFilenameValue ( void  )

Definition at line 1073 of file globals.c.

1073 {
1074 if (IS_MAIN_THREAD)
1076 else
1078}
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue
Definition: globals.c:284

◆ __xmlParserDebugEntities()

int * __xmlParserDebugEntities ( void  )

Definition at line 969 of file globals.c.

969 {
970 if (IS_MAIN_THREAD)
971 return (&xmlParserDebugEntities);
972 else
974}
int xmlParserDebugEntities
Definition: globals.c:208

◆ __xmlParserInputBufferCreateFilenameValue()

xmlParserInputBufferCreateFilenameFunc * __xmlParserInputBufferCreateFilenameValue ( void  )

Definition at line 1064 of file globals.c.

1064 {
1065 if (IS_MAIN_THREAD)
1067 else
1069}
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue
Definition: globals.c:281

◆ __xmlParserVersion()

const char ** __xmlParserVersion ( void  )

Definition at line 986 of file globals.c.

986 {
987 if (IS_MAIN_THREAD)
988 return (&xmlParserVersion);
989 else
991}
const char * xmlParserVersion
Definition: globals.c:173

◆ __xmlPedanticParserDefaultValue()

int * __xmlPedanticParserDefaultValue ( void  )

Definition at line 995 of file globals.c.

995 {
996 if (IS_MAIN_THREAD)
998 else
1000}
int xmlPedanticParserDefaultValue
Definition: globals.c:241

◆ __xmlRegisterNodeDefaultValue()

xmlRegisterNodeFunc * __xmlRegisterNodeDefaultValue ( void  )

Definition at line 1046 of file globals.c.

1046 {
1047 if (IS_MAIN_THREAD)
1049 else
1051}
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue
Definition: globals.c:276

◆ __xmlSaveNoEmptyTags()

int * __xmlSaveNoEmptyTags ( void  )

Definition at line 1012 of file globals.c.

1012 {
1013 if (IS_MAIN_THREAD)
1014 return (&xmlSaveNoEmptyTags);
1015 else
1017}
int xmlSaveNoEmptyTags
Definition: globals.c:354

◆ __xmlStructuredError()

xmlStructuredErrorFunc * __xmlStructuredError ( void  )

Definition at line 840 of file globals.c.

840 {
841 if (IS_MAIN_THREAD)
842 return (&xmlStructuredError);
843 else
845}
xmlStructuredErrorFunc xmlStructuredError
Definition: globals.c:308

◆ __xmlStructuredErrorContext()

void ** __xmlStructuredErrorContext ( void  )

Definition at line 858 of file globals.c.

858 {
859 if (IS_MAIN_THREAD)
861 else
863}
void * xmlStructuredErrorContext
Definition: globals.c:322

◆ __xmlSubstituteEntitiesDefaultValue()

int * __xmlSubstituteEntitiesDefaultValue ( void  )

Definition at line 1029 of file globals.c.

1029 {
1030 if (IS_MAIN_THREAD)
1032 else
1034}
int xmlSubstituteEntitiesDefaultValue
Definition: globals.c:273

◆ __xmlTreeIndentString()

const char ** __xmlTreeIndentString ( void  )

Definition at line 901 of file globals.c.

901 {
902 if (IS_MAIN_THREAD)
903 return (&xmlTreeIndentString);
904 else
906}
const char * xmlTreeIndentString
Definition: globals.c:343

◆ xmlCleanupGlobals()

void xmlCleanupGlobals ( void  )

xmlCleanupGlobals:

DEPRECATED: This function will be made private. 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.

Additional cleanup for multi-threading

Definition at line 535 of file globals.c.

536{
538
539 if (xmlThrDefMutex != NULL) {
542 }
544}
#define NULL
Definition: types.h:112
void __xmlGlobalInitMutexDestroy(void)
Definition: threads.c:512
static xmlMutexPtr xmlThrDefMutex
Definition: globals.c:38
XMLPUBFUN void XMLCALL xmlFreeMutex(xmlMutexPtr tok)
Definition: threads.c:197
XMLPUBFUN void XMLCALL xmlResetError(xmlErrorPtr err)

Referenced by xmlCleanupParser().

◆ xmlDeregisterNodeDefault()

xmlDeregisterNodeFunc xmlDeregisterNodeDefault ( xmlDeregisterNodeFunc  func)

xmlDeregisterNodeDefault: @func: function pointer to the new DeregisterNodeFunc

Registers a callback for node destruction

Returns the previous value of the deregistration function

Definition at line 611 of file globals.c.

612{
614
617 return(old);
618}
GLenum func
Definition: glext.h:6028
int __xmlRegisterCallbacks
Definition: tree.c:50
void(* xmlDeregisterNodeFunc)(xmlNodePtr node)
Definition: globals.h:118

Referenced by main().

◆ xmlGenericErrorDefaultFunc()

void XMLCDECL xmlGenericErrorDefaultFunc ( void *ctx  ATTRIBUTE_UNUSED,
const char msg,
  ... 
)

xmlGenericErrorDefaultFunc: @ctx: an error context @msg: the message to display/transmit ...: extra parameters for the message display

Default handler for out of context error messages.

Definition at line 19 of file error.c.

71 {
73
76
79 va_end(args);
80}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define msg(x)
Definition: auth_time.c:54
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:353
#define args
Definition: format.c:66
Definition: match.c:390

Referenced by initGenericErrorDefaultFunc(), xmlSetGenericErrorFunc(), and xmlThrDefSetGenericErrorFunc().

◆ xmlInitGlobals()

void xmlInitGlobals ( void  )

xmlInitGlobals:

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library.

Additional initialisation for multi-threading

Definition at line 48 of file globals.c.

49{
50 if (xmlThrDefMutex == NULL)
52}
XMLPUBFUN xmlMutexPtr XMLCALL xmlNewMutex(void)
Definition: threads.c:168

Referenced by xmlInitializeGlobalState(), and xmlInitParser().

◆ xmlInitializeGlobalState()

void xmlInitializeGlobalState ( xmlGlobalStatePtr  gs)

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

xmlInitializeGlobalState() initialize a global state with all the default values of the library.

Definition at line 454 of file globals.c.

455{
456#ifdef DEBUG_GLOBALS
457 fprintf(stderr, "Initializing globals at %lu for thread %d\n",
458 (unsigned long) gs, xmlGetThreadId());
459#endif
460
461 /*
462 * Perform initialization as required by libxml
463 */
464 if (xmlThrDefMutex == NULL)
466
468
469#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
470 inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
471#endif
472
473 gs->oldXMLWDcompatibility = 0;
474 gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
475 gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
476#if defined(LIBXML_SAX1_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
477 initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
478#endif /* LIBXML_SAX1_ENABLED */
479 gs->xmlDefaultSAXLocator.getPublicId = xmlSAX2GetPublicId;
480 gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
481 gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
482 gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
483 gs->xmlDoValidityCheckingDefaultValue =
485#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
486 gs->xmlFree = (xmlFreeFunc) xmlMemFree;
487 gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
488 gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
489 gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
490 gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
491#else
492 gs->xmlFree = (xmlFreeFunc) free;
493 gs->xmlMalloc = (xmlMallocFunc) malloc;
494 gs->xmlMallocAtomic = (xmlMallocFunc) malloc;
495 gs->xmlRealloc = (xmlReallocFunc) realloc;
496 gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
497#endif
498 gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
499 gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
500 gs->xmlTreeIndentString = xmlTreeIndentStringThrDef;
501 gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
502 gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
503 gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
504 gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
505 gs->xmlParserVersion = LIBXML_VERSION_STRING;
506 gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
507 gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
508 gs->xmlSubstituteEntitiesDefaultValue =
510
511 gs->xmlGenericError = xmlGenericErrorThrDef;
512 gs->xmlStructuredError = xmlStructuredErrorThrDef;
513 gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef;
514 gs->xmlStructuredErrorContext = xmlStructuredErrorContextThrDef;
515 gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
516 gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
517
518 gs->xmlParserInputBufferCreateFilenameValue = xmlParserInputBufferCreateFilenameValueThrDef;
519 gs->xmlOutputBufferCreateFilenameValue = xmlOutputBufferCreateFilenameValueThrDef;
520 memset(&gs->xmlLastError, 0, sizeof(xmlError));
521
523}
XMLPUBFUN int XMLCALL xmlSAX2GetColumnNumber(void *ctx)
Definition: SAX2.c:259
XMLPUBFUN const xmlChar *XMLCALL xmlSAX2GetSystemId(void *ctx)
Definition: SAX2.c:227
XMLPUBFUN const xmlChar *XMLCALL xmlSAX2GetPublicId(void *ctx)
XMLPUBFUN int XMLCALL xmlSAX2GetLineNumber(void *ctx)
Definition: SAX2.c:243
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define gs
Definition: i386-dis.c:446
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
static int xmlSaveNoEmptyTagsThrDef
Definition: globals.c:355
static xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef
Definition: globals.c:282
static int xmlLineNumbersDefaultValueThrDef
Definition: globals.c:252
static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef
Definition: globals.c:277
static int xmlGetWarningsDefaultValueThrDef
Definition: globals.c:225
static xmlStructuredErrorFunc xmlStructuredErrorThrDef
Definition: globals.c:309
static void * xmlGenericErrorContextThrDef
Definition: globals.c:316
static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef
Definition: globals.c:285
static int xmlSubstituteEntitiesDefaultValueThrDef
Definition: globals.c:274
static int xmlIndentTreeOutputThrDef
Definition: globals.c:336
static int xmlKeepBlanksDefaultValueThrDef
Definition: globals.c:263
static void * xmlStructuredErrorContextThrDef
Definition: globals.c:323
void xmlInitGlobals(void)
Definition: globals.c:48
static int xmlParserDebugEntitiesThrDef
Definition: globals.c:209
static const char * xmlTreeIndentStringThrDef
Definition: globals.c:344
static int xmlDefaultBufferSizeThrDef
Definition: globals.c:189
static int xmlLoadExtDtdDefaultValueThrDef
Definition: globals.c:234
static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef
Definition: globals.c:279
static int xmlDoValidityCheckingDefaultValueThrDef
Definition: globals.c:217
static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef
Definition: globals.c:182
static int xmlPedanticParserDefaultValueThrDef
Definition: globals.c:242
static xmlGenericErrorFunc xmlGenericErrorThrDef
Definition: globals.c:302
#define memset(x, y, z)
Definition: compat.h:39
XMLPUBFUN void XMLCALL xmlMutexUnlock(xmlMutexPtr tok)
Definition: threads.c:248
XMLPUBFUN int XMLCALL xmlGetThreadId(void)
Definition: threads.c:750
XMLPUBFUN void XMLCALL xmlMutexLock(xmlMutexPtr tok)
Definition: threads.c:220
void *(XMLCALL * xmlReallocFunc)(void *mem, size_t size)
Definition: xmlmemory.h:77
char *(XMLCALL * xmlStrdupFunc)(const char *str)
Definition: xmlmemory.h:87
XMLPUBFUN void XMLCALL xmlMemFree(void *ptr)
Definition: xmlmemory.c:414
void(XMLCALL * xmlFreeFunc)(void *mem)
Definition: xmlmemory.h:57
XMLPUBFUN void *XMLCALL xmlMemMalloc(size_t size) LIBXML_ATTR_ALLOC_SIZE(1)
Definition: xmlmemory.c:294
XMLPUBFUN char *XMLCALL xmlMemoryStrdup(const char *str)
Definition: xmlmemory.c:555
XMLPUBFUN void *XMLCALL xmlMemRealloc(void *ptr, size_t size)
Definition: xmlmemory.c:403
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:67
#define LIBXML_VERSION_STRING
Definition: xmlversion.h:46

Referenced by xmlGetGlobalState().

◆ 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 122 of file globals.c.

122 {
123 return((char*) xmlCharStrdup(cur));
124}
FxCollectionEntry * cur
XMLPUBFUN xmlChar *XMLCALL xmlCharStrdup(const char *cur)
Definition: xmlstring.c:114

◆ xmlRegisterNodeDefault()

xmlRegisterNodeFunc xmlRegisterNodeDefault ( xmlRegisterNodeFunc  func)

xmlRegisterNodeDefault: @func: function pointer to the new RegisterNodeFunc

Registers a callback for node creation

Returns the old value of the registration function

Definition at line 578 of file globals.c.

579{
581
584 return(old);
585}
void(* xmlRegisterNodeFunc)(xmlNodePtr node)
Definition: globals.h:111

Referenced by main().

◆ xmlThrDefBufferAllocScheme()

xmlBufferAllocationScheme xmlThrDefBufferAllocScheme ( xmlBufferAllocationScheme  v)

Definition at line 766 of file globals.c.

766 {
772 return ret;
773}
const GLdouble * v
Definition: gl.h:2040
xmlBufferAllocationScheme
Definition: tree.h:74
int ret

◆ xmlThrDefDefaultBufferSize()

int xmlThrDefDefaultBufferSize ( int  v)

Definition at line 783 of file globals.c.

◆ xmlThrDefDeregisterNodeDefault()

xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault ( xmlDeregisterNodeFunc  func)

Definition at line 621 of file globals.c.

◆ xmlThrDefDoValidityCheckingDefaultValue()

int xmlThrDefDoValidityCheckingDefaultValue ( int  v)

◆ xmlThrDefGetWarningsDefaultValue()

int xmlThrDefGetWarningsDefaultValue ( int  v)

Definition at line 873 of file globals.c.

◆ xmlThrDefIndentTreeOutput()

int xmlThrDefIndentTreeOutput ( int  v)

Definition at line 890 of file globals.c.

◆ xmlThrDefKeepBlanksDefaultValue()

int xmlThrDefKeepBlanksDefaultValue ( int  v)

Definition at line 924 of file globals.c.

◆ xmlThrDefLineNumbersDefaultValue()

int xmlThrDefLineNumbersDefaultValue ( int  v)

Definition at line 941 of file globals.c.

◆ xmlThrDefLoadExtDtdDefaultValue()

int xmlThrDefLoadExtDtdDefaultValue ( int  v)

Definition at line 958 of file globals.c.

◆ xmlThrDefOutputBufferCreateFilenameDefault()

xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault ( xmlOutputBufferCreateFilenameFunc  func)

Definition at line 653 of file globals.c.

654{
656
659#ifdef LIBXML_OUTPUT_ENABLED
660 if (old == NULL) {
661 old = __xmlOutputBufferCreateFilename;
662 }
663#endif
666
667 return(old);
668}
xmlOutputBufferPtr(* xmlOutputBufferCreateFilenameFunc)(const char *URI, xmlCharEncodingHandlerPtr encoder, int compression)
Definition: globals.h:58

◆ xmlThrDefParserDebugEntities()

int xmlThrDefParserDebugEntities ( int  v)

Definition at line 975 of file globals.c.

◆ xmlThrDefParserInputBufferCreateFilenameDefault()

xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault ( xmlParserInputBufferCreateFilenameFunc  func)

Definition at line 636 of file globals.c.

637{
639
642 if (old == NULL) {
644 }
645
648
649 return(old);
650}
xmlParserInputBufferPtr(* xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc)
Definition: globals.h:43
xmlParserInputBufferPtr __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc)

◆ xmlThrDefPedanticParserDefaultValue()

int xmlThrDefPedanticParserDefaultValue ( int  v)

Definition at line 1001 of file globals.c.

◆ xmlThrDefRegisterNodeDefault()

xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault ( xmlRegisterNodeFunc  func)

Definition at line 588 of file globals.c.

◆ xmlThrDefSaveNoEmptyTags()

int xmlThrDefSaveNoEmptyTags ( int  v)

Definition at line 1018 of file globals.c.

1018 {
1019 int ret;
1024 return ret;
1025}

◆ xmlThrDefSetGenericErrorFunc()

void xmlThrDefSetGenericErrorFunc ( void ctx,
xmlGenericErrorFunc  handler 
)

DOC_DISABLE : we ignore missing doc for the xmlThrDef functions, those are really internal work

Definition at line 551 of file globals.c.

551 {
554 if (handler != NULL)
556 else
559}
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...)
Definition: error.c:71

◆ xmlThrDefSetStructuredErrorFunc()

void xmlThrDefSetStructuredErrorFunc ( void ctx,
xmlStructuredErrorFunc  handler 
)

◆ xmlThrDefSubstituteEntitiesDefaultValue()

int xmlThrDefSubstituteEntitiesDefaultValue ( int  v)

Definition at line 1035 of file globals.c.

◆ xmlThrDefTreeIndentString()

const char * xmlThrDefTreeIndentString ( const char v)

Definition at line 907 of file globals.c.

907 {
908 const char * ret;
913 return ret;
914}

Referenced by DllMain().

Variable Documentation

◆ oldXMLWDcompatibility

int oldXMLWDcompatibility = 0

oldXMLWDcompatibility:

Global setting, DEPRECATED.

Definition at line 200 of file globals.c.

Referenced by __oldXMLWDcompatibility().

◆ xmlBufferAllocScheme

xmlBufferAllocScheme:

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

Definition at line 181 of file globals.c.

Referenced by __xmlBufferAllocScheme().

◆ xmlBufferAllocSchemeThrDef

xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT
static

Definition at line 182 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefBufferAllocScheme().

◆ xmlDefaultBufferSize

int xmlDefaultBufferSize = BASE_BUFFER_SIZE

xmlDefaultBufferSize:

Global setting, default buffer size. Default value is BASE_BUFFER_SIZE

Definition at line 188 of file globals.c.

Referenced by __xmlDefaultBufferSize().

◆ xmlDefaultBufferSizeThrDef

int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE
static

Definition at line 189 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefDefaultBufferSize().

◆ xmlDefaultSAXLocator

xmlSAXLocator xmlDefaultSAXLocator
Initial value:

xmlDefaultSAXLocator:

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

Definition at line 401 of file globals.c.

Referenced by __xmlDefaultSAXLocator().

◆ xmlDeregisterNodeDefaultValue

xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL

Definition at line 278 of file globals.c.

Referenced by __xmlDeregisterNodeDefaultValue(), and xmlDeregisterNodeDefault().

◆ xmlDeregisterNodeDefaultValueThrDef

xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL
static

Definition at line 279 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefDeregisterNodeDefault().

◆ xmlDoValidityCheckingDefaultValue

int xmlDoValidityCheckingDefaultValue = 0

xmlDoValidityCheckingDefaultValue:

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

Definition at line 216 of file globals.c.

Referenced by __xmlDoValidityCheckingDefaultValue().

◆ xmlDoValidityCheckingDefaultValueThrDef

int xmlDoValidityCheckingDefaultValueThrDef = 0
static

Definition at line 217 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefDoValidityCheckingDefaultValue().

◆ xmlFree

xmlFreeFunc xmlFree = free

xmlFree: @mem: an already allocated block of memory

The variable holding the libxml free() implementation

Definition at line 82 of file globals.c.

◆ xmlGenericError

xmlGenericError:

Global setting: function used for generic error callbacks

Definition at line 301 of file globals.c.

Referenced by __xmlGenericError().

◆ xmlGenericErrorContext

void* xmlGenericErrorContext = NULL

xmlGenericErrorContext:

Global setting passed to generic error callbacks

Definition at line 315 of file globals.c.

Referenced by __xmlGenericErrorContext().

◆ xmlGenericErrorContextThrDef

void* xmlGenericErrorContextThrDef = NULL
static

Definition at line 316 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefSetGenericErrorFunc().

◆ xmlGenericErrorThrDef

xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc
static

Definition at line 302 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefSetGenericErrorFunc().

◆ xmlGetWarningsDefaultValue

int xmlGetWarningsDefaultValue = 1

xmlGetWarningsDefaultValue:

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

Definition at line 224 of file globals.c.

Referenced by __xmlGetWarningsDefaultValue().

◆ xmlGetWarningsDefaultValueThrDef

int xmlGetWarningsDefaultValueThrDef = 1
static

Definition at line 225 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefGetWarningsDefaultValue().

◆ xmlIndentTreeOutput

int xmlIndentTreeOutput = 1

xmlIndentTreeOutput:

Global setting, asking the serializer to indent the output tree by default Enabled by default

Definition at line 335 of file globals.c.

Referenced by __xmlIndentTreeOutput().

◆ xmlIndentTreeOutputThrDef

int xmlIndentTreeOutputThrDef = 1
static

Definition at line 336 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefIndentTreeOutput().

◆ xmlKeepBlanksDefaultValue

int xmlKeepBlanksDefaultValue = 1

xmlKeepBlanksDefaultValue:

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 262 of file globals.c.

Referenced by __xmlKeepBlanksDefaultValue().

◆ xmlKeepBlanksDefaultValueThrDef

int xmlKeepBlanksDefaultValueThrDef = 1
static

Definition at line 263 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefKeepBlanksDefaultValue().

◆ xmlLastError

xmlError xmlLastError

Definition at line 324 of file globals.c.

Referenced by __xmlLastError(), and xmlCleanupGlobals().

◆ xmlLineNumbersDefaultValue

int xmlLineNumbersDefaultValue = 0

xmlLineNumbersDefaultValue:

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 251 of file globals.c.

Referenced by __xmlLineNumbersDefaultValue().

◆ xmlLineNumbersDefaultValueThrDef

int xmlLineNumbersDefaultValueThrDef = 0
static

Definition at line 252 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefLineNumbersDefaultValue().

◆ xmlLoadExtDtdDefaultValue

int xmlLoadExtDtdDefaultValue = 0

xmlLoadExtDtdDefaultValue:

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

Definition at line 233 of file globals.c.

Referenced by __xmlLoadExtDtdDefaultValue().

◆ xmlLoadExtDtdDefaultValueThrDef

int xmlLoadExtDtdDefaultValueThrDef = 0
static

Definition at line 234 of file globals.c.

Referenced by xmlInitializeGlobalState(), and 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 91 of file globals.c.

◆ 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 102 of file globals.c.

◆ 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 133 of file globals.c.

◆ xmlOutputBufferCreateFilenameValue

xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL

Definition at line 284 of file globals.c.

Referenced by __xmlOutputBufferCreateFilenameValue().

◆ xmlOutputBufferCreateFilenameValueThrDef

xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef = NULL
static

◆ xmlParserDebugEntities

int xmlParserDebugEntities = 0

xmlParserDebugEntities:

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

Definition at line 208 of file globals.c.

Referenced by __xmlParserDebugEntities().

◆ xmlParserDebugEntitiesThrDef

int xmlParserDebugEntitiesThrDef = 0
static

Definition at line 209 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefParserDebugEntities().

◆ xmlParserInputBufferCreateFilenameValue

xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue = NULL

Definition at line 281 of file globals.c.

Referenced by __xmlParserInputBufferCreateFilenameValue().

◆ xmlParserInputBufferCreateFilenameValueThrDef

xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef = NULL
static

◆ xmlParserVersion

xmlParserVersion:

Constant string describing the internal version of the library

Definition at line 173 of file globals.c.

Referenced by __xmlParserVersion().

◆ xmlPedanticParserDefaultValue

int xmlPedanticParserDefaultValue = 0

xmlPedanticParserDefaultValue:

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

Definition at line 241 of file globals.c.

Referenced by __xmlPedanticParserDefaultValue().

◆ xmlPedanticParserDefaultValueThrDef

int xmlPedanticParserDefaultValueThrDef = 0
static

Definition at line 242 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefPedanticParserDefaultValue().

◆ xmlRealloc

xmlReallocFunc xmlRealloc = realloc

xmlRealloc: @mem: an already allocated block of memory @size: the new size requested in bytes

The variable holding the libxml realloc() implementation

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

Definition at line 112 of file globals.c.

◆ xmlRegisterNodeDefaultValue

xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL

Definition at line 276 of file globals.c.

Referenced by __xmlRegisterNodeDefaultValue(), and xmlRegisterNodeDefault().

◆ xmlRegisterNodeDefaultValueThrDef

xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL
static

Definition at line 277 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefRegisterNodeDefault().

◆ xmlSaveNoEmptyTags

int xmlSaveNoEmptyTags = 0

xmlSaveNoEmptyTags:

Global setting, asking the serializer to not output empty tags as <empty> but <empty></empty>. those two forms are indistinguishable once parsed. Disabled by default

Definition at line 354 of file globals.c.

Referenced by __xmlSaveNoEmptyTags().

◆ xmlSaveNoEmptyTagsThrDef

int xmlSaveNoEmptyTagsThrDef = 0
static

Definition at line 355 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefSaveNoEmptyTags().

◆ xmlStructuredError

xmlStructuredErrorFunc xmlStructuredError = NULL

xmlStructuredError:

Global setting: function used for structured error callbacks

Definition at line 308 of file globals.c.

Referenced by __xmlStructuredError().

◆ xmlStructuredErrorContext

void* xmlStructuredErrorContext = NULL

xmlStructuredErrorContext:

Global setting passed to structured error callbacks

Definition at line 322 of file globals.c.

Referenced by __xmlStructuredErrorContext().

◆ xmlStructuredErrorContextThrDef

void* xmlStructuredErrorContextThrDef = NULL
static

Definition at line 323 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefSetStructuredErrorFunc().

◆ xmlStructuredErrorThrDef

xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL
static

Definition at line 309 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefSetStructuredErrorFunc().

◆ xmlSubstituteEntitiesDefaultValue

int xmlSubstituteEntitiesDefaultValue = 0

xmlSubstituteEntitiesDefaultValue:

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 273 of file globals.c.

Referenced by __xmlSubstituteEntitiesDefaultValue().

◆ xmlSubstituteEntitiesDefaultValueThrDef

int xmlSubstituteEntitiesDefaultValueThrDef = 0
static

Definition at line 274 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefSubstituteEntitiesDefaultValue().

◆ xmlThrDefMutex

◆ xmlTreeIndentString

const char* xmlTreeIndentString = " "

xmlTreeIndentString:

The string used to do one-level indent. By default is equal to " " (two spaces)

Definition at line 343 of file globals.c.

Referenced by __xmlTreeIndentString().

◆ xmlTreeIndentStringThrDef

const char* xmlTreeIndentStringThrDef = " "
static

Definition at line 344 of file globals.c.

Referenced by xmlInitializeGlobalState(), and xmlThrDefTreeIndentString().