added Info.plist
[TestXSLT.git] / libxml2 / include / libxml / 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 <Gary.Pennington@uk.sun.com>
10  * daniel@veillard.com
11  */
12
13 #ifndef __XML_GLOBALS_H
14 #define __XML_GLOBALS_H
15
16 #include <libxml/parser.h>
17 #include <libxml/xmlerror.h>
18 #include <libxml/SAX.h>
19 #include <libxml/xmlmemory.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 void xmlInitGlobals(void);
26 void xmlCleanupGlobals(void);
27
28 /*
29  * Externally global symbols which need to be protected for backwards
30  * compatibility support.
31  */
32
33 #undef  docbDefaultSAXHandler
34 #undef  htmlDefaultSAXHandler
35 #undef  oldXMLWDcompatibility
36 #undef  xmlBufferAllocScheme
37 #undef  xmlDefaultBufferSize
38 #undef  xmlDefaultSAXHandler
39 #undef  xmlDefaultSAXLocator
40 #undef  xmlDoValidityCheckingDefaultValue
41 #undef  xmlFree
42 #undef  xmlGenericError
43 #undef  xmlGenericErrorContext
44 #undef  xmlGetWarningsDefaultValue
45 #undef  xmlIndentTreeOutput
46 #undef  xmlTreeIndentString
47 #undef  xmlKeepBlanksDefaultValue
48 #undef  xmlLineNumbersDefaultValue
49 #undef  xmlLoadExtDtdDefaultValue
50 #undef  xmlMalloc
51 #undef  xmlMallocAtomic
52 #undef  xmlMemStrdup
53 #undef  xmlParserDebugEntities
54 #undef  xmlParserVersion
55 #undef  xmlPedanticParserDefaultValue
56 #undef  xmlRealloc
57 #undef  xmlSaveNoEmptyTags
58 #undef  xmlSubstituteEntitiesDefaultValue
59 #undef xmlRegisterNodeDefaultValue
60 #undef xmlDeregisterNodeDefaultValue
61
62 typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
63 typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
64
65 typedef struct _xmlGlobalState xmlGlobalState;
66 typedef xmlGlobalState *xmlGlobalStatePtr;
67 struct _xmlGlobalState 
68 {
69         const char *xmlParserVersion;
70
71         xmlSAXLocator xmlDefaultSAXLocator;
72         xmlSAXHandler xmlDefaultSAXHandler;
73         xmlSAXHandler docbDefaultSAXHandler;
74         xmlSAXHandler htmlDefaultSAXHandler;
75
76         xmlFreeFunc xmlFree;
77         xmlMallocFunc xmlMalloc;
78         xmlStrdupFunc xmlMemStrdup;
79         xmlReallocFunc xmlRealloc;
80
81         xmlGenericErrorFunc xmlGenericError;
82         void *xmlGenericErrorContext;
83
84         int oldXMLWDcompatibility;
85
86         xmlBufferAllocationScheme xmlBufferAllocScheme;
87         int xmlDefaultBufferSize;
88
89         int xmlSubstituteEntitiesDefaultValue;
90         int xmlDoValidityCheckingDefaultValue;
91         int xmlGetWarningsDefaultValue;
92         int xmlKeepBlanksDefaultValue;
93         int xmlLineNumbersDefaultValue;
94         int xmlLoadExtDtdDefaultValue;
95         int xmlParserDebugEntities;
96         int xmlPedanticParserDefaultValue;
97
98         int xmlSaveNoEmptyTags;
99         int xmlIndentTreeOutput;
100         const char *xmlTreeIndentString;
101
102         xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
103         xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
104
105         xmlMallocFunc xmlMallocAtomic;
106 };
107
108 #ifdef __cplusplus
109 }
110 #endif
111 #include <libxml/threads.h>
112 #ifdef __cplusplus
113 extern "C" {
114 #endif
115
116 void    xmlInitializeGlobalState(xmlGlobalStatePtr gs);
117
118 void xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
119
120 xmlRegisterNodeFunc xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
121 xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
122 xmlDeregisterNodeFunc xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
123 xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
124
125 /*
126  * In general the memory allocation entry points are not kept
127  * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
128  *    - xmlMalloc
129  *    - xmlMallocAtomic
130  *    - xmlRealloc
131  *    - xmlMemStrdup
132  *    - xmlFree
133  */
134
135 #ifdef LIBXML_THREAD_ALLOC_ENABLED
136 #ifdef LIBXML_THREAD_ENABLED
137 extern xmlMallocFunc *__xmlMalloc(void);
138 #define xmlMalloc \
139 (*(__xmlMalloc()))
140 #else
141 LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
142 #endif
143
144 #ifdef LIBXML_THREAD_ENABLED
145 extern xmlMallocFunc *__xmlMallocAtomic(void);
146 #define xmlMallocAtomic \
147 (*(__xmlMallocAtomic()))
148 #else
149 LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMallocAtomic;
150 #endif
151
152 #ifdef LIBXML_THREAD_ENABLED
153 extern xmlReallocFunc *__xmlRealloc(void);
154 #define xmlRealloc \
155 (*(__xmlRealloc()))
156 #else
157 LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
158 #endif
159
160 #ifdef LIBXML_THREAD_ENABLED
161 extern xmlFreeFunc *__xmlFree(void);
162 #define xmlFree \
163 (*(__xmlFree()))
164 #else
165 LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
166 #endif
167
168 #ifdef LIBXML_THREAD_ENABLED
169 extern xmlStrdupFunc *__xmlMemStrdup(void);
170 #define xmlMemStrdup \
171 (*(__xmlMemStrdup()))
172 #else
173 LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
174 #endif
175
176 #else /* !LIBXML_THREAD_ALLOC_ENABLED */
177 LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
178 LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMallocAtomic;
179 LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
180 LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
181 LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
182 #endif /* LIBXML_THREAD_ALLOC_ENABLED */
183
184 #ifdef LIBXML_DOCB_ENABLED
185 extern xmlSAXHandler *__docbDefaultSAXHandler(void);
186 #ifdef LIBXML_THREAD_ENABLED
187 #define docbDefaultSAXHandler \
188 (*(__docbDefaultSAXHandler()))
189 #else
190 LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
191 #endif
192 #endif
193
194 #ifdef LIBXML_HTML_ENABLED
195 extern xmlSAXHandler *__htmlDefaultSAXHandler(void);
196 #ifdef LIBXML_THREAD_ENABLED
197 #define htmlDefaultSAXHandler \
198 (*(__htmlDefaultSAXHandler()))
199 #else
200 LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
201 #endif
202 #endif
203
204
205 /*
206  * Everything starting from the line below is
207  * Automatically generated by build_glob.py.
208  * Do not modify the previous line.
209  */
210
211
212 extern int *__oldXMLWDcompatibility(void);
213 #ifdef LIBXML_THREAD_ENABLED
214 #define oldXMLWDcompatibility \
215 (*(__oldXMLWDcompatibility()))
216 #else
217 LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility;
218 #endif
219
220 extern xmlBufferAllocationScheme *__xmlBufferAllocScheme(void);
221 #ifdef LIBXML_THREAD_ENABLED
222 #define xmlBufferAllocScheme \
223 (*(__xmlBufferAllocScheme()))
224 #else
225 LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme;
226 #endif
227 xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
228
229 extern int *__xmlDefaultBufferSize(void);
230 #ifdef LIBXML_THREAD_ENABLED
231 #define xmlDefaultBufferSize \
232 (*(__xmlDefaultBufferSize()))
233 #else
234 LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize;
235 #endif
236 int xmlThrDefDefaultBufferSize(int v);
237
238 extern xmlSAXHandler *__xmlDefaultSAXHandler(void);
239 #ifdef LIBXML_THREAD_ENABLED
240 #define xmlDefaultSAXHandler \
241 (*(__xmlDefaultSAXHandler()))
242 #else
243 LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
244 #endif
245
246 extern xmlSAXLocator *__xmlDefaultSAXLocator(void);
247 #ifdef LIBXML_THREAD_ENABLED
248 #define xmlDefaultSAXLocator \
249 (*(__xmlDefaultSAXLocator()))
250 #else
251 LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
252 #endif
253
254 extern int *__xmlDoValidityCheckingDefaultValue(void);
255 #ifdef LIBXML_THREAD_ENABLED
256 #define xmlDoValidityCheckingDefaultValue \
257 (*(__xmlDoValidityCheckingDefaultValue()))
258 #else
259 LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
260 #endif
261 int xmlThrDefDoValidityCheckingDefaultValue(int v);
262
263 extern xmlGenericErrorFunc *__xmlGenericError(void);
264 #ifdef LIBXML_THREAD_ENABLED
265 #define xmlGenericError \
266 (*(__xmlGenericError()))
267 #else
268 LIBXML_DLL_IMPORT extern xmlGenericErrorFunc xmlGenericError;
269 #endif
270
271 extern void * *__xmlGenericErrorContext(void);
272 #ifdef LIBXML_THREAD_ENABLED
273 #define xmlGenericErrorContext \
274 (*(__xmlGenericErrorContext()))
275 #else
276 LIBXML_DLL_IMPORT extern void * xmlGenericErrorContext;
277 #endif
278
279 extern int *__xmlGetWarningsDefaultValue(void);
280 #ifdef LIBXML_THREAD_ENABLED
281 #define xmlGetWarningsDefaultValue \
282 (*(__xmlGetWarningsDefaultValue()))
283 #else
284 LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
285 #endif
286 int xmlThrDefGetWarningsDefaultValue(int v);
287
288 extern int *__xmlIndentTreeOutput(void);
289 #ifdef LIBXML_THREAD_ENABLED
290 #define xmlIndentTreeOutput \
291 (*(__xmlIndentTreeOutput()))
292 #else
293 LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput;
294 #endif
295 int xmlThrDefIndentTreeOutput(int v);
296
297 extern const char * *__xmlTreeIndentString(void);
298 #ifdef LIBXML_THREAD_ENABLED
299 #define xmlTreeIndentString \
300 (*(__xmlTreeIndentString()))
301 #else
302 LIBXML_DLL_IMPORT extern const char * xmlTreeIndentString;
303 #endif
304 const char * xmlThrDefTreeIndentString(const char * v);
305
306 extern int *__xmlKeepBlanksDefaultValue(void);
307 #ifdef LIBXML_THREAD_ENABLED
308 #define xmlKeepBlanksDefaultValue \
309 (*(__xmlKeepBlanksDefaultValue()))
310 #else
311 LIBXML_DLL_IMPORT extern int xmlKeepBlanksDefaultValue;
312 #endif
313 int xmlThrDefKeepBlanksDefaultValue(int v);
314
315 extern int *__xmlLineNumbersDefaultValue(void);
316 #ifdef LIBXML_THREAD_ENABLED
317 #define xmlLineNumbersDefaultValue \
318 (*(__xmlLineNumbersDefaultValue()))
319 #else
320 LIBXML_DLL_IMPORT extern int xmlLineNumbersDefaultValue;
321 #endif
322 int xmlThrDefLineNumbersDefaultValue(int v);
323
324 extern int *__xmlLoadExtDtdDefaultValue(void);
325 #ifdef LIBXML_THREAD_ENABLED
326 #define xmlLoadExtDtdDefaultValue \
327 (*(__xmlLoadExtDtdDefaultValue()))
328 #else
329 LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue;
330 #endif
331 int xmlThrDefLoadExtDtdDefaultValue(int v);
332
333 extern int *__xmlParserDebugEntities(void);
334 #ifdef LIBXML_THREAD_ENABLED
335 #define xmlParserDebugEntities \
336 (*(__xmlParserDebugEntities()))
337 #else
338 LIBXML_DLL_IMPORT extern int xmlParserDebugEntities;
339 #endif
340 int xmlThrDefParserDebugEntities(int v);
341
342 extern const char * *__xmlParserVersion(void);
343 #ifdef LIBXML_THREAD_ENABLED
344 #define xmlParserVersion \
345 (*(__xmlParserVersion()))
346 #else
347 LIBXML_DLL_IMPORT extern const char * xmlParserVersion;
348 #endif
349
350 extern int *__xmlPedanticParserDefaultValue(void);
351 #ifdef LIBXML_THREAD_ENABLED
352 #define xmlPedanticParserDefaultValue \
353 (*(__xmlPedanticParserDefaultValue()))
354 #else
355 LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue;
356 #endif
357 int xmlThrDefPedanticParserDefaultValue(int v);
358
359 extern int *__xmlSaveNoEmptyTags(void);
360 #ifdef LIBXML_THREAD_ENABLED
361 #define xmlSaveNoEmptyTags \
362 (*(__xmlSaveNoEmptyTags()))
363 #else
364 LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags;
365 #endif
366 int xmlThrDefSaveNoEmptyTags(int v);
367
368 extern int *__xmlSubstituteEntitiesDefaultValue(void);
369 #ifdef LIBXML_THREAD_ENABLED
370 #define xmlSubstituteEntitiesDefaultValue \
371 (*(__xmlSubstituteEntitiesDefaultValue()))
372 #else
373 LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
374 #endif
375 int xmlThrDefSubstituteEntitiesDefaultValue(int v);
376
377 extern xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
378 #ifdef LIBXML_THREAD_ENABLED
379 #define xmlRegisterNodeDefaultValue \
380 (*(__xmlRegisterNodeDefaultValue()))
381 #else
382 LIBXML_DLL_IMPORT extern xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
383 #endif
384
385 extern xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void);
386 #ifdef LIBXML_THREAD_ENABLED
387 #define xmlDeregisterNodeDefaultValue \
388 (*(__xmlDeregisterNodeDefaultValue()))
389 #else
390 LIBXML_DLL_IMPORT extern xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
391 #endif
392
393 #ifdef __cplusplus
394 }
395 #endif
396
397 #endif /* __XML_GLOBALS_H */