Apache HTTPD
handlers.c
Go to the documentation of this file.
1/* XML handler functions for the Expat test suite
2 __ __ _
3 ___\ \/ /_ __ __ _| |_
4 / _ \\ /| '_ \ / _` | __|
5 | __// \| |_) | (_| | |_
6 \___/_/\_\ .__/ \__,_|\__|
7 |_| XML parser
8
9 Copyright (c) 2001-2006 Fred L. Drake, Jr. <[email protected]>
10 Copyright (c) 2003 Greg Stein <[email protected]>
11 Copyright (c) 2005-2007 Steven Solie <[email protected]>
12 Copyright (c) 2005-2012 Karl Waclawek <[email protected]>
13 Copyright (c) 2016-2024 Sebastian Pipping <[email protected]>
14 Copyright (c) 2017-2022 Rhodri James <[email protected]>
15 Copyright (c) 2017 Joe Orton <[email protected]>
16 Copyright (c) 2017 José Gutiérrez de la Concha <[email protected]>
17 Copyright (c) 2018 Marco Maggi <[email protected]>
18 Copyright (c) 2019 David Loffredo <[email protected]>
19 Copyright (c) 2020 Tim Gates <[email protected]>
20 Copyright (c) 2021 Donghee Na <[email protected]>
21 Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <[email protected]>
22 Licensed under the MIT license:
23
24 Permission is hereby granted, free of charge, to any person obtaining
25 a copy of this software and associated documentation files (the
26 "Software"), to deal in the Software without restriction, including
27 without limitation the rights to use, copy, modify, merge, publish,
28 distribute, sublicense, and/or sell copies of the Software, and to permit
29 persons to whom the Software is furnished to do so, subject to the
30 following conditions:
31
32 The above copyright notice and this permission notice shall be included
33 in all copies or substantial portions of the Software.
34
35 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
37 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
38 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
39 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
40 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
41 USE OR OTHER DEALINGS IN THE SOFTWARE.
42*/
43
44#if defined(NDEBUG)
45# undef NDEBUG /* because test suite relies on assert(...) at the moment */
46#endif
47
48#include <stdio.h>
49#include <string.h>
50#include <assert.h>
51
52#include "expat_config.h"
53
54#include "expat.h"
55#include "internal.h"
56#include "chardata.h"
57#include "structdata.h"
58#include "common.h"
59#include "handlers.h"
60
61/* Global variables for user parameter settings tests */
62/* Variable holding the expected handler userData */
63const void *g_handler_data = NULL;
64/* Count of the number of times the comment handler has been invoked */
66/* Count of the number of skipped entities */
68/* Count of the number of times the XML declaration handler is invoked */
70
71/* Start/End Element Handlers */
72
73void XMLCALL
75 const XML_Char **atts) {
76 UNUSED_P(atts);
77 CharData_AppendXMLChars((CharData *)userData, name, -1);
78}
79
80void XMLCALL
86
87void XMLCALL
95
96void XMLCALL
102
103void XMLCALL
105 const XML_Char **atts) {
107 = (ParserAndElementInfo *)userData;
109 AttrInfo *attr;
110 int count, id, i;
111
112 while (info->name != NULL) {
113 if (! xcstrcmp(name, info->name))
114 break;
115 info++;
116 }
117 if (info->name == NULL)
118 fail("Element not recognised");
119 /* The attribute count is twice what you might expect. It is a
120 * count of items in atts, an array which contains alternating
121 * attribute names and attribute values. For the naive user this
122 * is possibly a little unexpected, but it is what the
123 * documentation in expat.h tells us to expect.
124 */
126 if (info->attr_count * 2 != count) {
127 fail("Not got expected attribute count");
128 return;
129 }
131 if (id == -1 && info->id_name != NULL) {
132 fail("ID not present");
133 return;
134 }
135 if (id != -1 && xcstrcmp(atts[id], info->id_name)) {
136 fail("ID does not have the correct name");
137 return;
138 }
139 for (i = 0; i < info->attr_count; i++) {
140 attr = info->attributes;
141 while (attr->name != NULL) {
142 if (! xcstrcmp(atts[0], attr->name))
143 break;
144 attr++;
145 }
146 if (attr->name == NULL) {
147 fail("Attribute not recognised");
148 return;
149 }
150 if (xcstrcmp(atts[1], attr->value)) {
151 fail("Attribute has wrong value");
152 return;
153 }
154 /* Remember, two entries in atts per attribute (see above) */
155 atts += 2;
156 }
157}
158
159void XMLCALL
160suspending_end_handler(void *userData, const XML_Char *s) {
161 UNUSED_P(s);
162 XML_StopParser((XML_Parser)userData, 1);
163}
164
165void XMLCALL
166start_element_suspender(void *userData, const XML_Char *name,
167 const XML_Char **atts) {
168 UNUSED_P(userData);
169 UNUSED_P(atts);
170 if (! xcstrcmp(name, XCS("suspend")))
172 if (! xcstrcmp(name, XCS("abort")))
174}
175
176/* Check that an element name and attribute name match the expected values.
177 The expected values are passed as an array reference of string pointers
178 provided as the userData argument; the first is the expected
179 element name, and the second is the expected attribute name.
180*/
183
184void XMLCALL
185triplet_start_checker(void *userData, const XML_Char *name,
186 const XML_Char **atts) {
187 XML_Char **elemstr = (XML_Char **)userData;
188 char buffer[1024];
189 if (xcstrcmp(elemstr[0], name) != 0) {
190 snprintf(buffer, sizeof(buffer),
191 "unexpected start string: '%" XML_FMT_STR "'", name);
192 fail(buffer);
193 }
194 if (xcstrcmp(elemstr[1], atts[0]) != 0) {
195 snprintf(buffer, sizeof(buffer),
196 "unexpected attribute string: '%" XML_FMT_STR "'", atts[0]);
197 fail(buffer);
198 }
200}
201
202/* Check that the element name passed to the end-element handler matches
203 the expected value. The expected value is passed as the first element
204 in an array of strings passed as the userData argument.
205*/
206void XMLCALL
207triplet_end_checker(void *userData, const XML_Char *name) {
208 XML_Char **elemstr = (XML_Char **)userData;
209 if (xcstrcmp(elemstr[0], name) != 0) {
210 char buffer[1024];
211 snprintf(buffer, sizeof(buffer),
212 "unexpected end string: '%" XML_FMT_STR "'", name);
213 fail(buffer);
214 }
216}
217
218void XMLCALL
219overwrite_start_checker(void *userData, const XML_Char *name,
220 const XML_Char **atts) {
221 CharData *storage = (CharData *)userData;
222 CharData_AppendXMLChars(storage, XCS("start "), 6);
224 while (*atts != NULL) {
225 CharData_AppendXMLChars(storage, XCS("\nattribute "), 11);
227 atts += 2;
228 }
230}
231
232void XMLCALL
233overwrite_end_checker(void *userData, const XML_Char *name) {
234 CharData *storage = (CharData *)userData;
238}
239
240void XMLCALL
241start_element_fail(void *userData, const XML_Char *name,
242 const XML_Char **atts) {
243 UNUSED_P(userData);
244 UNUSED_P(name);
245 UNUSED_P(atts);
246
247 /* We should never get here. */
248 fail("should never reach start_element_fail()");
249}
250
251void XMLCALL
253 const XML_Char *uri) {
255 UNUSED_P(uri);
257}
258
259void XMLCALL
260start_element_issue_240(void *userData, const XML_Char *name,
261 const XML_Char **atts) {
262 DataIssue240 *mydata = (DataIssue240 *)userData;
263 UNUSED_P(name);
264 UNUSED_P(atts);
265 mydata->deep++;
266}
267
268void XMLCALL
269end_element_issue_240(void *userData, const XML_Char *name) {
270 DataIssue240 *mydata = (DataIssue240 *)userData;
271
272 UNUSED_P(name);
273 mydata->deep--;
274 if (mydata->deep == 0) {
275 XML_StopParser(mydata->parser, 0);
276 }
277}
278
279/* Text encoding handlers */
280
281int XMLCALL
284 UNUSED_P(data);
285 if (xcstrcmp(encoding, XCS("unsupported-encoding")) == 0) {
286 int i;
287 for (i = 0; i < 256; ++i)
288 info->map[i] = i;
289 info->data = NULL;
290 info->convert = NULL;
291 info->release = NULL;
292 return XML_STATUS_OK;
293 }
294 return XML_STATUS_ERROR;
295}
296
297static void
299 UNUSED_P(data);
300}
301
302int XMLCALL
305 UNUSED_P(data);
307 info->data = NULL;
308 info->convert = NULL;
309 info->release = dummy_release;
310 return XML_STATUS_ERROR;
311}
312
313int XMLCALL
316 UNUSED_P(data);
317 if (! xcstrcmp(encoding, XCS("unsupported-encoding"))) {
318 int i;
319
320 for (i = 0; i < 256; i++)
321 info->map[i] = i;
322 info->data = NULL;
323 info->convert = NULL;
324 info->release = dummy_release;
325 return XML_STATUS_OK;
326 }
327 return XML_STATUS_ERROR;
328}
329
330static int XMLCALL
331failing_converter(void *data, const char *s) {
332 UNUSED_P(data);
333 UNUSED_P(s);
334 /* Always claim to have failed */
335 return -1;
336}
337
338static int XMLCALL
339prefix_converter(void *data, const char *s) {
340 UNUSED_P(data);
341 /* If the first byte is 0xff, raise an error */
342 if (s[0] == (char)-1)
343 return -1;
344 /* Just add the low bits of the first byte to the second */
345 return (s[1] + (s[0] & 0x7f)) & 0x01ff;
346}
347
348int XMLCALL
350 int i;
351 int high_map = -2; /* Assume a 2-byte sequence */
352
353 if (! xcstrcmp(encoding, XCS("invalid-9"))
354 || ! xcstrcmp(encoding, XCS("ascii-like"))
355 || ! xcstrcmp(encoding, XCS("invalid-len"))
356 || ! xcstrcmp(encoding, XCS("invalid-a"))
357 || ! xcstrcmp(encoding, XCS("invalid-surrogate"))
358 || ! xcstrcmp(encoding, XCS("invalid-high")))
359 high_map = -1;
360
361 for (i = 0; i < 128; ++i)
362 info->map[i] = i;
363 for (; i < 256; ++i)
364 info->map[i] = high_map;
365
366 /* If required, put an invalid value in the ASCII entries */
367 if (! xcstrcmp(encoding, XCS("invalid-9")))
368 info->map[9] = 5;
369 /* If required, have a top-bit set character starts a 5-byte sequence */
370 if (! xcstrcmp(encoding, XCS("invalid-len")))
371 info->map[0x81] = -5;
372 /* If required, make a top-bit set character a valid ASCII character */
373 if (! xcstrcmp(encoding, XCS("invalid-a")))
374 info->map[0x82] = 'a';
375 /* If required, give a top-bit set character a forbidden value,
376 * what would otherwise be the first of a surrogate pair.
377 */
378 if (! xcstrcmp(encoding, XCS("invalid-surrogate")))
379 info->map[0x83] = 0xd801;
380 /* If required, give a top-bit set character too high a value */
381 if (! xcstrcmp(encoding, XCS("invalid-high")))
382 info->map[0x84] = 0x010101;
383
384 info->data = data;
385 info->release = NULL;
386 if (! xcstrcmp(encoding, XCS("failing-conv")))
387 info->convert = failing_converter;
388 else if (! xcstrcmp(encoding, XCS("prefix-conv")))
389 info->convert = prefix_converter;
390 else
391 info->convert = NULL;
392 return XML_STATUS_OK;
393}
394
395int XMLCALL
398 int i;
399
400 UNUSED_P(userData);
402 for (i = 0; i < 256; i++)
403 info->map[i] = i;
404 info->data = NULL;
405 info->convert = NULL;
406 info->release = NULL;
407 return XML_STATUS_OK;
408}
409
410/* External Entity Handlers */
411
412int XMLCALL
414 const XML_Char *base, const XML_Char *systemId,
415 const XML_Char *publicId) {
418
419 UNUSED_P(base);
420 UNUSED_P(publicId);
421 while (options->parse_text != NULL) {
422 if (! xcstrcmp(systemId, options->system_id)) {
423 enum XML_Status rc;
425 if (ext_parser == NULL)
426 return XML_STATUS_ERROR;
428 (int)strlen(options->parse_text), XML_TRUE);
430 return rc;
431 }
432 options++;
433 }
434 fail("No suitable option found");
435 return XML_STATUS_ERROR;
436}
437
438int XMLCALL
440 const XML_Char *base, const XML_Char *systemId,
441 const XML_Char *publicId) {
444
445 UNUSED_P(base);
446 UNUSED_P(systemId);
447 UNUSED_P(publicId);
449 if (extparser == NULL)
450 fail("Could not create external entity parser.");
451 if (test_data->encoding != NULL) {
452 if (! XML_SetEncoding(extparser, test_data->encoding))
453 fail("XML_SetEncoding() ignored for external entity");
454 }
456 (int)strlen(test_data->parse_text), XML_TRUE)
457 == XML_STATUS_ERROR) {
459 return XML_STATUS_ERROR;
460 }
462 return XML_STATUS_OK;
463}
464
465int XMLCALL
467 const XML_Char *base, const XML_Char *systemId,
468 const XML_Char *publicId) {
471
472 UNUSED_P(base);
473 UNUSED_P(systemId);
474 UNUSED_P(publicId);
476 if (ext_parser == NULL)
477 fail("Could not create external entity parser");
478 if (fault->encoding != NULL) {
479 if (! XML_SetEncoding(ext_parser, fault->encoding))
480 fail("XML_SetEncoding failed");
481 }
483 (int)strlen(fault->parse_text), XML_TRUE)
485 fail(fault->fail_text);
486 if (XML_GetErrorCode(ext_parser) != fault->error)
488
490 return XML_STATUS_ERROR;
491}
492
493int XMLCALL
495 const XML_Char *base, const XML_Char *systemId,
496 const XML_Char *publicId) {
499 UNUSED_P(base);
500 UNUSED_P(systemId);
501 UNUSED_P(publicId);
502 return XML_STATUS_OK;
503}
504
505int XMLCALL
507 const XML_Char *base, const XML_Char *systemId,
508 const XML_Char *publicId) {
509 const char *text = "<!ELEMENT doc (#PCDATA)*>";
512
513 UNUSED_P(base);
514 UNUSED_P(systemId);
515 UNUSED_P(publicId);
517 if (ext_parser == NULL)
518 fail("Could not create external entity parser");
520 if (status.parsing != XML_INITIALIZED) {
521 fail("Parsing status is not INITIALIZED");
522 return XML_STATUS_ERROR;
523 }
525 == XML_STATUS_ERROR) {
527 return XML_STATUS_ERROR;
528 }
530 if (status.parsing != XML_FINISHED) {
531 fail("Parsing status is not FINISHED");
532 return XML_STATUS_ERROR;
533 }
534 /* Check we can't parse here */
537 fail("Parsing when finished not faulted");
539 fail("Parsing when finished faulted with wrong code");
542 if (status.parsing != XML_FINISHED) {
543 fail("Parsing status not still FINISHED");
544 return XML_STATUS_ERROR;
545 }
547 return XML_STATUS_OK;
548}
549
550void XMLCALL
552 XML_Content *model) {
553 XML_Parser ext_parser = (XML_Parser)userData;
554
555 UNUSED_P(name);
557 fail("Attempting to suspend a subordinate parser not faulted");
559 fail("Suspending subordinate parser get wrong code");
562}
563
564int XMLCALL
566 const XML_Char *base, const XML_Char *systemId,
567 const XML_Char *publicId) {
568 const char *text = "<!ELEMENT doc (#PCDATA)*>";
570
571 UNUSED_P(base);
572 UNUSED_P(systemId);
573 UNUSED_P(publicId);
575 if (ext_parser == NULL)
576 fail("Could not create external entity parser");
580 == XML_STATUS_ERROR) {
582 return XML_STATUS_ERROR;
583 }
585 return XML_STATUS_OK;
586}
587
588void XMLCALL
589entity_suspending_xdecl_handler(void *userData, const XML_Char *version,
590 const XML_Char *encoding, int standalone) {
591 XML_Parser ext_parser = (XML_Parser)userData;
592
593 UNUSED_P(version);
595 UNUSED_P(standalone);
598}
599
600int XMLCALL
602 const XML_Char *base, const XML_Char *systemId,
603 const XML_Char *publicId) {
604 const char *text = "<?xml version='1.0' encoding='us-ascii'?>";
607 enum XML_Status rc;
608
609 UNUSED_P(base);
610 UNUSED_P(systemId);
611 UNUSED_P(publicId);
613 if (ext_parser == NULL)
614 fail("Could not create external entity parser");
619 if (g_resumable) {
620 if (rc == XML_STATUS_ERROR)
622 if (status.parsing != XML_SUSPENDED)
623 fail("Ext Parsing status not SUSPENDED");
624 } else {
625 if (rc != XML_STATUS_ERROR)
626 fail("Ext parsing not aborted");
629 if (status.parsing != XML_FINISHED)
630 fail("Ext Parsing status not FINISHED");
631 }
632
634 return XML_STATUS_OK;
635}
636
637int XMLCALL
639 const XML_Char *base,
640 const XML_Char *systemId,
641 const XML_Char *publicId) {
644 void *buffer;
645 int parse_len = (int)strlen(fault->parse_text);
646
647 UNUSED_P(base);
648 UNUSED_P(systemId);
649 UNUSED_P(publicId);
651 if (ext_parser == NULL)
652 fail("Could not create external entity parser");
656 buffer = XML_GetBuffer(ext_parser, parse_len);
657 if (buffer == NULL)
658 fail("Could not allocate parse buffer");
659 assert(buffer != NULL);
660 memcpy(buffer, fault->parse_text, parse_len);
662 fail("XML declaration did not suspend");
666 fail(fault->fail_text);
667 if (XML_GetErrorCode(ext_parser) != fault->error)
669
671 return XML_STATUS_ERROR;
672}
673
674int XMLCALL
676 const XML_Char *context,
677 const XML_Char *base,
678 const XML_Char *systemId,
679 const XML_Char *publicId) {
682 UNUSED_P(base);
683 UNUSED_P(systemId);
684 UNUSED_P(publicId);
685#if XML_GE == 0
686 fail(
687 "Function external_entity_suspending_failer was called despite XML_GE==0.");
688#endif
689 return XML_STATUS_OK;
690}
691
692int XMLCALL
694 const XML_Char *base, const XML_Char *systemId,
695 const XML_Char *publicId) {
696 const char *text = "\r";
698
699 UNUSED_P(base);
700 UNUSED_P(systemId);
701 UNUSED_P(publicId);
703 if (ext_parser == NULL)
704 fail("Could not create external entity parser");
710 return XML_STATUS_OK;
711}
712
713int XMLCALL
715 const XML_Char *base, const XML_Char *systemId,
716 const XML_Char *publicId) {
717 const char *text = "<tag>\r";
719
720 UNUSED_P(base);
721 UNUSED_P(systemId);
722 UNUSED_P(publicId);
724 if (ext_parser == NULL)
725 fail("Could not create external entity parser");
728 == XML_STATUS_OK)
729 fail("Async entity error not caught");
733 return XML_STATUS_OK;
734}
735
736int XMLCALL
738 const XML_Char *base, const XML_Char *systemId,
739 const XML_Char *publicId) {
740 const char *text = "<tag>]";
742
743 UNUSED_P(base);
744 UNUSED_P(systemId);
745 UNUSED_P(publicId);
747 if (ext_parser == NULL)
748 fail("Could not create external entity parser");
752 fail("Async entity error not caught");
756 return XML_STATUS_OK;
757}
758
759int XMLCALL
761 const XML_Char *base, const XML_Char *systemId,
762 const XML_Char *publicId) {
763 const char *text = "<a><![CDATA[<greeting>Hello, world!</greeting>]]></a>";
764 const XML_Char *expected = XCS("<greeting>Hello, world!</greeting>");
767
768 UNUSED_P(base);
769 UNUSED_P(systemId);
770 UNUSED_P(publicId);
773 if (ext_parser == NULL)
774 fail("Could not create external entity parser");
777
782
784 return XML_STATUS_OK;
785}
786
787int XMLCALL
789 const XML_Char *base, const XML_Char *systemId,
790 const XML_Char *publicId) {
791 const char *text = "<!-- Subordinate parser -->\n"
792 "<!ELEMENT doc (#PCDATA)*>";
794
795 UNUSED_P(base);
796 UNUSED_P(systemId);
797 UNUSED_P(publicId);
799 if (ext_parser == NULL)
800 fail("Could not create external entity parser");
803 == XML_STATUS_ERROR) {
805 return XML_STATUS_ERROR;
806 }
809 return XML_STATUS_OK;
810}
811
812int XMLCALL
814 const XML_Char *base,
815 const XML_Char *systemId,
816 const XML_Char *publicId) {
817 const char *text = "<!ELEMENT doc (#PCDATA)*>";
819
820 UNUSED_P(base);
821 UNUSED_P(systemId);
822 UNUSED_P(publicId);
823 if ((void *)parameter != g_handler_data)
824 fail("External entity ref handler parameter not correct");
825
826 /* Here we use the global 'parser' variable */
828 if (ext_parser == NULL)
829 fail("Could not create external entity parser");
833
835 return XML_STATUS_OK;
836}
837
838int XMLCALL
840 const XML_Char *base, const XML_Char *systemId,
841 const XML_Char *publicId) {
842 const char *text1 = "<!ELEMENT doc EMPTY>\n"
843 "<!ENTITY % e1 SYSTEM '004-2.ent'>\n"
844 "<!ENTITY % e2 '%e1;'>\n"
845 "%e1;\n";
846 const char *text2 = "<!ELEMENT el EMPTY>\n"
847 "<el/>\n";
849
850 UNUSED_P(base);
851 UNUSED_P(publicId);
852 if (systemId == NULL)
853 return XML_STATUS_OK;
854
856 if (ext_parser == NULL)
857 fail("Could not create external entity parser");
858
859 if (! xcstrcmp(systemId, XCS("004-1.ent"))) {
862 fail("Inner DTD with invalid tag not rejected");
865 } else if (! xcstrcmp(systemId, XCS("004-2.ent"))) {
868 fail("Invalid tag in external param not rejected");
871 } else {
872 fail("Unknown system ID");
873 }
874
876 return XML_STATUS_ERROR;
877}
878
879int XMLCALL
881 const XML_Char *base, const XML_Char *systemId,
882 const XML_Char *publicId) {
883 const char *text = "<![IGNORE[<!ELEMENT e (#PCDATA)*>]]>";
885
886 UNUSED_P(base);
887 UNUSED_P(systemId);
888 UNUSED_P(publicId);
890 if (ext_parser == NULL)
891 fail("Could not create external entity parser");
895
897 return XML_STATUS_OK;
898}
899
900int XMLCALL
902 const XML_Char *base,
903 const XML_Char *systemId,
904 const XML_Char *publicId) {
905 const char text[] =
906 /* <![IGNORE[<!ELEMENT e (#PCDATA)*>]]> */
907 "<\0!\0[\0I\0G\0N\0O\0R\0E\0[\0"
908 "<\0!\0E\0L\0E\0M\0E\0N\0T\0 \0e\0 \0"
909 "(\0#\0P\0C\0D\0A\0T\0A\0)\0*\0>\0]\0]\0>\0";
911
912 UNUSED_P(base);
913 UNUSED_P(systemId);
914 UNUSED_P(publicId);
916 if (ext_parser == NULL)
917 fail("Could not create external entity parser");
918 if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)sizeof(text) - 1, XML_TRUE)
921
923 return XML_STATUS_OK;
924}
925
926int XMLCALL
928 const XML_Char *base,
929 const XML_Char *systemId,
930 const XML_Char *publicId) {
931 const char text[] =
932 /* <![IGNORE[<!ELEMENT e (#PCDATA)*>]]> */
933 "\0<\0!\0[\0I\0G\0N\0O\0R\0E\0["
934 "\0<\0!\0E\0L\0E\0M\0E\0N\0T\0 \0e\0 "
935 "\0(\0#\0P\0C\0D\0A\0T\0A\0)\0*\0>\0]\0]\0>";
937
938 UNUSED_P(base);
939 UNUSED_P(systemId);
940 UNUSED_P(publicId);
942 if (ext_parser == NULL)
943 fail("Could not create external entity parser");
944 if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)sizeof(text) - 1, XML_TRUE)
947
949 return XML_STATUS_OK;
950}
951
952int XMLCALL
954 const XML_Char *base, const XML_Char *systemId,
955 const XML_Char *publicId) {
956 const char *text1 = "<!ELEMENT doc EMPTY>\n"
957 "<!ENTITY % e1 SYSTEM '004-2.ent'>\n"
958 "<!ENTITY % e2 '%e1;'>\n"
959 "%e1;\n";
961
962 UNUSED_P(base);
963 UNUSED_P(publicId);
964 if (systemId == NULL)
965 return XML_STATUS_OK;
967 if (ext_parser == NULL)
968 fail("Could not create external entity parser");
969 if (! xcstrcmp(systemId, XCS("004-1.ent"))) {
973 } else if (! xcstrcmp(systemId, XCS("004-2.ent"))) {
975 enum XML_Status status;
976 enum XML_Error error;
977
979 (int)strlen(fault->parse_text), XML_TRUE);
980 if (fault->error == XML_ERROR_NONE) {
983 } else {
985 fail(fault->fail_text);
987 if (error != fault->error
988 && (fault->error != XML_ERROR_XML_DECL
991 }
992 }
993
995 return XML_STATUS_OK;
996}
997
998int XMLCALL
1000 const XML_Char *base, const XML_Char *systemId,
1001 const XML_Char *publicId) {
1002 const char *text1 = "<!ELEMENT doc EMPTY>\n"
1003 "<!ENTITY % e1 SYSTEM 'bar'>\n"
1004 "%e1;\n";
1005 const char *text2 = "<!ATTLIST doc a1 CDATA 'value'>";
1007
1008 UNUSED_P(base);
1009 UNUSED_P(publicId);
1010 if (systemId == NULL)
1011 return XML_STATUS_OK;
1013 if (ext_parser == NULL)
1014 fail("Could not create external entity parser");
1015 if (! xcstrcmp(systemId, XCS("foo"))) {
1019 fail("Expected not standalone rejection");
1024 return XML_STATUS_ERROR;
1025 } else if (! xcstrcmp(systemId, XCS("bar"))) {
1029 }
1030
1032 return XML_STATUS_OK;
1033}
1034
1035int XMLCALL
1037 const XML_Char *base, const XML_Char *systemId,
1038 const XML_Char *publicId) {
1039 const char *text1 = "<!ELEMENT doc EMPTY>\n"
1040 "<!ENTITY % e1 SYSTEM '004-2.ent'>\n"
1041 "<!ENTITY % e2 '%e1;'>\n"
1042 "%e1;\n";
1043 const char *text2 = "<?xml version='1.0' encoding='utf-8'?>";
1045
1046 UNUSED_P(base);
1047 UNUSED_P(publicId);
1048 if (systemId == NULL)
1049 return XML_STATUS_OK;
1051 if (ext_parser == NULL)
1052 fail("Could not create external entity parser");
1053 if (! xcstrcmp(systemId, XCS("004-1.ent"))) {
1057 }
1058 if (! xcstrcmp(systemId, XCS("004-2.ent"))) {
1063 fail("Aborted parse not faulted");
1066 }
1067
1069 return XML_STATUS_OK;
1070}
1071
1072int XMLCALL
1074 const XML_Char *base, const XML_Char *systemId,
1075 const XML_Char *publicId) {
1076 const char *text1 = (const char *)XML_GetUserData(parser);
1077 const char *text2 = "<!ATTLIST doc a CDATA 'value'>";
1078 const char *text = NULL;
1080 int parse_res;
1081
1082 UNUSED_P(base);
1084 if (ext_parser == NULL)
1085 return XML_STATUS_ERROR;
1086 if (systemId != NULL && ! xcstrcmp(systemId, XCS("http://example.org/"))) {
1087 text = text1;
1088 } else if (publicId != NULL && ! xcstrcmp(publicId, XCS("foo"))) {
1089 text = text2;
1090 } else
1091 fail("Unexpected parameters to external entity parser");
1092 assert(text != NULL);
1093 parse_res
1096 return parse_res;
1097}
1098
1099int XMLCALL
1101 const XML_Char *base, const XML_Char *systemId,
1102 const XML_Char *publicId) {
1103 const char *text = "<!ELEMENT doc EMPTY>\n"
1104 "<!ENTITY % e1 SYSTEM 'bar'>\n"
1105 "%e1;\n";
1108
1109 UNUSED_P(base);
1110 UNUSED_P(publicId);
1111 if (systemId == NULL || ! xcstrcmp(systemId, XCS("bar")))
1112 return XML_STATUS_OK;
1113 if (xcstrcmp(systemId, XCS("foo")))
1114 fail("Unexpected system ID");
1116 if (ext_parser == NULL)
1117 fail("Could note create external entity parser");
1123
1125 return XML_STATUS_OK;
1126}
1127
1128int XMLCALL
1130 const XML_Char *base, const XML_Char *systemId,
1131 const XML_Char *publicId) {
1134
1135 UNUSED_P(base);
1136 UNUSED_P(systemId);
1137 UNUSED_P(publicId);
1139 if (ext_parser == NULL)
1140 fail("Could not create external entity parser.");
1141 /* Use the requested entity parser for further externals */
1144 (int)strlen(test_data->parse_text), XML_TRUE)
1145 == XML_STATUS_ERROR) {
1147 }
1148
1150 return XML_STATUS_OK;
1151}
1152
1153int XMLCALL
1155 const XML_Char *base, const XML_Char *systemId,
1156 const XML_Char *publicId) {
1159
1160 UNUSED_P(base);
1161 UNUSED_P(systemId);
1162 UNUSED_P(publicId);
1164 if (extparser == NULL)
1165 fail("Coulr not create external entity parser");
1166 if (test_data->encoding != NULL) {
1167 if (! XML_SetEncoding(extparser, test_data->encoding))
1168 fail("XML_SetEncoding() ignored for external entity");
1169 }
1171 test_data->parse_len, XML_TRUE)
1172 == XML_STATUS_ERROR) {
1174 }
1175
1177 return XML_STATUS_OK;
1178}
1179
1180int XMLCALL
1182 const XML_Char *base, const XML_Char *systemId,
1183 const XML_Char *publicId) {
1186
1187 UNUSED_P(base);
1188 UNUSED_P(systemId);
1189 UNUSED_P(publicId);
1191 if (extparser == NULL)
1192 fail("Could not create external entity parser");
1193 if (test_data->encoding != NULL) {
1194 if (! XML_SetEncoding(extparser, test_data->encoding))
1195 fail("XML_SetEncoding() ignored for external entity");
1196 }
1198 test_data->parse_len, XML_TRUE)
1200 fail(test_data->fail_text);
1201 if (XML_GetErrorCode(extparser) != test_data->error)
1203
1205 return XML_STATUS_ERROR;
1206}
1207
1208int XMLCALL
1210 const XML_Char *base,
1211 const XML_Char *systemId,
1212 const XML_Char *publicId) {
1213 const char *text = "<!ELEMENT barf ANY>\n"
1214 "<!ATTLIST barf my_attr (blah|%blah;a|foo) #REQUIRED>\n"
1215 "<!--COMMENT-->\n";
1217
1218 UNUSED_P(base);
1219 UNUSED_P(publicId);
1220 if (systemId == NULL)
1221 return XML_STATUS_OK;
1222
1224 if (ext_parser == NULL)
1225 fail("Could not create external entity parser");
1226
1230
1232 return XML_STATUS_OK;
1233}
1234
1235int XMLCALL
1237 const XML_Char *base, const XML_Char *systemId,
1238 const XML_Char *publicId) {
1239 void *user_data = XML_GetUserData(parser);
1240 const char *text;
1241 XML_Parser p2;
1242
1243 UNUSED_P(base);
1244 UNUSED_P(systemId);
1245 UNUSED_P(publicId);
1246 if (user_data == NULL)
1247 text = ("<!ELEMENT doc (e+)>\n"
1248 "<!ATTLIST doc xmlns CDATA #IMPLIED>\n"
1249 "<!ELEMENT e EMPTY>\n");
1250 else
1251 text = ("<?xml version='1.0' encoding='us-ascii'?>"
1252 "<e/>");
1253
1254 /* Set user data to any non-NULL value */
1257 if (_XML_Parse_SINGLE_BYTES(p2, text, (int)strlen(text), XML_TRUE)
1258 == XML_STATUS_ERROR) {
1259 xml_failure(p2);
1260 return XML_STATUS_ERROR;
1261 }
1263 return XML_STATUS_OK;
1264}
1265
1266int XMLCALL
1268 const XML_Char *base, const XML_Char *systemId,
1269 const XML_Char *publicId) {
1271 unsigned int i;
1272 const unsigned int max_alloc_count = 10;
1273
1274 UNUSED_P(base);
1275 UNUSED_P(systemId);
1276 UNUSED_P(publicId);
1277 /* Try a few different allocation levels */
1278 for (i = 0; i < max_alloc_count; i++) {
1281 if (new_parser != NULL) {
1283 break;
1284 }
1285 }
1286 if (i == 0)
1287 fail("External parser creation ignored failing allocator");
1288 else if (i == max_alloc_count)
1289 fail("Extern parser not created with max allocation count");
1290
1291 /* Make sure other random allocation doesn't now fail */
1293
1294 /* Make sure the failure code path is executed too */
1295 return XML_STATUS_ERROR;
1296}
1297
1298int XMLCALL
1300 const XML_Char *base, const XML_Char *systemId,
1301 const XML_Char *publicId) {
1302 int *pcallno = (int *)XML_GetUserData(parser);
1303 int callno = *pcallno;
1304 const char *text;
1306 int i;
1307 const int max_alloc_count = 20;
1308
1309 UNUSED_P(base);
1310 UNUSED_P(systemId);
1311 UNUSED_P(publicId);
1312 if (callno == 0) {
1313 /* First time through, check how many calls to malloc occur */
1314 text = ("<!ELEMENT doc (e+)>\n"
1315 "<!ATTLIST doc xmlns CDATA #IMPLIED>\n"
1316 "<!ELEMENT e EMPTY>\n");
1317 g_allocation_count = 10000;
1319 if (new_parser == NULL) {
1320 fail("Unable to allocate first external parser");
1321 return XML_STATUS_ERROR;
1322 }
1323 /* Stash the number of calls in the user data */
1324 *pcallno = 10000 - g_allocation_count;
1325 } else {
1326 text = ("<?xml version='1.0' encoding='us-ascii'?>"
1327 "<e/>");
1328 /* Try at varying levels to exercise more code paths */
1329 for (i = 0; i < max_alloc_count; i++) {
1332 if (new_parser != NULL)
1333 break;
1334 }
1335 if (i == 0) {
1336 fail("Second external parser unexpectedly created");
1338 return XML_STATUS_ERROR;
1339 } else if (i == max_alloc_count) {
1340 fail("Second external parser not created");
1341 return XML_STATUS_ERROR;
1342 }
1343 }
1344
1347 == XML_STATUS_ERROR) {
1349 return XML_STATUS_ERROR;
1350 }
1352 return XML_STATUS_OK;
1353}
1354
1355int XMLCALL
1357 const XML_Char *base, const XML_Char *systemId,
1358 const XML_Char *publicId) {
1359 int *pcallno = (int *)XML_GetUserData(parser);
1360 int callno = *pcallno;
1361 const char *text;
1363 enum XML_Status rv;
1364
1365 UNUSED_P(base);
1366 UNUSED_P(systemId);
1367 UNUSED_P(publicId);
1368 if (callno == 0) {
1369 /* Try different allocation levels for whole exercise */
1370 text = ("<!ELEMENT doc (e+)>\n"
1371 "<!ATTLIST doc xmlns CDATA #IMPLIED>\n"
1372 "<!ELEMENT e EMPTY>\n");
1373 *pcallno = 1;
1375 if (new_parser == NULL)
1376 return XML_STATUS_ERROR;
1377 rv = _XML_Parse_SINGLE_BYTES(new_parser, text, (int)strlen(text), XML_TRUE);
1378 } else {
1379 /* Just run through once */
1380 text = ("<?xml version='1.0' encoding='us-ascii'?>"
1381 "<e/>");
1383 if (new_parser == NULL)
1384 return XML_STATUS_ERROR;
1385 rv = _XML_Parse_SINGLE_BYTES(new_parser, text, (int)strlen(text), XML_TRUE);
1386 }
1388 if (rv == XML_STATUS_ERROR)
1389 return XML_STATUS_ERROR;
1390 return XML_STATUS_OK;
1391}
1392
1393int XMLCALL
1395 const XML_Char *base,
1396 const XML_Char *systemId,
1397 const XML_Char *publicId) {
1398 /* As for external_entity_loader() */
1399 const char *text = "<?xml encoding='iso-8859-3'?>"
1400 "\xC3\xA9";
1402 enum XML_Status status;
1403
1404 UNUSED_P(base);
1405 UNUSED_P(systemId);
1406 UNUSED_P(publicId);
1408 if (ext_parser == NULL)
1409 return XML_STATUS_ERROR;
1410 if (! XML_SetEncoding(ext_parser, XCS("utf-8"))) {
1412 return XML_STATUS_ERROR;
1413 }
1414 status
1417 if (status == XML_STATUS_ERROR)
1418 return XML_STATUS_ERROR;
1419 return XML_STATUS_OK;
1420}
1421
1422int XMLCALL
1424 const XML_Char *base, const XML_Char *systemId,
1425 const XML_Char *publicId) {
1426 const char *text = get_buffer_test_text;
1428 void *buffer;
1429 enum XML_Status status;
1430
1431 UNUSED_P(base);
1432 UNUSED_P(systemId);
1433 UNUSED_P(publicId);
1435 if (ext_parser == NULL)
1436 fail("Could not create external entity parser");
1437
1440 if (buffer == NULL)
1441 fail("Buffer allocation failed");
1442 assert(buffer != NULL);
1443 memcpy(buffer, text, strlen(text));
1448}
1449
1450int XMLCALL
1452 const XML_Char *base, const XML_Char *systemId,
1453 const XML_Char *publicId) {
1454 const char *text = (const char *)XML_GetUserData(parser);
1456 int parse_res;
1457
1458 UNUSED_P(base);
1459 UNUSED_P(systemId);
1460 UNUSED_P(publicId);
1462 if (ext_parser == NULL)
1463 return XML_STATUS_ERROR;
1464 parse_res
1467 return parse_res;
1468}
1469
1470int XMLCALL
1472 const XML_Char *context,
1473 const XML_Char *base,
1474 const XML_Char *systemId,
1475 const XML_Char *publicId) {
1476 UNUSED_P(base);
1477 UNUSED_P(systemId);
1478 UNUSED_P(publicId);
1479
1480 if (context != NULL)
1481 fail("Unexpected non-NULL context");
1482
1483 // The following number intends to fail the upcoming allocation in line
1484 // "parser->m_protocolEncodingName = copyString(encodingName,
1485 // &(parser->m_mem));" in function parserInit.
1487
1488 const XML_Char *const encodingName = XCS("UTF-8"); // needs something non-NULL
1491 if (ext_parser != NULL)
1492 fail(
1493 "Call to XML_ExternalEntityParserCreate was expected to fail out-of-memory");
1494
1496 return XML_STATUS_ERROR;
1497}
1498
1499#if XML_GE == 1
1500int
1502 const XML_Char *context,
1503 const XML_Char *base,
1504 const XML_Char *systemId,
1505 const XML_Char *publicId) {
1506 UNUSED_P(base);
1507 UNUSED_P(publicId);
1508
1509 const struct AccountingTestCase *const testCase
1510 = (const struct AccountingTestCase *)XML_GetUserData(parser);
1511
1512 const char *externalText = NULL;
1513 if (xcstrcmp(systemId, XCS("first.ent")) == 0) {
1515 } else if (xcstrcmp(systemId, XCS("second.ent")) == 0) {
1516 externalText = testCase->secondExternalText;
1517 } else {
1518 assert(! "systemId is neither \"first.ent\" nor \"second.ent\"");
1519 }
1521
1524
1527
1529 return status;
1530}
1531#endif /* XML_GE == 1 */
1532
1533/* NotStandalone handlers */
1534
1535int XMLCALL
1537 UNUSED_P(userData);
1538 return XML_STATUS_ERROR;
1539}
1540
1541int XMLCALL
1543 UNUSED_P(userData);
1544 return XML_STATUS_OK;
1545}
1546
1547/* Attribute List handlers */
1548void XMLCALL
1549verify_attlist_decl_handler(void *userData, const XML_Char *element_name,
1550 const XML_Char *attr_name,
1551 const XML_Char *attr_type,
1552 const XML_Char *default_value, int is_required) {
1553 AttTest *at = (AttTest *)userData;
1554
1555 if (xcstrcmp(element_name, at->element_name))
1556 fail("Unexpected element name in attribute declaration");
1557 if (xcstrcmp(attr_name, at->attr_name))
1558 fail("Unexpected attribute name in attribute declaration");
1559 if (xcstrcmp(attr_type, at->attr_type))
1560 fail("Unexpected attribute type in attribute declaration");
1561 if ((default_value == NULL && at->default_value != NULL)
1562 || (default_value != NULL && at->default_value == NULL)
1563 || (default_value != NULL && xcstrcmp(default_value, at->default_value)))
1564 fail("Unexpected default value in attribute declaration");
1565 if (is_required != at->is_required)
1566 fail("Requirement mismatch in attribute declaration");
1567}
1568
1569/* Character Data handlers */
1570
1571void XMLCALL
1573 int len) {
1574 UNUSED_P(userData);
1575 UNUSED_P(s);
1576 UNUSED_P(len);
1579}
1580
1581void XMLCALL
1582parser_stop_character_handler(void *userData, const XML_Char *s, int len) {
1583 UNUSED_P(userData);
1584 UNUSED_P(s);
1585 UNUSED_P(len);
1588 if (status.parsing == XML_FINISHED) {
1589 return; // the parser was stopped by a previous call to this handler.
1590 }
1593 if (! g_resumable) {
1594 /* Check that aborting an aborted parser is faulted */
1596 fail("Aborting aborted parser not faulted");
1599 } else if (g_abortable) {
1600 /* Check that aborting a suspended parser works */
1603 } else {
1604 /* Check that suspending a suspended parser works */
1606 fail("Suspending suspended parser not faulted");
1609 }
1610}
1611
1612void XMLCALL
1613cr_cdata_handler(void *userData, const XML_Char *s, int len) {
1614 int *pfound = (int *)userData;
1615
1616 /* Internal processing turns the CR into a newline for the
1617 * character data handler, but not for the default handler
1618 */
1619 if (len == 1 && (*s == XCS('\n') || *s == XCS('\r')))
1620 *pfound = 1;
1621}
1622
1623void XMLCALL
1624rsqb_handler(void *userData, const XML_Char *s, int len) {
1625 int *pfound = (int *)userData;
1626
1627 if (len == 1 && *s == XCS(']'))
1628 *pfound = 1;
1629}
1630
1631void XMLCALL
1632byte_character_handler(void *userData, const XML_Char *s, int len) {
1633#if XML_CONTEXT_BYTES > 0
1634 int offset, size;
1635 const char *buffer;
1636 ByteTestData *data = (ByteTestData *)userData;
1637
1638 UNUSED_P(s);
1640 if (buffer == NULL)
1641 fail("Failed to get context buffer");
1642 if (offset != data->start_element_len)
1643 fail("Context offset in unexpected position");
1644 if (len != data->cdata_len)
1645 fail("CDATA length reported incorrectly");
1646 if (size != data->total_string_len)
1647 fail("Context size is not full buffer");
1649 fail("Character byte index incorrect");
1651 fail("Character byte count incorrect");
1652#else
1653 UNUSED_P(s);
1654 UNUSED_P(userData);
1655 UNUSED_P(len);
1656#endif
1657}
1658
1659void XMLCALL
1660ext2_accumulate_characters(void *userData, const XML_Char *s, int len) {
1661 ExtTest2 *test_data = (ExtTest2 *)userData;
1663}
1664
1665/* Handlers that record their function name and int arg. */
1666
1667static void
1668record_call(struct handler_record_list *const rec, const char *funcname,
1669 const int arg) {
1670 const int max_entries = sizeof(rec->entries) / sizeof(rec->entries[0]);
1671 assert_true(rec->count < max_entries);
1672 struct handler_record_entry *const e = &rec->entries[rec->count++];
1673 e->name = funcname;
1674 e->arg = arg;
1675}
1676
1677void XMLCALL
1678record_default_handler(void *userData, const XML_Char *s, int len) {
1679 UNUSED_P(s);
1680 record_call((struct handler_record_list *)userData, __func__, len);
1681}
1682
1683void XMLCALL
1684record_cdata_handler(void *userData, const XML_Char *s, int len) {
1685 UNUSED_P(s);
1686 record_call((struct handler_record_list *)userData, __func__, len);
1688}
1689
1690void XMLCALL
1691record_cdata_nodefault_handler(void *userData, const XML_Char *s, int len) {
1692 UNUSED_P(s);
1693 record_call((struct handler_record_list *)userData, __func__, len);
1694}
1695
1696void XMLCALL
1698 int is_parameter_entity) {
1700 record_call((struct handler_record_list *)userData, __func__,
1702}
1703
1704void XMLCALL
1706 const XML_Char **atts) {
1707 UNUSED_P(atts);
1708 CharData_AppendXMLChars((CharData *)userData, name, (int)xcstrlen(name));
1709}
1710
1711void XMLCALL
1713 CharData *storage = (CharData *)userData;
1714
1717}
1718
1719const struct handler_record_entry *
1721 const char *file, int line) {
1722 if (storage->count <= index) {
1723 _fail(file, line, "too few handler calls");
1724 }
1725 return &storage->entries[index];
1726}
1727
1728/* Entity Declaration Handlers */
1732
1733void XMLCALL
1736 int value_length, const XML_Char *base,
1737 const XML_Char *systemId, const XML_Char *publicId,
1738 const XML_Char *notationName) {
1739 UNUSED_P(userData);
1740 UNUSED_P(base);
1741 UNUSED_P(systemId);
1742 UNUSED_P(publicId);
1743 UNUSED_P(notationName);
1746 return;
1747 }
1749 /* The cast here is safe because we control the horizontal and
1750 * the vertical, and we therefore know our strings are never
1751 * going to overflow an int.
1752 */
1756 } else {
1758 }
1759 }
1760 /* Else leave the match flag alone */
1761}
1762
1763void
1769
1770int
1774
1775/* Misc handlers */
1776
1777void XMLCALL
1778xml_decl_handler(void *userData, const XML_Char *version,
1779 const XML_Char *encoding, int standalone) {
1780 UNUSED_P(version);
1782 if (userData != g_handler_data)
1783 fail("User data (xml decl) not correctly set");
1784 if (standalone != -1)
1785 fail("Standalone not flagged as not present in XML decl");
1786 g_xdecl_count++;
1787}
1788
1789void XMLCALL
1791 int is_parameter_entity) {
1794 if (userData != g_handler_data)
1795 fail("User data (skip) not correctly set");
1796 g_skip_count++;
1797}
1798
1799void XMLCALL
1801 UNUSED_P(data);
1802 /* Check that the userData passed through is what we expect */
1803 if (userData != g_handler_data)
1804 fail("User data (parser) not correctly set");
1805 /* Check that the user data in the parser is appropriate */
1806 if (XML_GetUserData(userData) != (void *)1)
1807 fail("User data in parser not correctly set");
1809}
1810
1811void XMLCALL
1812selective_aborting_default_handler(void *userData, const XML_Char *s, int len) {
1813 const XML_Char trigger_char = *(const XML_Char *)userData;
1814
1815 int found = 0;
1816 for (int i = 0; i < len; ++i) {
1817 if (s[i] == trigger_char) {
1818 found = 1;
1819 break;
1820 }
1821 }
1822
1823 if (found) {
1826 }
1827}
1828
1829void XMLCALL
1831 UNUSED_P(data);
1832 XML_Parser parser = (XML_Parser)userData;
1834}
1835
1836void XMLCALL
1837element_decl_suspender(void *userData, const XML_Char *name,
1838 XML_Content *model) {
1839 UNUSED_P(userData);
1840 UNUSED_P(name);
1843}
1844
1845void XMLCALL
1846accumulate_pi_characters(void *userData, const XML_Char *target,
1847 const XML_Char *data) {
1848 CharData *storage = (CharData *)userData;
1849
1850 CharData_AppendXMLChars(storage, target, -1);
1854}
1855
1856void XMLCALL
1857accumulate_comment(void *userData, const XML_Char *data) {
1858 CharData *storage = (CharData *)userData;
1859
1861}
1862
1863void XMLCALL
1866 int value_length, const XML_Char *base,
1867 const XML_Char *systemId, const XML_Char *publicId,
1868 const XML_Char *notationName) {
1869 CharData *storage = (CharData *)userData;
1870
1872 UNUSED_P(base);
1873 UNUSED_P(systemId);
1874 UNUSED_P(publicId);
1875 UNUSED_P(notationName);
1878 if (value == NULL)
1879 CharData_AppendXMLChars(storage, XCS("(null)"), -1);
1880 else
1883}
1884
1885void XMLCALL
1887 const XML_Char **atts) {
1888 CharData *const storage = (CharData *)userData;
1891
1892 if ((atts != NULL) && (atts[0] != NULL)) {
1894 while (atts[0] != NULL) {
1895 CharData_AppendXMLChars(storage, atts[0], -1);
1897 CharData_AppendXMLChars(storage, atts[1], -1);
1898 atts += 2;
1899 if (atts[0] != NULL) {
1901 }
1902 }
1904 }
1905
1907}
1908
1909void XMLCALL
1910accumulate_characters(void *userData, const XML_Char *s, int len) {
1911 CharData *const storage = (CharData *)userData;
1913}
1914
1915void XMLCALL
1916accumulate_attribute(void *userData, const XML_Char *name,
1917 const XML_Char **atts) {
1918 CharData *const storage = (CharData *)userData;
1919 UNUSED_P(name);
1920 /* Check there are attributes to deal with */
1921 if (atts == NULL)
1922 return;
1923
1924 while (storage->count < 0 && atts[0] != NULL) {
1925 /* "accumulate" the value of the first attribute we see */
1926 CharData_AppendXMLChars(storage, atts[1], -1);
1927 atts += 2;
1928 }
1929}
1930
1931void XMLCALL
1932ext_accumulate_characters(void *userData, const XML_Char *s, int len) {
1933 ExtTest *const test_data = (ExtTest *)userData;
1935}
1936
1937void XMLCALL
1938checking_default_handler(void *userData, const XML_Char *s, int len) {
1939 DefaultCheck *data = (DefaultCheck *)userData;
1940 int i;
1941
1942 for (i = 0; data[i].expected != NULL; i++) {
1943 if (data[i].expectedLen == len
1944 && ! memcmp(data[i].expected, s, len * sizeof(XML_Char))) {
1945 data[i].seen = XML_TRUE;
1946 break;
1947 }
1948 }
1949}
1950
1951void XMLCALL
const char apr_size_t len
Definition ap_regex.h:187
int g_reallocation_count
Definition common.c:276
enum XML_Status _XML_Parse_SINGLE_BYTES(XML_Parser parser, const char *s, int len, int isFinal)
Definition common.c:193
XML_Bool g_abortable
Definition common.c:141
const char * get_buffer_test_text
Definition common.c:112
int g_allocation_count
Definition common.c:275
XML_Bool g_resumable
Definition common.c:138
#define ALLOC_ALWAYS_SUCCEED
Definition common.c:272
void CharData_Init(CharData *storage)
Definition chardata.c:61
int CharData_CheckXMLChars(CharData *storage, const XML_Char *expected)
Definition chardata.c:87
void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len)
Definition chardata.c:67
#define xcstrncmp(s, t, n)
Definition common.h:76
#define XCS(s)
Definition common.h:77
XML_Parser g_parser
Definition runtests.c:62
#define xcstrcmp(s, t)
Definition common.h:75
#define xml_failure(parser)
Definition common.h:99
#define xcstrlen(s)
Definition common.h:74
return found
Definition core.c:2840
#define XML_FMT_STR
int XML_GetCurrentByteCount(XML_Parser parser)
Definition xmlparse.c:2335
#define XML_FALSE
Definition expat.h:59
void XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status)
Definition xmlparse.c:2310
int XML_GetSpecifiedAttributeCount(XML_Parser parser)
Definition xmlparse.c:1668
@ XML_SUSPENDED
Definition expat.h:845
@ XML_FINISHED
Definition expat.h:845
@ XML_INITIALIZED
Definition expat.h:845
#define XML_STATUS_ERROR
Definition expat.h:76
int XML_GetIdAttributeIndex(XML_Parser parser)
Definition xmlparse.c:1675
XML_Index XML_GetCurrentByteIndex(XML_Parser parser)
Definition xmlparse.c:2325
enum XML_Status XML_SetEncoding(XML_Parser parser, const XML_Char *encoding)
Definition xmlparse.c:1327
void XML_SetStartElementHandler(XML_Parser parser, XML_StartElementHandler handler)
Definition xmlparse.c:1700
void XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl)
Definition xmlparse.c:1871
void XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler)
Definition xmlparse.c:1831
void XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler)
Definition xmlparse.c:1712
XML_Bool XML_ParserReset(XML_Parser parser, const XML_Char *encoding)
Definition xmlparse.c:1286
XML_Error
Definition expat.h:83
@ XML_ERROR_ASYNC_ENTITY
Definition expat.h:97
@ XML_ERROR_ABORTED
Definition expat.h:121
@ XML_ERROR_XML_DECL
Definition expat.h:116
@ XML_ERROR_NOT_STANDALONE
Definition expat.h:106
@ XML_ERROR_TEXT_DECL
Definition expat.h:117
@ XML_ERROR_SUSPENDED
Definition expat.h:119
@ XML_ERROR_EXTERNAL_ENTITY_HANDLING
Definition expat.h:105
@ XML_ERROR_NONE
Definition expat.h:84
@ XML_ERROR_FINISHED
Definition expat.h:122
@ XML_ERROR_SUSPEND_PE
Definition expat.h:123
@ XML_ERROR_SYNTAX
Definition expat.h:86
#define XML_STATUS_SUSPENDED
enum XML_Status XML_StopParser(XML_Parser parser, XML_Bool resumable)
Definition xmlparse.c:2234
enum XML_Error XML_GetErrorCode(XML_Parser parser)
Definition xmlparse.c:2318
#define XML_GetUserData(parser)
Definition expat.h:683
void XML_ParserFree(XML_Parser parser)
Definition xmlparse.c:1537
void XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler)
Definition xmlparse.c:1756
XML_Size XML_GetCurrentLineNumber(XML_Parser parser)
Definition xmlparse.c:2364
struct XML_ParserStruct * XML_Parser
Definition expat.h:55
XML_Size XML_GetCurrentColumnNumber(XML_Parser parser)
Definition xmlparse.c:2376
void XML_SetUserData(XML_Parser parser, void *userData)
Definition xmlparse.c:1637
#define XML_STATUS_OK
Definition expat.h:78
void XML_FreeContentModel(XML_Parser parser, XML_Content *model)
Definition xmlparse.c:2388
enum XML_Status XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
Definition xmlparse.c:2037
void XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler)
Definition xmlparse.c:1838
void XML_DefaultCurrent(XML_Parser parser)
Definition xmlparse.c:2414
void XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler xmldecl)
Definition xmlparse.c:1889
const char * XML_GetInputContext(XML_Parser parser, int *offset, int *size)
Definition xmlparse.c:2344
void * XML_GetBuffer(XML_Parser parser, int len)
Definition xmlparse.c:2108
enum XML_Status XML_ResumeParser(XML_Parser parser)
Definition xmlparse.c:2270
#define XML_TRUE
Definition expat.h:58
XML_Status
Definition expat.h:74
XML_Parser XML_ExternalEntityParserCreate(XML_Parser parser, const XML_Char *context, const XML_Char *encoding)
Definition xmlparse.c:1354
char XML_Char
#define XMLCALL
ap_conf_vector_t * base
apr_md5_ctx_t * context
Definition util_md5.h:58
void const char * arg
Definition http_vhost.h:63
unsigned int count
Definition apr_md5.h:152
apr_bucket * e
apr_pool_t const char apr_dbd_t const char ** error
Definition apr_dbd.h:143
apr_redis_t * rc
Definition apr_redis.h:173
const char * uri
Definition apr_uri.h:159
apr_text_header const char * text
Definition apr_xml.h:78
apr_xml_parser ** parser
Definition apr_xml.h:228
apr_size_t size
const char * value
Definition apr_env.h:51
apr_seek_where_t apr_off_t * offset
void * data
const char apr_file_t * file
char * buffer
void * rec
Definition apr_hash.h:270
const char apr_uint32_t * id
const char * s
Definition apr_strings.h:95
const char const char *const const char *const apr_procattr_t * attr
int int status
void XMLCALL start_element_fail(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:241
int XMLCALL external_entity_param_checker(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:788
void XMLCALL entity_suspending_xdecl_handler(void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
Definition handlers.c:589
int XMLCALL external_entity_devaluer(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1100
int g_triplet_start_flag
Definition handlers.c:181
int XMLCALL external_entity_param(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:839
const void * g_handler_data
Definition handlers.c:63
int XMLCALL external_entity_loader2(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1154
int XMLCALL external_entity_rsqb_catcher(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:737
void XMLCALL cr_cdata_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1613
int XMLCALL MiscEncodingHandler(void *data, const XML_Char *encoding, XML_Encoding *info)
Definition handlers.c:349
void XMLCALL data_check_comment_handler(void *userData, const XML_Char *data)
Definition handlers.c:1800
static int XMLCALL prefix_converter(void *data, const char *s)
Definition handlers.c:339
void XMLCALL accumulate_characters(void *userData, const XML_Char *s, int len)
Definition handlers.c:1910
int XMLCALL external_entity_failer__if_not_xml_ge(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:675
int XMLCALL external_entity_cr_catcher(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:693
int XMLCALL external_entity_valuer(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:953
int XMLCALL external_entity_optioner(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:413
void XMLCALL ext_accumulate_characters(void *userData, const XML_Char *s, int len)
Definition handlers.c:1932
int get_param_entity_match_flag(void)
Definition handlers.c:1771
void XMLCALL rsqb_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1624
int XMLCALL external_entity_duff_loader(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1267
void XMLCALL element_decl_suspender(void *userData, const XML_Char *name, XML_Content *model)
Definition handlers.c:1837
int XMLCALL external_entity_loader(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:439
void XMLCALL record_element_start_handler(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:1705
int XMLCALL long_encoding_handler(void *userData, const XML_Char *encoding, XML_Encoding *info)
Definition handlers.c:396
int XMLCALL external_entity_load_ignore(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:880
int g_xdecl_count
Definition handlers.c:69
int XMLCALL external_entity_reallocator(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1423
int XMLCALL external_entity_not_standalone(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:999
void XMLCALL param_check_skip_handler(void *userData, const XML_Char *entityName, int is_parameter_entity)
Definition handlers.c:1790
int XMLCALL external_entity_oneshot_loader(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1129
void XMLCALL start_element_issue_240(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:260
void XMLCALL record_cdata_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1684
int XMLCALL external_entity_value_aborter(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1036
int g_triplet_end_flag
Definition handlers.c:182
void XMLCALL record_element_end_handler(void *userData, const XML_Char *name)
Definition handlers.c:1712
void XMLCALL accumulate_start_element(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:1886
void XMLCALL accumulate_attribute(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:1916
int g_comment_count
Definition handlers.c:65
int XMLCALL external_entity_alloc(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1451
void XMLCALL xml_decl_handler(void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
Definition handlers.c:1778
int XMLCALL external_entity_bad_cr_catcher(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:714
int XMLCALL external_entity_unfinished_attlist(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1209
int XMLCALL external_entity_suspend_xmldecl(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:601
void XMLCALL triplet_end_checker(void *userData, const XML_Char *name)
Definition handlers.c:207
int XMLCALL UnrecognisedEncodingHandler(void *data, const XML_Char *encoding, XML_Encoding *info)
Definition handlers.c:303
int XMLCALL external_entity_public(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1073
void XMLCALL accumulate_entity_decl(void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
Definition handlers.c:1864
void XMLCALL accumulate_pi_characters(void *userData, const XML_Char *target, const XML_Char *data)
Definition handlers.c:1846
static void dummy_release(void *data)
Definition handlers.c:298
void XMLCALL entity_suspending_decl_handler(void *userData, const XML_Char *name, XML_Content *model)
Definition handlers.c:551
static int entity_match_flag
Definition handlers.c:1731
void XMLCALL accumulate_comment(void *userData, const XML_Char *data)
Definition handlers.c:1857
void XMLCALL selective_aborting_default_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1812
int XMLCALL external_entity_alloc_set_encoding(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1394
static void record_call(struct handler_record_list *const rec, const char *funcname, const int arg)
Definition handlers.c:1668
static int XMLCALL failing_converter(void *data, const char *s)
Definition handlers.c:331
void XMLCALL end_element_issue_240(void *userData, const XML_Char *name)
Definition handlers.c:269
void XMLCALL overwrite_end_checker(void *userData, const XML_Char *name)
Definition handlers.c:233
int XMLCALL external_entity_dbl_handler_2(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1356
void XMLCALL end_element_event_handler(void *userData, const XML_Char *name)
Definition handlers.c:81
void XMLCALL byte_character_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1632
void XMLCALL end_element_event_handler2(void *userData, const XML_Char *name)
Definition handlers.c:97
int XMLCALL external_entity_faulter2(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1181
static const XML_Char * entity_value_to_match
Definition handlers.c:1730
int XMLCALL external_entity_good_cdata_ascii(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:760
void XMLCALL param_entity_match_handler(void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
Definition handlers.c:1734
int XMLCALL UnknownEncodingHandler(void *data, const XML_Char *encoding, XML_Encoding *info)
Definition handlers.c:282
int XMLCALL external_entity_parser_create_alloc_fail_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1471
int XMLCALL external_entity_null_loader(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:494
static const XML_Char * entity_name_to_match
Definition handlers.c:1729
int XMLCALL unknown_released_encoding_handler(void *data, const XML_Char *encoding, XML_Encoding *info)
Definition handlers.c:314
void XMLCALL clearing_aborting_character_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1572
int XMLCALL accept_not_standalone_handler(void *userData)
Definition handlers.c:1542
int XMLCALL external_entity_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1236
void XMLCALL suspending_comment_handler(void *userData, const XML_Char *data)
Definition handlers.c:1830
const struct handler_record_entry * _handler_record_get(const struct handler_record_list *storage, int index, const char *file, int line)
Definition handlers.c:1720
void XMLCALL record_cdata_nodefault_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1691
int XMLCALL external_entity_load_ignore_utf16(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:901
void XMLCALL ext2_accumulate_characters(void *userData, const XML_Char *s, int len)
Definition handlers.c:1660
int XMLCALL reject_not_standalone_handler(void *userData)
Definition handlers.c:1536
void XMLCALL verify_attlist_decl_handler(void *userData, const XML_Char *element_name, const XML_Char *attr_name, const XML_Char *attr_type, const XML_Char *default_value, int is_required)
Definition handlers.c:1549
int XMLCALL external_entity_suspender(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:565
int XMLCALL external_entity_load_ignore_utf16_be(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:927
int XMLCALL external_entity_suspending_faulter(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:638
int g_skip_count
Definition handlers.c:67
void XMLCALL start_element_suspender(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:166
void param_entity_match_init(const XML_Char *name, const XML_Char *value)
Definition handlers.c:1764
void XMLCALL counting_start_element_handler(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:104
void XMLCALL checking_default_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1938
int XMLCALL external_entity_faulter(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:466
void XMLCALL parser_stop_character_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1582
void XMLCALL overwrite_start_checker(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:219
int XMLCALL external_entity_dbl_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:1299
void XMLCALL triplet_start_checker(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:185
void XMLCALL accumulate_and_suspend_comment_handler(void *userData, const XML_Char *data)
Definition handlers.c:1952
void XMLCALL start_ns_clearing_start_element(void *userData, const XML_Char *prefix, const XML_Char *uri)
Definition handlers.c:252
void XMLCALL record_default_handler(void *userData, const XML_Char *s, int len)
Definition handlers.c:1678
void XMLCALL start_element_event_handler(void *userData, const XML_Char *name, const XML_Char **atts)
Definition handlers.c:74
int XMLCALL external_entity_ref_param_checker(XML_Parser parameter, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:813
void XMLCALL suspending_end_handler(void *userData, const XML_Char *s)
Definition handlers.c:160
int XMLCALL external_entity_resetter(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition handlers.c:506
void XMLCALL start_element_event_handler2(void *userData, const XML_Char *name, const XML_Char **attr)
Definition handlers.c:88
void XMLCALL record_skip_handler(void *userData, const XML_Char *entityName, int is_parameter_entity)
Definition handlers.c:1697
#define ENTITY_MATCH_SUCCESS
Definition handlers.h:525
#define ENTITY_MATCH_NOT_FOUND
Definition handlers.h:524
int accounting_external_entity_ref_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
#define STRUCT_START_TAG
Definition handlers.h:73
#define STRUCT_END_TAG
Definition handlers.h:74
#define ENTITY_MATCH_FAIL
Definition handlers.h:523
#define UNUSED_P(p)
Definition internal.h:137
void _fail(const char *file, int line, const char *msg)
Definition minicheck.c:247
#define fail(msg)
Definition minicheck.h:87
#define assert_true(cond)
Definition minicheck.h:88
static const ap_slotmem_provider_t * storage
return NULL
Definition mod_so.c:359
int i
Definition mod_so.c:347
char * name
const char * firstExternalText
Definition handlers.h:417
const XML_Char * system_id
Definition handlers.h:165
const char * parse_text
Definition handlers.h:166
void StructData_AddItem(StructData *storage, const XML_Char *s, int data0, int data1, int data2)
Definition structdata.c:80
XML_Bool seen
Definition handlers.h:588
Definition handlers.h:477
typedef int(WSAAPI *apr_winapi_fpt_WSAPoll)(IN OUT LPWSAPOLLFD fdArray
INT info