1/*
2** Copyright (c) 2001-2007 Expat maintainers.
3**
4** Permission is hereby granted, free of charge, to any person obtaining
5** a copy of this software and associated documentation files (the
6** "Software"), to deal in the Software without restriction, including
7** without limitation the rights to use, copy, modify, merge, publish,
8** distribute, sublicense, and/or sell copies of the Software, and to
9** permit persons to whom the Software is furnished to do so, subject to
10** the following conditions:
11**
12** The above copyright notice and this permission notice shall be included
13** in all copies or substantial portions of the Software.
14**
15** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/
23
24#include <exec/types.h>
25#include <exec/exec.h>
26#include <exec/interfaces.h>
27#include <interfaces/expat.h>
28
29extern uint32                _Expat_Obtain(struct ExpatIFace *);
30extern uint32                _Expat_Release(struct ExpatIFace *);
31extern XML_Parser            _Expat_XML_ParserCreate(struct ExpatIFace *, const XML_Char * encodingName);
32extern XML_Parser            _Expat_XML_ParserCreateNS(struct ExpatIFace *, const XML_Char * encodingName, XML_Char nsSep);
33extern XML_Parser            _Expat_XML_ParserCreate_MM(struct ExpatIFace *, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator);
34extern XML_Parser            _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace *, XML_Parser parser, const XML_Char * context, const XML_Char * encoding);
35extern void                  _Expat_XML_ParserFree(struct ExpatIFace *, XML_Parser parser);
36extern enum XML_Status       _Expat_XML_Parse(struct ExpatIFace *, XML_Parser parser, const char * s, int len, int isFinal);
37extern enum XML_Status       _Expat_XML_ParseBuffer(struct ExpatIFace *, XML_Parser parser, int len, int isFinal);
38extern void *                _Expat_XML_GetBuffer(struct ExpatIFace *, XML_Parser parser, int len);
39extern void                  _Expat_XML_SetStartElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start);
40extern void                  _Expat_XML_SetEndElementHandler(struct ExpatIFace *, XML_Parser parser, XML_EndElementHandler end);
41extern void                  _Expat_XML_SetElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end);
42extern void                  _Expat_XML_SetCharacterDataHandler(struct ExpatIFace *, XML_Parser parser, XML_CharacterDataHandler handler);
43extern void                  _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace *, XML_Parser parser, XML_ProcessingInstructionHandler handler);
44extern void                  _Expat_XML_SetCommentHandler(struct ExpatIFace *, XML_Parser parser, XML_CommentHandler handler);
45extern void                  _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start);
46extern void                  _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_EndCdataSectionHandler end);
47extern void                  _Expat_XML_SetCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end);
48extern void                  _Expat_XML_SetDefaultHandler(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler);
49extern void                  _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler);
50extern void                  _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace *, XML_Parser parser, XML_ExternalEntityRefHandler handler);
51extern void                  _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace *, XML_Parser parser, void * arg);
52extern void                  _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace *, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data);
53extern void                  _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start);
54extern void                  _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndNamespaceDeclHandler end);
55extern void                  _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end);
56extern void                  _Expat_XML_SetXmlDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_XmlDeclHandler handler);
57extern void                  _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start);
58extern void                  _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndDoctypeDeclHandler end);
59extern void                  _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end);
60extern void                  _Expat_XML_SetElementDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_ElementDeclHandler eldecl);
61extern void                  _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_AttlistDeclHandler attdecl);
62extern void                  _Expat_XML_SetEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EntityDeclHandler handler);
63extern void                  _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_UnparsedEntityDeclHandler handler);
64extern void                  _Expat_XML_SetNotationDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_NotationDeclHandler handler);
65extern void                  _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace *, XML_Parser parser, XML_NotStandaloneHandler handler);
66extern enum XML_Error        _Expat_XML_GetErrorCode(struct ExpatIFace *, XML_Parser parser);
67extern const XML_LChar *     _Expat_XML_ErrorString(struct ExpatIFace *, enum XML_Error code);
68extern long                  _Expat_XML_GetCurrentByteIndex(struct ExpatIFace *, XML_Parser parser);
69extern int                   _Expat_XML_GetCurrentLineNumber(struct ExpatIFace *, XML_Parser parser);
70extern int                   _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace *, XML_Parser parser);
71extern int                   _Expat_XML_GetCurrentByteCount(struct ExpatIFace *, XML_Parser parser);
72extern const char *          _Expat_XML_GetInputContext(struct ExpatIFace *, XML_Parser parser, int * offset, int * size);
73extern void                  _Expat_XML_SetUserData(struct ExpatIFace *, XML_Parser parser, void * userData);
74extern void                  _Expat_XML_DefaultCurrent(struct ExpatIFace *, XML_Parser parser);
75extern void                  _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace *, XML_Parser parser);
76extern enum XML_Status       _Expat_XML_SetBase(struct ExpatIFace *, XML_Parser parser, const XML_Char * base);
77extern const XML_Char *      _Expat_XML_GetBase(struct ExpatIFace *, XML_Parser parser);
78extern int                   _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace *, XML_Parser parser);
79extern int                   _Expat_XML_GetIdAttributeIndex(struct ExpatIFace *, XML_Parser parser);
80extern enum XML_Status       _Expat_XML_SetEncoding(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding);
81extern int                   _Expat_XML_SetParamEntityParsing(struct ExpatIFace *, XML_Parser parser, enum XML_ParamEntityParsing parsing);
82extern void                  _Expat_XML_SetReturnNSTriplet(struct ExpatIFace *, XML_Parser parser, int do_nst);
83extern const XML_LChar *     _Expat_XML_ExpatVersion(struct ExpatIFace *);
84extern XML_Expat_Version     _Expat_XML_ExpatVersionInfo(struct ExpatIFace *);
85extern XML_Bool              _Expat_XML_ParserReset(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding);
86extern void                  _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace *, XML_Parser parser, XML_SkippedEntityHandler handler);
87extern enum XML_Error        _Expat_XML_UseForeignDTD(struct ExpatIFace *, XML_Parser parser, XML_Bool useDTD);
88extern const XML_Feature *   _Expat_XML_GetFeatureList(struct ExpatIFace *);
89extern enum XML_Status       _Expat_XML_StopParser(struct ExpatIFace *, XML_Parser parser, XML_Bool resumable);
90extern enum XML_Status       _Expat_XML_ResumeParser(struct ExpatIFace *, XML_Parser parser);
91extern void                  _Expat_XML_GetParsingStatus(struct ExpatIFace *, XML_Parser parser, XML_ParsingStatus * status);
92extern void                  _Expat_XML_FreeContentModel(struct ExpatIFace *, XML_Parser parser, XML_Content * model);
93extern void *                _Expat_XML_MemMalloc(struct ExpatIFace *, XML_Parser parser, size_t size);
94extern void *                _Expat_XML_MemRealloc(struct ExpatIFace *, XML_Parser parser, void * ptr, size_t size);
95extern void                  _Expat_XML_MemFree(struct ExpatIFace *, XML_Parser parser, void * ptr);
96
97
98CONST APTR main_vectors[] =
99{
100    _Expat_Obtain,
101    _Expat_Release,
102    NULL,
103    NULL,
104    _Expat_XML_ParserCreate,
105    _Expat_XML_ParserCreateNS,
106    _Expat_XML_ParserCreate_MM,
107    _Expat_XML_ExternalEntityParserCreate,
108    _Expat_XML_ParserFree,
109    _Expat_XML_Parse,
110    _Expat_XML_ParseBuffer,
111    _Expat_XML_GetBuffer,
112    _Expat_XML_SetStartElementHandler,
113    _Expat_XML_SetEndElementHandler,
114    _Expat_XML_SetElementHandler,
115    _Expat_XML_SetCharacterDataHandler,
116    _Expat_XML_SetProcessingInstructionHandler,
117    _Expat_XML_SetCommentHandler,
118    _Expat_XML_SetStartCdataSectionHandler,
119    _Expat_XML_SetEndCdataSectionHandler,
120    _Expat_XML_SetCdataSectionHandler,
121    _Expat_XML_SetDefaultHandler,
122    _Expat_XML_SetDefaultHandlerExpand,
123    _Expat_XML_SetExternalEntityRefHandler,
124    _Expat_XML_SetExternalEntityRefHandlerArg,
125    _Expat_XML_SetUnknownEncodingHandler,
126    _Expat_XML_SetStartNamespaceDeclHandler,
127    _Expat_XML_SetEndNamespaceDeclHandler,
128    _Expat_XML_SetNamespaceDeclHandler,
129    _Expat_XML_SetXmlDeclHandler,
130    _Expat_XML_SetStartDoctypeDeclHandler,
131    _Expat_XML_SetEndDoctypeDeclHandler,
132    _Expat_XML_SetDoctypeDeclHandler,
133    _Expat_XML_SetElementDeclHandler,
134    _Expat_XML_SetAttlistDeclHandler,
135    _Expat_XML_SetEntityDeclHandler,
136    _Expat_XML_SetUnparsedEntityDeclHandler,
137    _Expat_XML_SetNotationDeclHandler,
138    _Expat_XML_SetNotStandaloneHandler,
139    _Expat_XML_GetErrorCode,
140    _Expat_XML_ErrorString,
141    _Expat_XML_GetCurrentByteIndex,
142    _Expat_XML_GetCurrentLineNumber,
143    _Expat_XML_GetCurrentColumnNumber,
144    _Expat_XML_GetCurrentByteCount,
145    _Expat_XML_GetInputContext,
146    _Expat_XML_SetUserData,
147    _Expat_XML_DefaultCurrent,
148    _Expat_XML_UseParserAsHandlerArg,
149    _Expat_XML_SetBase,
150    _Expat_XML_GetBase,
151    _Expat_XML_GetSpecifiedAttributeCount,
152    _Expat_XML_GetIdAttributeIndex,
153    _Expat_XML_SetEncoding,
154    _Expat_XML_SetParamEntityParsing,
155    _Expat_XML_SetReturnNSTriplet,
156    _Expat_XML_ExpatVersion,
157    _Expat_XML_ExpatVersionInfo,
158    _Expat_XML_ParserReset,
159    _Expat_XML_SetSkippedEntityHandler,
160    _Expat_XML_UseForeignDTD,
161    _Expat_XML_GetFeatureList,
162    _Expat_XML_StopParser,
163    _Expat_XML_ResumeParser,
164    _Expat_XML_GetParsingStatus,
165    _Expat_XML_FreeContentModel,
166    _Expat_XML_MemMalloc,
167    _Expat_XML_MemRealloc,
168    _Expat_XML_MemFree,
169    (APTR)-1
170};
171
172uint32 _Expat_Obtain(struct ExpatIFace *Self)
173{
174	return ++Self->Data.RefCount;
175}
176
177uint32 _Expat_Release(struct ExpatIFace *Self)
178{
179	return --Self->Data.RefCount;
180}
181
182XML_Parser _Expat_XML_ParserCreate(struct ExpatIFace * Self, const XML_Char *encoding)
183{
184	return XML_ParserCreate(encoding);
185}
186
187XML_Parser _Expat_XML_ParserCreateNS(struct ExpatIFace * Self, const XML_Char *encoding, XML_Char nsSep)
188{
189	return XML_ParserCreateNS(encoding, nsSep);
190}
191
192XML_Parser _Expat_XML_ParserCreate_MM(struct ExpatIFace * Self, const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator)
193{
194	return XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator);
195}
196
197XML_Parser _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *context, const XML_Char *encoding)
198{
199	return XML_ExternalEntityParserCreate(parser, context, encoding);
200}
201
202void _Expat_XML_ParserFree(struct ExpatIFace *Self, XML_Parser parser)
203{
204	XML_ParserFree(parser);
205}
206
207enum XML_Status _Expat_XML_Parse(struct ExpatIFace * Self, XML_Parser parser, const char * s, int len, int isFinal)
208{
209	return XML_Parse(parser, s, len, isFinal);
210}
211
212enum XML_Status _Expat_XML_ParseBuffer(struct ExpatIFace * Self, XML_Parser parser, int len, int isFinal)
213{
214	return XML_ParseBuffer(parser, len, isFinal);
215}
216
217void * _Expat_XML_GetBuffer(struct ExpatIFace * Self, XML_Parser parser, int len)
218{
219	return XML_GetBuffer(parser, len);
220}
221
222void _Expat_XML_SetStartElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start)
223{
224	XML_SetStartElementHandler(parser, start);
225}
226
227void _Expat_XML_SetEndElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndElementHandler end)
228{
229	XML_SetEndElementHandler(parser, end);
230}
231
232void _Expat_XML_SetElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)
233{
234	XML_SetElementHandler(parser, start, end);
235}
236
237void _Expat_XML_SetCharacterDataHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CharacterDataHandler handler)
238{
239	XML_SetCharacterDataHandler(parser, handler);
240}
241
242void _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ProcessingInstructionHandler handler)
243{
244	XML_SetProcessingInstructionHandler(parser, handler);
245}
246
247void _Expat_XML_SetCommentHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CommentHandler handler)
248{
249	XML_SetCommentHandler(parser, handler);
250}
251
252void _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start)
253{
254	XML_SetStartCdataSectionHandler(parser, start);
255}
256
257void _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndCdataSectionHandler end)
258{
259	XML_SetEndCdataSectionHandler(parser, end);
260}
261
262void _Expat_XML_SetCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end)
263{
264	XML_SetCdataSectionHandler(parser, start, end);
265}
266
267void _Expat_XML_SetDefaultHandler(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler)
268{
269	XML_SetDefaultHandler(parser, handler);
270}
271
272void _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler)
273{
274	XML_SetDefaultHandlerExpand(parser, handler);
275}
276
277void _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ExternalEntityRefHandler handler)
278{
279	XML_SetExternalEntityRefHandler(parser, handler);
280}
281
282void _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace * Self, XML_Parser parser, void * arg)
283{
284	XML_SetExternalEntityRefHandlerArg(parser, arg);
285}
286
287void _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data)
288{
289	XML_SetUnknownEncodingHandler(parser, handler, data);
290}
291
292void _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start)
293{
294	XML_SetStartNamespaceDeclHandler(parser, start);
295}
296
297void _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndNamespaceDeclHandler end)
298{
299	XML_SetEndNamespaceDeclHandler(parser, end);
300}
301
302void _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end)
303{
304	XML_SetNamespaceDeclHandler(parser, start, end);
305}
306
307void _Expat_XML_SetXmlDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_XmlDeclHandler handler)
308{
309	XML_SetXmlDeclHandler(parser, handler);
310}
311
312void _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start)
313{
314	XML_SetStartDoctypeDeclHandler(parser, start);
315}
316
317void _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndDoctypeDeclHandler end)
318{
319	XML_SetEndDoctypeDeclHandler(parser, end);
320}
321
322void _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end)
323{
324	XML_SetDoctypeDeclHandler(parser, start, end);
325}
326
327void _Expat_XML_SetElementDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ElementDeclHandler eldecl)
328{
329	XML_SetElementDeclHandler(parser, eldecl);
330}
331
332void _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_AttlistDeclHandler attdecl)
333{
334	XML_SetAttlistDeclHandler(parser, attdecl);
335}
336
337void _Expat_XML_SetEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EntityDeclHandler handler)
338{
339	XML_SetEntityDeclHandler(parser, handler);
340}
341
342void _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler)
343{
344	XML_SetUnparsedEntityDeclHandler(parser, handler);
345}
346
347void _Expat_XML_SetNotationDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotationDeclHandler handler)
348{
349	XML_SetNotationDeclHandler(parser, handler);
350}
351
352void _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotStandaloneHandler handler)
353{
354	XML_SetNotStandaloneHandler(parser, handler);
355}
356
357enum XML_Error _Expat_XML_GetErrorCode(struct ExpatIFace * Self, XML_Parser parser)
358{
359	return XML_GetErrorCode(parser);
360}
361
362const XML_LChar * _Expat_XML_ErrorString(struct ExpatIFace * Self, enum XML_Error code)
363{
364	return XML_ErrorString(code);
365}
366
367long _Expat_XML_GetCurrentByteIndex(struct ExpatIFace * Self, XML_Parser parser)
368{
369	return XML_GetCurrentByteIndex(parser);
370}
371
372int _Expat_XML_GetCurrentLineNumber(struct ExpatIFace * Self, XML_Parser parser)
373{
374	return XML_GetCurrentLineNumber(parser);
375}
376
377int _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace * Self, XML_Parser parser)
378{
379	return XML_GetCurrentColumnNumber(parser);
380}
381
382int _Expat_XML_GetCurrentByteCount(struct ExpatIFace * Self, XML_Parser parser)
383{
384	return XML_GetCurrentByteCount(parser);
385}
386
387const char * _Expat_XML_GetInputContext(struct ExpatIFace * Self, XML_Parser parser, int * offset, int * size)
388{
389	return XML_GetInputContext(parser, offset, size);
390}
391
392void _Expat_XML_SetUserData(struct ExpatIFace * Self, XML_Parser parser, void * userData)
393{
394	XML_SetUserData(parser, userData);
395}
396
397void _Expat_XML_DefaultCurrent(struct ExpatIFace * Self, XML_Parser parser)
398{
399	XML_DefaultCurrent(parser);
400}
401
402void _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace * Self, XML_Parser parser)
403{
404	XML_UseParserAsHandlerArg(parser);
405}
406
407enum XML_Status _Expat_XML_SetBase(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *p)
408{
409	return XML_SetBase(parser, p);
410}
411
412const XML_Char * _Expat_XML_GetBase(struct ExpatIFace * Self, XML_Parser parser)
413{
414	return XML_GetBase(parser);
415}
416
417int _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace * Self, XML_Parser parser)
418{
419	return XML_GetSpecifiedAttributeCount(parser);
420}
421
422int _Expat_XML_GetIdAttributeIndex(struct ExpatIFace * Self, XML_Parser parser)
423{
424	return XML_GetIdAttributeIndex(parser);
425}
426
427enum XML_Status _Expat_XML_SetEncoding(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding)
428{
429	return XML_SetEncoding(parser, encoding);
430}
431
432int _Expat_XML_SetParamEntityParsing(struct ExpatIFace * Self, XML_Parser parser, enum XML_ParamEntityParsing parsing)
433{
434	return XML_SetParamEntityParsing(parser, parsing);
435}
436
437void _Expat_XML_SetReturnNSTriplet(struct ExpatIFace * Self, XML_Parser parser, int do_nst)
438{
439	XML_SetReturnNSTriplet(parser, do_nst);
440}
441
442const XML_LChar * _Expat_XML_ExpatVersion(struct ExpatIFace * Self)
443{
444	return XML_ExpatVersion();
445}
446
447XML_Expat_Version _Expat_XML_ExpatVersionInfo(struct ExpatIFace * Self)
448{
449	return XML_ExpatVersionInfo();
450}
451
452XML_Bool _Expat_XML_ParserReset(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding)
453{
454	return XML_ParserReset(parser, encoding);
455}
456
457void _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace * Self, XML_Parser parser, XML_SkippedEntityHandler handler)
458{
459	XML_SetSkippedEntityHandler(parser, handler);
460}
461
462enum XML_Error _Expat_XML_UseForeignDTD(struct ExpatIFace * Self, XML_Parser parser, XML_Bool useDTD)
463{
464	return XML_UseForeignDTD(parser, useDTD);
465}
466
467const XML_Feature * _Expat_XML_GetFeatureList(struct ExpatIFace * Self)
468{
469	return XML_GetFeatureList();
470}
471
472enum XML_Status _Expat_XML_StopParser(struct ExpatIFace * Self, XML_Parser parser, XML_Bool resumable)
473{
474	return XML_StopParser(parser, resumable);
475}
476
477enum XML_Status _Expat_XML_ResumeParser(struct ExpatIFace * Self, XML_Parser parser)
478{
479	return XML_ResumeParser(parser);
480}
481
482void _Expat_XML_GetParsingStatus(struct ExpatIFace * Self, XML_Parser parser, XML_ParsingStatus * status)
483{
484	XML_GetParsingStatus(parser, status);
485}
486
487void _Expat_XML_FreeContentModel(struct ExpatIFace * Self, XML_Parser parser, XML_Content * model)
488{
489	XML_FreeContentModel(parser, model);
490}
491
492void * _Expat_XML_MemMalloc(struct ExpatIFace * Self, XML_Parser parser, size_t size)
493{
494	return XML_MemMalloc(parser, size);
495}
496
497void * _Expat_XML_MemRealloc(struct ExpatIFace * Self, XML_Parser parser, void * ptr, size_t size)
498{
499	XML_MemRealloc(parser, ptr, size);
500}
501
502void _Expat_XML_MemFree(struct ExpatIFace * Self, XML_Parser parser, void * ptr)
503{
504	XML_MemFree(parser, ptr);
505}
506