globals.h


    1 /*
    2  * globals.h: interface for all global variables of the library
    3  *
    4  * The bottom of this file is automatically generated by build_glob.py
    5  * based on the description file global.data
    6  *
    7  * See Copyright for the status of this software.
    8  *
    9  * Gary Pennington 
    10  * daniel@veillard.com
    11  */
    12 
    13 #ifndef __XML_GLOBALS_H
    14 #define __XML_GLOBALS_H
    15 
    16 #include 
    17 #include 
    18 #include 
    19 #include 
    20 
    21 #ifdef __cplusplus
    22 extern "C" {
    23 #endif
    24 
    25 /*
    26  * Externally global symbols which need to be protected for backwards
    27  * compatibility support.
    28  */
    29 
    30 #undef	docbDefaultSAXHandler
    31 #undef	htmlDefaultSAXHandler
    32 #undef	oldXMLWDcompatibility
    33 #undef	xmlBufferAllocScheme
    34 #undef	xmlDefaultBufferSize
    35 #undef	xmlDefaultSAXHandler
    36 #undef	xmlDefaultSAXLocator
    37 #undef	xmlDoValidityCheckingDefaultValue
    38 #undef	xmlFree
    39 #undef	xmlGenericError
    40 #undef	xmlGenericErrorContext
    41 #undef	xmlGetWarningsDefaultValue
    42 #undef	xmlIndentTreeOutput
    43 #undef  xmlTreeIndentString
    44 #undef	xmlKeepBlanksDefaultValue
    45 #undef	xmlLineNumbersDefaultValue
    46 #undef	xmlLoadExtDtdDefaultValue
    47 #undef	xmlMalloc
    48 #undef	xmlMemStrdup
    49 #undef	xmlParserDebugEntities
    50 #undef	xmlParserVersion
    51 #undef	xmlPedanticParserDefaultValue
    52 #undef	xmlRealloc
    53 #undef	xmlSaveNoEmptyTags
    54 #undef	xmlSubstituteEntitiesDefaultValue
    55 
    56 typedef struct _xmlGlobalState xmlGlobalState;  <_xmlGlobalState>
    57 typedef xmlGlobalState *xmlGlobalStatePtr;  <typedef:xmlGlobalStatePtr>
    58 struct _xmlGlobalState 
    59 {
    60 	const char *xmlParserVersion;
    61 
    62 	xmlSAXLocator xmlDefaultSAXLocator;
    63 	xmlSAXHandler xmlDefaultSAXHandler;
    64 	xmlSAXHandler docbDefaultSAXHandler;
    65 	xmlSAXHandler htmlDefaultSAXHandler;
    66 
    67 	xmlFreeFunc xmlFree;
    68 	xmlMallocFunc xmlMalloc;
    69 	xmlStrdupFunc xmlMemStrdup;
    70 	xmlReallocFunc xmlRealloc;
    71 
    72 	xmlGenericErrorFunc xmlGenericError;
    73 	void *xmlGenericErrorContext;
    74 
    75 	int oldXMLWDcompatibility;
    76 
    77 	xmlBufferAllocationScheme xmlBufferAllocScheme;
    78 	int xmlDefaultBufferSize;
    79 
    80 	int xmlSubstituteEntitiesDefaultValue;
    81 	int xmlDoValidityCheckingDefaultValue;
    82 	int xmlGetWarningsDefaultValue;
    83 	int xmlKeepBlanksDefaultValue;
    84 	int xmlLineNumbersDefaultValue;
    85 	int xmlLoadExtDtdDefaultValue;
    86 	int xmlParserDebugEntities;
    87 	int xmlPedanticParserDefaultValue;
    88 
    89 	int xmlSaveNoEmptyTags;
    90 	int xmlIndentTreeOutput;
    91 	const char *xmlTreeIndentString;
    92 };
    93 
    94 #ifdef __cplusplus
    95 }
    96 #endif
    97 #include 
    98 #ifdef __cplusplus
    99 extern "C" {
    100 #endif
    101 
    102 void	xmlInitializeGlobalState(xmlGlobalStatePtr gs);
    103 
    104 /*
    105  * In general the memory allocation entry points are not kept
    106  * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
    107  *    - xmlMalloc
    108  *    - xmlRealloc
    109  *    - xmlMemStrdup
    110  *    - xmlFree
    111  */
    112 
    113 #ifdef LIBXML_THREAD_ALLOC_ENABLED
    114 #ifdef LIBXML_THREAD_ENABLED
    115 extern xmlMallocFunc *__xmlMalloc(void);
    116 #define xmlMalloc \
    117 (*(__xmlMalloc()))
    118 #else
    119 LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
    120 #endif
    121 
    122 #ifdef LIBXML_THREAD_ENABLED
    123 extern xmlReallocFunc *__xmlRealloc(void);
    124 #define xmlRealloc \
    125 (*(__xmlRealloc()))
    126 #else
    127 LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
    128 #endif
    129 
    130 #ifdef LIBXML_THREAD_ENABLED
    131 extern xmlFreeFunc *__xmlFree(void);
    132 #define xmlFree \
    133 (*(__xmlFree()))
    134 #else
    135 LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
    136 #endif
    137 
    138 #ifdef LIBXML_THREAD_ENABLED
    139 extern xmlStrdupFunc *__xmlMemStrdup(void);
    140 #define xmlMemStrdup \
    141 (*(__xmlMemStrdup()))
    142 #else
    143 LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
    144 #endif
    145 #else /* !LIBXML_THREAD_ALLOC_ENABLED */
    146 LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
    147 LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
    148 LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; <xmlFree>
    149 LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
    150 #endif /* LIBXML_THREAD_ALLOC_ENABLED */
    151 
    152 #ifdef LIBXML_DOCB_ENABLED
    153 extern xmlSAXHandler *__docbDefaultSAXHandler(void);
    154 #ifdef LIBXML_THREAD_ENABLED
    155 #define docbDefaultSAXHandler \
    156 (*(__docbDefaultSAXHandler()))
    157 #else
    158 LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
    159 #endif
    160 #endif
    161 
    162 #ifdef LIBXML_HTML_ENABLED
    163 extern xmlSAXHandler *__htmlDefaultSAXHandler(void);
    164 #ifdef LIBXML_THREAD_ENABLED
    165 #define htmlDefaultSAXHandler \
    166 (*(__htmlDefaultSAXHandler()))
    167 #else
    168 LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
    169 #endif
    170 #endif
    171 
    172 
    173 /*
    174  * Everything starting from the line below is
    175  * Automatically generated by build_glob.py.
    176  * Do not modify the previous line.
    177  */
    178 
    179 
    180 extern int *__oldXMLWDcompatibility(void);
    181 #ifdef LIBXML_THREAD_ENABLED
    182 #define oldXMLWDcompatibility \
    183 (*(__oldXMLWDcompatibility()))
    184 #else
    185 LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility;
    186 #endif
    187 
    188 extern xmlBufferAllocationScheme *__xmlBufferAllocScheme(void);
    189 #ifdef LIBXML_THREAD_ENABLED
    190 #define xmlBufferAllocScheme \
    191 (*(__xmlBufferAllocScheme()))
    192 #else
    193 LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme;
    194 #endif
    195 
    196 extern int *__xmlDefaultBufferSize(void);
    197 #ifdef LIBXML_THREAD_ENABLED
    198 #define xmlDefaultBufferSize \
    199 (*(__xmlDefaultBufferSize()))
    200 #else
    201 LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize;
    202 #endif
    203 
    204 extern xmlSAXHandler *__xmlDefaultSAXHandler(void);
    205 #ifdef LIBXML_THREAD_ENABLED
    206 #define xmlDefaultSAXHandler \
    207 (*(__xmlDefaultSAXHandler()))
    208 #else
    209 LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
    210 #endif
    211 
    212 extern xmlSAXLocator *__xmlDefaultSAXLocator(void);
    213 #ifdef LIBXML_THREAD_ENABLED
    214 #define xmlDefaultSAXLocator \
    215 (*(__xmlDefaultSAXLocator()))
    216 #else
    217 LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
    218 #endif
    219 
    220 extern int *__xmlDoValidityCheckingDefaultValue(void);
    221 #ifdef LIBXML_THREAD_ENABLED
    222 #define xmlDoValidityCheckingDefaultValue \
    223 (*(__xmlDoValidityCheckingDefaultValue()))
    224 #else
    225 LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue; <xmlDoValidityCheckingDefaultValue>
    226 #endif
    227 
    228 extern xmlGenericErrorFunc *__xmlGenericError(void);
    229 #ifdef LIBXML_THREAD_ENABLED
    230 #define xmlGenericError \
    231 (*(__xmlGenericError()))
    232 #else
    233 LIBXML_DLL_IMPORT extern xmlGenericErrorFunc xmlGenericError;
    234 #endif
    235 
    236 extern void * *__xmlGenericErrorContext(void);
    237 #ifdef LIBXML_THREAD_ENABLED
    238 #define xmlGenericErrorContext \
    239 (*(__xmlGenericErrorContext()))
    240 #else
    241 LIBXML_DLL_IMPORT extern void * xmlGenericErrorContext;
    242 #endif
    243 
    244 extern int *__xmlGetWarningsDefaultValue(void);
    245 #ifdef LIBXML_THREAD_ENABLED
    246 #define xmlGetWarningsDefaultValue \
    247 (*(__xmlGetWarningsDefaultValue()))
    248 #else
    249 LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
    250 #endif
    251 
    252 extern int *__xmlIndentTreeOutput(void);
    253 #ifdef LIBXML_THREAD_ENABLED
    254 #define xmlIndentTreeOutput \
    255 (*(__xmlIndentTreeOutput()))
    256 #else
    257 LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput;
    258 #endif
    259 
    260 extern const char * *__xmlTreeIndentString(void);
    261 #ifdef LIBXML_THREAD_ENABLED
    262 #define xmlTreeIndentString \
    263 (*(__xmlTreeIndentString()))
    264 #else
    265 LIBXML_DLL_IMPORT extern const char * xmlTreeIndentString;
    266 #endif
    267 
    268 extern int *__xmlKeepBlanksDefaultValue(void);
    269 #ifdef LIBXML_THREAD_ENABLED
    270 #define xmlKeepBlanksDefaultValue \
    271 (*(__xmlKeepBlanksDefaultValue()))
    272 #else
    273 LIBXML_DLL_IMPORT extern int xmlKeepBlanksDefaultValue;
    274 #endif
    275 
    276 extern int *__xmlLineNumbersDefaultValue(void);
    277 #ifdef LIBXML_THREAD_ENABLED
    278 #define xmlLineNumbersDefaultValue \
    279 (*(__xmlLineNumbersDefaultValue()))
    280 #else
    281 LIBXML_DLL_IMPORT extern int xmlLineNumbersDefaultValue;
    282 #endif
    283 
    284 extern int *__xmlLoadExtDtdDefaultValue(void);
    285 #ifdef LIBXML_THREAD_ENABLED
    286 #define xmlLoadExtDtdDefaultValue \
    287 (*(__xmlLoadExtDtdDefaultValue()))
    288 #else
    289 LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue;
    290 #endif
    291 
    292 extern int *__xmlParserDebugEntities(void);
    293 #ifdef LIBXML_THREAD_ENABLED
    294 #define xmlParserDebugEntities \
    295 (*(__xmlParserDebugEntities()))
    296 #else
    297 LIBXML_DLL_IMPORT extern int xmlParserDebugEntities;
    298 #endif
    299 
    300 extern const char * *__xmlParserVersion(void);
    301 #ifdef LIBXML_THREAD_ENABLED
    302 #define xmlParserVersion \
    303 (*(__xmlParserVersion()))
    304 #else
    305 LIBXML_DLL_IMPORT extern const char * xmlParserVersion;
    306 #endif
    307 
    308 extern int *__xmlPedanticParserDefaultValue(void);
    309 #ifdef LIBXML_THREAD_ENABLED
    310 #define xmlPedanticParserDefaultValue \
    311 (*(__xmlPedanticParserDefaultValue()))
    312 #else
    313 LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue;
    314 #endif
    315 
    316 extern int *__xmlSaveNoEmptyTags(void);
    317 #ifdef LIBXML_THREAD_ENABLED
    318 #define xmlSaveNoEmptyTags \
    319 (*(__xmlSaveNoEmptyTags()))
    320 #else
    321 LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags;
    322 #endif
    323 
    324 extern int *__xmlSubstituteEntitiesDefaultValue(void);
    325 #ifdef LIBXML_THREAD_ENABLED
    326 #define xmlSubstituteEntitiesDefaultValue \
    327 (*(__xmlSubstituteEntitiesDefaultValue()))
    328 #else
    329 LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
    330 #endif
    331 
    332 #ifdef __cplusplus
    333 }
    334 #endif
    335 
    336 #endif /* __XML_GLOBALS_H */