Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
globals.h530 linesDownload Raw Back to libxml
1/*2 * Summary: interface for all global variables of the library3 * Description: all the global variables and thread handling for4 *              those variables is handled by this module.5 *6 * The bottom of this file is automatically generated by build_glob.py7 * based on the description file global.data8 *9 * Copy: See Copyright for the status of this software.10 *11 * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard12 */13 14#ifndef __XML_GLOBALS_H15#define __XML_GLOBALS_H16 17#include <libxml/xmlversion.h>18#include <libxml/parser.h>19#include <libxml/xmlerror.h>20#include <libxml/SAX2.h>21#include <libxml/xmlmemory.h>22 23#ifdef __cplusplus24extern "C" {25#endif26 27XML_DEPRECATED28XMLPUBFUN void xmlInitGlobals(void);29XML_DEPRECATED30XMLPUBFUN void xmlCleanupGlobals(void);31 32/**33 * xmlParserInputBufferCreateFilenameFunc:34 * @URI: the URI to read from35 * @enc: the requested source encoding36 *37 * Signature for the function doing the lookup for a suitable input method38 * corresponding to an URI.39 *40 * Returns the new xmlParserInputBufferPtr in case of success or NULL if no41 *         method was found.42 */43typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI,44									   xmlCharEncoding enc);45 46 47/**48 * xmlOutputBufferCreateFilenameFunc:49 * @URI: the URI to write to50 * @enc: the requested target encoding51 *52 * Signature for the function doing the lookup for a suitable output method53 * corresponding to an URI.54 *55 * Returns the new xmlOutputBufferPtr in case of success or NULL if no56 *         method was found.57 */58typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI,59								 xmlCharEncodingHandlerPtr encoder,60								 int compression);61 62XMLPUBFUN xmlParserInputBufferCreateFilenameFunc63xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);64XMLPUBFUN xmlOutputBufferCreateFilenameFunc65xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);66 67/*68 * Externally global symbols which need to be protected for backwards69 * compatibility support.70 */71 72#undef	htmlDefaultSAXHandler73#undef	oldXMLWDcompatibility74#undef	xmlBufferAllocScheme75#undef	xmlDefaultBufferSize76#undef	xmlDefaultSAXHandler77#undef	xmlDefaultSAXLocator78#undef	xmlDoValidityCheckingDefaultValue79#undef	xmlFree80#undef	xmlGenericError81#undef	xmlStructuredError82#undef	xmlGenericErrorContext83#undef	xmlStructuredErrorContext84#undef	xmlGetWarningsDefaultValue85#undef	xmlIndentTreeOutput86#undef  xmlTreeIndentString87#undef	xmlKeepBlanksDefaultValue88#undef	xmlLineNumbersDefaultValue89#undef	xmlLoadExtDtdDefaultValue90#undef	xmlMalloc91#undef	xmlMallocAtomic92#undef	xmlMemStrdup93#undef	xmlParserDebugEntities94#undef	xmlParserVersion95#undef	xmlPedanticParserDefaultValue96#undef	xmlRealloc97#undef	xmlSaveNoEmptyTags98#undef	xmlSubstituteEntitiesDefaultValue99#undef  xmlRegisterNodeDefaultValue100#undef  xmlDeregisterNodeDefaultValue101#undef  xmlLastError102#undef  xmlParserInputBufferCreateFilenameValue103#undef  xmlOutputBufferCreateFilenameValue104 105/**106 * xmlRegisterNodeFunc:107 * @node: the current node108 *109 * Signature for the registration callback of a created node110 */111typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);112/**113 * xmlDeregisterNodeFunc:114 * @node: the current node115 *116 * Signature for the deregistration callback of a discarded node117 */118typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);119 120typedef struct _xmlGlobalState xmlGlobalState;121typedef xmlGlobalState *xmlGlobalStatePtr;122struct _xmlGlobalState123{124	const char *xmlParserVersion;125 126	xmlSAXLocator xmlDefaultSAXLocator;127	xmlSAXHandlerV1 xmlDefaultSAXHandler;128	xmlSAXHandlerV1 docbDefaultSAXHandler; /* unused */129	xmlSAXHandlerV1 htmlDefaultSAXHandler;130 131	xmlFreeFunc xmlFree;132	xmlMallocFunc xmlMalloc;133	xmlStrdupFunc xmlMemStrdup;134	xmlReallocFunc xmlRealloc;135 136	xmlGenericErrorFunc xmlGenericError;137	xmlStructuredErrorFunc xmlStructuredError;138	void *xmlGenericErrorContext;139 140	int oldXMLWDcompatibility;141 142	xmlBufferAllocationScheme xmlBufferAllocScheme;143	int xmlDefaultBufferSize;144 145	int xmlSubstituteEntitiesDefaultValue;146	int xmlDoValidityCheckingDefaultValue;147	int xmlGetWarningsDefaultValue;148	int xmlKeepBlanksDefaultValue;149	int xmlLineNumbersDefaultValue;150	int xmlLoadExtDtdDefaultValue;151	int xmlParserDebugEntities;152	int xmlPedanticParserDefaultValue;153 154	int xmlSaveNoEmptyTags;155	int xmlIndentTreeOutput;156	const char *xmlTreeIndentString;157 158	xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;159	xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;160 161	xmlMallocFunc xmlMallocAtomic;162	xmlError xmlLastError;163 164	xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;165	xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;166 167	void *xmlStructuredErrorContext;168};169 170#ifdef __cplusplus171}172#endif173#include <libxml/threads.h>174#ifdef __cplusplus175extern "C" {176#endif177 178XMLPUBFUN void	xmlInitializeGlobalState(xmlGlobalStatePtr gs);179 180XMLPUBFUN void xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);181 182XMLPUBFUN void xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);183 184XMLPUBFUN xmlRegisterNodeFunc xmlRegisterNodeDefault(xmlRegisterNodeFunc func);185XMLPUBFUN xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);186XMLPUBFUN xmlDeregisterNodeFunc xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);187XMLPUBFUN xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);188 189XMLPUBFUN xmlOutputBufferCreateFilenameFunc190	xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);191XMLPUBFUN xmlParserInputBufferCreateFilenameFunc192	xmlThrDefParserInputBufferCreateFilenameDefault(193				xmlParserInputBufferCreateFilenameFunc func);194 195/*196 * In general the memory allocation entry points are not kept197 * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED198 *    - xmlMalloc199 *    - xmlMallocAtomic200 *    - xmlRealloc201 *    - xmlMemStrdup202 *    - xmlFree203 */204 205#ifdef LIBXML_THREAD_ALLOC_ENABLED206/** DOC_DISABLE */207 208#ifdef LIBXML_THREAD_ENABLED209XMLPUBFUN  xmlMallocFunc * __xmlMalloc(void);210#define xmlMalloc \211(*(__xmlMalloc()))212#else213XMLPUBVAR xmlMallocFunc xmlMalloc;214#endif215 216#ifdef LIBXML_THREAD_ENABLED217XMLPUBFUN  xmlMallocFunc * __xmlMallocAtomic(void);218#define xmlMallocAtomic \219(*(__xmlMallocAtomic()))220#else221XMLPUBVAR xmlMallocFunc xmlMallocAtomic;222#endif223 224#ifdef LIBXML_THREAD_ENABLED225XMLPUBFUN  xmlReallocFunc * __xmlRealloc(void);226#define xmlRealloc \227(*(__xmlRealloc()))228#else229XMLPUBVAR xmlReallocFunc xmlRealloc;230#endif231 232#ifdef LIBXML_THREAD_ENABLED233XMLPUBFUN  xmlFreeFunc * __xmlFree(void);234#define xmlFree \235(*(__xmlFree()))236#else237XMLPUBVAR xmlFreeFunc xmlFree;238#endif239 240#ifdef LIBXML_THREAD_ENABLED241XMLPUBFUN  xmlStrdupFunc * __xmlMemStrdup(void);242#define xmlMemStrdup \243(*(__xmlMemStrdup()))244#else245XMLPUBVAR xmlStrdupFunc xmlMemStrdup;246#endif247 248/** DOC_ENABLE */249#else /* !LIBXML_THREAD_ALLOC_ENABLED */250XMLPUBVAR xmlMallocFunc xmlMalloc;251XMLPUBVAR xmlMallocFunc xmlMallocAtomic;252XMLPUBVAR xmlReallocFunc xmlRealloc;253XMLPUBVAR xmlFreeFunc xmlFree;254XMLPUBVAR xmlStrdupFunc xmlMemStrdup;255#endif /* LIBXML_THREAD_ALLOC_ENABLED */256 257#ifdef LIBXML_HTML_ENABLED258XML_DEPRECATED259XMLPUBFUN xmlSAXHandlerV1 * __htmlDefaultSAXHandler(void);260#ifdef LIBXML_THREAD_ENABLED261#define htmlDefaultSAXHandler \262(*(__htmlDefaultSAXHandler()))263#else264XML_DEPRECATED265XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;266#endif267#endif268 269XMLPUBFUN xmlError * __xmlLastError(void);270#ifdef LIBXML_THREAD_ENABLED271#define xmlLastError \272(*(__xmlLastError()))273#else274XMLPUBVAR xmlError xmlLastError;275#endif276 277/*278 * Everything starting from the line below is279 * Automatically generated by build_glob.py.280 * Do not modify the previous line.281 */282 283 284XML_DEPRECATED285XMLPUBFUN int * __oldXMLWDcompatibility(void);286#ifdef LIBXML_THREAD_ENABLED287#define oldXMLWDcompatibility \288(*(__oldXMLWDcompatibility()))289#else290XML_DEPRECATED291XMLPUBVAR int oldXMLWDcompatibility;292#endif293 294XML_DEPRECATED295XMLPUBFUN xmlBufferAllocationScheme * __xmlBufferAllocScheme(void);296#ifdef LIBXML_THREAD_ENABLED297#define xmlBufferAllocScheme \298(*(__xmlBufferAllocScheme()))299#else300XML_DEPRECATED301XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;302#endif303XML_DEPRECATED304XMLPUBFUN xmlBufferAllocationScheme305	xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);306 307XML_DEPRECATED308XMLPUBFUN int * __xmlDefaultBufferSize(void);309#ifdef LIBXML_THREAD_ENABLED310#define xmlDefaultBufferSize \311(*(__xmlDefaultBufferSize()))312#else313XML_DEPRECATED314XMLPUBVAR int xmlDefaultBufferSize;315#endif316XML_DEPRECATED317XMLPUBFUN int xmlThrDefDefaultBufferSize(int v);318 319XML_DEPRECATED320XMLPUBFUN xmlSAXHandlerV1 * __xmlDefaultSAXHandler(void);321#ifdef LIBXML_THREAD_ENABLED322#define xmlDefaultSAXHandler \323(*(__xmlDefaultSAXHandler()))324#else325XML_DEPRECATED326XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;327#endif328 329XML_DEPRECATED330XMLPUBFUN xmlSAXLocator * __xmlDefaultSAXLocator(void);331#ifdef LIBXML_THREAD_ENABLED332#define xmlDefaultSAXLocator \333(*(__xmlDefaultSAXLocator()))334#else335XML_DEPRECATED336XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;337#endif338 339XMLPUBFUN int * __xmlDoValidityCheckingDefaultValue(void);340#ifdef LIBXML_THREAD_ENABLED341#define xmlDoValidityCheckingDefaultValue \342(*(__xmlDoValidityCheckingDefaultValue()))343#else344XMLPUBVAR int xmlDoValidityCheckingDefaultValue;345#endif346XMLPUBFUN int xmlThrDefDoValidityCheckingDefaultValue(int v);347 348XMLPUBFUN xmlGenericErrorFunc * __xmlGenericError(void);349#ifdef LIBXML_THREAD_ENABLED350#define xmlGenericError \351(*(__xmlGenericError()))352#else353XMLPUBVAR xmlGenericErrorFunc xmlGenericError;354#endif355 356XMLPUBFUN xmlStructuredErrorFunc * __xmlStructuredError(void);357#ifdef LIBXML_THREAD_ENABLED358#define xmlStructuredError \359(*(__xmlStructuredError()))360#else361XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;362#endif363 364XMLPUBFUN void * * __xmlGenericErrorContext(void);365#ifdef LIBXML_THREAD_ENABLED366#define xmlGenericErrorContext \367(*(__xmlGenericErrorContext()))368#else369XMLPUBVAR void * xmlGenericErrorContext;370#endif371 372XMLPUBFUN void * * __xmlStructuredErrorContext(void);373#ifdef LIBXML_THREAD_ENABLED374#define xmlStructuredErrorContext \375(*(__xmlStructuredErrorContext()))376#else377XMLPUBVAR void * xmlStructuredErrorContext;378#endif379 380XMLPUBFUN int * __xmlGetWarningsDefaultValue(void);381#ifdef LIBXML_THREAD_ENABLED382#define xmlGetWarningsDefaultValue \383(*(__xmlGetWarningsDefaultValue()))384#else385XMLPUBVAR int xmlGetWarningsDefaultValue;386#endif387XMLPUBFUN int xmlThrDefGetWarningsDefaultValue(int v);388 389XMLPUBFUN int * __xmlIndentTreeOutput(void);390#ifdef LIBXML_THREAD_ENABLED391#define xmlIndentTreeOutput \392(*(__xmlIndentTreeOutput()))393#else394XMLPUBVAR int xmlIndentTreeOutput;395#endif396XMLPUBFUN int xmlThrDefIndentTreeOutput(int v);397 398XMLPUBFUN const char * * __xmlTreeIndentString(void);399#ifdef LIBXML_THREAD_ENABLED400#define xmlTreeIndentString \401(*(__xmlTreeIndentString()))402#else403XMLPUBVAR const char * xmlTreeIndentString;404#endif405XMLPUBFUN const char * xmlThrDefTreeIndentString(const char * v);406 407XMLPUBFUN int * __xmlKeepBlanksDefaultValue(void);408#ifdef LIBXML_THREAD_ENABLED409#define xmlKeepBlanksDefaultValue \410(*(__xmlKeepBlanksDefaultValue()))411#else412XMLPUBVAR int xmlKeepBlanksDefaultValue;413#endif414XMLPUBFUN int xmlThrDefKeepBlanksDefaultValue(int v);415 416XML_DEPRECATED417XMLPUBFUN int * __xmlLineNumbersDefaultValue(void);418#ifdef LIBXML_THREAD_ENABLED419#define xmlLineNumbersDefaultValue \420(*(__xmlLineNumbersDefaultValue()))421#else422XML_DEPRECATED423XMLPUBVAR int xmlLineNumbersDefaultValue;424#endif425XML_DEPRECATED426XMLPUBFUN int xmlThrDefLineNumbersDefaultValue(int v);427 428XMLPUBFUN int * __xmlLoadExtDtdDefaultValue(void);429#ifdef LIBXML_THREAD_ENABLED430#define xmlLoadExtDtdDefaultValue \431(*(__xmlLoadExtDtdDefaultValue()))432#else433XMLPUBVAR int xmlLoadExtDtdDefaultValue;434#endif435XMLPUBFUN int xmlThrDefLoadExtDtdDefaultValue(int v);436 437XMLPUBFUN int * __xmlParserDebugEntities(void);438#ifdef LIBXML_THREAD_ENABLED439#define xmlParserDebugEntities \440(*(__xmlParserDebugEntities()))441#else442XMLPUBVAR int xmlParserDebugEntities;443#endif444XMLPUBFUN int xmlThrDefParserDebugEntities(int v);445 446XMLPUBFUN const char * * __xmlParserVersion(void);447#ifdef LIBXML_THREAD_ENABLED448#define xmlParserVersion \449(*(__xmlParserVersion()))450#else451XMLPUBVAR const char * xmlParserVersion;452#endif453 454XML_DEPRECATED455XMLPUBFUN int * __xmlPedanticParserDefaultValue(void);456#ifdef LIBXML_THREAD_ENABLED457#define xmlPedanticParserDefaultValue \458(*(__xmlPedanticParserDefaultValue()))459#else460XML_DEPRECATED461XMLPUBVAR int xmlPedanticParserDefaultValue;462#endif463XML_DEPRECATED464XMLPUBFUN int xmlThrDefPedanticParserDefaultValue(int v);465 466XMLPUBFUN int * __xmlSaveNoEmptyTags(void);467#ifdef LIBXML_THREAD_ENABLED468#define xmlSaveNoEmptyTags \469(*(__xmlSaveNoEmptyTags()))470#else471XMLPUBVAR int xmlSaveNoEmptyTags;472#endif473XMLPUBFUN int xmlThrDefSaveNoEmptyTags(int v);474 475XMLPUBFUN int * __xmlSubstituteEntitiesDefaultValue(void);476#ifdef LIBXML_THREAD_ENABLED477#define xmlSubstituteEntitiesDefaultValue \478(*(__xmlSubstituteEntitiesDefaultValue()))479#else480XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;481#endif482XMLPUBFUN int xmlThrDefSubstituteEntitiesDefaultValue(int v);483 484XML_DEPRECATED485XMLPUBFUN xmlRegisterNodeFunc * __xmlRegisterNodeDefaultValue(void);486#ifdef LIBXML_THREAD_ENABLED487#define xmlRegisterNodeDefaultValue \488(*(__xmlRegisterNodeDefaultValue()))489#else490XML_DEPRECATED491XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;492#endif493 494XML_DEPRECATED495XMLPUBFUN xmlDeregisterNodeFunc * __xmlDeregisterNodeDefaultValue(void);496#ifdef LIBXML_THREAD_ENABLED497#define xmlDeregisterNodeDefaultValue \498(*(__xmlDeregisterNodeDefaultValue()))499#else500XML_DEPRECATED501XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;502#endif503 504XML_DEPRECATED505XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * \506				__xmlParserInputBufferCreateFilenameValue(void);507#ifdef LIBXML_THREAD_ENABLED508#define xmlParserInputBufferCreateFilenameValue \509(*(__xmlParserInputBufferCreateFilenameValue()))510#else511XML_DEPRECATED512XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;513#endif514 515XML_DEPRECATED516XMLPUBFUN xmlOutputBufferCreateFilenameFunc * __xmlOutputBufferCreateFilenameValue(void);517#ifdef LIBXML_THREAD_ENABLED518#define xmlOutputBufferCreateFilenameValue \519(*(__xmlOutputBufferCreateFilenameValue()))520#else521XML_DEPRECATED522XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;523#endif524 525#ifdef __cplusplus526}527#endif528 529#endif /* __XML_GLOBALS_H */530 
codekingpro/portable-devtools · Team Ai