📄 globals.h.svn-base
字号:
/* * Summary: interface for all global variables of the library * Description: all the global variables and thread handling for * those variables is handled by this module. * * The bottom of this file is automatically generated by build_glob.py * based on the description file global.data * * Copy: See Copyright for the status of this software. * * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard */#ifndef __XML_GLOBALS_H#define __XML_GLOBALS_H#include <libxml/xmlversion.h>#include <libxml/parser.h>#include <libxml/xmlerror.h>#include <libxml/SAX.h>#include <libxml/SAX2.h>#include <libxml/xmlmemory.h>#ifdef __cplusplusextern "C" {#endifXMLPUBFUN void XMLCALL xmlInitGlobals(void);XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);/* * Externally global symbols which need to be protected for backwards * compatibility support. */#undef docbDefaultSAXHandler#undef htmlDefaultSAXHandler#undef oldXMLWDcompatibility#undef xmlBufferAllocScheme#undef xmlDefaultBufferSize#undef xmlDefaultSAXHandler#undef xmlDefaultSAXLocator#undef xmlDoValidityCheckingDefaultValue#undef xmlFree#undef xmlGenericError#undef xmlStructuredError#undef xmlGenericErrorContext#undef xmlGetWarningsDefaultValue#undef xmlIndentTreeOutput#undef xmlTreeIndentString#undef xmlKeepBlanksDefaultValue#undef xmlLineNumbersDefaultValue#undef xmlLoadExtDtdDefaultValue#undef xmlMalloc#undef xmlMallocAtomic#undef xmlMemStrdup#undef xmlParserDebugEntities#undef xmlParserVersion#undef xmlPedanticParserDefaultValue#undef xmlRealloc#undef xmlSaveNoEmptyTags#undef xmlSubstituteEntitiesDefaultValue#undef xmlRegisterNodeDefaultValue#undef xmlDeregisterNodeDefaultValue#undef xmlLastErrortypedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);typedef struct _xmlGlobalState xmlGlobalState;typedef xmlGlobalState *xmlGlobalStatePtr;struct _xmlGlobalState { const char *xmlParserVersion; xmlSAXLocator xmlDefaultSAXLocator; xmlSAXHandlerV1 xmlDefaultSAXHandler; xmlSAXHandlerV1 docbDefaultSAXHandler; xmlSAXHandlerV1 htmlDefaultSAXHandler; xmlFreeFunc xmlFree; xmlMallocFunc xmlMalloc; xmlStrdupFunc xmlMemStrdup; xmlReallocFunc xmlRealloc; xmlGenericErrorFunc xmlGenericError; xmlStructuredErrorFunc xmlStructuredError; void *xmlGenericErrorContext; int oldXMLWDcompatibility; xmlBufferAllocationScheme xmlBufferAllocScheme; int xmlDefaultBufferSize; int xmlSubstituteEntitiesDefaultValue; int xmlDoValidityCheckingDefaultValue; int xmlGetWarningsDefaultValue; int xmlKeepBlanksDefaultValue; int xmlLineNumbersDefaultValue; int xmlLoadExtDtdDefaultValue; int xmlParserDebugEntities; int xmlPedanticParserDefaultValue; int xmlSaveNoEmptyTags; int xmlIndentTreeOutput; const char *xmlTreeIndentString; xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; xmlMallocFunc xmlMallocAtomic; xmlError xmlLastError;};#ifdef __cplusplus}#endif#include <libxml/threads.h>#ifdef __cplusplusextern "C" {#endifXMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);/** DOC_DISABLE *//* * In general the memory allocation entry points are not kept * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED * - xmlMalloc * - xmlMallocAtomic * - xmlRealloc * - xmlMemStrdup * - xmlFree */#ifdef LIBXML_THREAD_ALLOC_ENABLED#ifdef LIBXML_THREAD_ENABLEDXMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);#define xmlMalloc \(*(__xmlMalloc()))#elseXMLPUBVAR xmlMallocFunc xmlMalloc;#endif#ifdef LIBXML_THREAD_ENABLEDXMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);#define xmlMallocAtomic \(*(__xmlMallocAtomic()))#elseXMLPUBVAR xmlMallocFunc xmlMallocAtomic;#endif#ifdef LIBXML_THREAD_ENABLEDXMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);#define xmlRealloc \(*(__xmlRealloc()))#elseXMLPUBVAR xmlReallocFunc xmlRealloc;#endif#ifdef LIBXML_THREAD_ENABLEDXMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);#define xmlFree \(*(__xmlFree()))#elseXMLPUBVAR xmlFreeFunc xmlFree;#endif#ifdef LIBXML_THREAD_ENABLEDXMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);#define xmlMemStrdup \(*(__xmlMemStrdup()))#elseXMLPUBVAR xmlStrdupFunc xmlMemStrdup;#endif#else /* !LIBXML_THREAD_ALLOC_ENABLED */XMLPUBVAR xmlMallocFunc xmlMalloc;XMLPUBVAR xmlMallocFunc xmlMallocAtomic;XMLPUBVAR xmlReallocFunc xmlRealloc;XMLPUBVAR xmlFreeFunc xmlFree;XMLPUBVAR xmlStrdupFunc xmlMemStrdup;#endif /* LIBXML_THREAD_ALLOC_ENABLED */#ifdef LIBXML_DOCB_ENABLEDXMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);#ifdef LIBXML_THREAD_ENABLED#define docbDefaultSAXHandler \(*(__docbDefaultSAXHandler()))#elseXMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;#endif#endif#ifdef LIBXML_HTML_ENABLEDXMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);#ifdef LIBXML_THREAD_ENABLED#define htmlDefaultSAXHandler \(*(__htmlDefaultSAXHandler()))#elseXMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;#endif#endifXMLPUBFUN xmlError * XMLCALL __xmlLastError(void);#ifdef LIBXML_THREAD_ENABLED#define xmlLastError \(*(__xmlLastError()))#elseXMLPUBVAR xmlError xmlLastError;#endif/* * Everything starting from the line below is * Automatically generated by build_glob.py. * Do not modify the previous line. */XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);#ifdef LIBXML_THREAD_ENABLED#define oldXMLWDcompatibility \(*(__oldXMLWDcompatibility()))#elseXMLPUBVAR int oldXMLWDcompatibility;#endifXMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);#ifdef LIBXML_THREAD_ENABLED#define xmlBufferAllocScheme \(*(__xmlBufferAllocScheme()))#elseXMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;#endifXMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);#ifdef LIBXML_THREAD_ENABLED#define xmlDefaultBufferSize \(*(__xmlDefaultBufferSize()))#elseXMLPUBVAR int xmlDefaultBufferSize;#endifXMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);#ifdef LIBXML_THREAD_ENABLED#define xmlDefaultSAXHandler \(*(__xmlDefaultSAXHandler()))#elseXMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;#endifXMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);#ifdef LIBXML_THREAD_ENABLED#define xmlDefaultSAXLocator \(*(__xmlDefaultSAXLocator()))#elseXMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;#endifXMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlDoValidityCheckingDefaultValue \(*(__xmlDoValidityCheckingDefaultValue()))#elseXMLPUBVAR int xmlDoValidityCheckingDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);#ifdef LIBXML_THREAD_ENABLED#define xmlGenericError \(*(__xmlGenericError()))#elseXMLPUBVAR xmlGenericErrorFunc xmlGenericError;#endifXMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);#ifdef LIBXML_THREAD_ENABLED#define xmlStructuredError \(*(__xmlStructuredError()))#elseXMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;#endifXMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);#ifdef LIBXML_THREAD_ENABLED#define xmlGenericErrorContext \(*(__xmlGenericErrorContext()))#elseXMLPUBVAR void * xmlGenericErrorContext;#endifXMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlGetWarningsDefaultValue \(*(__xmlGetWarningsDefaultValue()))#elseXMLPUBVAR int xmlGetWarningsDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);#ifdef LIBXML_THREAD_ENABLED#define xmlIndentTreeOutput \(*(__xmlIndentTreeOutput()))#elseXMLPUBVAR int xmlIndentTreeOutput;#endifXMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);#ifdef LIBXML_THREAD_ENABLED#define xmlTreeIndentString \(*(__xmlTreeIndentString()))#elseXMLPUBVAR const char * xmlTreeIndentString;#endifXMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlKeepBlanksDefaultValue \(*(__xmlKeepBlanksDefaultValue()))#elseXMLPUBVAR int xmlKeepBlanksDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlLineNumbersDefaultValue \(*(__xmlLineNumbersDefaultValue()))#elseXMLPUBVAR int xmlLineNumbersDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlLoadExtDtdDefaultValue \(*(__xmlLoadExtDtdDefaultValue()))#elseXMLPUBVAR int xmlLoadExtDtdDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);#ifdef LIBXML_THREAD_ENABLED#define xmlParserDebugEntities \(*(__xmlParserDebugEntities()))#elseXMLPUBVAR int xmlParserDebugEntities;#endifXMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);#ifdef LIBXML_THREAD_ENABLED#define xmlParserVersion \(*(__xmlParserVersion()))#elseXMLPUBVAR const char * xmlParserVersion;#endifXMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlPedanticParserDefaultValue \(*(__xmlPedanticParserDefaultValue()))#elseXMLPUBVAR int xmlPedanticParserDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);#ifdef LIBXML_THREAD_ENABLED#define xmlSaveNoEmptyTags \(*(__xmlSaveNoEmptyTags()))#elseXMLPUBVAR int xmlSaveNoEmptyTags;#endifXMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlSubstituteEntitiesDefaultValue \(*(__xmlSubstituteEntitiesDefaultValue()))#elseXMLPUBVAR int xmlSubstituteEntitiesDefaultValue;#endifXMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlRegisterNodeDefaultValue \(*(__xmlRegisterNodeDefaultValue()))#elseXMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;#endifXMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);#ifdef LIBXML_THREAD_ENABLED#define xmlDeregisterNodeDefaultValue \(*(__xmlDeregisterNodeDefaultValue()))#elseXMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;#endif#ifdef __cplusplus}#endif#endif /* __XML_GLOBALS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -