1 /* Copyright 2007-2012 Fredrik Wikstrom. All rights reserved.
3 ** Redistribution and use in source and binary forms, with or without
4 ** modification, are permitted provided that the following conditions
7 ** 1. Redistributions of source code must retain the above copyright
8 ** notice, this list of conditions and the following disclaimer.
10 ** 2. Redistributions in binary form must reproduce the above copyright
11 ** notice, this list of conditions and the following disclaimer in the
12 ** documentation and/or other materials provided with the distribution.
14 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
15 ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18 ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 ** POSSIBILITY OF SUCH DAMAGE.
27 #include <exec/exec.h>
29 #include <proto/exec.h>
32 #include <SDI_compiler.h>
33 #include "expat.library_rev.h"
35 #define LIBNAME "expat.library"
36 const char USED_VAR verstag
[] = VERSTAG
;
42 struct ExecBase
*SysBase
;
45 struct Library libNode
;
50 int malloc_init(void);
51 void malloc_exit(void);
54 static AROS_UFP3(struct ExpatBase
*, LibInit
,
55 AROS_UFPA(struct ExpatBase
*, libBase
, D0
),
56 AROS_UFPA(BPTR
, seglist
, A0
),
57 AROS_UFPA(struct ExecBase
*, exec_base
, A6
)
59 static AROS_LD1(struct ExpatBase
*, LibOpen
,
60 AROS_LPA(ULONG
, version
, D0
),
61 struct ExpatBase
*, libBase
, 1, Expat
63 static AROS_LD0(BPTR
, LibClose
,
64 struct ExpatBase
*, libBase
, 2, Expat
66 static AROS_LD0(BPTR
, LibExpunge
,
67 struct ExpatBase
*, libBase
, 3, Expat
69 static AROS_LD0(APTR
, LibReserved
,
70 struct ExpatBase
*, libBase
, 4, Expat
72 static AROS_LD1(XML_Parser
, ParserCreate
,
73 AROS_LPA(const XML_Char
*, encodingName
, A0
),
74 struct ExpatBase
*, libBase
, 5, Expat
76 static AROS_LD2(XML_Parser
, ParserCreateNS
,
77 AROS_LPA(const XML_Char
*, encodingName
, A0
),
78 AROS_LPA(XML_Char
, nsSep
, D0
),
79 struct ExpatBase
*, libBase
, 6, Expat
81 static AROS_LD3(XML_Parser
, ParserCreate_MM
,
82 AROS_LPA(const XML_Char
*, encodingName
, A0
),
83 AROS_LPA(const XML_Memory_Handling_Suite
*, memsuite
, A1
),
84 AROS_LPA(const XML_Char
*, nameSep
, A2
),
85 struct ExpatBase
*, libBase
, 7, Expat
87 static AROS_LD3(XML_Parser
, ExternalEntityParserCreate
,
88 AROS_LPA(XML_Parser
, oldParser
, A0
),
89 AROS_LPA(const XML_Char
*, context
, A1
),
90 AROS_LPA(const XML_Char
*, encodingName
, A2
),
91 struct ExpatBase
*, libBase
, 8, Expat
93 static AROS_LD1(void, ParserFree
,
94 AROS_LPA(XML_Parser
, parser
, A0
),
95 struct ExpatBase
*, libBase
, 9, Expat
97 static AROS_LD4(int, Parse
,
98 AROS_LPA(XML_Parser
, parser
, A0
),
99 AROS_LPA(const char *, s
, A1
),
100 AROS_LPA(int, len
, D0
),
101 AROS_LPA(int, isFinal
, D1
),
102 struct ExpatBase
*, libBase
, 10, Expat
104 static AROS_LD3(int, ParseBuffer
,
105 AROS_LPA(XML_Parser
, parser
, A0
),
106 AROS_LPA(int, len
, D0
),
107 AROS_LPA(int, isFinal
, D1
),
108 struct ExpatBase
*, libBase
, 11, Expat
110 static AROS_LD2(void *, GetBuffer
,
111 AROS_LPA(XML_Parser
, parser
, A0
),
112 AROS_LPA(int, len
, D0
),
113 struct ExpatBase
*, libBase
, 12, Expat
115 static AROS_LD2(void, SetStartElementHandler
,
116 AROS_LPA(XML_Parser
, parser
, A0
),
117 AROS_LPA(XML_StartElementHandler
, start
, A1
),
118 struct ExpatBase
*, libBase
, 13, Expat
120 static AROS_LD2(void, SetEndElementHandler
,
121 AROS_LPA(XML_Parser
, parser
, A0
),
122 AROS_LPA(XML_EndElementHandler
, end
, A1
),
123 struct ExpatBase
*, libBase
, 14, Expat
125 static AROS_LD3(void, SetElementHandler
,
126 AROS_LPA(XML_Parser
, parser
, A0
),
127 AROS_LPA(XML_StartElementHandler
, start
, A1
),
128 AROS_LPA(XML_EndElementHandler
, end
, A2
),
129 struct ExpatBase
*, libBase
, 15, Expat
131 static AROS_LD2(void, SetCharacterDataHandler
,
132 AROS_LPA(XML_Parser
, parser
, A0
),
133 AROS_LPA(XML_CharacterDataHandler
, handler
, A1
),
134 struct ExpatBase
*, libBase
, 16, Expat
136 static AROS_LD2(void, SetProcessingInstructionHandler
,
137 AROS_LPA(XML_Parser
, parser
, A0
),
138 AROS_LPA(XML_ProcessingInstructionHandler
, handler
, A1
),
139 struct ExpatBase
*, libBase
, 17, Expat
141 static AROS_LD2(void, SetCommentHandler
,
142 AROS_LPA(XML_Parser
, parser
, A0
),
143 AROS_LPA(XML_CommentHandler
, handler
, A1
),
144 struct ExpatBase
*, libBase
, 18, Expat
146 static AROS_LD2(void, SetStartCdataSectionHandler
,
147 AROS_LPA(XML_Parser
, parser
, A0
),
148 AROS_LPA(XML_StartCdataSectionHandler
, start
, A1
),
149 struct ExpatBase
*, libBase
, 19, Expat
151 static AROS_LD2(void, SetEndCdataSectionHandler
,
152 AROS_LPA(XML_Parser
, parser
, A0
),
153 AROS_LPA(XML_EndCdataSectionHandler
, end
, A1
),
154 struct ExpatBase
*, libBase
, 20, Expat
156 static AROS_LD3(void, SetCdataSectionHandler
,
157 AROS_LPA(XML_Parser
, parser
, A0
),
158 AROS_LPA(XML_StartCdataSectionHandler
, start
, A1
),
159 AROS_LPA(XML_EndCdataSectionHandler
, end
, A2
),
160 struct ExpatBase
*, libBase
, 21, Expat
162 static AROS_LD2(void, SetDefaultHandler
,
163 AROS_LPA(XML_Parser
, parser
, A0
),
164 AROS_LPA(XML_DefaultHandler
, handler
, A1
),
165 struct ExpatBase
*, libBase
, 22, Expat
167 static AROS_LD2(void, SetDefaultHandlerExpand
,
168 AROS_LPA(XML_Parser
, parser
, A0
),
169 AROS_LPA(XML_DefaultHandler
, handler
, A1
),
170 struct ExpatBase
*, libBase
, 23, Expat
172 static AROS_LD2(void, SetExternalEntityRefHandler
,
173 AROS_LPA(XML_Parser
, parser
, A0
),
174 AROS_LPA(XML_ExternalEntityRefHandler
, handler
, A1
),
175 struct ExpatBase
*, libBase
, 24, Expat
177 static AROS_LD2(void, SetExternalEntityRefHandlerArg
,
178 AROS_LPA(XML_Parser
, parser
, A0
),
179 AROS_LPA(void *, arg
, A1
),
180 struct ExpatBase
*, libBase
, 25, Expat
182 static AROS_LD3(void, SetUnknownEncodingHandler
,
183 AROS_LPA(XML_Parser
, parser
, A0
),
184 AROS_LPA(XML_UnknownEncodingHandler
, handler
, A1
),
185 AROS_LPA(void *, data
, A2
),
186 struct ExpatBase
*, libBase
, 26, Expat
188 static AROS_LD2(void, SetStartNamespaceDeclHandler
,
189 AROS_LPA(XML_Parser
, parser
, A0
),
190 AROS_LPA(XML_StartNamespaceDeclHandler
, start
, A1
),
191 struct ExpatBase
*, libBase
, 27, Expat
193 static AROS_LD2(void, SetEndNamespaceDeclHandler
,
194 AROS_LPA(XML_Parser
, parser
, A0
),
195 AROS_LPA(XML_EndNamespaceDeclHandler
, end
, A1
),
196 struct ExpatBase
*, libBase
, 28, Expat
198 static AROS_LD3(void, SetNamespaceDeclHandler
,
199 AROS_LPA(XML_Parser
, parser
, A0
),
200 AROS_LPA(XML_StartNamespaceDeclHandler
, start
, A1
),
201 AROS_LPA(XML_EndNamespaceDeclHandler
, end
, A2
),
202 struct ExpatBase
*, libBase
, 29, Expat
204 static AROS_LD2(void, SetXmlDeclHandler
,
205 AROS_LPA(XML_Parser
, parser
, A0
),
206 AROS_LPA(XML_XmlDeclHandler
, handler
, A1
),
207 struct ExpatBase
*, libBase
, 30, Expat
209 static AROS_LD2(void, SetStartDoctypeDeclHandler
,
210 AROS_LPA(XML_Parser
, parser
, A0
),
211 AROS_LPA(XML_StartDoctypeDeclHandler
, start
, A1
),
212 struct ExpatBase
*, libBase
, 31, Expat
214 static AROS_LD2(void, SetEndDoctypeDeclHandler
,
215 AROS_LPA(XML_Parser
, parser
, A0
),
216 AROS_LPA(XML_EndDoctypeDeclHandler
, end
, A1
),
217 struct ExpatBase
*, libBase
, 32, Expat
219 static AROS_LD3(void, SetDoctypeDeclHandler
,
220 AROS_LPA(XML_Parser
, parser
, A0
),
221 AROS_LPA(XML_StartDoctypeDeclHandler
, start
, A1
),
222 AROS_LPA(XML_EndDoctypeDeclHandler
, end
, A2
),
223 struct ExpatBase
*, libBase
, 33, Expat
225 static AROS_LD2(void, SetElementDeclHandler
,
226 AROS_LPA(XML_Parser
, parser
, A0
),
227 AROS_LPA(XML_ElementDeclHandler
, eldecl
, A1
),
228 struct ExpatBase
*, libBase
, 34, Expat
230 static AROS_LD2(void, SetAttlistDeclHandler
,
231 AROS_LPA(XML_Parser
, parser
, A0
),
232 AROS_LPA(XML_AttlistDeclHandler
, attdecl
, A1
),
233 struct ExpatBase
*, libBase
, 35, Expat
235 static AROS_LD2(void, SetEntityDeclHandler
,
236 AROS_LPA(XML_Parser
, parser
, A0
),
237 AROS_LPA(XML_EntityDeclHandler
, handler
, A1
),
238 struct ExpatBase
*, libBase
, 36, Expat
240 static AROS_LD2(void, SetUnparsedEntityDeclHandler
,
241 AROS_LPA(XML_Parser
, parser
, A0
),
242 AROS_LPA(XML_UnparsedEntityDeclHandler
, handler
, A1
),
243 struct ExpatBase
*, libBase
, 37, Expat
245 static AROS_LD2(void, SetNotationDeclHandler
,
246 AROS_LPA(XML_Parser
, parser
, A0
),
247 AROS_LPA(XML_NotationDeclHandler
, handler
, A1
),
248 struct ExpatBase
*, libBase
, 38, Expat
250 static AROS_LD2(void, SetNotStandaloneHandler
,
251 AROS_LPA(XML_Parser
, parser
, A0
),
252 AROS_LPA(XML_NotStandaloneHandler
, handler
, A1
),
253 struct ExpatBase
*, libBase
, 39, Expat
255 static AROS_LD1(int, GetErrorCode
,
256 AROS_LPA(XML_Parser
, parser
, A0
),
257 struct ExpatBase
*, libBase
, 40, Expat
259 static AROS_LD1(const XML_LChar
*, ErrorString
,
260 AROS_LPA(int, code
, D0
),
261 struct ExpatBase
*, libBase
, 41, Expat
263 static AROS_LD1(long, GetCurrentByteIndex
,
264 AROS_LPA(XML_Parser
, parser
, A0
),
265 struct ExpatBase
*, libBase
, 42, Expat
267 static AROS_LD1(int, GetCurrentLineNumber
,
268 AROS_LPA(XML_Parser
, parser
, A0
),
269 struct ExpatBase
*, libBase
, 43, Expat
271 static AROS_LD1(int, GetCurrentColumnNumber
,
272 AROS_LPA(XML_Parser
, parser
, A0
),
273 struct ExpatBase
*, libBase
, 44, Expat
275 static AROS_LD1(int, GetCurrentByteCount
,
276 AROS_LPA(XML_Parser
, parser
, A0
),
277 struct ExpatBase
*, libBase
, 45, Expat
279 static AROS_LD3(const char *, GetInputContext
,
280 AROS_LPA(XML_Parser
, parser
, A0
),
281 AROS_LPA(int *, offset
, A1
),
282 AROS_LPA(int *, size
, A2
),
283 struct ExpatBase
*, libBase
, 46, Expat
285 static AROS_LD2(void, SetUserData
,
286 AROS_LPA(XML_Parser
, parser
, A0
),
287 AROS_LPA(void *, p
, A1
),
288 struct ExpatBase
*, libBase
, 47, Expat
290 static AROS_LD1(void, DefaultCurrent
,
291 AROS_LPA(XML_Parser
, parser
, A0
),
292 struct ExpatBase
*, libBase
, 48, Expat
294 static AROS_LD1(void, UseParserAsHandlerArg
,
295 AROS_LPA(XML_Parser
, parser
, A0
),
296 struct ExpatBase
*, libBase
, 49, Expat
298 static AROS_LD2(int, SetBase
,
299 AROS_LPA(XML_Parser
, parser
, A0
),
300 AROS_LPA(const XML_Char
*, p
, A1
),
301 struct ExpatBase
*, libBase
, 50, Expat
303 static AROS_LD1(const XML_Char
*, GetBase
,
304 AROS_LPA(XML_Parser
, parser
, A0
),
305 struct ExpatBase
*, libBase
, 51, Expat
307 static AROS_LD1(int, GetSpecifiedAttributeCount
,
308 AROS_LPA(XML_Parser
, parser
, A0
),
309 struct ExpatBase
*, libBase
, 52, Expat
311 static AROS_LD1(int, GetIdAttributeIndex
,
312 AROS_LPA(XML_Parser
, parser
, A0
),
313 struct ExpatBase
*, libBase
, 53, Expat
315 static AROS_LD2(int, SetEncoding
,
316 AROS_LPA(XML_Parser
, parser
, A0
),
317 AROS_LPA(const XML_Char
*, encodingName
, A1
),
318 struct ExpatBase
*, libBase
, 54, Expat
320 static AROS_LD2(int, SetParamEntityParsing
,
321 AROS_LPA(XML_Parser
, parser
, A0
),
322 AROS_LPA(int, peParsing
, D0
),
323 struct ExpatBase
*, libBase
, 55, Expat
325 static AROS_LD2(void, SetReturnNSTriplet
,
326 AROS_LPA(XML_Parser
, parser
, A0
),
327 AROS_LPA(int, do_nst
, D0
),
328 struct ExpatBase
*, libBase
, 56, Expat
330 static AROS_LD0(const XML_LChar
*, ExpatVersion
,
331 struct ExpatBase
*, libBase
, 57, Expat
333 static AROS_LD0(XML_Expat_Version
, ExpatVersionInfo
,
334 struct ExpatBase
*, libBase
, 58, Expat
336 static AROS_LD2(XML_Bool
, ParserReset
,
337 AROS_LPA(XML_Parser
, parser
, A0
),
338 AROS_LPA(const XML_Char
*, encodingName
, A1
),
339 struct ExpatBase
*, libBase
, 59, Expat
341 static AROS_LD2(void, SetSkippedEntityHandler
,
342 AROS_LPA(XML_Parser
, parser
, A0
),
343 AROS_LPA(XML_SkippedEntityHandler
, handler
, A1
),
344 struct ExpatBase
*, libBase
, 60, Expat
346 static AROS_LD2(int, UseForeignDTD
,
347 AROS_LPA(XML_Parser
, parser
, A0
),
348 AROS_LPA(XML_Bool
, useDTD
, D0
),
349 struct ExpatBase
*, libBase
, 61, Expat
351 static AROS_LD0(const XML_Feature
*, GetFeatureList
,
352 struct ExpatBase
*, libBase
, 62, Expat
354 static AROS_LD2(int, StopParser
,
355 AROS_LPA(XML_Parser
, parser
, A0
),
356 AROS_LPA(XML_Bool
, resumable
, D0
),
357 struct ExpatBase
*, libBase
, 63, Expat
359 static AROS_LD1(int, ResumeParser
,
360 AROS_LPA(XML_Parser
, parser
, A0
),
361 struct ExpatBase
*, libBase
, 64, Expat
363 static AROS_LD2(void, GetParsingStatus
,
364 AROS_LPA(XML_Parser
, parser
, A0
),
365 AROS_LPA(XML_ParsingStatus
*, status
, A1
),
366 struct ExpatBase
*, libBase
, 65, Expat
368 static AROS_LD2(void, FreeContentModel
,
369 AROS_LPA(XML_Parser
, parser
, A0
),
370 AROS_LPA(XML_Content
*, model
, A1
),
371 struct ExpatBase
*, libBase
, 66, Expat
373 static AROS_LD2(void *, MemMalloc
,
374 AROS_LPA(XML_Parser
, parser
, A0
),
375 AROS_LPA(size_t, size
, D0
),
376 struct ExpatBase
*, libBase
, 67, Expat
378 static AROS_LD3(void *, MemRealloc
,
379 AROS_LPA(XML_Parser
, parser
, A0
),
380 AROS_LPA(void *, ptr
, A1
),
381 AROS_LPA(size_t, size
, D0
),
382 struct ExpatBase
*, libBase
, 68, Expat
384 static AROS_LD2(void, MemFree
,
385 AROS_LPA(XML_Parser
, parser
, A0
),
386 AROS_LPA(void *, ptr
, A1
),
387 struct ExpatBase
*, libBase
, 69, Expat
390 static struct ExpatBase
*LibInit (REG(d0
, struct ExpatBase
*libBase
),
391 REG(a0
, BPTR seglist
), REG(a6
, struct ExecBase
*exec_base
));
392 static struct ExpatBase
*Expat_LibOpen (REG(a6
, struct ExpatBase
*libBase
),
393 REG(d0
, ULONG version
));
394 static BPTR
Expat_LibClose (REG(a6
, struct ExpatBase
*libBase
));
395 static BPTR
Expat_LibExpunge (REG(a6
, struct ExpatBase
*libBase
));
396 static APTR
Expat_LibReserved (REG(a6
, struct ExpatBase
*libBase
));
397 static XML_Parser
Expat_ParserCreate(REG(a0
, const XML_Char
* encodingName
));
398 static XML_Parser
Expat_ParserCreateNS(REG(a0
, const XML_Char
* encodingName
),
399 REG(d0
, XML_Char nsSep
));
400 static XML_Parser
Expat_ParserCreate_MM(REG(a0
, const XML_Char
* encodingName
),
401 REG(a1
, const XML_Memory_Handling_Suite
* memsuite
),
402 REG(a2
, const XML_Char
* nameSep
));
403 static XML_Parser
Expat_ExternalEntityParserCreate(REG(a0
, XML_Parser oldParser
),
404 REG(a1
, const XML_Char
* context
), REG(a2
, const XML_Char
* encodingName
));
405 static void Expat_ParserFree(REG(a0
, XML_Parser parser
));
406 static int Expat_Parse(REG(a0
, XML_Parser parser
), REG(a1
, const char * s
),
407 REG(d0
, int len
), REG(d1
, int isFinal
));
408 static int Expat_ParseBuffer(REG(a0
, XML_Parser parser
), REG(d0
, int len
),
409 REG(d1
, int isFinal
));
410 static void * Expat_GetBuffer(REG(a0
, XML_Parser parser
), REG(d0
, int len
));
411 static void Expat_SetStartElementHandler(REG(a0
, XML_Parser parser
),
412 REG(a1
, XML_StartElementHandler start
));
413 static void Expat_SetEndElementHandler(REG(a0
, XML_Parser parser
),
414 REG(a1
, XML_EndElementHandler end
));
415 static void Expat_SetElementHandler(REG(a0
, XML_Parser parser
),
416 REG(a1
, XML_StartElementHandler start
),
417 REG(a2
, XML_EndElementHandler end
));
418 static void Expat_SetCharacterDataHandler(REG(a0
, XML_Parser parser
),
419 REG(a1
, XML_CharacterDataHandler handler
));
420 static void Expat_SetProcessingInstructionHandler(REG(a0
, XML_Parser parser
),
421 REG(a1
, XML_ProcessingInstructionHandler handler
));
422 static void Expat_SetCommentHandler(REG(a0
, XML_Parser parser
),
423 REG(a1
, XML_CommentHandler handler
));
424 static void Expat_SetStartCdataSectionHandler(REG(a0
, XML_Parser parser
),
425 REG(a1
, XML_StartCdataSectionHandler start
));
426 static void Expat_SetEndCdataSectionHandler(REG(a0
, XML_Parser parser
),
427 REG(a1
, XML_EndCdataSectionHandler end
));
428 static void Expat_SetCdataSectionHandler(REG(a0
, XML_Parser parser
),
429 REG(a1
, XML_StartCdataSectionHandler start
),
430 REG(a2
, XML_EndCdataSectionHandler end
));
431 static void Expat_SetDefaultHandler(REG(a0
, XML_Parser parser
),
432 REG(a1
, XML_DefaultHandler handler
));
433 static void Expat_SetDefaultHandlerExpand(REG(a0
, XML_Parser parser
),
434 REG(a1
, XML_DefaultHandler handler
));
435 static void Expat_SetExternalEntityRefHandler(REG(a0
, XML_Parser parser
),
436 REG(a1
, XML_ExternalEntityRefHandler handler
));
437 static void Expat_SetExternalEntityRefHandlerArg(REG(a0
, XML_Parser parser
),
438 REG(a1
, void * arg
));
439 static void Expat_SetUnknownEncodingHandler(REG(a0
, XML_Parser parser
),
440 REG(a1
, XML_UnknownEncodingHandler handler
), REG(a2
, void * data
));
441 static void Expat_SetStartNamespaceDeclHandler(REG(a0
, XML_Parser parser
),
442 REG(a1
, XML_StartNamespaceDeclHandler start
));
443 static void Expat_SetEndNamespaceDeclHandler(REG(a0
, XML_Parser parser
),
444 REG(a1
, XML_EndNamespaceDeclHandler end
));
445 static void Expat_SetNamespaceDeclHandler(REG(a0
, XML_Parser parser
),
446 REG(a1
, XML_StartNamespaceDeclHandler start
),
447 REG(a2
, XML_EndNamespaceDeclHandler end
));
448 static void Expat_SetXmlDeclHandler(REG(a0
, XML_Parser parser
),
449 REG(a1
, XML_XmlDeclHandler handler
));
450 static void Expat_SetStartDoctypeDeclHandler(REG(a0
, XML_Parser parser
),
451 REG(a1
, XML_StartDoctypeDeclHandler start
));
452 static void Expat_SetEndDoctypeDeclHandler(REG(a0
, XML_Parser parser
),
453 REG(a1
, XML_EndDoctypeDeclHandler end
));
454 static void Expat_SetDoctypeDeclHandler(REG(a0
, XML_Parser parser
),
455 REG(a1
, XML_StartDoctypeDeclHandler start
),
456 REG(a2
, XML_EndDoctypeDeclHandler end
));
457 static void Expat_SetElementDeclHandler(REG(a0
, XML_Parser parser
),
458 REG(a1
, XML_ElementDeclHandler eldecl
));
459 static void Expat_SetAttlistDeclHandler(REG(a0
, XML_Parser parser
),
460 REG(a1
, XML_AttlistDeclHandler attdecl
));
461 static void Expat_SetEntityDeclHandler(REG(a0
, XML_Parser parser
),
462 REG(a1
, XML_EntityDeclHandler handler
));
463 static void Expat_SetUnparsedEntityDeclHandler(REG(a0
, XML_Parser parser
),
464 REG(a1
, XML_UnparsedEntityDeclHandler handler
));
465 static void Expat_SetNotationDeclHandler(REG(a0
, XML_Parser parser
),
466 REG(a1
, XML_NotationDeclHandler handler
));
467 static void Expat_SetNotStandaloneHandler(REG(a0
, XML_Parser parser
),
468 REG(a1
, XML_NotStandaloneHandler handler
));
469 static int Expat_GetErrorCode(REG(a0
, XML_Parser parser
));
470 static const XML_LChar
* Expat_ErrorString(REG(d0
, int code
));
471 static long Expat_GetCurrentByteIndex(REG(a0
, XML_Parser parser
));
472 static int Expat_GetCurrentLineNumber(REG(a0
, XML_Parser parser
));
473 static int Expat_GetCurrentColumnNumber(REG(a0
, XML_Parser parser
));
474 static int Expat_GetCurrentByteCount(REG(a0
, XML_Parser parser
));
475 static const char * Expat_GetInputContext(REG(a0
, XML_Parser parser
),
476 REG(a1
, int * offset
), REG(a2
, int * size
));
477 static void Expat_SetUserData(REG(a0
, XML_Parser parser
), REG(a1
, void * p
));
478 static void Expat_DefaultCurrent(REG(a0
, XML_Parser parser
));
479 static void Expat_UseParserAsHandlerArg(REG(a0
, XML_Parser parser
));
480 static int Expat_SetBase(REG(a0
, XML_Parser parser
), REG(a1
, const XML_Char
* p
));
481 static const XML_Char
* Expat_GetBase(REG(a0
, XML_Parser parser
));
482 static int Expat_GetSpecifiedAttributeCount(REG(a0
, XML_Parser parser
));
483 static int Expat_GetIdAttributeIndex(REG(a0
, XML_Parser parser
));
484 static int Expat_SetEncoding(REG(a0
, XML_Parser parser
),
485 REG(a1
, const XML_Char
* encodingName
));
486 static int Expat_SetParamEntityParsing(REG(a0
, XML_Parser parser
),
487 REG(d0
, int peParsing
));
488 static void Expat_SetReturnNSTriplet(REG(a0
, XML_Parser parser
), REG(d0
, int do_nst
));
489 static const XML_LChar
* Expat_ExpatVersion();
490 static XML_Expat_Version
Expat_ExpatVersionInfo();
491 static XML_Bool
Expat_ParserReset(REG(a0
, XML_Parser parser
),
492 REG(a1
, const XML_Char
* encodingName
));
493 static void Expat_SetSkippedEntityHandler(REG(a0
, XML_Parser parser
),
494 REG(a1
, XML_SkippedEntityHandler handler
));
495 static int Expat_UseForeignDTD(REG(a0
, XML_Parser parser
), REG(d0
, XML_Bool useDTD
));
496 static const XML_Feature
* Expat_GetFeatureList();
497 static int Expat_StopParser(REG(a0
, XML_Parser parser
), REG(d0
, XML_Bool resumable
));
498 static int Expat_ResumeParser(REG(a0
, XML_Parser parser
));
499 static void Expat_GetParsingStatus(REG(a0
, XML_Parser parser
),
500 REG(a1
, XML_ParsingStatus
* status
));
501 static void Expat_FreeContentModel(REG(a0
, XML_Parser parser
),
502 REG(a1
, XML_Content
* model
));
503 static void * Expat_MemMalloc(REG(a0
, XML_Parser parser
), REG(d0
, size_t size
));
504 static void * Expat_MemRealloc(REG(a0
, XML_Parser parser
), REG(a1
, void * ptr
),
505 REG(d0
, size_t size
));
506 static void Expat_MemFree(REG(a0
, XML_Parser parser
), REG(a1
, void * ptr
));
511 #define LIB_ENTRY(a,b) AROS_SLIB_ENTRY(a, Expat, b)
513 #define LIB_ENTRY(a,b) AROS_SLIB_ENTRY(a, Expat)
516 #define LIB_ENTRY(a,b) Expat_##a
519 CONST_APTR LibVectors
[] = {
520 (APTR
)LIB_ENTRY(LibOpen
, 1),
521 (APTR
)LIB_ENTRY(LibClose
, 2),
522 (APTR
)LIB_ENTRY(LibExpunge
, 3),
523 (APTR
)LIB_ENTRY(LibReserved
, 4),
524 (APTR
)LIB_ENTRY(ParserCreate
, 5),
525 (APTR
)LIB_ENTRY(ParserCreateNS
, 6),
526 (APTR
)LIB_ENTRY(ParserCreate_MM
, 7),
527 (APTR
)LIB_ENTRY(ExternalEntityParserCreate
, 8),
528 (APTR
)LIB_ENTRY(ParserFree
, 9),
529 (APTR
)LIB_ENTRY(Parse
, 10),
530 (APTR
)LIB_ENTRY(ParseBuffer
, 11),
531 (APTR
)LIB_ENTRY(GetBuffer
, 12),
532 (APTR
)LIB_ENTRY(SetStartElementHandler
, 13),
533 (APTR
)LIB_ENTRY(SetEndElementHandler
, 14),
534 (APTR
)LIB_ENTRY(SetElementHandler
, 15),
535 (APTR
)LIB_ENTRY(SetCharacterDataHandler
, 16),
536 (APTR
)LIB_ENTRY(SetProcessingInstructionHandler
, 17),
537 (APTR
)LIB_ENTRY(SetCommentHandler
, 18),
538 (APTR
)LIB_ENTRY(SetStartCdataSectionHandler
, 19),
539 (APTR
)LIB_ENTRY(SetEndCdataSectionHandler
, 20),
540 (APTR
)LIB_ENTRY(SetCdataSectionHandler
, 21),
541 (APTR
)LIB_ENTRY(SetDefaultHandler
, 22),
542 (APTR
)LIB_ENTRY(SetDefaultHandlerExpand
, 23),
543 (APTR
)LIB_ENTRY(SetExternalEntityRefHandler
, 24),
544 (APTR
)LIB_ENTRY(SetExternalEntityRefHandlerArg
, 25),
545 (APTR
)LIB_ENTRY(SetUnknownEncodingHandler
, 26),
546 (APTR
)LIB_ENTRY(SetStartNamespaceDeclHandler
, 27),
547 (APTR
)LIB_ENTRY(SetEndNamespaceDeclHandler
, 28),
548 (APTR
)LIB_ENTRY(SetNamespaceDeclHandler
, 29),
549 (APTR
)LIB_ENTRY(SetXmlDeclHandler
, 30),
550 (APTR
)LIB_ENTRY(SetStartDoctypeDeclHandler
, 31),
551 (APTR
)LIB_ENTRY(SetEndDoctypeDeclHandler
, 32),
552 (APTR
)LIB_ENTRY(SetDoctypeDeclHandler
, 33),
553 (APTR
)LIB_ENTRY(SetElementDeclHandler
, 34),
554 (APTR
)LIB_ENTRY(SetAttlistDeclHandler
, 35),
555 (APTR
)LIB_ENTRY(SetEntityDeclHandler
, 36),
556 (APTR
)LIB_ENTRY(SetUnparsedEntityDeclHandler
, 37),
557 (APTR
)LIB_ENTRY(SetNotationDeclHandler
, 38),
558 (APTR
)LIB_ENTRY(SetNotStandaloneHandler
, 39),
559 (APTR
)LIB_ENTRY(GetErrorCode
, 40),
560 (APTR
)LIB_ENTRY(ErrorString
, 41),
561 (APTR
)LIB_ENTRY(GetCurrentByteIndex
, 42),
562 (APTR
)LIB_ENTRY(GetCurrentLineNumber
, 43),
563 (APTR
)LIB_ENTRY(GetCurrentColumnNumber
, 44),
564 (APTR
)LIB_ENTRY(GetCurrentByteCount
, 45),
565 (APTR
)LIB_ENTRY(GetInputContext
, 46),
566 (APTR
)LIB_ENTRY(SetUserData
, 47),
567 (APTR
)LIB_ENTRY(DefaultCurrent
, 48),
568 (APTR
)LIB_ENTRY(UseParserAsHandlerArg
, 49),
569 (APTR
)LIB_ENTRY(SetBase
, 50),
570 (APTR
)LIB_ENTRY(GetBase
, 51),
571 (APTR
)LIB_ENTRY(GetSpecifiedAttributeCount
, 52),
572 (APTR
)LIB_ENTRY(GetIdAttributeIndex
, 53),
573 (APTR
)LIB_ENTRY(SetEncoding
, 54),
574 (APTR
)LIB_ENTRY(SetParamEntityParsing
, 55),
575 (APTR
)LIB_ENTRY(SetReturnNSTriplet
, 56),
576 (APTR
)LIB_ENTRY(ExpatVersion
, 57),
577 (APTR
)LIB_ENTRY(ExpatVersionInfo
, 58),
578 (APTR
)LIB_ENTRY(ParserReset
, 59),
579 (APTR
)LIB_ENTRY(SetSkippedEntityHandler
, 60),
580 (APTR
)LIB_ENTRY(UseForeignDTD
, 61),
581 (APTR
)LIB_ENTRY(GetFeatureList
, 62),
582 (APTR
)LIB_ENTRY(StopParser
, 63),
583 (APTR
)LIB_ENTRY(ResumeParser
, 64),
584 (APTR
)LIB_ENTRY(GetParsingStatus
, 65),
585 (APTR
)LIB_ENTRY(FreeContentModel
, 66),
586 (APTR
)LIB_ENTRY(MemMalloc
, 67),
587 (APTR
)LIB_ENTRY(MemRealloc
, 68),
588 (APTR
)LIB_ENTRY(MemFree
, 69),
592 const IPTR LibInitTab
[] = {
593 sizeof(struct ExpatBase
),
599 const struct Resident USED_VAR ROMTag
= {
601 (struct Resident
*)&ROMTag
,
613 static AROS_UFH3(struct ExpatBase
*, LibInit
,
614 AROS_UFHA(struct ExpatBase
*, libBase
, D0
),
615 AROS_UFHA(BPTR
, seglist
, A0
),
616 AROS_UFHA(struct ExecBase
*, exec_base
, A6
)
621 static struct ExpatBase
*LibInit (REG(d0
, struct ExpatBase
*libBase
), REG(a0
, BPTR seglist
),
622 REG(a6
, struct ExecBase
*exec_base
))
625 libBase
->libNode
.lib_Node
.ln_Type
= NT_LIBRARY
;
626 libBase
->libNode
.lib_Node
.ln_Pri
= 0;
627 libBase
->libNode
.lib_Node
.ln_Name
= LIBNAME
;
628 libBase
->libNode
.lib_Flags
= LIBF_SUMUSED
|LIBF_CHANGED
;
629 libBase
->libNode
.lib_Version
= VERSION
;
630 libBase
->libNode
.lib_Revision
= REVISION
;
631 libBase
->libNode
.lib_IdString
= VSTRING
;
634 libBase
->seglist
= seglist
;
640 DeleteLibrary((struct Library
*)libBase
);
649 static AROS_LH1(struct ExpatBase
*, LibOpen
,
650 AROS_LHA(ULONG
, version
, D0
),
651 struct ExpatBase
*, libBase
, 1, Expat
656 static struct ExpatBase
*Expat_LibOpen (REG(a6
, struct ExpatBase
*libBase
), REG(d0
, ULONG version
)) {
658 libBase
->libNode
.lib_OpenCnt
++;
659 libBase
->libNode
.lib_Flags
&= ~LIBF_DELEXP
;
667 static AROS_LH0(BPTR
, LibClose
,
668 struct ExpatBase
*, libBase
, 2, Expat
673 static BPTR
Expat_LibClose (REG(a6
, struct ExpatBase
*libBase
)) {
675 libBase
->libNode
.lib_OpenCnt
--;
683 static AROS_LH0(BPTR
, LibExpunge
,
684 struct ExpatBase
*, libBase
, 3, Expat
689 static BPTR
Expat_LibExpunge (REG(a6
, struct ExpatBase
*libBase
)) {
693 if (libBase
->libNode
.lib_OpenCnt
> 0) {
694 libBase
->libNode
.lib_Flags
|= LIBF_DELEXP
;
698 Remove(&libBase
->libNode
.lib_Node
);
700 result
= libBase
->seglist
;
704 DeleteLibrary((struct Library
*)libBase
);
713 static AROS_LH0(APTR
, LibReserved
,
714 struct ExpatBase
*, libBase
, 4, Expat
722 static APTR
Expat_LibReserved (REG(a6
, struct ExpatBase
*libBase
)) {
728 static AROS_LH1(XML_Parser
, ParserCreate
,
729 AROS_LHA(const XML_Char
*, encodingName
, A0
),
730 struct ExpatBase
*, libBase
, 5, Expat
735 static XML_Parser
Expat_ParserCreate(REG(a0
, const XML_Char
* encodingName
))
738 return XML_ParserCreate(encodingName
);
745 static AROS_LH2(XML_Parser
, ParserCreateNS
,
746 AROS_LHA(const XML_Char
*, encodingName
, A0
),
747 AROS_LHA(XML_Char
, nsSep
, D0
),
748 struct ExpatBase
*, libBase
, 6, Expat
753 static XML_Parser
Expat_ParserCreateNS(REG(a0
, const XML_Char
* encodingName
),
754 REG(d0
, XML_Char nsSep
))
757 return XML_ParserCreateNS(encodingName
, nsSep
);
764 static AROS_LH3(XML_Parser
, ParserCreate_MM
,
765 AROS_LHA(const XML_Char
*, encodingName
, A0
),
766 AROS_LHA(const XML_Memory_Handling_Suite
*, memsuite
, A1
),
767 AROS_LHA(const XML_Char
*, nameSep
, A2
),
768 struct ExpatBase
*, libBase
, 7, Expat
773 static XML_Parser
Expat_ParserCreate_MM(REG(a0
, const XML_Char
* encodingName
),
774 REG(a1
, const XML_Memory_Handling_Suite
* memsuite
),
775 REG(a2
, const XML_Char
* nameSep
))
778 return XML_ParserCreate_MM(encodingName
, memsuite
, nameSep
);
785 static AROS_LH3(XML_Parser
, ExternalEntityParserCreate
,
786 AROS_LHA(XML_Parser
, oldParser
, A0
),
787 AROS_LHA(const XML_Char
*, context
, A1
),
788 AROS_LHA(const XML_Char
*, encodingName
, A2
),
789 struct ExpatBase
*, libBase
, 8, Expat
794 static XML_Parser
Expat_ExternalEntityParserCreate(REG(a0
, XML_Parser oldParser
),
795 REG(a1
, const XML_Char
* context
), REG(a2
, const XML_Char
* encodingName
))
798 return XML_ExternalEntityParserCreate(oldParser
, context
, encodingName
);
805 static AROS_LH1(void, ParserFree
,
806 AROS_LHA(XML_Parser
, parser
, A0
),
807 struct ExpatBase
*, libBase
, 9, Expat
812 static void Expat_ParserFree(REG(a0
, XML_Parser parser
))
815 XML_ParserFree(parser
);
822 static AROS_LH4(int, Parse
,
823 AROS_LHA(XML_Parser
, parser
, A0
),
824 AROS_LHA(const char *, s
, A1
),
825 AROS_LHA(int, len
, D0
),
826 AROS_LHA(int, isFinal
, D1
),
827 struct ExpatBase
*, libBase
, 10, Expat
832 static int Expat_Parse(REG(a0
, XML_Parser parser
), REG(a1
, const char * s
),
833 REG(d0
, int len
), REG(d1
, int isFinal
))
836 return XML_Parse(parser
, s
, len
, isFinal
);
843 static AROS_LH3(int, ParseBuffer
,
844 AROS_LHA(XML_Parser
, parser
, A0
),
845 AROS_LHA(int, len
, D0
),
846 AROS_LHA(int, isFinal
, D1
),
847 struct ExpatBase
*, libBase
, 11, Expat
852 static int Expat_ParseBuffer(REG(a0
, XML_Parser parser
), REG(d0
, int len
),
853 REG(d1
, int isFinal
))
856 return XML_ParseBuffer(parser
, len
, isFinal
);
863 static AROS_LH2(void *, GetBuffer
,
864 AROS_LHA(XML_Parser
, parser
, A0
),
865 AROS_LHA(int, len
, D0
),
866 struct ExpatBase
*, libBase
, 12, Expat
871 static void * Expat_GetBuffer(REG(a0
, XML_Parser parser
), REG(d0
, int len
))
874 return XML_GetBuffer(parser
, len
);
881 static AROS_LH2(void, SetStartElementHandler
,
882 AROS_LHA(XML_Parser
, parser
, A0
),
883 AROS_LHA(XML_StartElementHandler
, start
, A1
),
884 struct ExpatBase
*, libBase
, 13, Expat
889 static void Expat_SetStartElementHandler(REG(a0
, XML_Parser parser
),
890 REG(a1
, XML_StartElementHandler start
))
893 XML_SetStartElementHandler(parser
, start
);
900 static AROS_LH2(void, SetEndElementHandler
,
901 AROS_LHA(XML_Parser
, parser
, A0
),
902 AROS_LHA(XML_EndElementHandler
, end
, A1
),
903 struct ExpatBase
*, libBase
, 14, Expat
908 static void Expat_SetEndElementHandler(REG(a0
, XML_Parser parser
),
909 REG(a1
, XML_EndElementHandler end
))
912 XML_SetEndElementHandler(parser
, end
);
919 static AROS_LH3(void, SetElementHandler
,
920 AROS_LHA(XML_Parser
, parser
, A0
),
921 AROS_LHA(XML_StartElementHandler
, start
, A1
),
922 AROS_LHA(XML_EndElementHandler
, end
, A2
),
923 struct ExpatBase
*, libBase
, 15, Expat
928 static void Expat_SetElementHandler(REG(a0
, XML_Parser parser
),
929 REG(a1
, XML_StartElementHandler start
),
930 REG(a2
, XML_EndElementHandler end
))
933 XML_SetElementHandler(parser
, start
, end
);
940 static AROS_LH2(void, SetCharacterDataHandler
,
941 AROS_LHA(XML_Parser
, parser
, A0
),
942 AROS_LHA(XML_CharacterDataHandler
, handler
, A1
),
943 struct ExpatBase
*, libBase
, 16, Expat
948 static void Expat_SetCharacterDataHandler(REG(a0
, XML_Parser parser
),
949 REG(a1
, XML_CharacterDataHandler handler
))
952 XML_SetCharacterDataHandler(parser
, handler
);
959 static AROS_LH2(void, SetProcessingInstructionHandler
,
960 AROS_LHA(XML_Parser
, parser
, A0
),
961 AROS_LHA(XML_ProcessingInstructionHandler
, handler
, A1
),
962 struct ExpatBase
*, libBase
, 17, Expat
967 static void Expat_SetProcessingInstructionHandler(REG(a0
, XML_Parser parser
),
968 REG(a1
, XML_ProcessingInstructionHandler handler
))
971 XML_SetProcessingInstructionHandler(parser
, handler
);
978 static AROS_LH2(void, SetCommentHandler
,
979 AROS_LHA(XML_Parser
, parser
, A0
),
980 AROS_LHA(XML_CommentHandler
, handler
, A1
),
981 struct ExpatBase
*, libBase
, 18, Expat
986 static void Expat_SetCommentHandler(REG(a0
, XML_Parser parser
),
987 REG(a1
, XML_CommentHandler handler
))
990 XML_SetCommentHandler(parser
, handler
);
997 static AROS_LH2(void, SetStartCdataSectionHandler
,
998 AROS_LHA(XML_Parser
, parser
, A0
),
999 AROS_LHA(XML_StartCdataSectionHandler
, start
, A1
),
1000 struct ExpatBase
*, libBase
, 19, Expat
1005 static void Expat_SetStartCdataSectionHandler(REG(a0
, XML_Parser parser
),
1006 REG(a1
, XML_StartCdataSectionHandler start
))
1009 XML_SetStartCdataSectionHandler(parser
, start
);
1016 static AROS_LH2(void, SetEndCdataSectionHandler
,
1017 AROS_LHA(XML_Parser
, parser
, A0
),
1018 AROS_LHA(XML_EndCdataSectionHandler
, end
, A1
),
1019 struct ExpatBase
*, libBase
, 20, Expat
1024 static void Expat_SetEndCdataSectionHandler(REG(a0
, XML_Parser parser
),
1025 REG(a1
, XML_EndCdataSectionHandler end
))
1028 XML_SetEndCdataSectionHandler(parser
, end
);
1035 static AROS_LH3(void, SetCdataSectionHandler
,
1036 AROS_LHA(XML_Parser
, parser
, A0
),
1037 AROS_LHA(XML_StartCdataSectionHandler
, start
, A1
),
1038 AROS_LHA(XML_EndCdataSectionHandler
, end
, A2
),
1039 struct ExpatBase
*, libBase
, 21, Expat
1044 static void Expat_SetCdataSectionHandler(REG(a0
, XML_Parser parser
),
1045 REG(a1
, XML_StartCdataSectionHandler start
),
1046 REG(a2
, XML_EndCdataSectionHandler end
))
1049 XML_SetCdataSectionHandler(parser
, start
, end
);
1056 static AROS_LH2(void, SetDefaultHandler
,
1057 AROS_LHA(XML_Parser
, parser
, A0
),
1058 AROS_LHA(XML_DefaultHandler
, handler
, A1
),
1059 struct ExpatBase
*, libBase
, 22, Expat
1064 static void Expat_SetDefaultHandler(REG(a0
, XML_Parser parser
),
1065 REG(a1
, XML_DefaultHandler handler
))
1068 XML_SetDefaultHandler(parser
, handler
);
1075 static AROS_LH2(void, SetDefaultHandlerExpand
,
1076 AROS_LHA(XML_Parser
, parser
, A0
),
1077 AROS_LHA(XML_DefaultHandler
, handler
, A1
),
1078 struct ExpatBase
*, libBase
, 23, Expat
1083 static void Expat_SetDefaultHandlerExpand(REG(a0
, XML_Parser parser
),
1084 REG(a1
, XML_DefaultHandler handler
))
1087 XML_SetDefaultHandlerExpand(parser
, handler
);
1094 static AROS_LH2(void, SetExternalEntityRefHandler
,
1095 AROS_LHA(XML_Parser
, parser
, A0
),
1096 AROS_LHA(XML_ExternalEntityRefHandler
, handler
, A1
),
1097 struct ExpatBase
*, libBase
, 24, Expat
1102 static void Expat_SetExternalEntityRefHandler(REG(a0
, XML_Parser parser
),
1103 REG(a1
, XML_ExternalEntityRefHandler handler
))
1106 XML_SetExternalEntityRefHandler(parser
, handler
);
1113 static AROS_LH2(void, SetExternalEntityRefHandlerArg
,
1114 AROS_LHA(XML_Parser
, parser
, A0
),
1115 AROS_LHA(void *, arg
, A1
),
1116 struct ExpatBase
*, libBase
, 25, Expat
1121 static void Expat_SetExternalEntityRefHandlerArg(REG(a0
, XML_Parser parser
),
1122 REG(a1
, void * arg
))
1125 XML_SetExternalEntityRefHandlerArg(parser
, arg
);
1132 static AROS_LH3(void, SetUnknownEncodingHandler
,
1133 AROS_LHA(XML_Parser
, parser
, A0
),
1134 AROS_LHA(XML_UnknownEncodingHandler
, handler
, A1
),
1135 AROS_LHA(void *, data
, A2
),
1136 struct ExpatBase
*, libBase
, 26, Expat
1141 static void Expat_SetUnknownEncodingHandler(REG(a0
, XML_Parser parser
),
1142 REG(a1
, XML_UnknownEncodingHandler handler
), REG(a2
, void * data
))
1145 XML_SetUnknownEncodingHandler(parser
, handler
, data
);
1152 static AROS_LH2(void, SetStartNamespaceDeclHandler
,
1153 AROS_LHA(XML_Parser
, parser
, A0
),
1154 AROS_LHA(XML_StartNamespaceDeclHandler
, start
, A1
),
1155 struct ExpatBase
*, libBase
, 27, Expat
1160 static void Expat_SetStartNamespaceDeclHandler(REG(a0
, XML_Parser parser
),
1161 REG(a1
, XML_StartNamespaceDeclHandler start
))
1164 XML_SetStartNamespaceDeclHandler(parser
, start
);
1171 static AROS_LH2(void, SetEndNamespaceDeclHandler
,
1172 AROS_LHA(XML_Parser
, parser
, A0
),
1173 AROS_LHA(XML_EndNamespaceDeclHandler
, end
, A1
),
1174 struct ExpatBase
*, libBase
, 28, Expat
1179 static void Expat_SetEndNamespaceDeclHandler(REG(a0
, XML_Parser parser
),
1180 REG(a1
, XML_EndNamespaceDeclHandler end
))
1183 XML_SetEndNamespaceDeclHandler(parser
, end
);
1190 static AROS_LH3(void, SetNamespaceDeclHandler
,
1191 AROS_LHA(XML_Parser
, parser
, A0
),
1192 AROS_LHA(XML_StartNamespaceDeclHandler
, start
, A1
),
1193 AROS_LHA(XML_EndNamespaceDeclHandler
, end
, A2
),
1194 struct ExpatBase
*, libBase
, 29, Expat
1199 static void Expat_SetNamespaceDeclHandler(REG(a0
, XML_Parser parser
),
1200 REG(a1
, XML_StartNamespaceDeclHandler start
),
1201 REG(a2
, XML_EndNamespaceDeclHandler end
))
1204 XML_SetNamespaceDeclHandler(parser
, start
, end
);
1211 static AROS_LH2(void, SetXmlDeclHandler
,
1212 AROS_LHA(XML_Parser
, parser
, A0
),
1213 AROS_LHA(XML_XmlDeclHandler
, handler
, A1
),
1214 struct ExpatBase
*, libBase
, 30, Expat
1219 static void Expat_SetXmlDeclHandler(REG(a0
, XML_Parser parser
),
1220 REG(a1
, XML_XmlDeclHandler handler
))
1223 XML_SetXmlDeclHandler(parser
, handler
);
1230 static AROS_LH2(void, SetStartDoctypeDeclHandler
,
1231 AROS_LHA(XML_Parser
, parser
, A0
),
1232 AROS_LHA(XML_StartDoctypeDeclHandler
, start
, A1
),
1233 struct ExpatBase
*, libBase
, 31, Expat
1238 static void Expat_SetStartDoctypeDeclHandler(REG(a0
, XML_Parser parser
),
1239 REG(a1
, XML_StartDoctypeDeclHandler start
))
1242 XML_SetStartDoctypeDeclHandler(parser
, start
);
1249 static AROS_LH2(void, SetEndDoctypeDeclHandler
,
1250 AROS_LHA(XML_Parser
, parser
, A0
),
1251 AROS_LHA(XML_EndDoctypeDeclHandler
, end
, A1
),
1252 struct ExpatBase
*, libBase
, 32, Expat
1257 static void Expat_SetEndDoctypeDeclHandler(REG(a0
, XML_Parser parser
),
1258 REG(a1
, XML_EndDoctypeDeclHandler end
))
1261 XML_SetEndDoctypeDeclHandler(parser
, end
);
1268 static AROS_LH3(void, SetDoctypeDeclHandler
,
1269 AROS_LHA(XML_Parser
, parser
, A0
),
1270 AROS_LHA(XML_StartDoctypeDeclHandler
, start
, A1
),
1271 AROS_LHA(XML_EndDoctypeDeclHandler
, end
, A2
),
1272 struct ExpatBase
*, libBase
, 33, Expat
1277 static void Expat_SetDoctypeDeclHandler(REG(a0
, XML_Parser parser
),
1278 REG(a1
, XML_StartDoctypeDeclHandler start
),
1279 REG(a2
, XML_EndDoctypeDeclHandler end
))
1282 XML_SetDoctypeDeclHandler(parser
, start
, end
);
1289 static AROS_LH2(void, SetElementDeclHandler
,
1290 AROS_LHA(XML_Parser
, parser
, A0
),
1291 AROS_LHA(XML_ElementDeclHandler
, eldecl
, A1
),
1292 struct ExpatBase
*, libBase
, 34, Expat
1297 static void Expat_SetElementDeclHandler(REG(a0
, XML_Parser parser
),
1298 REG(a1
, XML_ElementDeclHandler eldecl
))
1301 XML_SetElementDeclHandler(parser
, eldecl
);
1308 static AROS_LH2(void, SetAttlistDeclHandler
,
1309 AROS_LHA(XML_Parser
, parser
, A0
),
1310 AROS_LHA(XML_AttlistDeclHandler
, attdecl
, A1
),
1311 struct ExpatBase
*, libBase
, 35, Expat
1316 static void Expat_SetAttlistDeclHandler(REG(a0
, XML_Parser parser
),
1317 REG(a1
, XML_AttlistDeclHandler attdecl
))
1320 XML_SetAttlistDeclHandler(parser
, attdecl
);
1327 static AROS_LH2(void, SetEntityDeclHandler
,
1328 AROS_LHA(XML_Parser
, parser
, A0
),
1329 AROS_LHA(XML_EntityDeclHandler
, handler
, A1
),
1330 struct ExpatBase
*, libBase
, 36, Expat
1335 static void Expat_SetEntityDeclHandler(REG(a0
, XML_Parser parser
),
1336 REG(a1
, XML_EntityDeclHandler handler
))
1339 XML_SetEntityDeclHandler(parser
, handler
);
1346 static AROS_LH2(void, SetUnparsedEntityDeclHandler
,
1347 AROS_LHA(XML_Parser
, parser
, A0
),
1348 AROS_LHA(XML_UnparsedEntityDeclHandler
, handler
, A1
),
1349 struct ExpatBase
*, libBase
, 37, Expat
1354 static void Expat_SetUnparsedEntityDeclHandler(REG(a0
, XML_Parser parser
),
1355 REG(a1
, XML_UnparsedEntityDeclHandler handler
))
1358 XML_SetUnparsedEntityDeclHandler(parser
, handler
);
1365 static AROS_LH2(void, SetNotationDeclHandler
,
1366 AROS_LHA(XML_Parser
, parser
, A0
),
1367 AROS_LHA(XML_NotationDeclHandler
, handler
, A1
),
1368 struct ExpatBase
*, libBase
, 38, Expat
1373 static void Expat_SetNotationDeclHandler(REG(a0
, XML_Parser parser
),
1374 REG(a1
, XML_NotationDeclHandler handler
))
1377 XML_SetNotationDeclHandler(parser
, handler
);
1384 static AROS_LH2(void, SetNotStandaloneHandler
,
1385 AROS_LHA(XML_Parser
, parser
, A0
),
1386 AROS_LHA(XML_NotStandaloneHandler
, handler
, A1
),
1387 struct ExpatBase
*, libBase
, 39, Expat
1392 static void Expat_SetNotStandaloneHandler(REG(a0
, XML_Parser parser
),
1393 REG(a1
, XML_NotStandaloneHandler handler
))
1396 XML_SetNotStandaloneHandler(parser
, handler
);
1403 static AROS_LH1(int, GetErrorCode
,
1404 AROS_LHA(XML_Parser
, parser
, A0
),
1405 struct ExpatBase
*, libBase
, 40, Expat
1410 static int Expat_GetErrorCode(REG(a0
, XML_Parser parser
))
1413 return XML_GetErrorCode(parser
);
1420 static AROS_LH1(const XML_LChar
*, ErrorString
,
1421 AROS_LHA(int, code
, D0
),
1422 struct ExpatBase
*, libBase
, 41, Expat
1427 static const XML_LChar
* Expat_ErrorString(REG(d0
, int code
))
1430 return XML_ErrorString(code
);
1437 static AROS_LH1(long, GetCurrentByteIndex
,
1438 AROS_LHA(XML_Parser
, parser
, A0
),
1439 struct ExpatBase
*, libBase
, 42, Expat
1444 static long Expat_GetCurrentByteIndex(REG(a0
, XML_Parser parser
))
1447 return XML_GetCurrentByteIndex(parser
);
1454 static AROS_LH1(int, GetCurrentLineNumber
,
1455 AROS_LHA(XML_Parser
, parser
, A0
),
1456 struct ExpatBase
*, libBase
, 43, Expat
1461 static int Expat_GetCurrentLineNumber(REG(a0
, XML_Parser parser
))
1464 return XML_GetCurrentLineNumber(parser
);
1471 static AROS_LH1(int, GetCurrentColumnNumber
,
1472 AROS_LHA(XML_Parser
, parser
, A0
),
1473 struct ExpatBase
*, libBase
, 44, Expat
1478 static int Expat_GetCurrentColumnNumber(REG(a0
, XML_Parser parser
))
1481 return XML_GetCurrentColumnNumber(parser
);
1488 static AROS_LH1(int, GetCurrentByteCount
,
1489 AROS_LHA(XML_Parser
, parser
, A0
),
1490 struct ExpatBase
*, libBase
, 45, Expat
1495 static int Expat_GetCurrentByteCount(REG(a0
, XML_Parser parser
))
1498 return XML_GetCurrentByteCount(parser
);
1505 static AROS_LH3(const char *, GetInputContext
,
1506 AROS_LHA(XML_Parser
, parser
, A0
),
1507 AROS_LHA(int *, offset
, A1
),
1508 AROS_LHA(int *, size
, A2
),
1509 struct ExpatBase
*, libBase
, 46, Expat
1514 static const char * Expat_GetInputContext(REG(a0
, XML_Parser parser
),
1515 REG(a1
, int * offset
), REG(a2
, int * size
))
1518 return XML_GetInputContext(parser
, offset
, size
);
1525 static AROS_LH2(void, SetUserData
,
1526 AROS_LHA(XML_Parser
, parser
, A0
),
1527 AROS_LHA(void *, p
, A1
),
1528 struct ExpatBase
*, libBase
, 47, Expat
1533 static void Expat_SetUserData(REG(a0
, XML_Parser parser
), REG(a1
, void * p
))
1536 XML_SetUserData(parser
, p
);
1543 static AROS_LH1(void, DefaultCurrent
,
1544 AROS_LHA(XML_Parser
, parser
, A0
),
1545 struct ExpatBase
*, libBase
, 48, Expat
1550 static void Expat_DefaultCurrent(REG(a0
, XML_Parser parser
))
1553 XML_DefaultCurrent(parser
);
1560 static AROS_LH1(void, UseParserAsHandlerArg
,
1561 AROS_LHA(XML_Parser
, parser
, A0
),
1562 struct ExpatBase
*, libBase
, 49, Expat
1567 static void Expat_UseParserAsHandlerArg(REG(a0
, XML_Parser parser
))
1570 XML_UseParserAsHandlerArg(parser
);
1577 static AROS_LH2(int, SetBase
,
1578 AROS_LHA(XML_Parser
, parser
, A0
),
1579 AROS_LHA(const XML_Char
*, p
, A1
),
1580 struct ExpatBase
*, libBase
, 50, Expat
1585 static int Expat_SetBase(REG(a0
, XML_Parser parser
), REG(a1
, const XML_Char
* p
))
1588 return XML_SetBase(parser
, p
);
1595 static AROS_LH1(const XML_Char
*, GetBase
,
1596 AROS_LHA(XML_Parser
, parser
, A0
),
1597 struct ExpatBase
*, libBase
, 51, Expat
1602 static const XML_Char
* Expat_GetBase(REG(a0
, XML_Parser parser
))
1605 return XML_GetBase(parser
);
1612 static AROS_LH1(int, GetSpecifiedAttributeCount
,
1613 AROS_LHA(XML_Parser
, parser
, A0
),
1614 struct ExpatBase
*, libBase
, 52, Expat
1619 static int Expat_GetSpecifiedAttributeCount(REG(a0
, XML_Parser parser
))
1622 return XML_GetSpecifiedAttributeCount(parser
);
1629 static AROS_LH1(int, GetIdAttributeIndex
,
1630 AROS_LHA(XML_Parser
, parser
, A0
),
1631 struct ExpatBase
*, libBase
, 53, Expat
1636 static int Expat_GetIdAttributeIndex(REG(a0
, XML_Parser parser
))
1639 return XML_GetIdAttributeIndex(parser
);
1646 static AROS_LH2(int, SetEncoding
,
1647 AROS_LHA(XML_Parser
, parser
, A0
),
1648 AROS_LHA(const XML_Char
*, encodingName
, A1
),
1649 struct ExpatBase
*, libBase
, 54, Expat
1654 static int Expat_SetEncoding(REG(a0
, XML_Parser parser
),
1655 REG(a1
, const XML_Char
* encodingName
))
1658 return XML_SetEncoding(parser
, encodingName
);
1665 static AROS_LH2(int, SetParamEntityParsing
,
1666 AROS_LHA(XML_Parser
, parser
, A0
),
1667 AROS_LHA(int, peParsing
, D0
),
1668 struct ExpatBase
*, libBase
, 55, Expat
1673 static int Expat_SetParamEntityParsing(REG(a0
, XML_Parser parser
),
1674 REG(d0
, int peParsing
))
1677 return XML_SetParamEntityParsing(parser
, peParsing
);
1684 static AROS_LH2(void, SetReturnNSTriplet
,
1685 AROS_LHA(XML_Parser
, parser
, A0
),
1686 AROS_LHA(int, do_nst
, D0
),
1687 struct ExpatBase
*, libBase
, 56, Expat
1692 static void Expat_SetReturnNSTriplet(REG(a0
, XML_Parser parser
), REG(d0
, int do_nst
))
1695 XML_SetReturnNSTriplet(parser
, do_nst
);
1702 static AROS_LH0(const XML_LChar
*, ExpatVersion
,
1703 struct ExpatBase
*, libBase
, 57, Expat
1708 static const XML_LChar
* Expat_ExpatVersion()
1711 return XML_ExpatVersion();
1718 static AROS_LH0(XML_Expat_Version
, ExpatVersionInfo
,
1719 struct ExpatBase
*, libBase
, 58, Expat
1724 static XML_Expat_Version
Expat_ExpatVersionInfo()
1727 return XML_ExpatVersionInfo();
1734 static AROS_LH2(XML_Bool
, ParserReset
,
1735 AROS_LHA(XML_Parser
, parser
, A0
),
1736 AROS_LHA(const XML_Char
*, encodingName
, A1
),
1737 struct ExpatBase
*, libBase
, 59, Expat
1742 static XML_Bool
Expat_ParserReset(REG(a0
, XML_Parser parser
),
1743 REG(a1
, const XML_Char
* encodingName
))
1746 return XML_ParserReset(parser
, encodingName
);
1753 static AROS_LH2(void, SetSkippedEntityHandler
,
1754 AROS_LHA(XML_Parser
, parser
, A0
),
1755 AROS_LHA(XML_SkippedEntityHandler
, handler
, A1
),
1756 struct ExpatBase
*, libBase
, 60, Expat
1761 static void Expat_SetSkippedEntityHandler(REG(a0
, XML_Parser parser
),
1762 REG(a1
, XML_SkippedEntityHandler handler
))
1765 XML_SetSkippedEntityHandler(parser
, handler
);
1772 static AROS_LH2(int, UseForeignDTD
,
1773 AROS_LHA(XML_Parser
, parser
, A0
),
1774 AROS_LHA(XML_Bool
, useDTD
, D0
),
1775 struct ExpatBase
*, libBase
, 61, Expat
1780 static int Expat_UseForeignDTD(REG(a0
, XML_Parser parser
), REG(d0
, XML_Bool useDTD
))
1783 return XML_UseForeignDTD(parser
, useDTD
);
1790 static AROS_LH0(const XML_Feature
*, GetFeatureList
,
1791 struct ExpatBase
*, libBase
, 62, Expat
1796 static const XML_Feature
* Expat_GetFeatureList()
1799 return XML_GetFeatureList();
1806 static AROS_LH2(int, StopParser
,
1807 AROS_LHA(XML_Parser
, parser
, A0
),
1808 AROS_LHA(XML_Bool
, resumable
, D0
),
1809 struct ExpatBase
*, libBase
, 63, Expat
1814 static int Expat_StopParser(REG(a0
, XML_Parser parser
), REG(d0
, XML_Bool resumable
))
1817 return XML_StopParser(parser
, resumable
);
1824 static AROS_LH1(int, ResumeParser
,
1825 AROS_LHA(XML_Parser
, parser
, A0
),
1826 struct ExpatBase
*, libBase
, 64, Expat
1831 static int Expat_ResumeParser(REG(a0
, XML_Parser parser
))
1834 return XML_ResumeParser(parser
);
1841 static AROS_LH2(void, GetParsingStatus
,
1842 AROS_LHA(XML_Parser
, parser
, A0
),
1843 AROS_LHA(XML_ParsingStatus
*, status
, A1
),
1844 struct ExpatBase
*, libBase
, 65, Expat
1849 static void Expat_GetParsingStatus(REG(a0
, XML_Parser parser
),
1850 REG(a1
, XML_ParsingStatus
* status
))
1853 XML_GetParsingStatus(parser
, status
);
1860 static AROS_LH2(void, FreeContentModel
,
1861 AROS_LHA(XML_Parser
, parser
, A0
),
1862 AROS_LHA(XML_Content
*, model
, A1
),
1863 struct ExpatBase
*, libBase
, 66, Expat
1868 static void Expat_FreeContentModel(REG(a0
, XML_Parser parser
),
1869 REG(a1
, XML_Content
* model
))
1872 XML_FreeContentModel(parser
, model
);
1879 static AROS_LH2(void *, MemMalloc
,
1880 AROS_LHA(XML_Parser
, parser
, A0
),
1881 AROS_LHA(size_t, size
, D0
),
1882 struct ExpatBase
*, libBase
, 67, Expat
1887 static void * Expat_MemMalloc(REG(a0
, XML_Parser parser
), REG(d0
, size_t size
))
1890 return XML_MemMalloc(parser
, size
);
1897 static AROS_LH3(void *, MemRealloc
,
1898 AROS_LHA(XML_Parser
, parser
, A0
),
1899 AROS_LHA(void *, ptr
, A1
),
1900 AROS_LHA(size_t, size
, D0
),
1901 struct ExpatBase
*, libBase
, 68, Expat
1906 static void * Expat_MemRealloc(REG(a0
, XML_Parser parser
), REG(a1
, void * ptr
),
1907 REG(d0
, size_t size
))
1910 return XML_MemRealloc(parser
, ptr
, size
);
1917 static AROS_LH2(void, MemFree
,
1918 AROS_LHA(XML_Parser
, parser
, A0
),
1919 AROS_LHA(void *, ptr
, A1
),
1920 struct ExpatBase
*, libBase
, 69, Expat
1925 static void Expat_MemFree(REG(a0
, XML_Parser parser
), REG(a1
, void * ptr
))
1928 return XML_MemFree(parser
, ptr
);