Eneboo - Documentación para desarrolladores
|
00001 /* 00002 * Summary: interface for all global variables of the library 00003 * Description: all the global variables and thread handling for 00004 * those variables is handled by this module. 00005 * 00006 * The bottom of this file is automatically generated by build_glob.py 00007 * based on the description file global.data 00008 * 00009 * Copy: See Copyright for the status of this software. 00010 * 00011 * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard 00012 */ 00013 00014 #ifndef __XML_GLOBALS_H 00015 #define __XML_GLOBALS_H 00016 00017 #include <libxml/xmlversion.h> 00018 #include <libxml/parser.h> 00019 #include <libxml/xmlerror.h> 00020 #include <libxml/SAX.h> 00021 #include <libxml/SAX2.h> 00022 #include <libxml/xmlmemory.h> 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 XMLPUBFUN void XMLCALL xmlInitGlobals(void); 00029 XMLPUBFUN void XMLCALL xmlCleanupGlobals(void); 00030 00042 typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc); 00043 00055 typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); 00056 00057 XMLPUBFUN xmlParserInputBufferCreateFilenameFunc 00058 XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); 00059 XMLPUBFUN xmlOutputBufferCreateFilenameFunc 00060 XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); 00061 00062 /* 00063 * Externally global symbols which need to be protected for backwards 00064 * compatibility support. 00065 */ 00066 00067 #undef docbDefaultSAXHandler 00068 #undef htmlDefaultSAXHandler 00069 #undef oldXMLWDcompatibility 00070 #undef xmlBufferAllocScheme 00071 #undef xmlDefaultBufferSize 00072 #undef xmlDefaultSAXHandler 00073 #undef xmlDefaultSAXLocator 00074 #undef xmlDoValidityCheckingDefaultValue 00075 #undef xmlFree 00076 #undef xmlGenericError 00077 #undef xmlStructuredError 00078 #undef xmlGenericErrorContext 00079 #undef xmlStructuredErrorContext 00080 #undef xmlGetWarningsDefaultValue 00081 #undef xmlIndentTreeOutput 00082 #undef xmlTreeIndentString 00083 #undef xmlKeepBlanksDefaultValue 00084 #undef xmlLineNumbersDefaultValue 00085 #undef xmlLoadExtDtdDefaultValue 00086 #undef xmlMalloc 00087 #undef xmlMallocAtomic 00088 #undef xmlMemStrdup 00089 #undef xmlParserDebugEntities 00090 #undef xmlParserVersion 00091 #undef xmlPedanticParserDefaultValue 00092 #undef xmlRealloc 00093 #undef xmlSaveNoEmptyTags 00094 #undef xmlSubstituteEntitiesDefaultValue 00095 #undef xmlRegisterNodeDefaultValue 00096 #undef xmlDeregisterNodeDefaultValue 00097 #undef xmlLastError 00098 #undef xmlParserInputBufferCreateFilenameValue 00099 #undef xmlOutputBufferCreateFilenameValue 00100 00107 typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); 00114 typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); 00115 00116 typedef struct _xmlGlobalState xmlGlobalState; 00117 typedef xmlGlobalState *xmlGlobalStatePtr; 00118 struct _xmlGlobalState 00119 { 00120 const char *xmlParserVersion; 00121 00122 xmlSAXLocator xmlDefaultSAXLocator; 00123 xmlSAXHandlerV1 xmlDefaultSAXHandler; 00124 xmlSAXHandlerV1 docbDefaultSAXHandler; 00125 xmlSAXHandlerV1 htmlDefaultSAXHandler; 00126 00127 xmlFreeFunc xmlFree; 00128 xmlMallocFunc xmlMalloc; 00129 xmlStrdupFunc xmlMemStrdup; 00130 xmlReallocFunc xmlRealloc; 00131 00132 xmlGenericErrorFunc xmlGenericError; 00133 xmlStructuredErrorFunc xmlStructuredError; 00134 void *xmlGenericErrorContext; 00135 00136 int oldXMLWDcompatibility; 00137 00138 xmlBufferAllocationScheme xmlBufferAllocScheme; 00139 int xmlDefaultBufferSize; 00140 00141 int xmlSubstituteEntitiesDefaultValue; 00142 int xmlDoValidityCheckingDefaultValue; 00143 int xmlGetWarningsDefaultValue; 00144 int xmlKeepBlanksDefaultValue; 00145 int xmlLineNumbersDefaultValue; 00146 int xmlLoadExtDtdDefaultValue; 00147 int xmlParserDebugEntities; 00148 int xmlPedanticParserDefaultValue; 00149 00150 int xmlSaveNoEmptyTags; 00151 int xmlIndentTreeOutput; 00152 const char *xmlTreeIndentString; 00153 00154 xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; 00155 xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; 00156 00157 xmlMallocFunc xmlMallocAtomic; 00158 xmlError xmlLastError; 00159 00160 xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; 00161 xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; 00162 00163 void *xmlStructuredErrorContext; 00164 }; 00165 00166 #ifdef __cplusplus 00167 } 00168 #endif 00169 #include <libxml/threads.h> 00170 #ifdef __cplusplus 00171 extern "C" { 00172 #endif 00173 00174 XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs); 00175 00176 XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); 00177 00178 XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler); 00179 00180 XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func); 00181 XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func); 00182 XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func); 00183 XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func); 00184 00185 XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL 00186 xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func); 00187 XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL 00188 xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func); 00189 00191 /* 00192 * In general the memory allocation entry points are not kept 00193 * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED 00194 * - xmlMalloc 00195 * - xmlMallocAtomic 00196 * - xmlRealloc 00197 * - xmlMemStrdup 00198 * - xmlFree 00199 */ 00200 00201 #ifdef LIBXML_THREAD_ALLOC_ENABLED 00202 #ifdef LIBXML_THREAD_ENABLED 00203 XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void); 00204 #define xmlMalloc \ 00205 (*(__xmlMalloc())) 00206 #else 00207 XMLPUBVAR xmlMallocFunc xmlMalloc; 00208 #endif 00209 00210 #ifdef LIBXML_THREAD_ENABLED 00211 XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void); 00212 #define xmlMallocAtomic \ 00213 (*(__xmlMallocAtomic())) 00214 #else 00215 XMLPUBVAR xmlMallocFunc xmlMallocAtomic; 00216 #endif 00217 00218 #ifdef LIBXML_THREAD_ENABLED 00219 XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void); 00220 #define xmlRealloc \ 00221 (*(__xmlRealloc())) 00222 #else 00223 XMLPUBVAR xmlReallocFunc xmlRealloc; 00224 #endif 00225 00226 #ifdef LIBXML_THREAD_ENABLED 00227 XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void); 00228 #define xmlFree \ 00229 (*(__xmlFree())) 00230 #else 00231 XMLPUBVAR xmlFreeFunc xmlFree; 00232 #endif 00233 00234 #ifdef LIBXML_THREAD_ENABLED 00235 XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void); 00236 #define xmlMemStrdup \ 00237 (*(__xmlMemStrdup())) 00238 #else 00239 XMLPUBVAR xmlStrdupFunc xmlMemStrdup; 00240 #endif 00241 00242 #else /* !LIBXML_THREAD_ALLOC_ENABLED */ 00243 XMLPUBVAR xmlMallocFunc xmlMalloc; 00244 XMLPUBVAR xmlMallocFunc xmlMallocAtomic; 00245 XMLPUBVAR xmlReallocFunc xmlRealloc; 00246 XMLPUBVAR xmlFreeFunc xmlFree; 00247 XMLPUBVAR xmlStrdupFunc xmlMemStrdup; 00248 #endif /* LIBXML_THREAD_ALLOC_ENABLED */ 00249 00250 #ifdef LIBXML_DOCB_ENABLED 00251 XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void); 00252 #ifdef LIBXML_THREAD_ENABLED 00253 #define docbDefaultSAXHandler \ 00254 (*(__docbDefaultSAXHandler())) 00255 #else 00256 XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler; 00257 #endif 00258 #endif 00259 00260 #ifdef LIBXML_HTML_ENABLED 00261 XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void); 00262 #ifdef LIBXML_THREAD_ENABLED 00263 #define htmlDefaultSAXHandler \ 00264 (*(__htmlDefaultSAXHandler())) 00265 #else 00266 XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler; 00267 #endif 00268 #endif 00269 00270 XMLPUBFUN xmlError * XMLCALL __xmlLastError(void); 00271 #ifdef LIBXML_THREAD_ENABLED 00272 #define xmlLastError \ 00273 (*(__xmlLastError())) 00274 #else 00275 XMLPUBVAR xmlError xmlLastError; 00276 #endif 00277 00278 /* 00279 * Everything starting from the line below is 00280 * Automatically generated by build_glob.py. 00281 * Do not modify the previous line. 00282 */ 00283 00284 00285 XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void); 00286 #ifdef LIBXML_THREAD_ENABLED 00287 #define oldXMLWDcompatibility \ 00288 (*(__oldXMLWDcompatibility())) 00289 #else 00290 XMLPUBVAR int oldXMLWDcompatibility; 00291 #endif 00292 00293 XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void); 00294 #ifdef LIBXML_THREAD_ENABLED 00295 #define xmlBufferAllocScheme \ 00296 (*(__xmlBufferAllocScheme())) 00297 #else 00298 XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme; 00299 #endif 00300 XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v); 00301 00302 XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void); 00303 #ifdef LIBXML_THREAD_ENABLED 00304 #define xmlDefaultBufferSize \ 00305 (*(__xmlDefaultBufferSize())) 00306 #else 00307 XMLPUBVAR int xmlDefaultBufferSize; 00308 #endif 00309 XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v); 00310 00311 XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void); 00312 #ifdef LIBXML_THREAD_ENABLED 00313 #define xmlDefaultSAXHandler \ 00314 (*(__xmlDefaultSAXHandler())) 00315 #else 00316 XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler; 00317 #endif 00318 00319 XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void); 00320 #ifdef LIBXML_THREAD_ENABLED 00321 #define xmlDefaultSAXLocator \ 00322 (*(__xmlDefaultSAXLocator())) 00323 #else 00324 XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator; 00325 #endif 00326 00327 XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void); 00328 #ifdef LIBXML_THREAD_ENABLED 00329 #define xmlDoValidityCheckingDefaultValue \ 00330 (*(__xmlDoValidityCheckingDefaultValue())) 00331 #else 00332 XMLPUBVAR int xmlDoValidityCheckingDefaultValue; 00333 #endif 00334 XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v); 00335 00336 XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void); 00337 #ifdef LIBXML_THREAD_ENABLED 00338 #define xmlGenericError \ 00339 (*(__xmlGenericError())) 00340 #else 00341 XMLPUBVAR xmlGenericErrorFunc xmlGenericError; 00342 #endif 00343 00344 XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void); 00345 #ifdef LIBXML_THREAD_ENABLED 00346 #define xmlStructuredError \ 00347 (*(__xmlStructuredError())) 00348 #else 00349 XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError; 00350 #endif 00351 00352 XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void); 00353 #ifdef LIBXML_THREAD_ENABLED 00354 #define xmlGenericErrorContext \ 00355 (*(__xmlGenericErrorContext())) 00356 #else 00357 XMLPUBVAR void * xmlGenericErrorContext; 00358 #endif 00359 00360 XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void); 00361 #ifdef LIBXML_THREAD_ENABLED 00362 #define xmlStructuredErrorContext \ 00363 (*(__xmlStructuredErrorContext())) 00364 #else 00365 XMLPUBVAR void * xmlStructuredErrorContext; 00366 #endif 00367 00368 XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void); 00369 #ifdef LIBXML_THREAD_ENABLED 00370 #define xmlGetWarningsDefaultValue \ 00371 (*(__xmlGetWarningsDefaultValue())) 00372 #else 00373 XMLPUBVAR int xmlGetWarningsDefaultValue; 00374 #endif 00375 XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v); 00376 00377 XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void); 00378 #ifdef LIBXML_THREAD_ENABLED 00379 #define xmlIndentTreeOutput \ 00380 (*(__xmlIndentTreeOutput())) 00381 #else 00382 XMLPUBVAR int xmlIndentTreeOutput; 00383 #endif 00384 XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v); 00385 00386 XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void); 00387 #ifdef LIBXML_THREAD_ENABLED 00388 #define xmlTreeIndentString \ 00389 (*(__xmlTreeIndentString())) 00390 #else 00391 XMLPUBVAR const char * xmlTreeIndentString; 00392 #endif 00393 XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v); 00394 00395 XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void); 00396 #ifdef LIBXML_THREAD_ENABLED 00397 #define xmlKeepBlanksDefaultValue \ 00398 (*(__xmlKeepBlanksDefaultValue())) 00399 #else 00400 XMLPUBVAR int xmlKeepBlanksDefaultValue; 00401 #endif 00402 XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v); 00403 00404 XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void); 00405 #ifdef LIBXML_THREAD_ENABLED 00406 #define xmlLineNumbersDefaultValue \ 00407 (*(__xmlLineNumbersDefaultValue())) 00408 #else 00409 XMLPUBVAR int xmlLineNumbersDefaultValue; 00410 #endif 00411 XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v); 00412 00413 XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void); 00414 #ifdef LIBXML_THREAD_ENABLED 00415 #define xmlLoadExtDtdDefaultValue \ 00416 (*(__xmlLoadExtDtdDefaultValue())) 00417 #else 00418 XMLPUBVAR int xmlLoadExtDtdDefaultValue; 00419 #endif 00420 XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v); 00421 00422 XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void); 00423 #ifdef LIBXML_THREAD_ENABLED 00424 #define xmlParserDebugEntities \ 00425 (*(__xmlParserDebugEntities())) 00426 #else 00427 XMLPUBVAR int xmlParserDebugEntities; 00428 #endif 00429 XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v); 00430 00431 XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void); 00432 #ifdef LIBXML_THREAD_ENABLED 00433 #define xmlParserVersion \ 00434 (*(__xmlParserVersion())) 00435 #else 00436 XMLPUBVAR const char * xmlParserVersion; 00437 #endif 00438 00439 XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void); 00440 #ifdef LIBXML_THREAD_ENABLED 00441 #define xmlPedanticParserDefaultValue \ 00442 (*(__xmlPedanticParserDefaultValue())) 00443 #else 00444 XMLPUBVAR int xmlPedanticParserDefaultValue; 00445 #endif 00446 XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v); 00447 00448 XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void); 00449 #ifdef LIBXML_THREAD_ENABLED 00450 #define xmlSaveNoEmptyTags \ 00451 (*(__xmlSaveNoEmptyTags())) 00452 #else 00453 XMLPUBVAR int xmlSaveNoEmptyTags; 00454 #endif 00455 XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v); 00456 00457 XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void); 00458 #ifdef LIBXML_THREAD_ENABLED 00459 #define xmlSubstituteEntitiesDefaultValue \ 00460 (*(__xmlSubstituteEntitiesDefaultValue())) 00461 #else 00462 XMLPUBVAR int xmlSubstituteEntitiesDefaultValue; 00463 #endif 00464 XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v); 00465 00466 XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void); 00467 #ifdef LIBXML_THREAD_ENABLED 00468 #define xmlRegisterNodeDefaultValue \ 00469 (*(__xmlRegisterNodeDefaultValue())) 00470 #else 00471 XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; 00472 #endif 00473 00474 XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void); 00475 #ifdef LIBXML_THREAD_ENABLED 00476 #define xmlDeregisterNodeDefaultValue \ 00477 (*(__xmlDeregisterNodeDefaultValue())) 00478 #else 00479 XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; 00480 #endif 00481 00482 XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void); 00483 #ifdef LIBXML_THREAD_ENABLED 00484 #define xmlParserInputBufferCreateFilenameValue \ 00485 (*(__xmlParserInputBufferCreateFilenameValue())) 00486 #else 00487 XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; 00488 #endif 00489 00490 XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void); 00491 #ifdef LIBXML_THREAD_ENABLED 00492 #define xmlOutputBufferCreateFilenameValue \ 00493 (*(__xmlOutputBufferCreateFilenameValue())) 00494 #else 00495 XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; 00496 #endif 00497 00498 #ifdef __cplusplus 00499 } 00500 #endif 00501 00502 #endif /* __XML_GLOBALS_H */