VirtualBox

source: vbox/trunk/src/libs/libxml2-2.6.30/include/libxml/globals.h@ 20364

最後變更 在這個檔案從20364是 6076,由 vboxsync 提交於 17 年 前

Merged dmik/s2 branch (r25959:26751) to the trunk.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Date Revision Author Id
檔案大小: 13.1 KB
 
1/*
2 * Summary: interface for all global variables of the library
3 * Description: all the global variables and thread handling for
4 * those variables is handled by this module.
5 *
6 * The bottom of this file is automatically generated by build_glob.py
7 * based on the description file global.data
8 *
9 * Copy: See Copyright for the status of this software.
10 *
11 * Author: Gary Pennington <[email protected]>, Daniel Veillard
12 */
13
14#ifndef __XML_GLOBALS_H
15#define __XML_GLOBALS_H
16
17#include <libxml/xmlversion.h>
18#include <libxml/parser.h>
19#include <libxml/xmlerror.h>
20#include <libxml/SAX.h>
21#include <libxml/SAX2.h>
22#include <libxml/xmlmemory.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28XMLPUBFUN void XMLCALL xmlInitGlobals(void);
29XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
30
31typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
32typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
33XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
34XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
35XMLPUBFUN xmlOutputBufferCreateFilenameFunc
36XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
37
38/*
39 * Externally global symbols which need to be protected for backwards
40 * compatibility support.
41 */
42
43#undef docbDefaultSAXHandler
44#undef htmlDefaultSAXHandler
45#undef oldXMLWDcompatibility
46#undef xmlBufferAllocScheme
47#undef xmlDefaultBufferSize
48#undef xmlDefaultSAXHandler
49#undef xmlDefaultSAXLocator
50#undef xmlDoValidityCheckingDefaultValue
51#undef xmlFree
52#undef xmlGenericError
53#undef xmlStructuredError
54#undef xmlGenericErrorContext
55#undef xmlGetWarningsDefaultValue
56#undef xmlIndentTreeOutput
57#undef xmlTreeIndentString
58#undef xmlKeepBlanksDefaultValue
59#undef xmlLineNumbersDefaultValue
60#undef xmlLoadExtDtdDefaultValue
61#undef xmlMalloc
62#undef xmlMallocAtomic
63#undef xmlMemStrdup
64#undef xmlParserDebugEntities
65#undef xmlParserVersion
66#undef xmlPedanticParserDefaultValue
67#undef xmlRealloc
68#undef xmlSaveNoEmptyTags
69#undef xmlSubstituteEntitiesDefaultValue
70#undef xmlRegisterNodeDefaultValue
71#undef xmlDeregisterNodeDefaultValue
72#undef xmlLastError
73#undef xmlParserInputBufferCreateFilenameValue
74#undef xmlOutputBufferCreateFilenameValue
75
76typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
77typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
78
79typedef struct _xmlGlobalState xmlGlobalState;
80typedef xmlGlobalState *xmlGlobalStatePtr;
81struct _xmlGlobalState
82{
83 const char *xmlParserVersion;
84
85 xmlSAXLocator xmlDefaultSAXLocator;
86 xmlSAXHandlerV1 xmlDefaultSAXHandler;
87 xmlSAXHandlerV1 docbDefaultSAXHandler;
88 xmlSAXHandlerV1 htmlDefaultSAXHandler;
89
90 xmlFreeFunc xmlFree;
91 xmlMallocFunc xmlMalloc;
92 xmlStrdupFunc xmlMemStrdup;
93 xmlReallocFunc xmlRealloc;
94
95 xmlGenericErrorFunc xmlGenericError;
96 xmlStructuredErrorFunc xmlStructuredError;
97 void *xmlGenericErrorContext;
98
99 int oldXMLWDcompatibility;
100
101 xmlBufferAllocationScheme xmlBufferAllocScheme;
102 int xmlDefaultBufferSize;
103
104 int xmlSubstituteEntitiesDefaultValue;
105 int xmlDoValidityCheckingDefaultValue;
106 int xmlGetWarningsDefaultValue;
107 int xmlKeepBlanksDefaultValue;
108 int xmlLineNumbersDefaultValue;
109 int xmlLoadExtDtdDefaultValue;
110 int xmlParserDebugEntities;
111 int xmlPedanticParserDefaultValue;
112
113 int xmlSaveNoEmptyTags;
114 int xmlIndentTreeOutput;
115 const char *xmlTreeIndentString;
116
117 xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
118 xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
119
120 xmlMallocFunc xmlMallocAtomic;
121 xmlError xmlLastError;
122
123 xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
124 xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
125};
126
127#ifdef __cplusplus
128}
129#endif
130#include <libxml/threads.h>
131#ifdef __cplusplus
132extern "C" {
133#endif
134
135XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
136
137XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
138
139XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
140
141XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
142XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
143XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
144XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
145
146XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
147 xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
148XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
149 xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
150
151/** DOC_DISABLE */
152/*
153 * In general the memory allocation entry points are not kept
154 * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
155 * - xmlMalloc
156 * - xmlMallocAtomic
157 * - xmlRealloc
158 * - xmlMemStrdup
159 * - xmlFree
160 */
161
162#ifdef LIBXML_THREAD_ALLOC_ENABLED
163#ifdef LIBXML_THREAD_ENABLED
164XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
165#define xmlMalloc \
166(*(__xmlMalloc()))
167#else
168XMLPUBVAR xmlMallocFunc xmlMalloc;
169#endif
170
171#ifdef LIBXML_THREAD_ENABLED
172XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
173#define xmlMallocAtomic \
174(*(__xmlMallocAtomic()))
175#else
176XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
177#endif
178
179#ifdef LIBXML_THREAD_ENABLED
180XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
181#define xmlRealloc \
182(*(__xmlRealloc()))
183#else
184XMLPUBVAR xmlReallocFunc xmlRealloc;
185#endif
186
187#ifdef LIBXML_THREAD_ENABLED
188XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
189#define xmlFree \
190(*(__xmlFree()))
191#else
192XMLPUBVAR xmlFreeFunc xmlFree;
193#endif
194
195#ifdef LIBXML_THREAD_ENABLED
196XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
197#define xmlMemStrdup \
198(*(__xmlMemStrdup()))
199#else
200XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
201#endif
202
203#else /* !LIBXML_THREAD_ALLOC_ENABLED */
204XMLPUBVAR xmlMallocFunc xmlMalloc;
205XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
206XMLPUBVAR xmlReallocFunc xmlRealloc;
207XMLPUBVAR xmlFreeFunc xmlFree;
208XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
209#endif /* LIBXML_THREAD_ALLOC_ENABLED */
210
211#ifdef LIBXML_DOCB_ENABLED
212XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
213#ifdef LIBXML_THREAD_ENABLED
214#define docbDefaultSAXHandler \
215(*(__docbDefaultSAXHandler()))
216#else
217XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
218#endif
219#endif
220
221#ifdef LIBXML_HTML_ENABLED
222XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
223#ifdef LIBXML_THREAD_ENABLED
224#define htmlDefaultSAXHandler \
225(*(__htmlDefaultSAXHandler()))
226#else
227XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
228#endif
229#endif
230
231XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
232#ifdef LIBXML_THREAD_ENABLED
233#define xmlLastError \
234(*(__xmlLastError()))
235#else
236XMLPUBVAR xmlError xmlLastError;
237#endif
238
239/*
240 * Everything starting from the line below is
241 * Automatically generated by build_glob.py.
242 * Do not modify the previous line.
243 */
244
245
246XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
247#ifdef LIBXML_THREAD_ENABLED
248#define oldXMLWDcompatibility \
249(*(__oldXMLWDcompatibility()))
250#else
251XMLPUBVAR int oldXMLWDcompatibility;
252#endif
253
254XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
255#ifdef LIBXML_THREAD_ENABLED
256#define xmlBufferAllocScheme \
257(*(__xmlBufferAllocScheme()))
258#else
259XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
260#endif
261XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
262
263XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
264#ifdef LIBXML_THREAD_ENABLED
265#define xmlDefaultBufferSize \
266(*(__xmlDefaultBufferSize()))
267#else
268XMLPUBVAR int xmlDefaultBufferSize;
269#endif
270XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
271
272XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
273#ifdef LIBXML_THREAD_ENABLED
274#define xmlDefaultSAXHandler \
275(*(__xmlDefaultSAXHandler()))
276#else
277XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
278#endif
279
280XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
281#ifdef LIBXML_THREAD_ENABLED
282#define xmlDefaultSAXLocator \
283(*(__xmlDefaultSAXLocator()))
284#else
285XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
286#endif
287
288XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
289#ifdef LIBXML_THREAD_ENABLED
290#define xmlDoValidityCheckingDefaultValue \
291(*(__xmlDoValidityCheckingDefaultValue()))
292#else
293XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
294#endif
295XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
296
297XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
298#ifdef LIBXML_THREAD_ENABLED
299#define xmlGenericError \
300(*(__xmlGenericError()))
301#else
302XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
303#endif
304
305XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
306#ifdef LIBXML_THREAD_ENABLED
307#define xmlStructuredError \
308(*(__xmlStructuredError()))
309#else
310XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
311#endif
312
313XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
314#ifdef LIBXML_THREAD_ENABLED
315#define xmlGenericErrorContext \
316(*(__xmlGenericErrorContext()))
317#else
318XMLPUBVAR void * xmlGenericErrorContext;
319#endif
320
321XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
322#ifdef LIBXML_THREAD_ENABLED
323#define xmlGetWarningsDefaultValue \
324(*(__xmlGetWarningsDefaultValue()))
325#else
326XMLPUBVAR int xmlGetWarningsDefaultValue;
327#endif
328XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
329
330XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
331#ifdef LIBXML_THREAD_ENABLED
332#define xmlIndentTreeOutput \
333(*(__xmlIndentTreeOutput()))
334#else
335XMLPUBVAR int xmlIndentTreeOutput;
336#endif
337XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
338
339XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
340#ifdef LIBXML_THREAD_ENABLED
341#define xmlTreeIndentString \
342(*(__xmlTreeIndentString()))
343#else
344XMLPUBVAR const char * xmlTreeIndentString;
345#endif
346XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
347
348XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
349#ifdef LIBXML_THREAD_ENABLED
350#define xmlKeepBlanksDefaultValue \
351(*(__xmlKeepBlanksDefaultValue()))
352#else
353XMLPUBVAR int xmlKeepBlanksDefaultValue;
354#endif
355XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
356
357XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
358#ifdef LIBXML_THREAD_ENABLED
359#define xmlLineNumbersDefaultValue \
360(*(__xmlLineNumbersDefaultValue()))
361#else
362XMLPUBVAR int xmlLineNumbersDefaultValue;
363#endif
364XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
365
366XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
367#ifdef LIBXML_THREAD_ENABLED
368#define xmlLoadExtDtdDefaultValue \
369(*(__xmlLoadExtDtdDefaultValue()))
370#else
371XMLPUBVAR int xmlLoadExtDtdDefaultValue;
372#endif
373XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
374
375XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
376#ifdef LIBXML_THREAD_ENABLED
377#define xmlParserDebugEntities \
378(*(__xmlParserDebugEntities()))
379#else
380XMLPUBVAR int xmlParserDebugEntities;
381#endif
382XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
383
384XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
385#ifdef LIBXML_THREAD_ENABLED
386#define xmlParserVersion \
387(*(__xmlParserVersion()))
388#else
389XMLPUBVAR const char * xmlParserVersion;
390#endif
391
392XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
393#ifdef LIBXML_THREAD_ENABLED
394#define xmlPedanticParserDefaultValue \
395(*(__xmlPedanticParserDefaultValue()))
396#else
397XMLPUBVAR int xmlPedanticParserDefaultValue;
398#endif
399XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
400
401XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
402#ifdef LIBXML_THREAD_ENABLED
403#define xmlSaveNoEmptyTags \
404(*(__xmlSaveNoEmptyTags()))
405#else
406XMLPUBVAR int xmlSaveNoEmptyTags;
407#endif
408XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
409
410XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
411#ifdef LIBXML_THREAD_ENABLED
412#define xmlSubstituteEntitiesDefaultValue \
413(*(__xmlSubstituteEntitiesDefaultValue()))
414#else
415XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
416#endif
417XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
418
419XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
420#ifdef LIBXML_THREAD_ENABLED
421#define xmlRegisterNodeDefaultValue \
422(*(__xmlRegisterNodeDefaultValue()))
423#else
424XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
425#endif
426
427XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
428#ifdef LIBXML_THREAD_ENABLED
429#define xmlDeregisterNodeDefaultValue \
430(*(__xmlDeregisterNodeDefaultValue()))
431#else
432XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
433#endif
434
435XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
436#ifdef LIBXML_THREAD_ENABLED
437#define xmlParserInputBufferCreateFilenameValue \
438(*(__xmlParserInputBufferCreateFilenameValue()))
439#else
440XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
441#endif
442
443XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
444#ifdef LIBXML_THREAD_ENABLED
445#define xmlOutputBufferCreateFilenameValue \
446(*(__xmlOutputBufferCreateFilenameValue()))
447#else
448XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
449#endif
450
451#ifdef __cplusplus
452}
453#endif
454
455#endif /* __XML_GLOBALS_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette