summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr65240.h
blob: 6b9c8c0469ddd5d83d6c8bf3eca2a71a847e34be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
// -*- C++ -*-

#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include <ctype.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <sys/types.h>
#include <time.h>
#include <signal.h>
#include <pthread.h>

void xmlCheckVersion (int version);
typedef unsigned char xmlChar;
xmlChar *xmlStrdup (const xmlChar * cur);
xmlChar *xmlStrndup (const xmlChar * cur, int len);
xmlChar *xmlCharStrndup (const char *cur, int len);
xmlChar *xmlCharStrdup (const char *cur);
xmlChar *xmlStrsub (const xmlChar * str, int start, int len);
const xmlChar *xmlStrchr (const xmlChar * str, xmlChar val);
const xmlChar *xmlStrstr (const xmlChar * str, const xmlChar * val);
const xmlChar *xmlStrcasestr (const xmlChar * str, const xmlChar * val);
int xmlStrcmp (const xmlChar * str1, const xmlChar * str2);
int xmlStrncmp (const xmlChar * str1, const xmlChar * str2, int len);
int xmlStrcasecmp (const xmlChar * str1, const xmlChar * str2);
int xmlStrncasecmp (const xmlChar * str1, const xmlChar * str2, int len);
int xmlStrEqual (const xmlChar * str1, const xmlChar * str2);
int xmlStrQEqual (const xmlChar * pref,
		  const xmlChar * name, const xmlChar * str);
int xmlStrlen (const xmlChar * str);
xmlChar *xmlStrcat (xmlChar * cur, const xmlChar * add);
xmlChar *xmlStrncat (xmlChar * cur, const xmlChar * add, int len);
xmlChar *xmlStrncatNew (const xmlChar * str1, const xmlChar * str2, int len);
int xmlStrPrintf (xmlChar * buf, int len, const xmlChar * msg, ...);
int xmlStrVPrintf (xmlChar * buf, int len, const xmlChar * msg, va_list ap);
int xmlGetUTF8Char (const unsigned char *utf, int *len);
int xmlCheckUTF8 (const unsigned char *utf);
int xmlUTF8Strsize (const xmlChar * utf, int len);
xmlChar *xmlUTF8Strndup (const xmlChar * utf, int len);
const xmlChar *xmlUTF8Strpos (const xmlChar * utf, int pos);
int xmlUTF8Strloc (const xmlChar * utf, const xmlChar * utfchar);
xmlChar *xmlUTF8Strsub (const xmlChar * utf, int start, int len);
int xmlUTF8Strlen (const xmlChar * utf);
int xmlUTF8Size (const xmlChar * utf);
int xmlUTF8Charcmp (const xmlChar * utf1, const xmlChar * utf2);

typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
typedef struct _xmlOutputBuffer xmlOutputBuffer;
typedef xmlOutputBuffer *xmlOutputBufferPtr;
typedef struct _xmlParserInput xmlParserInput;
typedef xmlParserInput *xmlParserInputPtr;
typedef struct _xmlParserCtxt xmlParserCtxt;
typedef xmlParserCtxt *xmlParserCtxtPtr;
typedef struct _xmlSAXLocator xmlSAXLocator;
typedef xmlSAXLocator *xmlSAXLocatorPtr;
typedef struct _xmlSAXHandler xmlSAXHandler;
typedef xmlSAXHandler *xmlSAXHandlerPtr;
typedef struct _xmlEntity xmlEntity;
typedef xmlEntity *xmlEntityPtr;

typedef enum
{
  XML_BUFFER_ALLOC_DOUBLEIT,
  XML_BUFFER_ALLOC_EXACT,
  XML_BUFFER_ALLOC_IMMUTABLE,
  XML_BUFFER_ALLOC_IO,
  XML_BUFFER_ALLOC_HYBRID
} xmlBufferAllocationScheme;

typedef struct _xmlBuffer xmlBuffer;
typedef xmlBuffer *xmlBufferPtr;

struct _xmlBuffer
{
  xmlChar *content;
  unsigned int use;
  unsigned int size;
  xmlBufferAllocationScheme alloc;
  xmlChar *contentIO;
};

typedef struct _xmlBuf xmlBuf;
typedef xmlBuf *xmlBufPtr;

xmlChar *xmlBufContent (const xmlBuf * buf);
xmlChar *xmlBufEnd (xmlBufPtr buf);
size_t xmlBufUse (const xmlBufPtr buf);
size_t xmlBufShrink (xmlBufPtr buf, size_t len);

typedef enum
{
  XML_ELEMENT_NODE = 1,
  XML_ATTRIBUTE_NODE = 2,
  XML_TEXT_NODE = 3,
  XML_CDATA_SECTION_NODE = 4,
  XML_ENTITY_REF_NODE = 5,
  XML_ENTITY_NODE = 6,
  XML_PI_NODE = 7,
  XML_COMMENT_NODE = 8,
  XML_DOCUMENT_NODE = 9,
  XML_DOCUMENT_TYPE_NODE = 10,
  XML_DOCUMENT_FRAG_NODE = 11,
  XML_NOTATION_NODE = 12,
  XML_HTML_DOCUMENT_NODE = 13,
  XML_DTD_NODE = 14,
  XML_ELEMENT_DECL = 15,
  XML_ATTRIBUTE_DECL = 16,
  XML_ENTITY_DECL = 17,
  XML_NAMESPACE_DECL = 18,
  XML_XINCLUDE_START = 19,
  XML_XINCLUDE_END = 20, XML_DOCB_DOCUMENT_NODE = 21
} xmlElementType;

typedef struct _xmlNotation xmlNotation;
typedef xmlNotation *xmlNotationPtr;

struct _xmlNotation
{
  const xmlChar *name;
  const xmlChar *PublicID;
  const xmlChar *SystemID;
};

typedef enum
{
  XML_ATTRIBUTE_CDATA = 1,
  XML_ATTRIBUTE_ID,
  XML_ATTRIBUTE_IDREF,
  XML_ATTRIBUTE_IDREFS,
  XML_ATTRIBUTE_ENTITY,
  XML_ATTRIBUTE_ENTITIES,
  XML_ATTRIBUTE_NMTOKEN,
  XML_ATTRIBUTE_NMTOKENS,
  XML_ATTRIBUTE_ENUMERATION,
  XML_ATTRIBUTE_NOTATION
} xmlAttributeType;

typedef enum
{
  XML_ATTRIBUTE_NONE = 1,
  XML_ATTRIBUTE_REQUIRED,
  XML_ATTRIBUTE_IMPLIED,
  XML_ATTRIBUTE_FIXED
} xmlAttributeDefault;

typedef struct _xmlEnumeration xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr;

struct _xmlEnumeration
{
  struct _xmlEnumeration *next;
  const xmlChar *name;
};

typedef struct _xmlAttribute xmlAttribute;
typedef xmlAttribute *xmlAttributePtr;
struct _xmlAttribute
{
  void *_private;
  xmlElementType type;
  const xmlChar *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlDtd *parent;
  struct _xmlNode *next;
  struct _xmlNode *prev;
  struct _xmlDoc *doc;

  struct _xmlAttribute *nexth;
  xmlAttributeType atype;
  xmlAttributeDefault def;
  const xmlChar *defaultValue;
  xmlEnumerationPtr tree;
  const xmlChar *prefix;
  const xmlChar *elem;
};

typedef enum
{
  XML_ELEMENT_CONTENT_PCDATA = 1,
  XML_ELEMENT_CONTENT_ELEMENT,
  XML_ELEMENT_CONTENT_SEQ,
  XML_ELEMENT_CONTENT_OR
} xmlElementContentType;

typedef enum
{
  XML_ELEMENT_CONTENT_ONCE = 1,
  XML_ELEMENT_CONTENT_OPT,
  XML_ELEMENT_CONTENT_MULT,
  XML_ELEMENT_CONTENT_PLUS
} xmlElementContentOccur;

typedef struct _xmlElementContent xmlElementContent;
typedef xmlElementContent *xmlElementContentPtr;

struct _xmlElementContent
{
  xmlElementContentType type;
  xmlElementContentOccur ocur;
  const xmlChar *name;
  struct _xmlElementContent *c1;
  struct _xmlElementContent *c2;
  struct _xmlElementContent *parent;
  const xmlChar *prefix;
};

typedef enum
{
  XML_ELEMENT_TYPE_UNDEFINED = 0,
  XML_ELEMENT_TYPE_EMPTY = 1,
  XML_ELEMENT_TYPE_ANY,
  XML_ELEMENT_TYPE_MIXED,
  XML_ELEMENT_TYPE_ELEMENT
} xmlElementTypeVal;

typedef struct _xmlRegexp xmlRegexp;
typedef xmlRegexp *xmlRegexpPtr;
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
typedef struct _xmlDict xmlDict;
typedef xmlDict *xmlDictPtr;

int xmlInitializeDict (void);
xmlDictPtr xmlDictCreate (void);
size_t xmlDictSetLimit (xmlDictPtr dict, size_t limit);
size_t xmlDictGetUsage (xmlDictPtr dict);
xmlDictPtr xmlDictCreateSub (xmlDictPtr sub);
int xmlDictReference (xmlDictPtr dict);
void xmlDictFree (xmlDictPtr dict);
const xmlChar *xmlDictLookup (xmlDictPtr dict, const xmlChar * name, int len);
const xmlChar *xmlDictExists (xmlDictPtr dict, const xmlChar * name, int len);
const xmlChar *xmlDictQLookup (xmlDictPtr dict,
			       const xmlChar * prefix, const xmlChar * name);
int xmlDictOwns (xmlDictPtr dict, const xmlChar * str);
int xmlDictSize (xmlDictPtr dict);
void xmlDictCleanup (void);
xmlRegexpPtr xmlRegexpCompile (const xmlChar * regexp);
void xmlRegFreeRegexp (xmlRegexpPtr regexp);
int xmlRegexpExec (xmlRegexpPtr comp, const xmlChar * value);
void xmlRegexpPrint (FILE * output, xmlRegexpPtr regexp);
int xmlRegexpIsDeterminist (xmlRegexpPtr comp);
typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
				     const xmlChar * token,
				     void *transdata, void *inputdata);
xmlRegExecCtxtPtr
xmlRegNewExecCtxt (xmlRegexpPtr comp,
		   xmlRegExecCallbacks callback, void *data);
void xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
int xmlRegExecPushString (xmlRegExecCtxtPtr exec,
			  const xmlChar * value, void *data);
int xmlRegExecPushString2 (xmlRegExecCtxtPtr exec,
			   const xmlChar * value,
			   const xmlChar * value2, void *data);

int xmlRegExecNextValues (xmlRegExecCtxtPtr exec,
			  int *nbval,
			  int *nbneg, xmlChar ** values, int *terminal);
int xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
		       const xmlChar ** string,
		       int *nbval, int *nbneg, xmlChar ** values, int *terminal);

typedef struct _xmlExpCtxt xmlExpCtxt;
typedef xmlExpCtxt *xmlExpCtxtPtr;
void xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
xmlExpCtxtPtr xmlExpNewCtxt (int maxNodes, xmlDictPtr dict);
int xmlExpCtxtNbNodes (xmlExpCtxtPtr ctxt);
int xmlExpCtxtNbCons (xmlExpCtxtPtr ctxt);
typedef struct _xmlExpNode xmlExpNode;
typedef xmlExpNode *xmlExpNodePtr;

typedef enum
{
  XML_EXP_EMPTY = 0,
  XML_EXP_FORBID = 1,
  XML_EXP_ATOM = 2,
  XML_EXP_SEQ = 3,
  XML_EXP_OR = 4,
  XML_EXP_COUNT = 5
} xmlExpNodeType;

extern xmlExpNodePtr forbiddenExp;
extern xmlExpNodePtr emptyExp;

void xmlExpFree (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr);
void xmlExpRef (xmlExpNodePtr expr);

xmlExpNodePtr xmlExpParse (xmlExpCtxtPtr ctxt, const char *expr);
xmlExpNodePtr xmlExpNewAtom (xmlExpCtxtPtr ctxt, const xmlChar * name, int len);
xmlExpNodePtr xmlExpNewOr (xmlExpCtxtPtr ctxt, xmlExpNodePtr left, xmlExpNodePtr right);
xmlExpNodePtr xmlExpNewSeq (xmlExpCtxtPtr ctxt, xmlExpNodePtr left, xmlExpNodePtr right);
xmlExpNodePtr xmlExpNewRange (xmlExpCtxtPtr ctxt, xmlExpNodePtr subset, int min, int max);

int xmlExpIsNillable (xmlExpNodePtr expr);
int xmlExpMaxToken (xmlExpNodePtr expr);
int xmlExpGetLanguage (xmlExpCtxtPtr ctxt,
		       xmlExpNodePtr expr, const xmlChar ** langList, int len);
int xmlExpGetStart (xmlExpCtxtPtr ctxt,
		    xmlExpNodePtr expr, const xmlChar ** tokList, int len);
xmlExpNodePtr xmlExpStringDerive (xmlExpCtxtPtr ctxt,
				  xmlExpNodePtr expr, const xmlChar * str, int len);
xmlExpNodePtr xmlExpExpDerive (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, xmlExpNodePtr sub);
int xmlExpSubsume (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, xmlExpNodePtr sub);
void xmlExpDump (xmlBufferPtr buf, xmlExpNodePtr expr);
typedef struct _xmlElement xmlElement;
typedef xmlElement *xmlElementPtr;

struct _xmlElement
{
  void *_private;
  xmlElementType type;
  const xmlChar *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlDtd *parent;
  struct _xmlNode *next;
  struct _xmlNode *prev;
  struct _xmlDoc *doc;
  xmlElementTypeVal etype;
  xmlElementContentPtr content;
  xmlAttributePtr attributes;
  const xmlChar *prefix;
  xmlRegexpPtr contModel;
};

typedef xmlElementType xmlNsType;
typedef struct _xmlNs xmlNs;
typedef xmlNs *xmlNsPtr;

struct _xmlNs
{
  struct _xmlNs *next;
  xmlNsType type;
  const xmlChar *href;
  const xmlChar *prefix;
  void *_private;
  struct _xmlDoc *context;
};

typedef struct _xmlDtd xmlDtd;
typedef xmlDtd *xmlDtdPtr;
struct _xmlDtd
{
  void *_private;
  xmlElementType type;
  const xmlChar *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlDoc *parent;
  struct _xmlNode *next;
  struct _xmlNode *prev;
  struct _xmlDoc *doc;
  void *notations;
  void *elements;
  void *attributes;
  void *entities;
  const xmlChar *ExternalID;
  const xmlChar *SystemID;
  void *pentities;
};

typedef struct _xmlAttr xmlAttr;
typedef xmlAttr *xmlAttrPtr;
struct _xmlAttr
{
  void *_private;
  xmlElementType type;
  const xmlChar *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlNode *parent;
  struct _xmlAttr *next;
  struct _xmlAttr *prev;
  struct _xmlDoc *doc;
  xmlNs *ns;
  xmlAttributeType atype;
  void *psvi;
};

typedef struct _xmlID xmlID;
typedef xmlID *xmlIDPtr;
struct _xmlID
{
  struct _xmlID *next;
  const xmlChar *value;
  xmlAttrPtr attr;
  const xmlChar *name;
  int lineno;
  struct _xmlDoc *doc;
};

typedef struct _xmlRef xmlRef;
typedef xmlRef *xmlRefPtr;
struct _xmlRef
{
  struct _xmlRef *next;
  const xmlChar *value;
  xmlAttrPtr attr;
  const xmlChar *name;
  int lineno;
};

typedef struct _xmlNode xmlNode;
typedef xmlNode *xmlNodePtr;
struct _xmlNode
{
  void *_private;
  xmlElementType type;
  const xmlChar *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlNode *parent;
  struct _xmlNode *next;
  struct _xmlNode *prev;
  struct _xmlDoc *doc;
  xmlNs *ns;
  xmlChar *content;
  struct _xmlAttr *properties;
  xmlNs *nsDef;
  void *psvi;
  unsigned short line;
  unsigned short extra;
};

typedef enum
{
  XML_DOC_WELLFORMED = 1 << 0,
  XML_DOC_NSVALID = 1 << 1,
  XML_DOC_OLD10 = 1 << 2,
  XML_DOC_DTDVALID = 1 << 3,
  XML_DOC_XINCLUDE = 1 << 4,
  XML_DOC_USERBUILT = 1 << 5,
  XML_DOC_INTERNAL = 1 << 6,
  XML_DOC_HTML = 1 << 7
} xmlDocProperties;

typedef struct _xmlDoc xmlDoc;
typedef xmlDoc *xmlDocPtr;

struct _xmlDoc
{
  void *_private;
  xmlElementType type;
  char *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlNode *parent;
  struct _xmlNode *next;
  struct _xmlNode *prev;
  struct _xmlDoc *doc;
  int compression;
  int standalone;
  struct _xmlDtd *intSubset;
  struct _xmlDtd *extSubset;
  struct _xmlNs *oldNs;
  const xmlChar *version;
  const xmlChar *encoding;
  void *ids;
  void *refs;
  const xmlChar *URL;
  int charset;
  struct _xmlDict *dict;
  void *psvi;
  int parseFlags;
  int properties;
};

typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
						 xmlNodePtr node,
						 const xmlChar * nsName,
						 const xmlChar * nsPrefix);

struct _xmlDOMWrapCtxt
{
  void *_private;
  int type;
  void *namespaceMap;
  xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
};

int xmlValidateNCName (const xmlChar * value, int space);
int xmlValidateQName (const xmlChar * value, int space);
int xmlValidateName (const xmlChar * value, int space);
int xmlValidateNMToken (const xmlChar * value, int space);
xmlChar *xmlBuildQName (const xmlChar * ncname,
			const xmlChar * prefix, xmlChar * memory, int len);
xmlChar *xmlSplitQName2 (const xmlChar * name, xmlChar ** prefix);
const xmlChar *xmlSplitQName3 (const xmlChar * name, int *len);
void xmlSetBufferAllocationScheme (xmlBufferAllocationScheme scheme);
xmlBufferAllocationScheme xmlGetBufferAllocationScheme (void);
xmlBufferPtr xmlBufferCreate (void);
xmlBufferPtr xmlBufferCreateSize (size_t size);
xmlBufferPtr xmlBufferCreateStatic (void *mem, size_t size);
int xmlBufferResize (xmlBufferPtr buf, unsigned int size);
void xmlBufferFree (xmlBufferPtr buf);
int xmlBufferDump (FILE * file, xmlBufferPtr buf);
int xmlBufferAdd (xmlBufferPtr buf, const xmlChar * str, int len);
int xmlBufferAddHead (xmlBufferPtr buf, const xmlChar * str, int len);
int xmlBufferCat (xmlBufferPtr buf, const xmlChar * str);
int xmlBufferCCat (xmlBufferPtr buf, const char *str);
int xmlBufferShrink (xmlBufferPtr buf, unsigned int len);
int xmlBufferGrow (xmlBufferPtr buf, unsigned int len);
void xmlBufferEmpty (xmlBufferPtr buf);
const xmlChar *xmlBufferContent (const xmlBuffer * buf);
xmlChar *xmlBufferDetach (xmlBufferPtr buf);
void xmlBufferSetAllocationScheme (xmlBufferPtr buf,
				   xmlBufferAllocationScheme scheme);
int xmlBufferLength (const xmlBuffer * buf);

xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
			      const xmlChar * name,
			      const xmlChar * ExternalID, const xmlChar * SystemID);
xmlDtdPtr xmlNewDtd (xmlDocPtr doc,
		     const xmlChar * name,
		     const xmlChar * ExternalID, const xmlChar * SystemID);
xmlDtdPtr xmlGetIntSubset (const xmlDoc * doc);
void xmlFreeDtd (xmlDtdPtr cur);

xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc, const xmlChar * href, const xmlChar * prefix);

xmlNsPtr xmlNewNs (xmlNodePtr node, const xmlChar * href, const xmlChar * prefix);
void xmlFreeNs (xmlNsPtr cur);
void xmlFreeNsList (xmlNsPtr cur);
xmlDocPtr xmlNewDoc (const xmlChar * version);
void xmlFreeDoc (xmlDocPtr cur);
xmlAttrPtr xmlNewDocProp (xmlDocPtr doc, const xmlChar * name, const xmlChar * value);


xmlAttrPtr xmlNewProp (xmlNodePtr node, const xmlChar * name, const xmlChar * value);

xmlAttrPtr xmlNewNsProp (xmlNodePtr node,
			 xmlNsPtr ns, const xmlChar * name, const xmlChar * value);
xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node,
				xmlNsPtr ns, xmlChar * name, const xmlChar * value);
void xmlFreePropList (xmlAttrPtr cur);
void xmlFreeProp (xmlAttrPtr cur);
xmlAttrPtr xmlCopyProp (xmlNodePtr target, xmlAttrPtr cur);
xmlAttrPtr xmlCopyPropList (xmlNodePtr target, xmlAttrPtr cur);
xmlDtdPtr xmlCopyDtd (xmlDtdPtr dtd);
xmlDocPtr xmlCopyDoc (xmlDocPtr doc, int recursive);
xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
			  xmlNsPtr ns, const xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewDocNodeEatName (xmlDocPtr doc,
				 xmlNsPtr ns, xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewNode (xmlNsPtr ns, const xmlChar * name);
xmlNodePtr xmlNewNodeEatName (xmlNsPtr ns, xmlChar * name);

xmlNodePtr xmlNewChild (xmlNodePtr parent,
			xmlNsPtr ns, const xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewDocText (const xmlDoc * doc, const xmlChar * content);
xmlNodePtr xmlNewText (const xmlChar * content);
xmlNodePtr xmlNewDocPI (xmlDocPtr doc, const xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewPI (const xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc, const xmlChar * content, int len);
xmlNodePtr xmlNewTextLen (const xmlChar * content, int len);
xmlNodePtr xmlNewDocComment (xmlDocPtr doc, const xmlChar * content);
xmlNodePtr xmlNewComment (const xmlChar * content);
xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, const xmlChar * content, int len);
xmlNodePtr xmlNewCharRef (xmlDocPtr doc, const xmlChar * name);
xmlNodePtr xmlNewReference (const xmlDoc * doc, const xmlChar * name);
xmlNodePtr xmlCopyNode (xmlNodePtr node, int recursive);
xmlNodePtr xmlDocCopyNode (xmlNodePtr node, xmlDocPtr doc, int recursive);
xmlNodePtr xmlDocCopyNodeList (xmlDocPtr doc, xmlNodePtr node);
xmlNodePtr xmlCopyNodeList (xmlNodePtr node);

xmlNodePtr xmlNewTextChild (xmlNodePtr parent,
			    xmlNsPtr ns, const xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc,
			     xmlNsPtr ns, const xmlChar * name, const xmlChar * content);
xmlNodePtr xmlNewDocFragment (xmlDocPtr doc);
long xmlGetLineNo (const xmlNode * node);
xmlChar *xmlGetNodePath (const xmlNode * node);
xmlNodePtr xmlDocGetRootElement (const xmlDoc * doc);
xmlNodePtr xmlGetLastChild (const xmlNode * parent);
int xmlNodeIsText (const xmlNode * node);
int xmlIsBlankNode (const xmlNode * node);
xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc, xmlNodePtr root);
void xmlNodeSetName (xmlNodePtr cur, const xmlChar * name);
xmlNodePtr xmlAddChild (xmlNodePtr parent, xmlNodePtr cur);
xmlNodePtr xmlAddChildList (xmlNodePtr parent, xmlNodePtr cur);
xmlNodePtr xmlReplaceNode (xmlNodePtr old, xmlNodePtr cur);
xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur, xmlNodePtr elem);
xmlNodePtr xmlAddSibling (xmlNodePtr cur, xmlNodePtr elem);
xmlNodePtr xmlAddNextSibling (xmlNodePtr cur, xmlNodePtr elem);
void xmlUnlinkNode (xmlNodePtr cur);
xmlNodePtr xmlTextMerge (xmlNodePtr first, xmlNodePtr second);
int xmlTextConcat (xmlNodePtr node, const xmlChar * content, int len);
void xmlFreeNodeList (xmlNodePtr cur);
void xmlFreeNode (xmlNodePtr cur);
void xmlSetTreeDoc (xmlNodePtr tree, xmlDocPtr doc);
void xmlSetListDoc (xmlNodePtr list, xmlDocPtr doc);

xmlNsPtr xmlSearchNs (xmlDocPtr doc, xmlNodePtr node, const xmlChar * nameSpace);
xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc, xmlNodePtr node, const xmlChar * href);
xmlNsPtr *xmlGetNsList (const xmlDoc * doc, const xmlNode * node);
void xmlSetNs (xmlNodePtr node, xmlNsPtr ns);
xmlNsPtr xmlCopyNamespace (xmlNsPtr cur);
xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur);
xmlAttrPtr xmlSetProp (xmlNodePtr node, const xmlChar * name, const xmlChar * value);
xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
			 xmlNsPtr ns, const xmlChar * name, const xmlChar * value);

xmlChar *xmlGetNoNsProp (const xmlNode * node, const xmlChar * name);
xmlChar *xmlGetProp (const xmlNode * node, const xmlChar * name);
xmlAttrPtr xmlHasProp (const xmlNode * node, const xmlChar * name);
xmlAttrPtr xmlHasNsProp (const xmlNode * node,
			 const xmlChar * name, const xmlChar * nameSpace);
xmlChar *xmlGetNsProp (const xmlNode * node,
		       const xmlChar * name, const xmlChar * nameSpace);
xmlNodePtr xmlStringGetNodeList (const xmlDoc * doc, const xmlChar * value);
xmlNodePtr xmlStringLenGetNodeList (const xmlDoc * doc, const xmlChar * value, int len);
xmlChar *xmlNodeListGetString (xmlDocPtr doc,
			       const xmlNode * list, int inLine);

xmlChar *xmlNodeListGetRawString (const xmlDoc * doc,
				  const xmlNode * list, int inLine);

void xmlNodeSetContent (xmlNodePtr cur, const xmlChar * content);
void xmlNodeSetContentLen (xmlNodePtr cur, const xmlChar * content, int len);
void xmlNodeAddContent (xmlNodePtr cur, const xmlChar * content);
void xmlNodeAddContentLen (xmlNodePtr cur, const xmlChar * content, int len);
xmlChar *xmlNodeGetContent (const xmlNode * cur);
int xmlNodeBufGetContent (xmlBufferPtr buffer, const xmlNode * cur);
int xmlBufGetNodeContent (xmlBufPtr buf, const xmlNode * cur);
xmlChar *xmlNodeGetLang (const xmlNode * cur);
int xmlNodeGetSpacePreserve (const xmlNode * cur);
void xmlNodeSetLang (xmlNodePtr cur, const xmlChar * lang);
void xmlNodeSetSpacePreserve (xmlNodePtr cur, int val);
xmlChar *xmlNodeGetBase (const xmlDoc * doc, const xmlNode * cur);
void xmlNodeSetBase (xmlNodePtr cur, const xmlChar * uri);
int xmlRemoveProp (xmlAttrPtr cur);
int xmlUnsetNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar * name);
int xmlUnsetProp (xmlNodePtr node, const xmlChar * name);
void xmlBufferWriteCHAR (xmlBufferPtr buf, const xmlChar * string);
void xmlBufferWriteChar (xmlBufferPtr buf, const char *string);
void xmlBufferWriteQuotedString (xmlBufferPtr buf, const xmlChar * string);
void xmlAttrSerializeTxtContent (xmlBufferPtr buf,
				 xmlDocPtr doc,
				 xmlAttrPtr attr, const xmlChar * string);
int xmlReconciliateNs (xmlDocPtr doc, xmlNodePtr tree);
void xmlDocDumpFormatMemory (xmlDocPtr cur, xmlChar ** mem, int *size, int format);
void xmlDocDumpMemory (xmlDocPtr cur, xmlChar ** mem, int *size);
void xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
			  xmlChar ** doc_txt_ptr,
			  int *doc_txt_len, const char *txt_encoding);
void xmlDocDumpFormatMemoryEnc (xmlDocPtr out_doc,
				xmlChar ** doc_txt_ptr,
				int *doc_txt_len,
				const char *txt_encoding, int format);
int xmlDocFormatDump (FILE * f, xmlDocPtr cur, int format);
int xmlDocDump (FILE * f, xmlDocPtr cur);
void xmlElemDump (FILE * f, xmlDocPtr doc, xmlNodePtr cur);
int xmlSaveFile (const char *filename, xmlDocPtr cur);
int xmlSaveFormatFile (const char *filename, xmlDocPtr cur, int format);
size_t xmlBufNodeDump (xmlBufPtr buf,
		       xmlDocPtr doc, xmlNodePtr cur, int level, int format);
int xmlNodeDump (xmlBufferPtr buf,
		 xmlDocPtr doc, xmlNodePtr cur, int level, int format);

int xmlSaveFileTo (xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding);
int xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
			 xmlDocPtr cur, const char *encoding, int format);
void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
			xmlDocPtr doc,
			xmlNodePtr cur,
			int level, int format, const char *encoding);

int xmlSaveFormatFileEnc (const char *filename,
			  xmlDocPtr cur, const char *encoding, int format);

int xmlSaveFileEnc (const char *filename, xmlDocPtr cur, const char *encoding);
int xmlIsXHTML (const xmlChar * systemID, const xmlChar * publicID);
int xmlGetDocCompressMode (const xmlDoc * doc);
void xmlSetDocCompressMode (xmlDocPtr doc, int mode);
int xmlGetCompressMode (void);
void xmlSetCompressMode (int mode);
xmlDOMWrapCtxtPtr xmlDOMWrapNewCtxt (void);
void xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
int xmlDOMWrapReconcileNamespaces (xmlDOMWrapCtxtPtr ctxt,
				   xmlNodePtr elem, int options);
int xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
			 xmlDocPtr sourceDoc,
			 xmlNodePtr node,
			 xmlDocPtr destDoc, xmlNodePtr destParent, int options);
int xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
			  xmlDocPtr doc, xmlNodePtr node, int options);
int xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
			 xmlDocPtr sourceDoc,
			 xmlNodePtr node,
			 xmlNodePtr * clonedNode,
			 xmlDocPtr destDoc,
			 xmlNodePtr destParent, int deep, int options);

unsigned long xmlChildElementCount (xmlNodePtr parent);
xmlNodePtr xmlNextElementSibling (xmlNodePtr node);
xmlNodePtr xmlFirstElementChild (xmlNodePtr parent);
xmlNodePtr xmlLastElementChild (xmlNodePtr parent);
xmlNodePtr xmlPreviousElementSibling (xmlNodePtr node);
typedef struct _xmlHashTable xmlHashTable;
typedef xmlHashTable *xmlHashTablePtr;
typedef void (*xmlHashDeallocator) (void *payload, xmlChar * name);
typedef void *(*xmlHashCopier) (void *payload, xmlChar * name);
typedef void (*xmlHashScanner) (void *payload, void *data, xmlChar * name);
typedef void (*xmlHashScannerFull) (void *payload, void *data,
				    const xmlChar * name,
				    const xmlChar * name2,
				    const xmlChar * name3);




xmlHashTablePtr xmlHashCreate (int size);
xmlHashTablePtr xmlHashCreateDict (int size, xmlDictPtr dict);
void xmlHashFree (xmlHashTablePtr table, xmlHashDeallocator f);

int xmlHashAddEntry (xmlHashTablePtr table, const xmlChar * name, void *userdata);
int xmlHashUpdateEntry (xmlHashTablePtr table,
			const xmlChar * name,
			void *userdata, xmlHashDeallocator f);
int xmlHashAddEntry2 (xmlHashTablePtr table,
		      const xmlChar * name,
		      const xmlChar * name2, void *userdata);
int xmlHashUpdateEntry2 (xmlHashTablePtr table,
			 const xmlChar * name,
			 const xmlChar * name2,
			 void *userdata, xmlHashDeallocator f);
int xmlHashAddEntry3 (xmlHashTablePtr table,
		      const xmlChar * name,
		      const xmlChar * name2,
		      const xmlChar * name3, void *userdata);
int xmlHashUpdateEntry3 (xmlHashTablePtr table,
			 const xmlChar * name,
			 const xmlChar * name2,
			 const xmlChar * name3,
			 void *userdata, xmlHashDeallocator f);

int xmlHashRemoveEntry (xmlHashTablePtr table, const xmlChar * name,
			xmlHashDeallocator f);
int xmlHashRemoveEntry2 (xmlHashTablePtr table, const xmlChar * name,
			 const xmlChar * name2, xmlHashDeallocator f);
int xmlHashRemoveEntry3 (xmlHashTablePtr table, const xmlChar * name,
			 const xmlChar * name2, const xmlChar * name3,
			 xmlHashDeallocator f);

void *xmlHashLookup (xmlHashTablePtr table, const xmlChar * name);
void *xmlHashLookup2 (xmlHashTablePtr table,
		      const xmlChar * name, const xmlChar * name2);
void *xmlHashLookup3 (xmlHashTablePtr table,
		      const xmlChar * name,
		      const xmlChar * name2, const xmlChar * name3);
void *xmlHashQLookup (xmlHashTablePtr table,
		      const xmlChar * name, const xmlChar * prefix);
void *xmlHashQLookup2 (xmlHashTablePtr table,
		       const xmlChar * name,
		       const xmlChar * prefix,
		       const xmlChar * name2, const xmlChar * prefix2);
void *xmlHashQLookup3 (xmlHashTablePtr table,
		       const xmlChar * name,
		       const xmlChar * prefix,
		       const xmlChar * name2,
		       const xmlChar * prefix2,
		       const xmlChar * name3, const xmlChar * prefix3);

xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table, xmlHashCopier f);
int xmlHashSize (xmlHashTablePtr table);
void xmlHashScan (xmlHashTablePtr table, xmlHashScanner f, void *data);
void xmlHashScan3 (xmlHashTablePtr table,
		   const xmlChar * name,
		   const xmlChar * name2,
		   const xmlChar * name3, xmlHashScanner f, void *data);
void xmlHashScanFull (xmlHashTablePtr table, xmlHashScannerFull f, void *data);
void xmlHashScanFull3 (xmlHashTablePtr table,
		       const xmlChar * name,
		       const xmlChar * name2,
		       const xmlChar * name3, xmlHashScannerFull f, void *data);
typedef enum
{
  XML_ERR_NONE = 0,
  XML_ERR_WARNING = 1,
  XML_ERR_ERROR = 2,
  XML_ERR_FATAL = 3
} xmlErrorLevel;

typedef enum
{
  XML_FROM_NONE = 0,
  XML_FROM_PARSER,
  XML_FROM_TREE,
  XML_FROM_NAMESPACE,
  XML_FROM_DTD,
  XML_FROM_HTML,
  XML_FROM_MEMORY,
  XML_FROM_OUTPUT,
  XML_FROM_IO,
  XML_FROM_FTP,
  XML_FROM_HTTP,
  XML_FROM_XINCLUDE,
  XML_FROM_XPATH,
  XML_FROM_XPOINTER,
  XML_FROM_REGEXP,
  XML_FROM_DATATYPE,
  XML_FROM_SCHEMASP,
  XML_FROM_SCHEMASV,
  XML_FROM_RELAXNGP,
  XML_FROM_RELAXNGV,
  XML_FROM_CATALOG,
  XML_FROM_C14N,
  XML_FROM_XSLT,
  XML_FROM_VALID,
  XML_FROM_CHECK,
  XML_FROM_WRITER,
  XML_FROM_MODULE,
  XML_FROM_I18N,
  XML_FROM_SCHEMATRONV,
  XML_FROM_BUFFER,
  XML_FROM_URI
} xmlErrorDomain;

typedef struct _xmlError xmlError;
typedef xmlError *xmlErrorPtr;
struct _xmlError
{
  int domain;
  int code;
  char *message;
  xmlErrorLevel level;
  char *file;
  int line;
  char *str1;
  char *str2;
  char *str3;
  int int1;
  int int2;
  void *ctxt;
  void *node;
};

typedef enum
{
  XML_ERR_OK = 0,
  XML_ERR_INTERNAL_ERROR,
  XML_ERR_NO_MEMORY,
  XML_ERR_DOCUMENT_START,
  XML_ERR_DOCUMENT_EMPTY,
  XML_ERR_DOCUMENT_END,
  XML_ERR_INVALID_HEX_CHARREF,
  XML_ERR_INVALID_DEC_CHARREF,
  XML_ERR_INVALID_CHARREF,
  XML_ERR_INVALID_CHAR,
  XML_ERR_CHARREF_AT_EOF,
  XML_ERR_CHARREF_IN_PROLOG,
  XML_ERR_CHARREF_IN_EPILOG,
  XML_ERR_CHARREF_IN_DTD,
  XML_ERR_ENTITYREF_AT_EOF,
  XML_ERR_ENTITYREF_IN_PROLOG,
  XML_ERR_ENTITYREF_IN_EPILOG,
  XML_ERR_ENTITYREF_IN_DTD,
  XML_ERR_PEREF_AT_EOF,
  XML_ERR_PEREF_IN_PROLOG,
  XML_ERR_PEREF_IN_EPILOG,
  XML_ERR_PEREF_IN_INT_SUBSET,
  XML_ERR_ENTITYREF_NO_NAME,
  XML_ERR_ENTITYREF_SEMICOL_MISSING,
  XML_ERR_PEREF_NO_NAME,
  XML_ERR_PEREF_SEMICOL_MISSING,
  XML_ERR_UNDECLARED_ENTITY,
  XML_WAR_UNDECLARED_ENTITY,
  XML_ERR_UNPARSED_ENTITY,
  XML_ERR_ENTITY_IS_EXTERNAL,
  XML_ERR_ENTITY_IS_PARAMETER,
  XML_ERR_UNKNOWN_ENCODING,
  XML_ERR_UNSUPPORTED_ENCODING,
  XML_ERR_STRING_NOT_STARTED,
  XML_ERR_STRING_NOT_CLOSED,
  XML_ERR_NS_DECL_ERROR,
  XML_ERR_ENTITY_NOT_STARTED,
  XML_ERR_ENTITY_NOT_FINISHED,
  XML_ERR_LT_IN_ATTRIBUTE,
  XML_ERR_ATTRIBUTE_NOT_STARTED,
  XML_ERR_ATTRIBUTE_NOT_FINISHED,
  XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
  XML_ERR_ATTRIBUTE_REDEFINED,
  XML_ERR_LITERAL_NOT_STARTED,
  XML_ERR_LITERAL_NOT_FINISHED,
  XML_ERR_COMMENT_NOT_FINISHED,
  XML_ERR_PI_NOT_STARTED,
  XML_ERR_PI_NOT_FINISHED,
  XML_ERR_NOTATION_NOT_STARTED,
  XML_ERR_NOTATION_NOT_FINISHED,
  XML_ERR_ATTLIST_NOT_STARTED,
  XML_ERR_ATTLIST_NOT_FINISHED,
  XML_ERR_MIXED_NOT_STARTED,
  XML_ERR_MIXED_NOT_FINISHED,
  XML_ERR_ELEMCONTENT_NOT_STARTED,
  XML_ERR_ELEMCONTENT_NOT_FINISHED,
  XML_ERR_XMLDECL_NOT_STARTED,
  XML_ERR_XMLDECL_NOT_FINISHED,
  XML_ERR_CONDSEC_NOT_STARTED,
  XML_ERR_CONDSEC_NOT_FINISHED,
  XML_ERR_EXT_SUBSET_NOT_FINISHED,
  XML_ERR_DOCTYPE_NOT_FINISHED,
  XML_ERR_MISPLACED_CDATA_END,
  XML_ERR_CDATA_NOT_FINISHED,
  XML_ERR_RESERVED_XML_NAME,
  XML_ERR_SPACE_REQUIRED,
  XML_ERR_SEPARATOR_REQUIRED,
  XML_ERR_NMTOKEN_REQUIRED,
  XML_ERR_NAME_REQUIRED,
  XML_ERR_PCDATA_REQUIRED,
  XML_ERR_URI_REQUIRED,
  XML_ERR_PUBID_REQUIRED,
  XML_ERR_LT_REQUIRED,
  XML_ERR_GT_REQUIRED,
  XML_ERR_LTSLASH_REQUIRED,
  XML_ERR_EQUAL_REQUIRED,
  XML_ERR_TAG_NAME_MISMATCH,
  XML_ERR_TAG_NOT_FINISHED,
  XML_ERR_STANDALONE_VALUE,
  XML_ERR_ENCODING_NAME,
  XML_ERR_HYPHEN_IN_COMMENT,
  XML_ERR_INVALID_ENCODING,
  XML_ERR_EXT_ENTITY_STANDALONE,
  XML_ERR_CONDSEC_INVALID,
  XML_ERR_VALUE_REQUIRED,
  XML_ERR_NOT_WELL_BALANCED,
  XML_ERR_EXTRA_CONTENT,
  XML_ERR_ENTITY_CHAR_ERROR,
  XML_ERR_ENTITY_PE_INTERNAL,
  XML_ERR_ENTITY_LOOP,
  XML_ERR_ENTITY_BOUNDARY,
  XML_ERR_INVALID_URI,
  XML_ERR_URI_FRAGMENT,
  XML_WAR_CATALOG_PI,
  XML_ERR_NO_DTD,
  XML_ERR_CONDSEC_INVALID_KEYWORD,
  XML_ERR_VERSION_MISSING,
  XML_WAR_UNKNOWN_VERSION,
  XML_WAR_LANG_VALUE,
  XML_WAR_NS_URI,
  XML_WAR_NS_URI_RELATIVE,
  XML_ERR_MISSING_ENCODING,
  XML_WAR_SPACE_VALUE,
  XML_ERR_NOT_STANDALONE,
  XML_ERR_ENTITY_PROCESSING,
  XML_ERR_NOTATION_PROCESSING,
  XML_WAR_NS_COLUMN,
  XML_WAR_ENTITY_REDEFINED,
  XML_ERR_UNKNOWN_VERSION,
  XML_ERR_VERSION_MISMATCH,
  XML_ERR_NAME_TOO_LONG,
  XML_ERR_USER_STOP,
  XML_NS_ERR_XML_NAMESPACE = 200,
  XML_NS_ERR_UNDEFINED_NAMESPACE,
  XML_NS_ERR_QNAME,
  XML_NS_ERR_ATTRIBUTE_REDEFINED,
  XML_NS_ERR_EMPTY,
  XML_NS_ERR_COLON,
  XML_DTD_ATTRIBUTE_DEFAULT = 500,
  XML_DTD_ATTRIBUTE_REDEFINED,
  XML_DTD_ATTRIBUTE_VALUE,
  XML_DTD_CONTENT_ERROR,
  XML_DTD_CONTENT_MODEL,
  XML_DTD_CONTENT_NOT_DETERMINIST,
  XML_DTD_DIFFERENT_PREFIX,
  XML_DTD_ELEM_DEFAULT_NAMESPACE,
  XML_DTD_ELEM_NAMESPACE,
  XML_DTD_ELEM_REDEFINED,
  XML_DTD_EMPTY_NOTATION,
  XML_DTD_ENTITY_TYPE,
  XML_DTD_ID_FIXED,
  XML_DTD_ID_REDEFINED,
  XML_DTD_ID_SUBSET,
  XML_DTD_INVALID_CHILD,
  XML_DTD_INVALID_DEFAULT,
  XML_DTD_LOAD_ERROR,
  XML_DTD_MISSING_ATTRIBUTE,
  XML_DTD_MIXED_CORRUPT,
  XML_DTD_MULTIPLE_ID,
  XML_DTD_NO_DOC,
  XML_DTD_NO_DTD,
  XML_DTD_NO_ELEM_NAME,
  XML_DTD_NO_PREFIX,
  XML_DTD_NO_ROOT,
  XML_DTD_NOTATION_REDEFINED,
  XML_DTD_NOTATION_VALUE,
  XML_DTD_NOT_EMPTY,
  XML_DTD_NOT_PCDATA,
  XML_DTD_NOT_STANDALONE,
  XML_DTD_ROOT_NAME,
  XML_DTD_STANDALONE_WHITE_SPACE,
  XML_DTD_UNKNOWN_ATTRIBUTE,
  XML_DTD_UNKNOWN_ELEM,
  XML_DTD_UNKNOWN_ENTITY,
  XML_DTD_UNKNOWN_ID,
  XML_DTD_UNKNOWN_NOTATION,
  XML_DTD_STANDALONE_DEFAULTED,
  XML_DTD_XMLID_VALUE,
  XML_DTD_XMLID_TYPE,
  XML_DTD_DUP_TOKEN,
  XML_HTML_STRUCURE_ERROR = 800,
  XML_HTML_UNKNOWN_TAG,
  XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
  XML_RNGP_ATTR_CONFLICT,
  XML_RNGP_ATTRIBUTE_CHILDREN,
  XML_RNGP_ATTRIBUTE_CONTENT,
  XML_RNGP_ATTRIBUTE_EMPTY,
  XML_RNGP_ATTRIBUTE_NOOP,
  XML_RNGP_CHOICE_CONTENT,
  XML_RNGP_CHOICE_EMPTY,
  XML_RNGP_CREATE_FAILURE,
  XML_RNGP_DATA_CONTENT,
  XML_RNGP_DEF_CHOICE_AND_INTERLEAVE,
  XML_RNGP_DEFINE_CREATE_FAILED,
  XML_RNGP_DEFINE_EMPTY,
  XML_RNGP_DEFINE_MISSING,
  XML_RNGP_DEFINE_NAME_MISSING,
  XML_RNGP_ELEM_CONTENT_EMPTY,
  XML_RNGP_ELEM_CONTENT_ERROR,
  XML_RNGP_ELEMENT_EMPTY,
  XML_RNGP_ELEMENT_CONTENT,
  XML_RNGP_ELEMENT_NAME,
  XML_RNGP_ELEMENT_NO_CONTENT,
  XML_RNGP_ELEM_TEXT_CONFLICT,
  XML_RNGP_EMPTY,
  XML_RNGP_EMPTY_CONSTRUCT,
  XML_RNGP_EMPTY_CONTENT,
  XML_RNGP_EMPTY_NOT_EMPTY,
  XML_RNGP_ERROR_TYPE_LIB,
  XML_RNGP_EXCEPT_EMPTY,
  XML_RNGP_EXCEPT_MISSING,
  XML_RNGP_EXCEPT_MULTIPLE,
  XML_RNGP_EXCEPT_NO_CONTENT,
  XML_RNGP_EXTERNALREF_EMTPY,
  XML_RNGP_EXTERNAL_REF_FAILURE,
  XML_RNGP_EXTERNALREF_RECURSE,
  XML_RNGP_FORBIDDEN_ATTRIBUTE,
  XML_RNGP_FOREIGN_ELEMENT,
  XML_RNGP_GRAMMAR_CONTENT,
  XML_RNGP_GRAMMAR_EMPTY,
  XML_RNGP_GRAMMAR_MISSING,
  XML_RNGP_GRAMMAR_NO_START,
  XML_RNGP_GROUP_ATTR_CONFLICT,
  XML_RNGP_HREF_ERROR,
  XML_RNGP_INCLUDE_EMPTY,
  XML_RNGP_INCLUDE_FAILURE,
  XML_RNGP_INCLUDE_RECURSE,
  XML_RNGP_INTERLEAVE_ADD,
  XML_RNGP_INTERLEAVE_CREATE_FAILED,
  XML_RNGP_INTERLEAVE_EMPTY,
  XML_RNGP_INTERLEAVE_NO_CONTENT,
  XML_RNGP_INVALID_DEFINE_NAME,
  XML_RNGP_INVALID_URI,
  XML_RNGP_INVALID_VALUE,
  XML_RNGP_MISSING_HREF,
  XML_RNGP_NAME_MISSING,
  XML_RNGP_NEED_COMBINE,
  XML_RNGP_NOTALLOWED_NOT_EMPTY,
  XML_RNGP_NSNAME_ATTR_ANCESTOR,
  XML_RNGP_NSNAME_NO_NS,
  XML_RNGP_PARAM_FORBIDDEN,
  XML_RNGP_PARAM_NAME_MISSING,
  XML_RNGP_PARENTREF_CREATE_FAILED,
  XML_RNGP_PARENTREF_NAME_INVALID,
  XML_RNGP_PARENTREF_NO_NAME,
  XML_RNGP_PARENTREF_NO_PARENT,
  XML_RNGP_PARENTREF_NOT_EMPTY,
  XML_RNGP_PARSE_ERROR,
  XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME,
  XML_RNGP_PAT_ATTR_ATTR,
  XML_RNGP_PAT_ATTR_ELEM,
  XML_RNGP_PAT_DATA_EXCEPT_ATTR,
  XML_RNGP_PAT_DATA_EXCEPT_ELEM,
  XML_RNGP_PAT_DATA_EXCEPT_EMPTY,
  XML_RNGP_PAT_DATA_EXCEPT_GROUP,
  XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE,
  XML_RNGP_PAT_DATA_EXCEPT_LIST,
  XML_RNGP_PAT_DATA_EXCEPT_ONEMORE,
  XML_RNGP_PAT_DATA_EXCEPT_REF,
  XML_RNGP_PAT_DATA_EXCEPT_TEXT,
  XML_RNGP_PAT_LIST_ATTR,
  XML_RNGP_PAT_LIST_ELEM,
  XML_RNGP_PAT_LIST_INTERLEAVE,
  XML_RNGP_PAT_LIST_LIST,
  XML_RNGP_PAT_LIST_REF,
  XML_RNGP_PAT_LIST_TEXT,
  XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME,
  XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME,
  XML_RNGP_PAT_ONEMORE_GROUP_ATTR,
  XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR,
  XML_RNGP_PAT_START_ATTR,
  XML_RNGP_PAT_START_DATA,
  XML_RNGP_PAT_START_EMPTY,
  XML_RNGP_PAT_START_GROUP,
  XML_RNGP_PAT_START_INTERLEAVE,
  XML_RNGP_PAT_START_LIST,
  XML_RNGP_PAT_START_ONEMORE,
  XML_RNGP_PAT_START_TEXT,
  XML_RNGP_PAT_START_VALUE,
  XML_RNGP_PREFIX_UNDEFINED,
  XML_RNGP_REF_CREATE_FAILED,
  XML_RNGP_REF_CYCLE,
  XML_RNGP_REF_NAME_INVALID,
  XML_RNGP_REF_NO_DEF,
  XML_RNGP_REF_NO_NAME,
  XML_RNGP_REF_NOT_EMPTY,
  XML_RNGP_START_CHOICE_AND_INTERLEAVE,
  XML_RNGP_START_CONTENT,
  XML_RNGP_START_EMPTY,
  XML_RNGP_START_MISSING,
  XML_RNGP_TEXT_EXPECTED,
  XML_RNGP_TEXT_HAS_CHILD,
  XML_RNGP_TYPE_MISSING,
  XML_RNGP_TYPE_NOT_FOUND,
  XML_RNGP_TYPE_VALUE,
  XML_RNGP_UNKNOWN_ATTRIBUTE,
  XML_RNGP_UNKNOWN_COMBINE,
  XML_RNGP_UNKNOWN_CONSTRUCT,
  XML_RNGP_UNKNOWN_TYPE_LIB,
  XML_RNGP_URI_FRAGMENT,
  XML_RNGP_URI_NOT_ABSOLUTE,
  XML_RNGP_VALUE_EMPTY,
  XML_RNGP_VALUE_NO_CONTENT,
  XML_RNGP_XMLNS_NAME,
  XML_RNGP_XML_NS,
  XML_XPATH_EXPRESSION_OK = 1200,
  XML_XPATH_NUMBER_ERROR,
  XML_XPATH_UNFINISHED_LITERAL_ERROR,
  XML_XPATH_START_LITERAL_ERROR,
  XML_XPATH_VARIABLE_REF_ERROR,
  XML_XPATH_UNDEF_VARIABLE_ERROR,
  XML_XPATH_INVALID_PREDICATE_ERROR,
  XML_XPATH_EXPR_ERROR,
  XML_XPATH_UNCLOSED_ERROR,
  XML_XPATH_UNKNOWN_FUNC_ERROR,
  XML_XPATH_INVALID_OPERAND,
  XML_XPATH_INVALID_TYPE,
  XML_XPATH_INVALID_ARITY,
  XML_XPATH_INVALID_CTXT_SIZE,
  XML_XPATH_INVALID_CTXT_POSITION,
  XML_XPATH_MEMORY_ERROR,
  XML_XPTR_SYNTAX_ERROR,
  XML_XPTR_RESOURCE_ERROR,
  XML_XPTR_SUB_RESOURCE_ERROR,
  XML_XPATH_UNDEF_PREFIX_ERROR,
  XML_XPATH_ENCODING_ERROR,
  XML_XPATH_INVALID_CHAR_ERROR,
  XML_TREE_INVALID_HEX = 1300,
  XML_TREE_INVALID_DEC,
  XML_TREE_UNTERMINATED_ENTITY,
  XML_TREE_NOT_UTF8,
  XML_SAVE_NOT_UTF8 = 1400,
  XML_SAVE_CHAR_INVALID,
  XML_SAVE_NO_DOCTYPE,
  XML_SAVE_UNKNOWN_ENCODING,
  XML_REGEXP_COMPILE_ERROR = 1450,
  XML_IO_UNKNOWN = 1500,
  XML_IO_EACCES,
  XML_IO_EAGAIN,
  XML_IO_EBADF,
  XML_IO_EBADMSG,
  XML_IO_EBUSY,
  XML_IO_ECANCELED,
  XML_IO_ECHILD,
  XML_IO_EDEADLK,
  XML_IO_EDOM,
  XML_IO_EEXIST,
  XML_IO_EFAULT,
  XML_IO_EFBIG,
  XML_IO_EINPROGRESS,
  XML_IO_EINTR,
  XML_IO_EINVAL,
  XML_IO_EIO,
  XML_IO_EISDIR,
  XML_IO_EMFILE,
  XML_IO_EMLINK,
  XML_IO_EMSGSIZE,
  XML_IO_ENAMETOOLONG,
  XML_IO_ENFILE,
  XML_IO_ENODEV,
  XML_IO_ENOENT,
  XML_IO_ENOEXEC,
  XML_IO_ENOLCK,
  XML_IO_ENOMEM,
  XML_IO_ENOSPC,
  XML_IO_ENOSYS,
  XML_IO_ENOTDIR,
  XML_IO_ENOTEMPTY,
  XML_IO_ENOTSUP,
  XML_IO_ENOTTY,
  XML_IO_ENXIO,
  XML_IO_EPERM,
  XML_IO_EPIPE,
  XML_IO_ERANGE,
  XML_IO_EROFS,
  XML_IO_ESPIPE,
  XML_IO_ESRCH,
  XML_IO_ETIMEDOUT,
  XML_IO_EXDEV,
  XML_IO_NETWORK_ATTEMPT,
  XML_IO_ENCODER,
  XML_IO_FLUSH,
  XML_IO_WRITE,
  XML_IO_NO_INPUT,
  XML_IO_BUFFER_FULL,
  XML_IO_LOAD_ERROR,
  XML_IO_ENOTSOCK,
  XML_IO_EISCONN,
  XML_IO_ECONNREFUSED,
  XML_IO_ENETUNREACH,
  XML_IO_EADDRINUSE,
  XML_IO_EALREADY,
  XML_IO_EAFNOSUPPORT,
  XML_XINCLUDE_RECURSION = 1600,
  XML_XINCLUDE_PARSE_VALUE,
  XML_XINCLUDE_ENTITY_DEF_MISMATCH,
  XML_XINCLUDE_NO_HREF,
  XML_XINCLUDE_NO_FALLBACK,
  XML_XINCLUDE_HREF_URI,
  XML_XINCLUDE_TEXT_FRAGMENT,
  XML_XINCLUDE_TEXT_DOCUMENT,
  XML_XINCLUDE_INVALID_CHAR,
  XML_XINCLUDE_BUILD_FAILED,
  XML_XINCLUDE_UNKNOWN_ENCODING,
  XML_XINCLUDE_MULTIPLE_ROOT,
  XML_XINCLUDE_XPTR_FAILED,
  XML_XINCLUDE_XPTR_RESULT,
  XML_XINCLUDE_INCLUDE_IN_INCLUDE,
  XML_XINCLUDE_FALLBACKS_IN_INCLUDE,
  XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE,
  XML_XINCLUDE_DEPRECATED_NS,
  XML_XINCLUDE_FRAGMENT_ID,
  XML_CATALOG_MISSING_ATTR = 1650,
  XML_CATALOG_ENTRY_BROKEN,
  XML_CATALOG_PREFER_VALUE,
  XML_CATALOG_NOT_CATALOG,
  XML_CATALOG_RECURSION,
  XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
  XML_SCHEMAP_ATTRFORMDEFAULT_VALUE,
  XML_SCHEMAP_ATTRGRP_NONAME_NOREF,
  XML_SCHEMAP_ATTR_NONAME_NOREF,
  XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF,
  XML_SCHEMAP_ELEMFORMDEFAULT_VALUE,
  XML_SCHEMAP_ELEM_NONAME_NOREF,
  XML_SCHEMAP_EXTENSION_NO_BASE,
  XML_SCHEMAP_FACET_NO_VALUE,
  XML_SCHEMAP_FAILED_BUILD_IMPORT,
  XML_SCHEMAP_GROUP_NONAME_NOREF,
  XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI,
  XML_SCHEMAP_IMPORT_REDEFINE_NSNAME,
  XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI,
  XML_SCHEMAP_INVALID_BOOLEAN,
  XML_SCHEMAP_INVALID_ENUM,
  XML_SCHEMAP_INVALID_FACET,
  XML_SCHEMAP_INVALID_FACET_VALUE,
  XML_SCHEMAP_INVALID_MAXOCCURS,
  XML_SCHEMAP_INVALID_MINOCCURS,
  XML_SCHEMAP_INVALID_REF_AND_SUBTYPE,
  XML_SCHEMAP_INVALID_WHITE_SPACE,
  XML_SCHEMAP_NOATTR_NOREF,
  XML_SCHEMAP_NOTATION_NO_NAME,
  XML_SCHEMAP_NOTYPE_NOREF,
  XML_SCHEMAP_REF_AND_SUBTYPE,
  XML_SCHEMAP_RESTRICTION_NONAME_NOREF,
  XML_SCHEMAP_SIMPLETYPE_NONAME,
  XML_SCHEMAP_TYPE_AND_SUBTYPE,
  XML_SCHEMAP_UNKNOWN_ALL_CHILD,
  XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD,
  XML_SCHEMAP_UNKNOWN_ATTR_CHILD,
  XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD,
  XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP,
  XML_SCHEMAP_UNKNOWN_BASE_TYPE,
  XML_SCHEMAP_UNKNOWN_CHOICE_CHILD,
  XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD,
  XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD,
  XML_SCHEMAP_UNKNOWN_ELEM_CHILD,
  XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD,
  XML_SCHEMAP_UNKNOWN_FACET_CHILD,
  XML_SCHEMAP_UNKNOWN_FACET_TYPE,
  XML_SCHEMAP_UNKNOWN_GROUP_CHILD,
  XML_SCHEMAP_UNKNOWN_IMPORT_CHILD,
  XML_SCHEMAP_UNKNOWN_LIST_CHILD,
  XML_SCHEMAP_UNKNOWN_NOTATION_CHILD,
  XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD,
  XML_SCHEMAP_UNKNOWN_REF,
  XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD,
  XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD,
  XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD,
  XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD,
  XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD,
  XML_SCHEMAP_UNKNOWN_TYPE,
  XML_SCHEMAP_UNKNOWN_UNION_CHILD,
  XML_SCHEMAP_ELEM_DEFAULT_FIXED,
  XML_SCHEMAP_REGEXP_INVALID,
  XML_SCHEMAP_FAILED_LOAD,
  XML_SCHEMAP_NOTHING_TO_PARSE,
  XML_SCHEMAP_NOROOT,
  XML_SCHEMAP_REDEFINED_GROUP,
  XML_SCHEMAP_REDEFINED_TYPE,
  XML_SCHEMAP_REDEFINED_ELEMENT,
  XML_SCHEMAP_REDEFINED_ATTRGROUP,
  XML_SCHEMAP_REDEFINED_ATTR,
  XML_SCHEMAP_REDEFINED_NOTATION,
  XML_SCHEMAP_FAILED_PARSE,
  XML_SCHEMAP_UNKNOWN_PREFIX,
  XML_SCHEMAP_DEF_AND_PREFIX,
  XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD,
  XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI,
  XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI,
  XML_SCHEMAP_NOT_SCHEMA,
  XML_SCHEMAP_UNKNOWN_MEMBER_TYPE,
  XML_SCHEMAP_INVALID_ATTR_USE,
  XML_SCHEMAP_RECURSIVE,
  XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE,
  XML_SCHEMAP_INVALID_ATTR_COMBINATION,
  XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION,
  XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD,
  XML_SCHEMAP_INVALID_ATTR_NAME,
  XML_SCHEMAP_REF_AND_CONTENT,
  XML_SCHEMAP_CT_PROPS_CORRECT_1,
  XML_SCHEMAP_CT_PROPS_CORRECT_2,
  XML_SCHEMAP_CT_PROPS_CORRECT_3,
  XML_SCHEMAP_CT_PROPS_CORRECT_4,
  XML_SCHEMAP_CT_PROPS_CORRECT_5,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3,
  XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER,
  XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE,
  XML_SCHEMAP_UNION_NOT_EXPRESSIBLE,
  XML_SCHEMAP_SRC_IMPORT_3_1,
  XML_SCHEMAP_SRC_IMPORT_3_2,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3,
  XML_SCHEMAP_COS_CT_EXTENDS_1_3,
  XML_SCHEMAV_NOROOT = 1801,
  XML_SCHEMAV_UNDECLAREDELEM,
  XML_SCHEMAV_NOTTOPLEVEL,
  XML_SCHEMAV_MISSING,
  XML_SCHEMAV_WRONGELEM,
  XML_SCHEMAV_NOTYPE,
  XML_SCHEMAV_NOROLLBACK,
  XML_SCHEMAV_ISABSTRACT,
  XML_SCHEMAV_NOTEMPTY,
  XML_SCHEMAV_ELEMCONT,
  XML_SCHEMAV_HAVEDEFAULT,
  XML_SCHEMAV_NOTNILLABLE,
  XML_SCHEMAV_EXTRACONTENT,
  XML_SCHEMAV_INVALIDATTR,
  XML_SCHEMAV_INVALIDELEM,
  XML_SCHEMAV_NOTDETERMINIST,
  XML_SCHEMAV_CONSTRUCT,
  XML_SCHEMAV_INTERNAL,
  XML_SCHEMAV_NOTSIMPLE,
  XML_SCHEMAV_ATTRUNKNOWN,
  XML_SCHEMAV_ATTRINVALID,
  XML_SCHEMAV_VALUE,
  XML_SCHEMAV_FACET,
  XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1,
  XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2,
  XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3,
  XML_SCHEMAV_CVC_TYPE_3_1_1,
  XML_SCHEMAV_CVC_TYPE_3_1_2,
  XML_SCHEMAV_CVC_FACET_VALID,
  XML_SCHEMAV_CVC_LENGTH_VALID,
  XML_SCHEMAV_CVC_MINLENGTH_VALID,
  XML_SCHEMAV_CVC_MAXLENGTH_VALID,
  XML_SCHEMAV_CVC_MININCLUSIVE_VALID,
  XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID,
  XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID,
  XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID,
  XML_SCHEMAV_CVC_TOTALDIGITS_VALID,
  XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID,
  XML_SCHEMAV_CVC_PATTERN_VALID,
  XML_SCHEMAV_CVC_ENUMERATION_VALID,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4,
  XML_SCHEMAV_CVC_ELT_1,
  XML_SCHEMAV_CVC_ELT_2,
  XML_SCHEMAV_CVC_ELT_3_1,
  XML_SCHEMAV_CVC_ELT_3_2_1,
  XML_SCHEMAV_CVC_ELT_3_2_2,
  XML_SCHEMAV_CVC_ELT_4_1,
  XML_SCHEMAV_CVC_ELT_4_2,
  XML_SCHEMAV_CVC_ELT_4_3,
  XML_SCHEMAV_CVC_ELT_5_1_1,
  XML_SCHEMAV_CVC_ELT_5_1_2,
  XML_SCHEMAV_CVC_ELT_5_2_1,
  XML_SCHEMAV_CVC_ELT_5_2_2_1,
  XML_SCHEMAV_CVC_ELT_5_2_2_2_1,
  XML_SCHEMAV_CVC_ELT_5_2_2_2_2,
  XML_SCHEMAV_CVC_ELT_6,
  XML_SCHEMAV_CVC_ELT_7,
  XML_SCHEMAV_CVC_ATTRIBUTE_1,
  XML_SCHEMAV_CVC_ATTRIBUTE_2,
  XML_SCHEMAV_CVC_ATTRIBUTE_3,
  XML_SCHEMAV_CVC_ATTRIBUTE_4,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_4,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2,
  XML_SCHEMAV_ELEMENT_CONTENT,
  XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING,
  XML_SCHEMAV_CVC_COMPLEX_TYPE_1,
  XML_SCHEMAV_CVC_AU,
  XML_SCHEMAV_CVC_TYPE_1,
  XML_SCHEMAV_CVC_TYPE_2,
  XML_SCHEMAV_CVC_IDC,
  XML_SCHEMAV_CVC_WILDCARD,
  XML_SCHEMAV_MISC,
  XML_XPTR_UNKNOWN_SCHEME = 1900,
  XML_XPTR_CHILDSEQ_START,
  XML_XPTR_EVAL_FAILED,
  XML_XPTR_EXTRA_OBJECTS,
  XML_C14N_CREATE_CTXT = 1950,
  XML_C14N_REQUIRES_UTF8,
  XML_C14N_CREATE_STACK,
  XML_C14N_INVALID_NODE,
  XML_C14N_UNKNOW_NODE,
  XML_C14N_RELATIVE_NAMESPACE,
  XML_FTP_PASV_ANSWER = 2000,
  XML_FTP_EPSV_ANSWER,
  XML_FTP_ACCNT,
  XML_FTP_URL_SYNTAX,
  XML_HTTP_URL_SYNTAX = 2020,
  XML_HTTP_USE_IP,
  XML_HTTP_UNKNOWN_HOST,
  XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
  XML_SCHEMAP_SRC_SIMPLE_TYPE_2,
  XML_SCHEMAP_SRC_SIMPLE_TYPE_3,
  XML_SCHEMAP_SRC_SIMPLE_TYPE_4,
  XML_SCHEMAP_SRC_RESOLVE,
  XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE,
  XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE,
  XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES,
  XML_SCHEMAP_ST_PROPS_CORRECT_1,
  XML_SCHEMAP_ST_PROPS_CORRECT_2,
  XML_SCHEMAP_ST_PROPS_CORRECT_3,
  XML_SCHEMAP_COS_ST_RESTRICTS_1_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_1_2,
  XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4,
  XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4,
  XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5,
  XML_SCHEMAP_COS_ST_DERIVED_OK_2_1,
  XML_SCHEMAP_COS_ST_DERIVED_OK_2_2,
  XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
  XML_SCHEMAP_S4S_ELEM_MISSING,
  XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED,
  XML_SCHEMAP_S4S_ATTR_MISSING,
  XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
  XML_SCHEMAP_SRC_ELEMENT_1,
  XML_SCHEMAP_SRC_ELEMENT_2_1,
  XML_SCHEMAP_SRC_ELEMENT_2_2,
  XML_SCHEMAP_SRC_ELEMENT_3,
  XML_SCHEMAP_P_PROPS_CORRECT_1,
  XML_SCHEMAP_P_PROPS_CORRECT_2_1,
  XML_SCHEMAP_P_PROPS_CORRECT_2_2,
  XML_SCHEMAP_E_PROPS_CORRECT_2,
  XML_SCHEMAP_E_PROPS_CORRECT_3,
  XML_SCHEMAP_E_PROPS_CORRECT_4,
  XML_SCHEMAP_E_PROPS_CORRECT_5,
  XML_SCHEMAP_E_PROPS_CORRECT_6,
  XML_SCHEMAP_SRC_INCLUDE,
  XML_SCHEMAP_SRC_ATTRIBUTE_1,
  XML_SCHEMAP_SRC_ATTRIBUTE_2,
  XML_SCHEMAP_SRC_ATTRIBUTE_3_1,
  XML_SCHEMAP_SRC_ATTRIBUTE_3_2,
  XML_SCHEMAP_SRC_ATTRIBUTE_4,
  XML_SCHEMAP_NO_XMLNS,
  XML_SCHEMAP_NO_XSI,
  XML_SCHEMAP_COS_VALID_DEFAULT_1,
  XML_SCHEMAP_COS_VALID_DEFAULT_2_1,
  XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1,
  XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2,
  XML_SCHEMAP_CVC_SIMPLE_TYPE,
  XML_SCHEMAP_COS_CT_EXTENDS_1_1,
  XML_SCHEMAP_SRC_IMPORT_1_1,
  XML_SCHEMAP_SRC_IMPORT_1_2,
  XML_SCHEMAP_SRC_IMPORT_2,
  XML_SCHEMAP_SRC_IMPORT_2_1,
  XML_SCHEMAP_SRC_IMPORT_2_2,
  XML_SCHEMAP_INTERNAL,
  XML_SCHEMAP_NOT_DETERMINISTIC,
  XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1,
  XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2,
  XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3,
  XML_SCHEMAP_MG_PROPS_CORRECT_1,
  XML_SCHEMAP_MG_PROPS_CORRECT_2,
  XML_SCHEMAP_SRC_CT_1,
  XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3,
  XML_SCHEMAP_AU_PROPS_CORRECT_2,
  XML_SCHEMAP_A_PROPS_CORRECT_2,
  XML_SCHEMAP_C_PROPS_CORRECT,
  XML_SCHEMAP_SRC_REDEFINE,
  XML_SCHEMAP_SRC_IMPORT,
  XML_SCHEMAP_WARN_SKIP_SCHEMA,
  XML_SCHEMAP_WARN_UNLOCATED_SCHEMA,
  XML_SCHEMAP_WARN_ATTR_REDECL_PROH,
  XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
  XML_SCHEMAP_AG_PROPS_CORRECT,
  XML_SCHEMAP_COS_CT_EXTENDS_1_2,
  XML_SCHEMAP_AU_PROPS_CORRECT,
  XML_SCHEMAP_A_PROPS_CORRECT_3,
  XML_SCHEMAP_COS_ALL_LIMITED,
  XML_SCHEMATRONV_ASSERT = 4000,
  XML_SCHEMATRONV_REPORT,
  XML_MODULE_OPEN = 4900,
  XML_MODULE_CLOSE,
  XML_CHECK_FOUND_ELEMENT = 5000,
  XML_CHECK_FOUND_ATTRIBUTE,
  XML_CHECK_FOUND_TEXT,
  XML_CHECK_FOUND_CDATA,
  XML_CHECK_FOUND_ENTITYREF,
  XML_CHECK_FOUND_ENTITY,
  XML_CHECK_FOUND_PI,
  XML_CHECK_FOUND_COMMENT,
  XML_CHECK_FOUND_DOCTYPE,
  XML_CHECK_FOUND_FRAGMENT,
  XML_CHECK_FOUND_NOTATION,
  XML_CHECK_UNKNOWN_NODE,
  XML_CHECK_ENTITY_TYPE,
  XML_CHECK_NO_PARENT,
  XML_CHECK_NO_DOC,
  XML_CHECK_NO_NAME,
  XML_CHECK_NO_ELEM,
  XML_CHECK_WRONG_DOC,
  XML_CHECK_NO_PREV,
  XML_CHECK_WRONG_PREV,
  XML_CHECK_NO_NEXT,
  XML_CHECK_WRONG_NEXT,
  XML_CHECK_NOT_DTD,
  XML_CHECK_NOT_ATTR,
  XML_CHECK_NOT_ATTR_DECL,
  XML_CHECK_NOT_ELEM_DECL,
  XML_CHECK_NOT_ENTITY_DECL,
  XML_CHECK_NOT_NS_DECL,
  XML_CHECK_NO_HREF,
  XML_CHECK_WRONG_PARENT,
  XML_CHECK_NS_SCOPE,
  XML_CHECK_NS_ANCESTOR,
  XML_CHECK_NOT_UTF8,
  XML_CHECK_NO_DICT,
  XML_CHECK_NOT_NCNAME,
  XML_CHECK_OUTSIDE_DICT,
  XML_CHECK_WRONG_NAME,
  XML_CHECK_NAME_NOT_NULL,
  XML_I18N_NO_NAME = 6000,
  XML_I18N_NO_HANDLER,
  XML_I18N_EXCESS_HANDLER,
  XML_I18N_CONV_FAILED,
  XML_I18N_NO_OUTPUT,
  XML_BUF_OVERFLOW = 7000
} xmlParserErrors;

typedef void (*xmlGenericErrorFunc) (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);

void xmlSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler);
void initGenericErrorDefaultFunc (xmlGenericErrorFunc * handler);
void xmlSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler);

void xmlParserError (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
void xmlParserWarning (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
void xmlParserValidityError (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
void xmlParserValidityWarning (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
void xmlParserPrintFileInfo (xmlParserInputPtr input);
void xmlParserPrintFileContext (xmlParserInputPtr input);
xmlErrorPtr xmlGetLastError (void);
void xmlResetLastError (void);
xmlErrorPtr xmlCtxtGetLastError (void *ctx);
void xmlCtxtResetLastError (void *ctx);
void xmlResetError (xmlErrorPtr err);
int xmlCopyError (xmlErrorPtr from, xmlErrorPtr to);
typedef struct _xmlLink xmlLink;
typedef xmlLink *xmlLinkPtr;
typedef struct _xmlList xmlList;
typedef xmlList *xmlListPtr;
typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
typedef int (*xmlListWalker) (const void *data, const void *user);

xmlListPtr xmlListCreate (xmlListDeallocator deallocator, xmlListDataCompare compare);
void xmlListDelete (xmlListPtr l);
void *xmlListSearch (xmlListPtr l, void *data);
void *xmlListReverseSearch (xmlListPtr l, void *data);
int xmlListInsert (xmlListPtr l, void *data);
int xmlListAppend (xmlListPtr l, void *data);
int xmlListRemoveFirst (xmlListPtr l, void *data);
int xmlListRemoveLast (xmlListPtr l, void *data);
int xmlListRemoveAll (xmlListPtr l, void *data);
void xmlListClear (xmlListPtr l);
int xmlListEmpty (xmlListPtr l);
xmlLinkPtr xmlListFront (xmlListPtr l);
xmlLinkPtr xmlListEnd (xmlListPtr l);
int xmlListSize (xmlListPtr l);
void xmlListPopFront (xmlListPtr l);
void xmlListPopBack (xmlListPtr l);
int xmlListPushFront (xmlListPtr l, void *data);
int xmlListPushBack (xmlListPtr l, void *data);
void xmlListReverse (xmlListPtr l);
void xmlListSort (xmlListPtr l);
void xmlListWalk (xmlListPtr l, xmlListWalker walker, const void *user);
void xmlListReverseWalk (xmlListPtr l, xmlListWalker walker, const void *user);
void xmlListMerge (xmlListPtr l1, xmlListPtr l2);
xmlListPtr xmlListDup (const xmlListPtr old);
int xmlListCopy (xmlListPtr cur, const xmlListPtr old);
void *xmlLinkGetData (xmlLinkPtr lk);
typedef struct _xmlAutomata xmlAutomata;
typedef xmlAutomata *xmlAutomataPtr;

typedef struct _xmlAutomataState xmlAutomataState;
typedef xmlAutomataState *xmlAutomataStatePtr;

xmlAutomataPtr xmlNewAutomata (void);
void xmlFreeAutomata (xmlAutomataPtr am);

xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am);
int xmlAutomataSetFinalState (xmlAutomataPtr am, xmlAutomataStatePtr state);
xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am);
xmlAutomataStatePtr
xmlAutomataNewTransition (xmlAutomataPtr am,
			  xmlAutomataStatePtr from,
			  xmlAutomataStatePtr to,
			  const xmlChar * token, void *data);
xmlAutomataStatePtr
xmlAutomataNewTransition2 (xmlAutomataPtr am,
			   xmlAutomataStatePtr from,
			   xmlAutomataStatePtr to,
			   const xmlChar * token,
			   const xmlChar * token2, void *data);
xmlAutomataStatePtr
xmlAutomataNewNegTrans (xmlAutomataPtr am,
			xmlAutomataStatePtr from,
			xmlAutomataStatePtr to,
			const xmlChar * token,
			const xmlChar * token2, void *data);

xmlAutomataStatePtr
xmlAutomataNewCountTrans (xmlAutomataPtr am,
			  xmlAutomataStatePtr from,
			  xmlAutomataStatePtr to,
			  const xmlChar * token,
			  int min, int max, void *data);
xmlAutomataStatePtr
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
			   xmlAutomataStatePtr from,
			   xmlAutomataStatePtr to,
			   const xmlChar * token,
			   const xmlChar * token2,
			   int min, int max, void *data);
xmlAutomataStatePtr
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
			 xmlAutomataStatePtr from,
			 xmlAutomataStatePtr to,
			 const xmlChar * token, int min, int max, void *data);
xmlAutomataStatePtr
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
			  xmlAutomataStatePtr from,
			  xmlAutomataStatePtr to,
			  const xmlChar * token,
			  const xmlChar * token2,
			  int min, int max, void *data);
xmlAutomataStatePtr
xmlAutomataNewAllTrans (xmlAutomataPtr am,
			xmlAutomataStatePtr from,
			xmlAutomataStatePtr to, int lax);
xmlAutomataStatePtr
xmlAutomataNewEpsilon (xmlAutomataPtr am,
		       xmlAutomataStatePtr from, xmlAutomataStatePtr to);
xmlAutomataStatePtr
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
			    xmlAutomataStatePtr from,
			    xmlAutomataStatePtr to, int counter);
xmlAutomataStatePtr
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
			    xmlAutomataStatePtr from,
			    xmlAutomataStatePtr to, int counter);
int xmlAutomataNewCounter (xmlAutomataPtr am, int min, int max);

xmlRegexpPtr xmlAutomataCompile (xmlAutomataPtr am);
int xmlAutomataIsDeterminist (xmlAutomataPtr am);
typedef struct _xmlValidState xmlValidState;
typedef xmlValidState *xmlValidStatePtr;
typedef void (*xmlValidityErrorFunc) (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
typedef void (*xmlValidityWarningFunc) (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
typedef struct _xmlValidCtxt xmlValidCtxt;
typedef xmlValidCtxt *xmlValidCtxtPtr;

struct _xmlValidCtxt
{
  void *userData;
  xmlValidityErrorFunc error;
  xmlValidityWarningFunc warning;
  xmlNodePtr node;
  int nodeNr;
  int nodeMax;
  xmlNodePtr *nodeTab;
  unsigned int finishDtd;
  xmlDocPtr doc;
  int valid;
  xmlValidState *vstate;
  int vstateNr;
  int vstateMax;
  xmlValidState *vstateTab;
  xmlAutomataPtr am;
  xmlAutomataStatePtr state;
};

typedef struct _xmlHashTable xmlNotationTable;
typedef xmlNotationTable *xmlNotationTablePtr;
typedef struct _xmlHashTable xmlElementTable;
typedef xmlElementTable *xmlElementTablePtr;
typedef struct _xmlHashTable xmlAttributeTable;
typedef xmlAttributeTable *xmlAttributeTablePtr;
typedef struct _xmlHashTable xmlIDTable;
typedef xmlIDTable *xmlIDTablePtr;
typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr;

xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
				   xmlDtdPtr dtd,
				   const xmlChar * name,
				   const xmlChar * PublicID, const xmlChar * SystemID);

xmlNotationTablePtr xmlCopyNotationTable (xmlNotationTablePtr table);

void xmlFreeNotationTable (xmlNotationTablePtr table);

void xmlDumpNotationDecl (xmlBufferPtr buf, xmlNotationPtr nota);
void xmlDumpNotationTable (xmlBufferPtr buf, xmlNotationTablePtr table);

xmlElementContentPtr xmlNewElementContent (const xmlChar * name, xmlElementContentType type);
xmlElementContentPtr xmlCopyElementContent (xmlElementContentPtr content);
void xmlFreeElementContent (xmlElementContentPtr cur);

xmlElementContentPtr xmlNewDocElementContent (xmlDocPtr doc,
					      const xmlChar * name, xmlElementContentType type);
xmlElementContentPtr xmlCopyDocElementContent (xmlDocPtr doc, xmlElementContentPtr content);
void xmlFreeDocElementContent (xmlDocPtr doc, xmlElementContentPtr cur);
void xmlSnprintfElementContent (char *buf,
				int size,
				xmlElementContentPtr content, int englob);

void xmlSprintfElementContent (char *buf,
			       xmlElementContentPtr content, int englob);

xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
				 xmlDtdPtr dtd,
				 const xmlChar * name,
				 xmlElementTypeVal type, xmlElementContentPtr content);

xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);

void xmlFreeElementTable (xmlElementTablePtr table);
void xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table);
void xmlDumpElementDecl (xmlBufferPtr buf, xmlElementPtr elem);
xmlEnumerationPtr xmlCreateEnumeration (const xmlChar * name);
void xmlFreeEnumeration (xmlEnumerationPtr cur);
xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur);

xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
				     xmlDtdPtr dtd,
				     const xmlChar * elem,
				     const xmlChar * name,
				     const xmlChar * ns,
				     xmlAttributeType type,
				     xmlAttributeDefault def,
				     const xmlChar * defaultValue, xmlEnumerationPtr tree);

xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
void xmlFreeAttributeTable (xmlAttributeTablePtr table);
void xmlDumpAttributeTable (xmlBufferPtr buf, xmlAttributeTablePtr table);
void xmlDumpAttributeDecl (xmlBufferPtr buf, xmlAttributePtr attr);

xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt,
		   xmlDocPtr doc, const xmlChar * value, xmlAttrPtr attr);
void xmlFreeIDTable (xmlIDTablePtr table);
xmlAttrPtr xmlGetID (xmlDocPtr doc, const xmlChar * ID);
int xmlIsID (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr);
int xmlRemoveID (xmlDocPtr doc, xmlAttrPtr attr);

xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt,
		     xmlDocPtr doc, const xmlChar * value, xmlAttrPtr attr);
void xmlFreeRefTable (xmlRefTablePtr table);
int xmlIsRef (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr);
int xmlRemoveRef (xmlDocPtr doc, xmlAttrPtr attr);
xmlListPtr xmlGetRefs (xmlDocPtr doc, const xmlChar * ID);

xmlValidCtxtPtr xmlNewValidCtxt (void);
void xmlFreeValidCtxt (xmlValidCtxtPtr);
int xmlValidateRoot (xmlValidCtxtPtr ctxt, xmlDocPtr doc);
int xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
			    xmlDocPtr doc, xmlElementPtr elem);
xmlChar *xmlValidNormalizeAttributeValue (xmlDocPtr doc,
					  xmlNodePtr elem,
					  const xmlChar * name,
					  const xmlChar * value);
xmlChar *xmlValidCtxtNormalizeAttributeValue (xmlValidCtxtPtr ctxt,
					      xmlDocPtr doc,
					      xmlNodePtr elem,
					      const xmlChar * name,
					      const xmlChar * value);
int xmlValidateAttributeDecl (xmlValidCtxtPtr ctxt,
			      xmlDocPtr doc, xmlAttributePtr attr);
int xmlValidateAttributeValue (xmlAttributeType type, const xmlChar * value);
int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
			     xmlDocPtr doc, xmlNotationPtr nota);
int xmlValidateDtd (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd);
int xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, xmlDocPtr doc);
int xmlValidateDocument (xmlValidCtxtPtr ctxt, xmlDocPtr doc);
int xmlValidateElement (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem);
int xmlValidateOneElement (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem);
int xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
			     xmlDocPtr doc,
			     xmlNodePtr elem,
			     xmlAttrPtr attr, const xmlChar * value);
int xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
			     xmlDocPtr doc,
			     xmlNodePtr elem,
			     const xmlChar * prefix,
			     xmlNsPtr ns, const xmlChar * value);
int xmlValidateDocumentFinal (xmlValidCtxtPtr ctxt, xmlDocPtr doc);



int
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
			xmlDocPtr doc, const xmlChar * notationName);


int xmlIsMixedElement (xmlDocPtr doc, const xmlChar * name);
xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd, const xmlChar * elem, const xmlChar * name);
xmlAttributePtr xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
				    const xmlChar * elem,
				    const xmlChar * name, const xmlChar * prefix);
xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd, const xmlChar * name);
xmlElementPtr xmlGetDtdQElementDesc (xmlDtdPtr dtd,
				     const xmlChar * name, const xmlChar * prefix);
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd, const xmlChar * name);

int xmlValidGetPotentialChildren (xmlElementContent * ctree,
				  const xmlChar ** names, int *len, int max);

int xmlValidGetValidElements (xmlNode * prev,
			      xmlNode * next, const xmlChar ** names, int max);
int xmlValidateNameValue (const xmlChar * value);
int xmlValidateNamesValue (const xmlChar * value);
int xmlValidateNmtokenValue (const xmlChar * value);
int xmlValidateNmtokensValue (const xmlChar * value);

int xmlValidBuildContentModel (xmlValidCtxtPtr ctxt, xmlElementPtr elem);

int
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
			xmlDocPtr doc,
			xmlNodePtr elem, const xmlChar * qname);
int
xmlValidatePushCData (xmlValidCtxtPtr ctxt, const xmlChar * data, int len);
int
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
		       xmlDocPtr doc, xmlNodePtr elem, const xmlChar * qname);
typedef enum
  {
    XML_INTERNAL_GENERAL_ENTITY = 1,
    XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
    XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
    XML_INTERNAL_PARAMETER_ENTITY = 4,
    XML_EXTERNAL_PARAMETER_ENTITY = 5,
    XML_INTERNAL_PREDEFINED_ENTITY = 6
  } xmlEntityType;

struct _xmlEntity
{
  void *_private;
  xmlElementType type;
  const xmlChar *name;
  struct _xmlNode *children;
  struct _xmlNode *last;
  struct _xmlDtd *parent;
  struct _xmlNode *next;
  struct _xmlNode *prev;
  struct _xmlDoc *doc;

  xmlChar *orig;
  xmlChar *content;
  int length;
  xmlEntityType etype;
  const xmlChar *ExternalID;
  const xmlChar *SystemID;

  struct _xmlEntity *nexte;
  const xmlChar *URI;
  int owner;
  int checked;
};

typedef struct _xmlHashTable xmlEntitiesTable;
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
void xmlInitializePredefinedEntities (void);

xmlEntityPtr
xmlNewEntity (xmlDocPtr doc,
	      const xmlChar * name,
	      int type,
	      const xmlChar * ExternalID,
	      const xmlChar * SystemID, const xmlChar * content);
xmlEntityPtr
xmlAddDocEntity (xmlDocPtr doc,
		 const xmlChar * name,
		 int type,
		 const xmlChar * ExternalID,
		 const xmlChar * SystemID, const xmlChar * content);
xmlEntityPtr
xmlAddDtdEntity (xmlDocPtr doc,
		 const xmlChar * name,
		 int type,
		 const xmlChar * ExternalID,
		 const xmlChar * SystemID, const xmlChar * content);
xmlEntityPtr xmlGetPredefinedEntity (const xmlChar * name);
xmlEntityPtr xmlGetDocEntity (const xmlDoc * doc, const xmlChar * name);
xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, const xmlChar * name);
xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, const xmlChar * name);
const xmlChar *xmlEncodeEntities (xmlDocPtr doc, const xmlChar * input);
xmlChar *xmlEncodeEntitiesReentrant (xmlDocPtr doc, const xmlChar * input);
xmlChar *xmlEncodeSpecialChars (const xmlDoc * doc, const xmlChar * input);
xmlEntitiesTablePtr xmlCreateEntitiesTable (void);

xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
void xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
void xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table);
void xmlDumpEntityDecl (xmlBufferPtr buf, xmlEntityPtr ent);
void xmlCleanupPredefinedEntities (void);
typedef void (*xmlParserInputDeallocate) (xmlChar * str);

struct _xmlParserInput
{
  xmlParserInputBufferPtr buf;
  const char *filename;
  const char *directory;
  const xmlChar *base;
  const xmlChar *cur;
  const xmlChar *end;
  int length;
  int line;
  int col;
  unsigned long consumed;
  xmlParserInputDeallocate free;
  const xmlChar *encoding;
  const xmlChar *version;
  int standalone;
  int id;
};

typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;

struct _xmlParserNodeInfo
{
  const struct _xmlNode *node;
  unsigned long begin_pos;
  unsigned long begin_line;
  unsigned long end_pos;
  unsigned long end_line;
};

typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
struct _xmlParserNodeInfoSeq
{
  unsigned long maximum;
  unsigned long length;
  xmlParserNodeInfo *buffer;
};

typedef enum
  {
    XML_PARSER_EOF = -1,
    XML_PARSER_START = 0,
    XML_PARSER_MISC,
    XML_PARSER_PI,
    XML_PARSER_DTD,
    XML_PARSER_PROLOG,
    XML_PARSER_COMMENT,
    XML_PARSER_START_TAG,
    XML_PARSER_CONTENT,
    XML_PARSER_CDATA_SECTION,
    XML_PARSER_END_TAG,
    XML_PARSER_ENTITY_DECL,
    XML_PARSER_ENTITY_VALUE,
    XML_PARSER_ATTRIBUTE_VALUE,
    XML_PARSER_SYSTEM_LITERAL,
    XML_PARSER_EPILOG,
    XML_PARSER_IGNORE,
    XML_PARSER_PUBLIC_LITERAL
  } xmlParserInputState;

typedef enum
  {
    XML_PARSE_UNKNOWN = 0,
    XML_PARSE_DOM = 1,
    XML_PARSE_SAX = 2,
    XML_PARSE_PUSH_DOM = 3,
    XML_PARSE_PUSH_SAX = 4,
    XML_PARSE_READER = 5
  } xmlParserMode;

struct _xmlParserCtxt
{
  struct _xmlSAXHandler *sax;
  void *userData;
  xmlDocPtr myDoc;
  int wellFormed;
  int replaceEntities;
  const xmlChar *version;
  const xmlChar *encoding;
  int standalone;
  int html;
  xmlParserInputPtr input;
  int inputNr;
  int inputMax;
  xmlParserInputPtr *inputTab;
  xmlNodePtr node;
  int nodeNr;
  int nodeMax;
  xmlNodePtr *nodeTab;
  int record_info;
  xmlParserNodeInfoSeq node_seq;
  int errNo;
  int hasExternalSubset;
  int hasPErefs;
  int external;
  int valid;
  int validate;
  xmlValidCtxt vctxt;
  xmlParserInputState instate;
  int token;
  char *directory;
  const xmlChar *name;
  int nameNr;
  int nameMax;
  const xmlChar **nameTab;
  long nbChars;
  long checkIndex;
  int keepBlanks;
  int disableSAX;
  int inSubset;
  const xmlChar *intSubName;
  xmlChar *extSubURI;
  xmlChar *extSubSystem;
  int *space;
  int spaceNr;
  int spaceMax;
  int *spaceTab;
  int depth;
  xmlParserInputPtr entity;
  int charset;
  int nodelen;
  int nodemem;
  int pedantic;
  void *_private;
  int loadsubset;
  int linenumbers;
  void *catalogs;
  int recovery;
  int progressive;
  xmlDictPtr dict;
  const xmlChar **atts;
  int maxatts;
  int docdict;
  const xmlChar *str_xml;
  const xmlChar *str_xmlns;
  const xmlChar *str_xml_ns;
  int sax2;
  int nsNr;
  int nsMax;
  const xmlChar **nsTab;
  int *attallocs;
  void **pushTab;
  xmlHashTablePtr attsDefault;
  xmlHashTablePtr attsSpecial;
  int nsWellFormed;
  int options;
  int dictNames;
  int freeElemsNr;
  xmlNodePtr freeElems;
  int freeAttrsNr;
  xmlAttrPtr freeAttrs;
  xmlError lastError;
  xmlParserMode parseMode;
  unsigned long nbentities;
  unsigned long sizeentities;
  xmlParserNodeInfo *nodeInfo;
  int nodeInfoNr;
  int nodeInfoMax;
  xmlParserNodeInfo *nodeInfoTab;
  int input_id;
  unsigned long sizeentcopy;
};

struct _xmlSAXLocator
{
  const xmlChar *(*getPublicId) (void *ctx);
  const xmlChar *(*getSystemId) (void *ctx);
  int (*getLineNumber) (void *ctx);
  int (*getColumnNumber) (void *ctx);
};

typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
						   const xmlChar * publicId,
						   const xmlChar * systemId);
typedef void (*internalSubsetSAXFunc) (void *ctx,
				       const xmlChar * name,
				       const xmlChar * ExternalID,
				       const xmlChar * SystemID);
typedef void (*externalSubsetSAXFunc) (void *ctx,
				       const xmlChar * name,
				       const xmlChar * ExternalID,
				       const xmlChar * SystemID);
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, const xmlChar * name);
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
						   const xmlChar * name);
typedef void (*entityDeclSAXFunc) (void *ctx,
				   const xmlChar * name,
				   int type,
				   const xmlChar * publicId,
				   const xmlChar * systemId,
				   xmlChar * content);
typedef void (*notationDeclSAXFunc) (void *ctx,
				     const xmlChar * name,
				     const xmlChar * publicId,
				     const xmlChar * systemId);
typedef void (*attributeDeclSAXFunc) (void *ctx,
				      const xmlChar * elem,
				      const xmlChar * fullname,
				      int type,
				      int def,
				      const xmlChar * defaultValue,
				      xmlEnumerationPtr tree);
typedef void (*elementDeclSAXFunc) (void *ctx,
				    const xmlChar * name,
				    int type, xmlElementContentPtr content);
typedef void (*unparsedEntityDeclSAXFunc) (void *ctx,
					   const xmlChar * name,
					   const xmlChar * publicId,
					   const xmlChar * systemId,
					   const xmlChar * notationName);
typedef void (*setDocumentLocatorSAXFunc) (void *ctx, xmlSAXLocatorPtr loc);
typedef void (*startDocumentSAXFunc) (void *ctx);
typedef void (*endDocumentSAXFunc) (void *ctx);
typedef void (*startElementSAXFunc) (void *ctx,
				     const xmlChar * name,
				     const xmlChar ** atts);
typedef void (*endElementSAXFunc) (void *ctx, const xmlChar * name);
typedef void (*attributeSAXFunc) (void *ctx,
				  const xmlChar * name,
				  const xmlChar * value);
typedef void (*referenceSAXFunc) (void *ctx, const xmlChar * name);
typedef void (*charactersSAXFunc) (void *ctx, const xmlChar * ch, int len);
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
					    const xmlChar * ch, int len);
typedef void (*processingInstructionSAXFunc) (void *ctx,
					      const xmlChar * target,
					      const xmlChar * data);

typedef void (*commentSAXFunc) (void *ctx, const xmlChar * value);
typedef void (*cdataBlockSAXFunc) (void *ctx, const xmlChar * value, int len);
typedef void (*warningSAXFunc) (void *ctx,
				const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...)
  __attribute__ ((__format__ (__printf__, 2, 3)));
typedef int (*isStandaloneSAXFunc) (void *ctx);
typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
typedef void (*startElementNsSAX2Func) (void *ctx,
					const xmlChar * localname,
					const xmlChar * prefix,
					const xmlChar * URI,
					int nb_namespaces,
					const xmlChar ** namespaces,
					int nb_attributes,
					int nb_defaulted,
					const xmlChar ** attributes);
typedef void (*endElementNsSAX2Func) (void *ctx,
				      const xmlChar * localname,
				      const xmlChar * prefix,
				      const xmlChar * URI);


struct _xmlSAXHandler
{
  internalSubsetSAXFunc internalSubset;
  isStandaloneSAXFunc isStandalone;
  hasInternalSubsetSAXFunc hasInternalSubset;
  hasExternalSubsetSAXFunc hasExternalSubset;
  resolveEntitySAXFunc resolveEntity;
  getEntitySAXFunc getEntity;
  entityDeclSAXFunc entityDecl;
  notationDeclSAXFunc notationDecl;
  attributeDeclSAXFunc attributeDecl;
  elementDeclSAXFunc elementDecl;
  unparsedEntityDeclSAXFunc unparsedEntityDecl;
  setDocumentLocatorSAXFunc setDocumentLocator;
  startDocumentSAXFunc startDocument;
  endDocumentSAXFunc endDocument;
  startElementSAXFunc startElement;
  endElementSAXFunc endElement;
  referenceSAXFunc reference;
  charactersSAXFunc characters;
  ignorableWhitespaceSAXFunc ignorableWhitespace;
  processingInstructionSAXFunc processingInstruction;
  commentSAXFunc comment;
  warningSAXFunc warning;
  errorSAXFunc error;
  fatalErrorSAXFunc fatalError;
  getParameterEntitySAXFunc getParameterEntity;
  cdataBlockSAXFunc cdataBlock;
  externalSubsetSAXFunc externalSubset;
  unsigned int initialized;

  void *_private;
  startElementNsSAX2Func startElementNs;
  endElementNsSAX2Func endElementNs;
  xmlStructuredErrorFunc serror;
};

typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
struct _xmlSAXHandlerV1
{
  internalSubsetSAXFunc internalSubset;
  isStandaloneSAXFunc isStandalone;
  hasInternalSubsetSAXFunc hasInternalSubset;
  hasExternalSubsetSAXFunc hasExternalSubset;
  resolveEntitySAXFunc resolveEntity;
  getEntitySAXFunc getEntity;
  entityDeclSAXFunc entityDecl;
  notationDeclSAXFunc notationDecl;
  attributeDeclSAXFunc attributeDecl;
  elementDeclSAXFunc elementDecl;
  unparsedEntityDeclSAXFunc unparsedEntityDecl;
  setDocumentLocatorSAXFunc setDocumentLocator;
  startDocumentSAXFunc startDocument;
  endDocumentSAXFunc endDocument;
  startElementSAXFunc startElement;
  endElementSAXFunc endElement;
  referenceSAXFunc reference;
  charactersSAXFunc characters;
  ignorableWhitespaceSAXFunc ignorableWhitespace;
  processingInstructionSAXFunc processingInstruction;
  commentSAXFunc comment;
  warningSAXFunc warning;
  errorSAXFunc error;
  fatalErrorSAXFunc fatalError;
  getParameterEntitySAXFunc getParameterEntity;
  cdataBlockSAXFunc cdataBlock;
  externalSubsetSAXFunc externalSubset;
  unsigned int initialized;
};
typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
						      const char *ID,
						      xmlParserCtxtPtr
						      context);

typedef void *iconv_t;
extern iconv_t iconv_open (const char *__tocode, const char *__fromcode);
extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
		     size_t * __restrict __inbytesleft,
		     char **__restrict __outbuf,
		     size_t * __restrict __outbytesleft);

extern int iconv_close (iconv_t __cd);
typedef int8_t UBool;
typedef short unsigned int UChar;
typedef int32_t UChar32;
typedef uint8_t UVersionInfo[4];

extern __attribute__ ((visibility ("default")))
void u_versionFromString_52 (UVersionInfo versionArray,
			     const char *versionString);
extern __attribute__ ((visibility ("default")))
void u_versionFromUString_52 (UVersionInfo versionArray,
			      const UChar * versionString);
extern __attribute__ ((visibility ("default")))
void u_versionToString_52 (const UVersionInfo versionArray,
			   char *versionString);
extern __attribute__ ((visibility ("default")))
void u_getVersion_52 (UVersionInfo versionArray);

extern const uint8_t utf8_countTrailBytes_52[256];
extern __attribute__ ((visibility ("default")))
UChar32 utf8_nextCharSafeBody_52 (const uint8_t * s, int32_t * pi, int32_t length,
				  UChar32 c, UBool strict);
extern __attribute__ ((visibility ("default")))
int32_t utf8_appendCharSafeBody_52 (uint8_t * s, int32_t i, int32_t length,
				    UChar32 c, UBool * pIsError);
extern __attribute__ ((visibility ("default")))
UChar32   utf8_prevCharSafeBody_52 (const uint8_t * s, int32_t start, int32_t * pi,
				    UChar32 c, UBool strict);
extern __attribute__ ((visibility ("default"))) int32_t
utf8_back1SafeBody_52 (const uint8_t * s, int32_t start, int32_t i);

typedef double UDate;

typedef enum UErrorCode {
  U_USING_FALLBACK_WARNING = -128,
  U_ERROR_WARNING_START = -128,
  U_USING_DEFAULT_WARNING = -127,
  U_SAFECLONE_ALLOCATED_WARNING = -126,
  U_STATE_OLD_WARNING = -125,
  U_STRING_NOT_TERMINATED_WARNING = -124,
  U_SORT_KEY_TOO_SHORT_WARNING = -123,
  U_AMBIGUOUS_ALIAS_WARNING = -122,
  U_DIFFERENT_UCA_VERSION = -121,
  U_PLUGIN_CHANGED_LEVEL_WARNING = -120,
  U_ERROR_WARNING_LIMIT,
  U_ZERO_ERROR = 0,
  U_ILLEGAL_ARGUMENT_ERROR = 1,
  U_MISSING_RESOURCE_ERROR = 2,
  U_INVALID_FORMAT_ERROR = 3,
  U_FILE_ACCESS_ERROR = 4,
  U_INTERNAL_PROGRAM_ERROR = 5,
  U_MESSAGE_PARSE_ERROR = 6,
  U_MEMORY_ALLOCATION_ERROR = 7,
  U_INDEX_OUTOFBOUNDS_ERROR = 8,
  U_PARSE_ERROR = 9,
  U_INVALID_CHAR_FOUND = 10,
  U_TRUNCATED_CHAR_FOUND = 11,
  U_ILLEGAL_CHAR_FOUND = 12,
  U_INVALID_TABLE_FORMAT = 13,
  U_INVALID_TABLE_FILE = 14,
  U_BUFFER_OVERFLOW_ERROR = 15,
  U_UNSUPPORTED_ERROR = 16,
  U_RESOURCE_TYPE_MISMATCH = 17,
  U_ILLEGAL_ESCAPE_SEQUENCE = 18,
  U_UNSUPPORTED_ESCAPE_SEQUENCE = 19,
  U_NO_SPACE_AVAILABLE = 20,
  U_CE_NOT_FOUND_ERROR = 21,
  U_PRIMARY_TOO_LONG_ERROR = 22,
  U_STATE_TOO_OLD_ERROR = 23,
  U_TOO_MANY_ALIASES_ERROR = 24,
  U_ENUM_OUT_OF_SYNC_ERROR = 25,
  U_INVARIANT_CONVERSION_ERROR = 26,
  U_INVALID_STATE_ERROR = 27,
  U_COLLATOR_VERSION_MISMATCH = 28,
  U_USELESS_COLLATOR_ERROR = 29,
  U_NO_WRITE_PERMISSION = 30,
  U_STANDARD_ERROR_LIMIT,
  U_BAD_VARIABLE_DEFINITION = 0x10000,
  U_PARSE_ERROR_START = 0x10000,
  U_MALFORMED_RULE,
  U_MALFORMED_SET,
  U_MALFORMED_SYMBOL_REFERENCE,
  U_MALFORMED_UNICODE_ESCAPE,
  U_MALFORMED_VARIABLE_DEFINITION,
  U_MALFORMED_VARIABLE_REFERENCE,
  U_MISMATCHED_SEGMENT_DELIMITERS,
  U_MISPLACED_ANCHOR_START,
  U_MISPLACED_CURSOR_OFFSET,
  U_MISPLACED_QUANTIFIER,
  U_MISSING_OPERATOR,
  U_MISSING_SEGMENT_CLOSE,
  U_MULTIPLE_ANTE_CONTEXTS,
  U_MULTIPLE_CURSORS,
  U_MULTIPLE_POST_CONTEXTS,
  U_TRAILING_BACKSLASH,
  U_UNDEFINED_SEGMENT_REFERENCE,
  U_UNDEFINED_VARIABLE,
  U_UNQUOTED_SPECIAL,
  U_UNTERMINATED_QUOTE,
  U_RULE_MASK_ERROR,
  U_MISPLACED_COMPOUND_FILTER,
  U_MULTIPLE_COMPOUND_FILTERS,
  U_INVALID_RBT_SYNTAX,
  U_INVALID_PROPERTY_PATTERN,
  U_MALFORMED_PRAGMA,
  U_UNCLOSED_SEGMENT,
  U_ILLEGAL_CHAR_IN_SEGMENT,
  U_VARIABLE_RANGE_EXHAUSTED,
  U_VARIABLE_RANGE_OVERLAP,
  U_ILLEGAL_CHARACTER,
  U_INTERNAL_TRANSLITERATOR_ERROR,
  U_INVALID_ID,
  U_INVALID_FUNCTION,
  U_PARSE_ERROR_LIMIT,
  U_UNEXPECTED_TOKEN = 0x10100,
  U_FMT_PARSE_ERROR_START = 0x10100,
  U_MULTIPLE_DECIMAL_SEPARATORS,
  U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS,
  U_MULTIPLE_EXPONENTIAL_SYMBOLS,
  U_MALFORMED_EXPONENTIAL_PATTERN,
  U_MULTIPLE_PERCENT_SYMBOLS,
  U_MULTIPLE_PERMILL_SYMBOLS,
  U_MULTIPLE_PAD_SPECIFIERS,
  U_PATTERN_SYNTAX_ERROR,
  U_ILLEGAL_PAD_POSITION,
  U_UNMATCHED_BRACES,
  U_UNSUPPORTED_PROPERTY,
  U_UNSUPPORTED_ATTRIBUTE,
  U_ARGUMENT_TYPE_MISMATCH,
  U_DUPLICATE_KEYWORD,
  U_UNDEFINED_KEYWORD,
  U_DEFAULT_KEYWORD_MISSING,
  U_DECIMAL_NUMBER_SYNTAX_ERROR,
  U_FORMAT_INEXACT_ERROR,
  U_FMT_PARSE_ERROR_LIMIT,
  U_BRK_INTERNAL_ERROR = 0x10200,
  U_BRK_ERROR_START = 0x10200,
  U_BRK_HEX_DIGITS_EXPECTED,
  U_BRK_SEMICOLON_EXPECTED,
  U_BRK_RULE_SYNTAX,
  U_BRK_UNCLOSED_SET,
  U_BRK_ASSIGN_ERROR,
  U_BRK_VARIABLE_REDFINITION,
  U_BRK_MISMATCHED_PAREN,
  U_BRK_NEW_LINE_IN_QUOTED_STRING,
  U_BRK_UNDEFINED_VARIABLE,
  U_BRK_INIT_ERROR,
  U_BRK_RULE_EMPTY_SET,
  U_BRK_UNRECOGNIZED_OPTION,
  U_BRK_MALFORMED_RULE_TAG,
  U_BRK_ERROR_LIMIT,
  U_REGEX_INTERNAL_ERROR = 0x10300,
  U_REGEX_ERROR_START = 0x10300,
  U_REGEX_RULE_SYNTAX,
  U_REGEX_INVALID_STATE,
  U_REGEX_BAD_ESCAPE_SEQUENCE,
  U_REGEX_PROPERTY_SYNTAX,
  U_REGEX_UNIMPLEMENTED,
  U_REGEX_MISMATCHED_PAREN,
  U_REGEX_NUMBER_TOO_BIG,
  U_REGEX_BAD_INTERVAL,
  U_REGEX_MAX_LT_MIN,
  U_REGEX_INVALID_BACK_REF,
  U_REGEX_INVALID_FLAG,
  U_REGEX_LOOK_BEHIND_LIMIT,
  U_REGEX_SET_CONTAINS_STRING,
  U_REGEX_OCTAL_TOO_BIG,
  U_REGEX_MISSING_CLOSE_BRACKET,
  U_REGEX_INVALID_RANGE,
  U_REGEX_STACK_OVERFLOW,
  U_REGEX_TIME_OUT,
  U_REGEX_STOPPED_BY_CALLER,
  U_REGEX_PATTERN_TOO_BIG,
  U_REGEX_ERROR_LIMIT,
  U_IDNA_PROHIBITED_ERROR = 0x10400,
  U_IDNA_ERROR_START = 0x10400,
  U_IDNA_UNASSIGNED_ERROR,
  U_IDNA_CHECK_BIDI_ERROR,
  U_IDNA_STD3_ASCII_RULES_ERROR,
  U_IDNA_ACE_PREFIX_ERROR,
  U_IDNA_VERIFICATION_ERROR,
  U_IDNA_LABEL_TOO_LONG_ERROR,
  U_IDNA_ZERO_LENGTH_LABEL_ERROR,
  U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR,
  U_IDNA_ERROR_LIMIT,
  U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR,
  U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR,
  U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR,
  U_PLUGIN_ERROR_START = 0x10500,
  U_PLUGIN_TOO_HIGH = 0x10500,
  U_PLUGIN_DIDNT_SET_LEVEL,
  U_PLUGIN_ERROR_LIMIT,
  U_ERROR_LIMIT = U_PLUGIN_ERROR_LIMIT
} UErrorCode;

extern __attribute__ ((visibility ("default")))
const char * u_errorName_52 (UErrorCode code);

struct UConverter;

typedef struct UConverter UConverter;
typedef enum {
  UCNV_UNASSIGNED = 0,
  UCNV_ILLEGAL = 1,
  UCNV_IRREGULAR = 2,
  UCNV_RESET = 3,
  UCNV_CLOSE = 4,
  UCNV_CLONE = 5
} UConverterCallbackReason;

typedef struct
{
  uint16_t size;
  UBool flush;
  UConverter *converter;
  const UChar *source;
  const UChar *sourceLimit;
  char *target;
  const char *targetLimit;
  int32_t * offsets;
} UConverterFromUnicodeArgs;

typedef struct
{
  uint16_t size;
  UBool flush;
  UConverter *converter;
  const char *source;
  const char *sourceLimit;
  UChar *target;
  const UChar *targetLimit;
  int32_t *offsets;
} UConverterToUnicodeArgs;

extern __attribute__ ((visibility ("default")))
void UCNV_FROM_U_CALLBACK_STOP_52 (const void *context,
				   UConverterFromUnicodeArgs * fromUArgs,
				   const UChar * codeUnits,
				   int32_t length,
				   UChar32 codePoint,
				   UConverterCallbackReason reason,
				   UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_TO_U_CALLBACK_STOP_52 (const void *context,
				 UConverterToUnicodeArgs * toUArgs,
				 const char *codeUnits,
				 int32_t length,
				 UConverterCallbackReason reason,
				 UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_FROM_U_CALLBACK_SKIP_52 (const void *context,
				   UConverterFromUnicodeArgs * fromUArgs,
				   const UChar * codeUnits,
				   int32_t length,
				   UChar32 codePoint,
				   UConverterCallbackReason reason,
				   UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_FROM_U_CALLBACK_SUBSTITUTE_52 (const void *context,
					 UConverterFromUnicodeArgs *
					 fromUArgs, const UChar * codeUnits,
					 int32_t length, UChar32 codePoint,
					 UConverterCallbackReason reason,
					 UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_FROM_U_CALLBACK_ESCAPE_52 (const void *context,
				     UConverterFromUnicodeArgs * fromUArgs,
				     const UChar * codeUnits,
				     int32_t length,
				     UChar32 codePoint,
				     UConverterCallbackReason reason,
				     UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_TO_U_CALLBACK_SKIP_52 (const void *context,
				 UConverterToUnicodeArgs * toUArgs,
				 const char *codeUnits,
				 int32_t length,
				 UConverterCallbackReason reason,
				 UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_TO_U_CALLBACK_SUBSTITUTE_52 (const void *context,
				       UConverterToUnicodeArgs * toUArgs,
				       const char *codeUnits,
				       int32_t length,
				       UConverterCallbackReason reason,
				       UErrorCode * err);

extern __attribute__ ((visibility ("default")))
void UCNV_TO_U_CALLBACK_ESCAPE_52 (const void *context,
				   UConverterToUnicodeArgs * toUArgs,
				   const char *codeUnits,
				   int32_t length,
				   UConverterCallbackReason reason,
				   UErrorCode * err);
struct UEnumeration;

typedef struct UEnumeration UEnumeration;

extern __attribute__ ((visibility ("default")))
void uenum_close_52 (UEnumeration * en);

extern __attribute__ ((visibility ("default")))
int32_t uenum_count_52 (UEnumeration * en, UErrorCode * status);

extern __attribute__ ((visibility ("default")))
const UChar *uenum_unext_52 (UEnumeration * en,
			     int32_t * resultLength, UErrorCode * status);

extern __attribute__ ((visibility ("default")))
const char *uenum_next_52 (UEnumeration * en,
			   int32_t * resultLength, UErrorCode * status);

extern __attribute__ ((visibility ("default")))
void uenum_reset_52 (UEnumeration * en, UErrorCode * status);

extern __attribute__ ((visibility ("default")))
UEnumeration *uenum_openUCharStringsEnumeration_52 (const UChar * const strings[],
						    int32_t count, UErrorCode * ec);

extern __attribute__ ((visibility ("default")))
UEnumeration *uenum_openCharStringsEnumeration_52 (const char *const strings[],
						   int32_t count, UErrorCode * ec);

struct USet;
typedef struct USet USet;

typedef enum {
  UCNV_UNSUPPORTED_CONVERTER = -1,
  UCNV_SBCS = 0,
  UCNV_DBCS = 1,
  UCNV_MBCS = 2,
  UCNV_LATIN_1 = 3,
  UCNV_UTF8 = 4,
  UCNV_UTF16_BigEndian = 5,
  UCNV_UTF16_LittleEndian = 6,
  UCNV_UTF32_BigEndian = 7,
  UCNV_UTF32_LittleEndian = 8,
  UCNV_EBCDIC_STATEFUL = 9,
  UCNV_ISO_2022 = 10,
  UCNV_LMBCS_1 = 11,
  UCNV_LMBCS_2,
  UCNV_LMBCS_3,
  UCNV_LMBCS_4,
  UCNV_LMBCS_5,
  UCNV_LMBCS_6,
  UCNV_LMBCS_8,
  UCNV_LMBCS_11,
  UCNV_LMBCS_16,
  UCNV_LMBCS_17,
  UCNV_LMBCS_18,
  UCNV_LMBCS_19,
  UCNV_LMBCS_LAST = UCNV_LMBCS_19,
  UCNV_HZ,
  UCNV_SCSU,
  UCNV_ISCII,
  UCNV_US_ASCII,
  UCNV_UTF7,
  UCNV_BOCU1,
  UCNV_UTF16,
  UCNV_UTF32,
  UCNV_CESU8,
  UCNV_IMAP_MAILBOX,
  UCNV_COMPOUND_TEXT,
  UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES
} UConverterType;

typedef enum {
  UCNV_UNKNOWN = -1,
  UCNV_IBM = 0
} UConverterPlatform;

typedef void (*UConverterToUCallback) (const void *context,
				       UConverterToUnicodeArgs * args,
				       const char *codeUnits,
				       int32_t length,
				       UConverterCallbackReason reason,
				       UErrorCode * pErrorCode);

typedef void (*UConverterFromUCallback) (const void *context,
					 UConverterFromUnicodeArgs *
					 args, const UChar * codeUnits,
					 int32_t length,
					 UChar32 codePoint,
					 UConverterCallbackReason reason,
					 UErrorCode * pErrorCode);

extern __attribute__ ((visibility ("default")))
int ucnv_compareNames_52 (const char *name1, const char *name2);

extern __attribute__ ((visibility ("default")))
UConverter *ucnv_open_52 (const char *converterName, UErrorCode * err);

extern __attribute__ ((visibility ("default")))
UConverter *ucnv_openU_52 (const UChar * name, UErrorCode * err);

extern __attribute__ ((visibility ("default")))
UConverter *ucnv_openCCSID_52 (int32_t codepage,
			       UConverterPlatform platform, UErrorCode * err);

extern __attribute__ ((visibility ("default")))
UConverter *ucnv_openPackage_52 (const char *packageName, const char *converterName,
				 UErrorCode * err);
extern __attribute__ ((visibility ("default")))
UConverter *
ucnv_safeClone_52 (const UConverter * cnv,
		   void *stackBuffer,
		   int32_t * pBufferSize, UErrorCode * status);
extern __attribute__ ((visibility ("default")))
void
ucnv_close_52 (UConverter * converter);
extern __attribute__ ((visibility ("default")))
void
ucnv_getSubstChars_52 (const UConverter * converter,
		       char *subChars, int8_t * len, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_setSubstChars_52 (UConverter * converter,
		       const char *subChars,
		       int8_t len, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_setSubstString_52 (UConverter * cnv,
			const UChar * s,
			int32_t length, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_getInvalidChars_52 (const UConverter * converter,
			 char *errBytes, int8_t * len, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_getInvalidUChars_52 (const UConverter * converter,
			  UChar * errUChars,
			  int8_t * len, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_reset_52 (UConverter * converter);
extern __attribute__ ((visibility ("default")))
void
ucnv_resetToUnicode_52 (UConverter * converter);
extern __attribute__ ((visibility ("default")))
void
ucnv_resetFromUnicode_52 (UConverter * converter);
extern __attribute__ ((visibility ("default"))) int8_t
ucnv_getMaxCharSize_52 (const UConverter * converter);
extern __attribute__ ((visibility ("default"))) int8_t
ucnv_getMinCharSize_52 (const UConverter * converter);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_getDisplayName_52 (const UConverter * converter,
			const char *displayLocale,
			UChar * displayName,
			int32_t displayNameCapacity, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getName_52 (const UConverter * converter, UErrorCode * err);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_getCCSID_52 (const UConverter * converter, UErrorCode * err);
extern __attribute__ ((visibility ("default"))) UConverterPlatform
ucnv_getPlatform_52 (const UConverter * converter, UErrorCode * err);
extern __attribute__ ((visibility ("default"))) UConverterType
ucnv_getType_52 (const UConverter * converter);
extern __attribute__ ((visibility ("default")))
void
ucnv_getStarters_52 (const UConverter * converter,
		     UBool starters[256], UErrorCode * err);

typedef enum UConverterUnicodeSet {

  UCNV_ROUNDTRIP_SET,

  UCNV_ROUNDTRIP_AND_FALLBACK_SET,

  UCNV_SET_COUNT
} UConverterUnicodeSet;
extern __attribute__ ((visibility ("default")))
void
ucnv_getUnicodeSet_52 (const UConverter * cnv,
		       USet * setFillIn,
		       UConverterUnicodeSet whichSet,
		       UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
void
ucnv_getToUCallBack_52 (const UConverter * converter,
			UConverterToUCallback * action,
			const void **context);
extern __attribute__ ((visibility ("default")))
void
ucnv_getFromUCallBack_52 (const UConverter * converter,
			  UConverterFromUCallback * action,
			  const void **context);
extern __attribute__ ((visibility ("default")))
void
ucnv_setToUCallBack_52 (UConverter * converter,
			UConverterToUCallback newAction,
			const void *newContext,
			UConverterToUCallback * oldAction,
			const void **oldContext, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_setFromUCallBack_52 (UConverter * converter,
			  UConverterFromUCallback newAction,
			  const void *newContext,
			  UConverterFromUCallback * oldAction,
			  const void **oldContext, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_fromUnicode_52 (UConverter * converter,
		     char **target,
		     const char *targetLimit,
		     const UChar ** source,
		     const UChar * sourceLimit,
		     int32_t * offsets, UBool flush, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_toUnicode_52 (UConverter * converter,
		   UChar ** target,
		   const UChar * targetLimit,
		   const char **source,
		   const char *sourceLimit,
		   int32_t * offsets, UBool flush, UErrorCode * err);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_fromUChars_52 (UConverter * cnv,
		    char *dest, int32_t destCapacity,
		    const UChar * src, int32_t srcLength,
		    UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_toUChars_52 (UConverter * cnv,
		  UChar * dest, int32_t destCapacity,
		  const char *src, int32_t srcLength,
		  UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) UChar32
ucnv_getNextUChar_52 (UConverter * converter,
		      const char **source,
		      const char *sourceLimit, UErrorCode * err);
extern __attribute__ ((visibility ("default")))
void
ucnv_convertEx_52 (UConverter * targetCnv, UConverter * sourceCnv,
		   char **target, const char *targetLimit,
		   const char **source, const char *sourceLimit,
		   UChar * pivotStart, UChar ** pivotSource,
		   UChar ** pivotTarget, const UChar * pivotLimit,
		   UBool reset, UBool flush, UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_convert_52 (const char *toConverterName,
		 const char *fromConverterName,
		 char *target,
		 int32_t targetCapacity,
		 const char *source,
		 int32_t sourceLength, UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_toAlgorithmic_52 (UConverterType algorithmicType,
		       UConverter * cnv,
		       char *target, int32_t targetCapacity,
		       const char *source, int32_t sourceLength,
		       UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_fromAlgorithmic_52 (UConverter * cnv,
			 UConverterType algorithmicType,
			 char *target, int32_t targetCapacity,
			 const char *source, int32_t sourceLength,
			 UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_flushCache_52 (void);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_countAvailable_52 (void);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getAvailableName_52 (int32_t n);
extern __attribute__ ((visibility ("default")))
UEnumeration *
ucnv_openAllNames_52 (UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) uint16_t
ucnv_countAliases_52 (const char *alias, UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getAlias_52 (const char *alias, uint16_t n,
		  UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
void
ucnv_getAliases_52 (const char *alias, const char **aliases,
		    UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
UEnumeration *
ucnv_openStandardNames_52 (const char *convName,
			   const char *standard,
			   UErrorCode * pErrorCode);






extern __attribute__ ((visibility ("default"))) uint16_t
ucnv_countStandards_52 (void);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getStandard_52 (uint16_t n, UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getStandardName_52 (const char *name, const char *standard,
			 UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getCanonicalName_52 (const char *alias, const char *standard,
			  UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_getDefaultName_52 (void);
extern __attribute__ ((visibility ("default")))
void
ucnv_setDefaultName_52 (const char *name);
extern __attribute__ ((visibility ("default")))
void
ucnv_fixFileSeparator_52 (const UConverter * cnv, UChar * source,
			  int32_t sourceLen);
extern
__attribute__ ((visibility ("default"))) UBool
ucnv_isAmbiguous_52 (const UConverter * cnv);
extern __attribute__ ((visibility ("default")))
void
ucnv_setFallback_52 (UConverter * cnv, UBool usesFallback);
extern __attribute__ ((visibility ("default"))) UBool
ucnv_usesFallback_52 (const UConverter * cnv);
extern __attribute__ ((visibility ("default")))
const char *
ucnv_detectUnicodeSignature_52 (const char *source,
				int32_t sourceLength,
				int32_t * signatureLength,
				UErrorCode * pErrorCode);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_fromUCountPending_52 (const UConverter * cnv, UErrorCode * status);
extern __attribute__ ((visibility ("default"))) int32_t
ucnv_toUCountPending_52 (const UConverter * cnv, UErrorCode * status);
extern __attribute__ ((visibility ("default"))) UBool
ucnv_isFixedWidth_52 (UConverter * cnv, UErrorCode * status);

typedef enum
  {
    XML_CHAR_ENCODING_ERROR = -1,
    XML_CHAR_ENCODING_NONE = 0,
    XML_CHAR_ENCODING_UTF8 = 1,
    XML_CHAR_ENCODING_UTF16LE = 2,
    XML_CHAR_ENCODING_UTF16BE = 3,
    XML_CHAR_ENCODING_UCS4LE = 4,
    XML_CHAR_ENCODING_UCS4BE = 5,
    XML_CHAR_ENCODING_EBCDIC = 6,
    XML_CHAR_ENCODING_UCS4_2143 = 7,
    XML_CHAR_ENCODING_UCS4_3412 = 8,
    XML_CHAR_ENCODING_UCS2 = 9,
    XML_CHAR_ENCODING_8859_1 = 10,
    XML_CHAR_ENCODING_8859_2 = 11,
    XML_CHAR_ENCODING_8859_3 = 12,
    XML_CHAR_ENCODING_8859_4 = 13,
    XML_CHAR_ENCODING_8859_5 = 14,
    XML_CHAR_ENCODING_8859_6 = 15,
    XML_CHAR_ENCODING_8859_7 = 16,
    XML_CHAR_ENCODING_8859_8 = 17,
    XML_CHAR_ENCODING_8859_9 = 18,
    XML_CHAR_ENCODING_2022_JP = 19,
    XML_CHAR_ENCODING_SHIFT_JIS = 20,
    XML_CHAR_ENCODING_EUC_JP = 21,
    XML_CHAR_ENCODING_ASCII = 22
  } xmlCharEncoding;
typedef int (*xmlCharEncodingInputFunc) (unsigned char *out, int *outlen,
					 const unsigned char *in,
					 int *inlen);
typedef int (*xmlCharEncodingOutputFunc) (unsigned char *out,
					  int *outlen,
					  const unsigned char *in,
					  int *inlen);







struct _uconv_t
{
  UConverter *
  uconv;
  UConverter *
  utf8;
};
typedef struct _uconv_t
uconv_t;


typedef struct _xmlCharEncodingHandler
xmlCharEncodingHandler;
typedef xmlCharEncodingHandler *
xmlCharEncodingHandlerPtr;
struct _xmlCharEncodingHandler
{
  char *
  name;
  xmlCharEncodingInputFunc
  input;
  xmlCharEncodingOutputFunc
  output;

  iconv_t
  iconv_in;
  iconv_t
  iconv_out;


  uconv_t *
  uconv_in;
  uconv_t *
  uconv_out;

};
void
xmlInitCharEncodingHandlers (void);
void
xmlCleanupCharEncodingHandlers (void);
void
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
xmlCharEncodingHandlerPtr
xmlGetCharEncodingHandler (xmlCharEncoding enc);
xmlCharEncodingHandlerPtr
xmlFindCharEncodingHandler (const char *name);
xmlCharEncodingHandlerPtr
xmlNewCharEncodingHandler (const char *name,
			   xmlCharEncodingInputFunc input,
			   xmlCharEncodingOutputFunc output);




int xmlAddEncodingAlias (const char *name, const char *alias);
int xmlDelEncodingAlias (const char *alias);
const char *xmlGetEncodingAlias (const char *alias);
void xmlCleanupEncodingAliases (void);
xmlCharEncoding
xmlParseCharEncoding (const char *name);
const char *xmlGetCharEncodingName (xmlCharEncoding enc);




xmlCharEncoding
xmlDetectCharEncoding (const unsigned char *in, int len);

int
xmlCharEncOutFunc (xmlCharEncodingHandler * handler,
		   xmlBufferPtr out, xmlBufferPtr in);

int
xmlCharEncInFunc (xmlCharEncodingHandler * handler,
		  xmlBufferPtr out, xmlBufferPtr in);
int
xmlCharEncFirstLine (xmlCharEncodingHandler * handler,
		     xmlBufferPtr out, xmlBufferPtr in);
int xmlCharEncCloseFunc (xmlCharEncodingHandler * handler);





int
UTF8Toisolat1 (unsigned char *out,
	       int *outlen, const unsigned char *in, int *inlen);

int
isolat1ToUTF8 (unsigned char *out,
	       int *outlen, const unsigned char *in, int *inlen);
typedef int (*xmlInputMatchCallback) (char const *filename);
typedef void *(*xmlInputOpenCallback) (char const *filename);
typedef int (*xmlInputReadCallback) (void *context, char *buffer,
				     int len);
typedef int (*xmlInputCloseCallback) (void *context);
typedef int (*xmlOutputMatchCallback) (char const *filename);
typedef void *(*xmlOutputOpenCallback) (char const *filename);
typedef int (*xmlOutputWriteCallback) (void *context, const char *buffer,
				       int len);
typedef int (*xmlOutputCloseCallback) (void *context);







typedef xmlChar *xlinkHRef;
typedef xmlChar *xlinkRole;
typedef xmlChar *xlinkTitle;

typedef enum
  {
    XLINK_TYPE_NONE = 0,
    XLINK_TYPE_SIMPLE,
    XLINK_TYPE_EXTENDED,
    XLINK_TYPE_EXTENDED_SET
  } xlinkType;

typedef enum
  {
    XLINK_SHOW_NONE = 0,
    XLINK_SHOW_NEW,
    XLINK_SHOW_EMBED,
    XLINK_SHOW_REPLACE
  } xlinkShow;

typedef enum
  {
    XLINK_ACTUATE_NONE = 0,
    XLINK_ACTUATE_AUTO,
    XLINK_ACTUATE_ONREQUEST
  } xlinkActuate;
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
typedef void
(*xlinkSimpleLinkFunk) (void *ctx,
			xmlNodePtr node,
			const xlinkHRef href,
			const xlinkRole role, const xlinkTitle title);
typedef void
(*xlinkExtendedLinkFunk) (void *ctx,
			  xmlNodePtr node,
			  int nbLocators,
			  const xlinkHRef * hrefs,
			  const xlinkRole * roles,
			  int nbArcs,
			  const xlinkRole * from,
			  const xlinkRole * to,
			  xlinkShow * show,
			  xlinkActuate * actuate,
			  int nbTitles,
			  const xlinkTitle * titles,
			  const xmlChar ** langs);
typedef void
(*xlinkExtendedLinkSetFunk) (void *ctx,
			     xmlNodePtr node,
			     int nbLocators,
			     const xlinkHRef * hrefs,
			     const xlinkRole * roles,
			     int nbTitles,
			     const xlinkTitle * titles,
			     const xmlChar ** langs);







typedef struct _xlinkHandler xlinkHandler;
typedef xlinkHandler *xlinkHandlerPtr;
struct _xlinkHandler
{
  xlinkSimpleLinkFunk simple;
  xlinkExtendedLinkFunk extended;
  xlinkExtendedLinkSetFunk set;
};






xlinkNodeDetectFunc
xlinkGetDefaultDetect (void);
void xlinkSetDefaultDetect (xlinkNodeDetectFunc func);




xlinkHandlerPtr
xlinkGetDefaultHandler (void);
void xlinkSetDefaultHandler (xlinkHandlerPtr handler);




xlinkType
xlinkIsLink (xmlDocPtr doc, xmlNodePtr node);






const xmlChar *getPublicId (void *ctx);
const xmlChar *getSystemId (void *ctx);
void setDocumentLocator (void *ctx, xmlSAXLocatorPtr loc);

int getLineNumber (void *ctx);
int getColumnNumber (void *ctx);

int isStandalone (void *ctx);
int hasInternalSubset (void *ctx);
int hasExternalSubset (void *ctx);

void
internalSubset (void *ctx,
		const xmlChar * name,
		const xmlChar * ExternalID, const xmlChar * SystemID);
void
externalSubset (void *ctx,
		const xmlChar * name,
		const xmlChar * ExternalID, const xmlChar * SystemID);
xmlEntityPtr
getEntity (void *ctx, const xmlChar * name);
xmlEntityPtr
getParameterEntity (void *ctx, const xmlChar * name);
xmlParserInputPtr
resolveEntity (void *ctx, const xmlChar * publicId, const xmlChar * systemId);

void
entityDecl (void *ctx,
	    const xmlChar * name,
	    int type,
	    const xmlChar * publicId,
	    const xmlChar * systemId, xmlChar * content);
void
attributeDecl (void *ctx,
	       const xmlChar * elem,
	       const xmlChar * fullname,
	       int type,
	       int def,
	       const xmlChar * defaultValue, xmlEnumerationPtr tree);
void
elementDecl (void *ctx,
	     const xmlChar * name,
	     int type, xmlElementContentPtr content);
void
notationDecl (void *ctx,
	      const xmlChar * name,
	      const xmlChar * publicId, const xmlChar * systemId);
void
unparsedEntityDecl (void *ctx,
		    const xmlChar * name,
		    const xmlChar * publicId,
		    const xmlChar * systemId,
		    const xmlChar * notationName);

void startDocument (void *ctx);
void endDocument (void *ctx);
void
attribute (void *ctx, const xmlChar * fullname, const xmlChar * value);
void
startElement (void *ctx,
	      const xmlChar * fullname, const xmlChar ** atts);
void endElement (void *ctx, const xmlChar * name);
void reference (void *ctx, const xmlChar * name);
void characters (void *ctx, const xmlChar * ch, int len);
void ignorableWhitespace (void *ctx, const xmlChar * ch, int len);
void
processingInstruction (void *ctx,
		       const xmlChar * target, const xmlChar * data);
void
globalNamespace (void *ctx,
		 const xmlChar * href, const xmlChar * prefix);
void setNamespace (void *ctx, const xmlChar * name);
xmlNsPtr
getNamespace (void *ctx);
int checkNamespace (void *ctx, xmlChar * nameSpace);
void
namespaceDecl (void *ctx,
	       const xmlChar * href, const xmlChar * prefix);
void comment (void *ctx, const xmlChar * value);
void cdataBlock (void *ctx, const xmlChar * value, int len);


void initxmlDefaultSAXHandler (xmlSAXHandlerV1 * hdlr, int warning);

void inithtmlDefaultSAXHandler (xmlSAXHandlerV1 * hdlr);


void initdocbDefaultSAXHandler (xmlSAXHandlerV1 * hdlr);
const xmlChar *xmlSAX2GetPublicId (void *ctx);
const xmlChar *xmlSAX2GetSystemId (void *ctx);
void xmlSAX2SetDocumentLocator (void *ctx, xmlSAXLocatorPtr loc);

int xmlSAX2GetLineNumber (void *ctx);
int xmlSAX2GetColumnNumber (void *ctx);

int xmlSAX2IsStandalone (void *ctx);
int xmlSAX2HasInternalSubset (void *ctx);
int xmlSAX2HasExternalSubset (void *ctx);

void
xmlSAX2InternalSubset (void *ctx,
		       const xmlChar * name,
		       const xmlChar * ExternalID,
		       const xmlChar * SystemID);
void
xmlSAX2ExternalSubset (void *ctx,
		       const xmlChar * name,
		       const xmlChar * ExternalID,
		       const xmlChar * SystemID);
xmlEntityPtr
xmlSAX2GetEntity (void *ctx, const xmlChar * name);
xmlEntityPtr
xmlSAX2GetParameterEntity (void *ctx, const xmlChar * name);
xmlParserInputPtr
xmlSAX2ResolveEntity (void *ctx,
		      const xmlChar * publicId, const xmlChar * systemId);

void
xmlSAX2EntityDecl (void *ctx,
		   const xmlChar * name,
		   int type,
		   const xmlChar * publicId,
		   const xmlChar * systemId, xmlChar * content);
void
xmlSAX2AttributeDecl (void *ctx,
		      const xmlChar * elem,
		      const xmlChar * fullname,
		      int type,
		      int def,
		      const xmlChar * defaultValue,
		      xmlEnumerationPtr tree);
void
xmlSAX2ElementDecl (void *ctx,
		    const xmlChar * name,
		    int type, xmlElementContentPtr content);
void
xmlSAX2NotationDecl (void *ctx,
		     const xmlChar * name,
		     const xmlChar * publicId,
		     const xmlChar * systemId);
void
xmlSAX2UnparsedEntityDecl (void *ctx,
			   const xmlChar * name,
			   const xmlChar * publicId,
			   const xmlChar * systemId,
			   const xmlChar * notationName);

void xmlSAX2StartDocument (void *ctx);
void xmlSAX2EndDocument (void *ctx);



void
xmlSAX2StartElement (void *ctx,
		     const xmlChar * fullname, const xmlChar ** atts);
void xmlSAX2EndElement (void *ctx, const xmlChar * name);

void
xmlSAX2StartElementNs (void *ctx,
		       const xmlChar * localname,
		       const xmlChar * prefix,
		       const xmlChar * URI,
		       int nb_namespaces,
		       const xmlChar ** namespaces,
		       int nb_attributes,
		       int nb_defaulted, const xmlChar ** attributes);
void
xmlSAX2EndElementNs (void *ctx,
		     const xmlChar * localname,
		     const xmlChar * prefix, const xmlChar * URI);
void xmlSAX2Reference (void *ctx, const xmlChar * name);
void xmlSAX2Characters (void *ctx, const xmlChar * ch, int len);
void xmlSAX2IgnorableWhitespace (void *ctx, const xmlChar * ch, int len);
void
xmlSAX2ProcessingInstruction (void *ctx,
			      const xmlChar * target,
			      const xmlChar * data);
void xmlSAX2Comment (void *ctx, const xmlChar * value);
void xmlSAX2CDataBlock (void *ctx, const xmlChar * value, int len);


int xmlSAXDefaultVersion (int version);


int xmlSAXVersion (xmlSAXHandler * hdlr, int version);
void xmlSAX2InitDefaultSAXHandler (xmlSAXHandler * hdlr, int warning);

void xmlSAX2InitHtmlDefaultSAXHandler (xmlSAXHandler * hdlr);
void htmlDefaultSAXHandlerInit (void);


void xmlSAX2InitDocbDefaultSAXHandler (xmlSAXHandler * hdlr);
void docbDefaultSAXHandlerInit (void);

void xmlDefaultSAXHandlerInit (void);
typedef void (*xmlFreeFunc) (void *mem);
typedef void *( __attribute__ ((alloc_size (1))) *
		xmlMallocFunc) (size_t size);
typedef void *(*xmlReallocFunc) (void *mem, size_t size);
typedef char *(*xmlStrdupFunc) (const char *str);
int
xmlMemSetup (xmlFreeFunc freeFunc,
	     xmlMallocFunc mallocFunc,
	     xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc);
int
xmlMemGet (xmlFreeFunc * freeFunc,
	   xmlMallocFunc * mallocFunc,
	   xmlReallocFunc * reallocFunc, xmlStrdupFunc * strdupFunc);
int
xmlGcMemSetup (xmlFreeFunc freeFunc,
	       xmlMallocFunc mallocFunc,
	       xmlMallocFunc mallocAtomicFunc,
	       xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc);
int
xmlGcMemGet (xmlFreeFunc * freeFunc,
	     xmlMallocFunc * mallocFunc,
	     xmlMallocFunc * mallocAtomicFunc,
	     xmlReallocFunc * reallocFunc, xmlStrdupFunc * strdupFunc);




int xmlInitMemory (void);




void xmlCleanupMemory (void);



int xmlMemUsed (void);
int xmlMemBlocks (void);
void xmlMemDisplay (FILE * fp);
void xmlMemDisplayLast (FILE * fp, long nbBytes);
void xmlMemShow (FILE * fp, int nr);
void xmlMemoryDump (void);
void *xmlMemMalloc (size_t size) __attribute__ ((alloc_size (1)));
void *xmlMemRealloc (void *ptr, size_t size);
void xmlMemFree (void *ptr);
char *xmlMemoryStrdup (const char *str);
void *xmlMallocLoc (size_t size, const char *file, int line)
  __attribute__ ((alloc_size (1)));
void *xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
void *xmlMallocAtomicLoc (size_t size, const char *file, int line)
  __attribute__ ((alloc_size (1)));
char *xmlMemStrdupLoc (const char *str, const char *file, int line);





void xmlInitGlobals (void);
void xmlCleanupGlobals (void);
typedef
xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc)
(const char *URI, xmlCharEncoding enc);
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const
								 char
								 *URI,
								 xmlCharEncodingHandlerPtr
								 encoder,
								 int
								 compression);

xmlParserInputBufferCreateFilenameFunc
xmlParserInputBufferCreateFilenameDefault
(xmlParserInputBufferCreateFilenameFunc func);
xmlOutputBufferCreateFilenameFunc
xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);






typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);

typedef struct _xmlGlobalState xmlGlobalState;
typedef xmlGlobalState *xmlGlobalStatePtr;
struct _xmlGlobalState
{
  const char *xmlParserVersion;

  xmlSAXLocator xmlDefaultSAXLocator;
  xmlSAXHandlerV1 xmlDefaultSAXHandler;
  xmlSAXHandlerV1 docbDefaultSAXHandler;
  xmlSAXHandlerV1 htmlDefaultSAXHandler;

  xmlFreeFunc xmlFree;
  xmlMallocFunc xmlMalloc;
  xmlStrdupFunc xmlMemStrdup;
  xmlReallocFunc xmlRealloc;

  xmlGenericErrorFunc xmlGenericError;
  xmlStructuredErrorFunc xmlStructuredError;
  void *xmlGenericErrorContext;

  int oldXMLWDcompatibility;

  xmlBufferAllocationScheme xmlBufferAllocScheme;
  int xmlDefaultBufferSize;

  int xmlSubstituteEntitiesDefaultValue;
  int xmlDoValidityCheckingDefaultValue;
  int xmlGetWarningsDefaultValue;
  int xmlKeepBlanksDefaultValue;
  int xmlLineNumbersDefaultValue;
  int xmlLoadExtDtdDefaultValue;
  int xmlParserDebugEntities;
  int xmlPedanticParserDefaultValue;

  int xmlSaveNoEmptyTags;
  int xmlIndentTreeOutput;
  const char *xmlTreeIndentString;

  xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
  xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;

  xmlMallocFunc xmlMallocAtomic;
  xmlError xmlLastError;

  xmlParserInputBufferCreateFilenameFunc
  xmlParserInputBufferCreateFilenameValue;
  xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;

  void *xmlStructuredErrorContext;
};




typedef struct _xmlMutex xmlMutex;
typedef xmlMutex *xmlMutexPtr;




typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex *xmlRMutexPtr;







xmlMutexPtr
xmlNewMutex (void);
void xmlMutexLock (xmlMutexPtr tok);
void xmlMutexUnlock (xmlMutexPtr tok);
void xmlFreeMutex (xmlMutexPtr tok);

xmlRMutexPtr
xmlNewRMutex (void);
void xmlRMutexLock (xmlRMutexPtr tok);
void xmlRMutexUnlock (xmlRMutexPtr tok);
void xmlFreeRMutex (xmlRMutexPtr tok);




void xmlInitThreads (void);
void xmlLockLibrary (void);
void xmlUnlockLibrary (void);
int xmlGetThreadId (void);
int xmlIsMainThread (void);
void xmlCleanupThreads (void);
xmlGlobalStatePtr
xmlGetGlobalState (void);




void xmlInitializeGlobalState (xmlGlobalStatePtr gs);

void xmlThrDefSetGenericErrorFunc (void *ctx,
				   xmlGenericErrorFunc handler);

void xmlThrDefSetStructuredErrorFunc (void *ctx,
				      xmlStructuredErrorFunc handler);

xmlRegisterNodeFunc xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault (xmlRegisterNodeFunc
						  func);
xmlDeregisterNodeFunc xmlDeregisterNodeDefault (xmlDeregisterNodeFunc
						func);
xmlDeregisterNodeFunc
xmlThrDefDeregisterNodeDefault (xmlDeregisterNodeFunc func);

xmlOutputBufferCreateFilenameFunc
xmlThrDefOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc
					    func);
xmlParserInputBufferCreateFilenameFunc
xmlThrDefParserInputBufferCreateFilenameDefault
(xmlParserInputBufferCreateFilenameFunc func);
extern xmlMallocFunc xmlMalloc;
extern xmlMallocFunc xmlMallocAtomic;
extern xmlReallocFunc xmlRealloc;
extern xmlFreeFunc xmlFree;
extern xmlStrdupFunc xmlMemStrdup;



xmlSAXHandlerV1 *__docbDefaultSAXHandler (void);
xmlSAXHandlerV1 *__htmlDefaultSAXHandler (void);
xmlError *__xmlLastError (void);
int *__oldXMLWDcompatibility (void);







xmlBufferAllocationScheme *__xmlBufferAllocScheme (void);






xmlBufferAllocationScheme
xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);

int *__xmlDefaultBufferSize (void);






int xmlThrDefDefaultBufferSize (int v);

xmlSAXHandlerV1 *__xmlDefaultSAXHandler (void);







xmlSAXLocator *__xmlDefaultSAXLocator (void);







int *__xmlDoValidityCheckingDefaultValue (void);






int xmlThrDefDoValidityCheckingDefaultValue (int v);

xmlGenericErrorFunc *__xmlGenericError (void);







xmlStructuredErrorFunc *__xmlStructuredError (void);







void **__xmlGenericErrorContext (void);







void **__xmlStructuredErrorContext (void);







int *__xmlGetWarningsDefaultValue (void);






int xmlThrDefGetWarningsDefaultValue (int v);

int *__xmlIndentTreeOutput (void);






int xmlThrDefIndentTreeOutput (int v);

const char **__xmlTreeIndentString (void);






const char *xmlThrDefTreeIndentString (const char *v);

int *__xmlKeepBlanksDefaultValue (void);






int xmlThrDefKeepBlanksDefaultValue (int v);

int *__xmlLineNumbersDefaultValue (void);






int xmlThrDefLineNumbersDefaultValue (int v);

int *__xmlLoadExtDtdDefaultValue (void);






int xmlThrDefLoadExtDtdDefaultValue (int v);

int *__xmlParserDebugEntities (void);






int xmlThrDefParserDebugEntities (int v);

const char **__xmlParserVersion (void);







int *__xmlPedanticParserDefaultValue (void);






int xmlThrDefPedanticParserDefaultValue (int v);

int *__xmlSaveNoEmptyTags (void);






int xmlThrDefSaveNoEmptyTags (int v);

int *__xmlSubstituteEntitiesDefaultValue (void);






int xmlThrDefSubstituteEntitiesDefaultValue (int v);

xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue (void);







xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue (void);







xmlParserInputBufferCreateFilenameFunc
*__xmlParserInputBufferCreateFilenameValue (void);







xmlOutputBufferCreateFilenameFunc
*__xmlOutputBufferCreateFilenameValue (void);







struct _xmlParserInputBuffer
{
  void *context;
  xmlInputReadCallback readcallback;
  xmlInputCloseCallback closecallback;

  xmlCharEncodingHandlerPtr encoder;

  xmlBufPtr buffer;
  xmlBufPtr raw;
  int compressed;
  int error;
  unsigned long rawconsumed;
};



struct _xmlOutputBuffer
{
  void *context;
  xmlOutputWriteCallback writecallback;
  xmlOutputCloseCallback closecallback;

  xmlCharEncodingHandlerPtr encoder;

  xmlBufPtr buffer;
  xmlBufPtr conv;
  int written;
  int error;
};





void xmlCleanupInputCallbacks (void);

int xmlPopInputCallbacks (void);

void xmlRegisterDefaultInputCallbacks (void);
xmlParserInputBufferPtr
xmlAllocParserInputBuffer (xmlCharEncoding enc);

xmlParserInputBufferPtr
xmlParserInputBufferCreateFilename (const char *URI, xmlCharEncoding enc);
xmlParserInputBufferPtr
xmlParserInputBufferCreateFile (FILE * file, xmlCharEncoding enc);
xmlParserInputBufferPtr
xmlParserInputBufferCreateFd (int fd, xmlCharEncoding enc);
xmlParserInputBufferPtr
xmlParserInputBufferCreateMem (const char *mem, int size,
			       xmlCharEncoding enc);
xmlParserInputBufferPtr
xmlParserInputBufferCreateStatic (const char *mem, int size,
				  xmlCharEncoding enc);
xmlParserInputBufferPtr
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
			      xmlInputCloseCallback ioclose,
			      void *ioctx, xmlCharEncoding enc);
int xmlParserInputBufferRead (xmlParserInputBufferPtr in, int len);
int xmlParserInputBufferGrow (xmlParserInputBufferPtr in, int len);
int
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
			  int len, const char *buf);
void xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
char *xmlParserGetDirectory (const char *filename);

int
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
			   xmlInputOpenCallback openFunc,
			   xmlInputReadCallback readFunc,
			   xmlInputCloseCallback closeFunc);

xmlParserInputBufferPtr
__xmlParserInputBufferCreateFilename (const char *URI, xmlCharEncoding enc);





void xmlCleanupOutputCallbacks (void);
void xmlRegisterDefaultOutputCallbacks (void);
xmlOutputBufferPtr
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);

xmlOutputBufferPtr
xmlOutputBufferCreateFilename (const char *URI,
			       xmlCharEncodingHandlerPtr encoder,
			       int compression);

xmlOutputBufferPtr
xmlOutputBufferCreateFile (FILE * file, xmlCharEncodingHandlerPtr encoder);

xmlOutputBufferPtr
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
			     xmlCharEncodingHandlerPtr encoder);

xmlOutputBufferPtr
xmlOutputBufferCreateFd (int fd, xmlCharEncodingHandlerPtr encoder);

xmlOutputBufferPtr
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
			 xmlOutputCloseCallback ioclose,
			 void *ioctx, xmlCharEncodingHandlerPtr encoder);


const xmlChar *xmlOutputBufferGetContent (xmlOutputBufferPtr out);
size_t
xmlOutputBufferGetSize (xmlOutputBufferPtr out);

int
xmlOutputBufferWrite (xmlOutputBufferPtr out,
		      int len, const char *buf);
int xmlOutputBufferWriteString (xmlOutputBufferPtr out, const char *str);
int
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
			    const xmlChar * str,
			    xmlCharEncodingOutputFunc escaping);

int xmlOutputBufferFlush (xmlOutputBufferPtr out);
int xmlOutputBufferClose (xmlOutputBufferPtr out);

int
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
			    xmlOutputOpenCallback openFunc,
			    xmlOutputWriteCallback writeFunc,
			    xmlOutputCloseCallback closeFunc);

xmlOutputBufferPtr
__xmlOutputBufferCreateFilename (const char *URI,
				 xmlCharEncodingHandlerPtr encoder,
				 int compression);



void xmlRegisterHTTPPostCallbacks (void);




xmlParserInputPtr
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt, xmlParserInputPtr ret);




xmlParserInputPtr
xmlNoNetExternalEntityLoader (const char *URL,
			      const char *ID, xmlParserCtxtPtr ctxt);





xmlChar *xmlNormalizeWindowsPath (const xmlChar * path);

int xmlCheckFilename (const char *path);



int xmlFileMatch (const char *filename);
void *xmlFileOpen (const char *filename);
int xmlFileRead (void *context, char *buffer, int len);
int xmlFileClose (void *context);





int xmlIOHTTPMatch (const char *filename);
void *xmlIOHTTPOpen (const char *filename);

void *xmlIOHTTPOpenW (const char *post_uri, int compression);

int xmlIOHTTPRead (void *context, char *buffer, int len);
int xmlIOHTTPClose (void *context);






int xmlIOFTPMatch (const char *filename);
void *xmlIOFTPOpen (const char *filename);
int xmlIOFTPRead (void *context, char *buffer, int len);
int xmlIOFTPClose (void *context);
void xmlInitParser (void);
void xmlCleanupParser (void);




int xmlParserInputRead (xmlParserInputPtr in, int len);
int xmlParserInputGrow (xmlParserInputPtr in, int len);





xmlDocPtr
xmlParseDoc (const xmlChar * cur);
xmlDocPtr
xmlParseFile (const char *filename);
xmlDocPtr
xmlParseMemory (const char *buffer, int size);

int xmlSubstituteEntitiesDefault (int val);
int xmlKeepBlanksDefault (int val);
void xmlStopParser (xmlParserCtxtPtr ctxt);
int xmlPedanticParserDefault (int val);
int xmlLineNumbersDefault (int val);





xmlDocPtr
xmlRecoverDoc (const xmlChar * cur);
xmlDocPtr
xmlRecoverMemory (const char *buffer, int size);
xmlDocPtr
xmlRecoverFile (const char *filename);





int xmlParseDocument (xmlParserCtxtPtr ctxt);
int xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);

int
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
		     void *user_data, const char *filename);
int
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
		       void *user_data, const char *buffer, int size);
xmlDocPtr
xmlSAXParseDoc (xmlSAXHandlerPtr sax, const xmlChar * cur, int recovery);
xmlDocPtr
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
		   const char *buffer, int size, int recovery);
xmlDocPtr
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
			   const char *buffer,
			   int size, int recovery, void *data);
xmlDocPtr
xmlSAXParseFile (xmlSAXHandlerPtr sax, const char *filename, int recovery);
xmlDocPtr
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
			 const char *filename, int recovery, void *data);
xmlDocPtr
xmlSAXParseEntity (xmlSAXHandlerPtr sax, const char *filename);
xmlDocPtr
xmlParseEntity (const char *filename);



xmlDtdPtr
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
		const xmlChar * ExternalID, const xmlChar * SystemID);
xmlDtdPtr
xmlParseDTD (const xmlChar * ExternalID, const xmlChar * SystemID);
xmlDtdPtr
xmlIOParseDTD (xmlSAXHandlerPtr sax,
	       xmlParserInputBufferPtr input, xmlCharEncoding enc);


int
xmlParseBalancedChunkMemory (xmlDocPtr doc,
			     xmlSAXHandlerPtr sax,
			     void *user_data,
			     int depth,
			     const xmlChar * string, xmlNodePtr * lst);

xmlParserErrors
xmlParseInNodeContext (xmlNodePtr node,
		       const char *data,
		       int datalen, int options, xmlNodePtr * lst);

int
xmlParseBalancedChunkMemoryRecover (xmlDocPtr doc,
				    xmlSAXHandlerPtr sax,
				    void *user_data,
				    int depth,
				    const xmlChar * string,
				    xmlNodePtr * lst, int recover);
int
xmlParseExternalEntity (xmlDocPtr doc,
			xmlSAXHandlerPtr sax,
			void *user_data,
			int depth,
			const xmlChar * URL,
			const xmlChar * ID, xmlNodePtr * lst);

int
xmlParseCtxtExternalEntity (xmlParserCtxtPtr ctx,
			    const xmlChar * URL,
			    const xmlChar * ID, xmlNodePtr * lst);




xmlParserCtxtPtr
xmlNewParserCtxt (void);
int xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
void xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);

void
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
			 const xmlChar * buffer, const char *filename);

xmlParserCtxtPtr
xmlCreateDocParserCtxt (const xmlChar * cur);





int xmlGetFeaturesList (int *len, const char **result);
int
xmlGetFeature (xmlParserCtxtPtr ctxt, const char *name, void *result);
int xmlSetFeature (xmlParserCtxtPtr ctxt, const char *name, void *value);






xmlParserCtxtPtr
xmlCreatePushParserCtxt (xmlSAXHandlerPtr sax,
			 void *user_data,
			 const char *chunk, int size, const char *filename);
int
xmlParseChunk (xmlParserCtxtPtr ctxt,
	       const char *chunk, int size, int terminate);






xmlParserCtxtPtr
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
		       void *user_data,
		       xmlInputReadCallback ioread,
		       xmlInputCloseCallback ioclose,
		       void *ioctx, xmlCharEncoding enc);

xmlParserInputPtr
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
		     xmlParserInputBufferPtr input, xmlCharEncoding enc);




const xmlParserNodeInfo *xmlParserFindNodeInfo (const xmlParserCtxtPtr
						ctxt,
						const xmlNodePtr node);
void xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
unsigned long
xmlParserFindNodeInfoIndex (const xmlParserNodeInfoSeqPtr seq,
			    const xmlNodePtr node);
void
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
		      const xmlParserNodeInfoPtr info);





void xmlSetExternalEntityLoader (xmlExternalEntityLoader f);
xmlExternalEntityLoader
xmlGetExternalEntityLoader (void);
xmlParserInputPtr
xmlLoadExternalEntity (const char *URL,
		       const char *ID, xmlParserCtxtPtr ctxt);




long xmlByteConsumed (xmlParserCtxtPtr ctxt);
typedef enum
  {
    XML_PARSE_RECOVER = 1 << 0,
    XML_PARSE_NOENT = 1 << 1,
    XML_PARSE_DTDLOAD = 1 << 2,
    XML_PARSE_DTDATTR = 1 << 3,
    XML_PARSE_DTDVALID = 1 << 4,
    XML_PARSE_NOERROR = 1 << 5,
    XML_PARSE_NOWARNING = 1 << 6,
    XML_PARSE_PEDANTIC = 1 << 7,
    XML_PARSE_NOBLANKS = 1 << 8,
    XML_PARSE_SAX1 = 1 << 9,
    XML_PARSE_XINCLUDE = 1 << 10,
    XML_PARSE_NONET = 1 << 11,
    XML_PARSE_NODICT = 1 << 12,
    XML_PARSE_NSCLEAN = 1 << 13,
    XML_PARSE_NOCDATA = 1 << 14,
    XML_PARSE_NOXINCNODE = 1 << 15,
    XML_PARSE_COMPACT = 1 << 16,


    XML_PARSE_OLD10 = 1 << 17,
    XML_PARSE_NOBASEFIX = 1 << 18,
    XML_PARSE_HUGE = 1 << 19,
    XML_PARSE_OLDSAX = 1 << 20,
    XML_PARSE_IGNORE_ENC = 1 << 21,
    XML_PARSE_BIG_LINES = 1 << 22
  } xmlParserOption;

void xmlCtxtReset (xmlParserCtxtPtr ctxt);
int
xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
		  const char *chunk,
		  int size,
		  const char *filename, const char *encoding);
int xmlCtxtUseOptions (xmlParserCtxtPtr ctxt, int options);
xmlDocPtr
xmlReadDoc (const xmlChar * cur,
	    const char *URL, const char *encoding, int options);
xmlDocPtr
xmlReadFile (const char *URL, const char *encoding, int options);
xmlDocPtr
xmlReadMemory (const char *buffer,
	       int size, const char *URL, const char *encoding, int options);
xmlDocPtr
xmlReadFd (int fd, const char *URL, const char *encoding, int options);
xmlDocPtr
xmlReadIO (xmlInputReadCallback ioread,
	   xmlInputCloseCallback ioclose,
	   void *ioctx, const char *URL, const char *encoding, int options);
xmlDocPtr
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
		const xmlChar * cur,
		const char *URL, const char *encoding, int options);
xmlDocPtr
xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
		 const char *filename, const char *encoding, int options);
xmlDocPtr
xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
		   const char *buffer,
		   int size,
		   const char *URL, const char *encoding, int options);
xmlDocPtr
xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
	       int fd, const char *URL, const char *encoding, int options);
xmlDocPtr
xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
	       xmlInputReadCallback ioread,
	       xmlInputCloseCallback ioclose,
	       void *ioctx,
	       const char *URL, const char *encoding, int options);
typedef enum
  {
    XML_WITH_THREAD = 1,
    XML_WITH_TREE = 2,
    XML_WITH_OUTPUT = 3,
    XML_WITH_PUSH = 4,
    XML_WITH_READER = 5,
    XML_WITH_PATTERN = 6,
    XML_WITH_WRITER = 7,
    XML_WITH_SAX1 = 8,
    XML_WITH_FTP = 9,
    XML_WITH_HTTP = 10,
    XML_WITH_VALID = 11,
    XML_WITH_HTML = 12,
    XML_WITH_LEGACY = 13,
    XML_WITH_C14N = 14,
    XML_WITH_CATALOG = 15,
    XML_WITH_XPATH = 16,
    XML_WITH_XPTR = 17,
    XML_WITH_XINCLUDE = 18,
    XML_WITH_ICONV = 19,
    XML_WITH_ISO8859X = 20,
    XML_WITH_UNICODE = 21,
    XML_WITH_REGEXP = 22,
    XML_WITH_AUTOMATA = 23,
    XML_WITH_EXPR = 24,
    XML_WITH_SCHEMAS = 25,
    XML_WITH_SCHEMATRON = 26,
    XML_WITH_MODULES = 27,
    XML_WITH_DEBUG = 28,
    XML_WITH_DEBUG_MEM = 29,
    XML_WITH_DEBUG_RUN = 30,
    XML_WITH_ZLIB = 31,
    XML_WITH_ICU = 32,
    XML_WITH_LZMA = 33,
    XML_WITH_NONE = 99999
  } xmlFeature;

int xmlHasFeature (xmlFeature feature);
typedef unsigned long int ub4;



typedef signed long int sb4;



typedef unsigned short int ub2;



typedef signed short int sb2;



typedef unsigned char ub1;



typedef signed char sb1;



typedef int word;
struct randctx
{
  ub4 randcnt;
  ub4 randrsl[(1 << (4))];
  ub4 randmem[(1 << (4))];
  ub4 randa;
  ub4 randb;
  ub4 randc;
};
typedef struct randctx randctx;






void irandinit (randctx * r, word flag);

void isaac (randctx * r);
char *flam3_version ();
typedef struct
{
  double index;
  double color[4];
} flam3_palette_entry;

typedef flam3_palette_entry flam3_palette[256];

int flam3_get_palette (int palette_index, flam3_palette p,
		       double hue_rotation);




extern char *flam3_variation_names[];
typedef struct
{

  double badvals;
  long int num_iters;
  int render_seconds;

} stat_struct;

typedef struct
{

  unsigned int width, height;
  int version;
  int id;


  double intensity_weight[256];
  unsigned int bin_size[256];
  unsigned int bin_offset[256];





  unsigned short *rowcols;

} flam3_image_store;


typedef struct xform
{
  double var[98];
  double c[3][2];
  double post[3][2];
  double density;
  double color;
  double color_speed;
  double animate;
  double opacity;
  double vis_adjusted;

  int padding;
  double wind[2];

  int precalc_angles_flag;
  int precalc_atan_xy_flag;
  int precalc_atan_yx_flag;
  double has_preblur;
  int has_post;



  double blob_low;
  double blob_high;
  double blob_waves;


  double pdj_a;
  double pdj_b;
  double pdj_c;
  double pdj_d;


  double fan2_x;
  double fan2_y;


  double rings2_val;


  double perspective_angle;
  double perspective_dist;


  double julian_power;
  double julian_dist;


  double juliascope_power;
  double juliascope_dist;


  double radial_blur_angle;


  double pie_slices;
  double pie_rotation;
  double pie_thickness;


  double ngon_sides;
  double ngon_power;
  double ngon_circle;
  double ngon_corners;


  double curl_c1;
  double curl_c2;


  double rectangles_x;
  double rectangles_y;


  double amw_amp;


  double disc2_rot;
  double disc2_twist;


  double super_shape_rnd;
  double super_shape_m;
  double super_shape_n1;
  double super_shape_n2;
  double super_shape_n3;
  double super_shape_holes;


  double flower_petals;
  double flower_holes;


  double conic_eccentricity;
  double conic_holes;


  double parabola_height;
  double parabola_width;


  double bent2_x;
  double bent2_y;


  double bipolar_shift;


  double cell_size;


  double cpow_r;
  double cpow_i;
  double cpow_power;


  double curve_xamp, curve_yamp;
  double curve_xlength, curve_ylength;


  double escher_beta;


  double lazysusan_spin;
  double lazysusan_space;
  double lazysusan_twist;
  double lazysusan_x, lazysusan_y;


  double modulus_x, modulus_y;


  double oscope_separation;
  double oscope_frequency;
  double oscope_amplitude;
  double oscope_damping;


  double popcorn2_x, popcorn2_y, popcorn2_c;


  double separation_x, separation_xinside;
  double separation_y, separation_yinside;


  double split_xsize;
  double split_ysize;


  double splits_x, splits_y;


  double stripes_space;
  double stripes_warp;


  double wedge_angle, wedge_hole;
  double wedge_count, wedge_swirl;


  double wedge_julia_angle;
  double wedge_julia_count;
  double wedge_julia_power;
  double wedge_julia_dist;


  double wedge_sph_angle, wedge_sph_count;
  double wedge_sph_hole, wedge_sph_swirl;


  double whorl_inside, whorl_outside;


  double waves2_freqx, waves2_scalex;
  double waves2_freqy, waves2_scaley;


  double auger_sym, auger_weight;
  double auger_freq, auger_scale;


  double flux_spread;



  double persp_vsin;
  double persp_vfcos;


  double julian_rN;
  double julian_cn;


  double juliascope_rN;
  double juliascope_cn;


  double wedgeJulia_rN;
  double wedgeJulia_cn;
  double wedgeJulia_cf;


  double radialBlur_spinvar;
  double radialBlur_zoomvar;


  double waves_dx2;
  double waves_dy2;


  double disc2_sinadd;
  double disc2_cosadd;
  double disc2_timespi;


  double super_shape_pm_4;
  double super_shape_pneg1_n1;

  int num_active_vars;
  double active_var_weights[98];
  int varFunc[98];

  int motion_freq;
  int motion_func;

  struct xform *motion;
  int num_motion;


} flam3_xform;

typedef struct
{
  char flame_name[64 + 1];
  double time;
  int interpolation;
  int interpolation_type;
  int palette_interpolation;
  int num_xforms;
  int final_xform_index;
  int final_xform_enable;
  flam3_xform *xform;


  double **chaos;
  int chaos_enable;

  int genome_index;
  char parent_fname[30];
  int symmetry;
  flam3_palette palette;
  char *input_image;
  int palette_index;
  double brightness;
  double contrast;
  double gamma;
  double highlight_power;
  int width, height;
  int spatial_oversample;
  double center[2];
  double rot_center[2];
  double rotate;
  double vibrancy;
  double hue_rotation;
  double background[3];
  double zoom;
  double pixels_per_unit;
  double spatial_filter_radius;
  int spatial_filter_select;


  double sample_density;






  int nbatches;
  int ntemporal_samples;


  double estimator;
  double estimator_curve;
  double estimator_minimum;



  xmlDocPtr edits;


  double gam_lin_thresh;


  int palette_index0;
  double hue_rotation0;
  int palette_index1;
  double hue_rotation1;
  double palette_blend;

  int temporal_filter_type;
  double temporal_filter_width, temporal_filter_exp;

  int palette_mode;


} flam3_genome;

typedef struct
{
  int from;
  int to;
  double scalar;
} flam3_chaos_entry;



void flam3_add_motion_element (flam3_xform * xf);
void flam3_add_xforms (flam3_genome * cp, int num_to_add,
		       int interp_padding, int final_flag);
void flam3_delete_xform (flam3_genome * thiscp, int idx_to_delete);
void flam3_copy_xform (flam3_xform * dest, flam3_xform * src);
void flam3_copy (flam3_genome * dest, flam3_genome * src);
void flam3_copyx (flam3_genome * dest, flam3_genome * src, int num_std,
		  int num_final);
void flam3_copy_params (flam3_xform * dest, flam3_xform * src, int varn);
void flam3_delete_motion_elements (flam3_xform * xf);

int flam3_xform_preview (flam3_genome * cp, int xi, double range,
			 int numvals, int depth, double *result,
			 randctx * rc);
unsigned short *flam3_create_xform_distrib (flam3_genome * cp);
int flam3_create_chaos_distrib (flam3_genome * cp, int xi,
				unsigned short *xform_distrib);
int flam3_check_unity_chaos (flam3_genome * cp);
void clear_cp (flam3_genome * cp, int def_flag);






int flam3_iterate (flam3_genome * g, int nsamples, int fuse,
		   double *samples, unsigned short *xform_distrib,
		   randctx * rc);

void apply_motion_parameters (flam3_xform * xf, flam3_xform * addto,
			      double blend);



void flam3_interpolate (flam3_genome * genomes, int ngenomes,
			double time, double stagger,
			flam3_genome * result);


void flam3_print (FILE * f, flam3_genome * g, char *extra_attributes,
		  int print_edits);
void flam3_print_xform (FILE * f, flam3_xform * x, int final_flag,
			int numstd, double *chaos_row, int motion_flag);
char *flam3_print_to_string (flam3_genome * cp);





void flam3_random (flam3_genome * g, int *ivars, int ivars_n, int sym,
		   int spec_xforms);

void add_to_action (char *action, char *addtoaction);

void flam3_mutate (flam3_genome * cp, int mutate_mode, int *ivars,
		   int ivars_n, int sym, double speed, randctx * rc,
		   char *action);
void flam3_cross (flam3_genome * cp0, flam3_genome * cp1,
		  flam3_genome * out, int cross_mode, randctx * rc,
		  char *action);


flam3_genome *flam3_parse_xml2 (char *s, char *fn, int default_flag,
				int *ncps);
flam3_genome *flam3_parse_from_file (FILE * f, char *fn,
				     int default_flag, int *ncps);

void flam3_add_symmetry (flam3_genome * g, int sym);

void flam3_improve_colors (flam3_genome * g, int ntries,
			   int change_palette, int color_resolution);
int flam3_colorhist (flam3_genome * cp, int num_batches, randctx * rc,
		     double *hist);
int flam3_estimate_bounding_box (flam3_genome * g, double eps,
				 int nsamples, double *bmin,
				 double *bmax, randctx * rc);
void flam3_rotate (flam3_genome * g, double angle, int interp_type);

double flam3_dimension (flam3_genome * g, int ntries,
			int clip_to_camera);
double flam3_lyapunov (flam3_genome * g, int ntries);

void flam3_apply_template (flam3_genome * cp, flam3_genome * templ);

int flam3_count_nthreads (void);

typedef struct
{

  double pixel_aspect_ratio;
  flam3_genome *genomes;
  int ngenomes;
  int verbose;
  int bits;
  int bytes_per_channel;
  int earlyclip;
  double time;
  int (*progress) (void *, double, int, double);
  void *progress_parameter;
  randctx rc;
  int nthreads;
  int sub_batch_size;
} flam3_frame;
int flam3_render (flam3_frame * f, void *out, int field, int nchan,
		  int transp, stat_struct * stats);

double flam3_render_memory_required (flam3_frame * f);
int flam3_make_strip (flam3_genome * cp, int nstrips, int stripnum);
void rotate_by (double *p, double *center, double by);


double flam3_random01 ();
double flam3_random11 ();
int flam3_random_bit ();


double flam3_random_isaac_01 (randctx *);
double flam3_random_isaac_11 (randctx *);
int flam3_random_isaac_bit (randctx *);

void flam3_init_frame (flam3_frame * f);


void *flam3_malloc (size_t size);
void flam3_free (void *ptr);

void flam3_srandom ();

flam3_genome *sheep_loop (flam3_genome * cp, double blend);
flam3_genome *sheep_edge (flam3_genome * cp, double blend, int seqflag,
			  double stagger);





extern char *dirname (char *__path)
  __attribute__ ((__nothrow__, __leaf__));







extern char *__xpg_basename (char *__path)
  __attribute__ ((__nothrow__, __leaf__));






void docstring ();


typedef struct
{
  unsigned short *xform_distrib;
  flam3_frame *spec;
  double bounds[4];
  double rot[2][2];
  double size[2];
  int width, height;
  double ws0, wb0s0, hs1, hb1s1;
  flam3_palette_entry *dmap;
  double color_scalar;
  void *buckets;
  double badvals;
  double batch_size;
  int temporal_sample_num, ntemporal_samples;
  int batch_num, nbatches, aborted;
  time_t *progress_timer;
  time_t *progress_timer_history;
  double *progress_history;
  int *progress_history_mark;


  pthread_mutex_t bucket_mutex;


} flam3_iter_constants;

typedef struct
{

  double tx, ty;

  double precalc_atan, precalc_sina;
  double precalc_cosa, precalc_sqrt;
  double precalc_sumsq, precalc_atanyx;

  flam3_xform *xform;



  double p0, p1;


  randctx *rc;

} flam3_iter_helper;

typedef struct
{
  double *iter_storage;
  randctx rc;
  flam3_genome cp;
  int first_thread;
  int timer_initialize;
  flam3_iter_constants *fic;
} flam3_thread_helper;

double flam3_sinc (double x);


double flam3_gaussian_filter (double x);
double flam3_hermite_filter (double t);
double flam3_box_filter (double t);
double flam3_triangle_filter (double t);
double flam3_bell_filter (double t);
double flam3_b_spline_filter (double t);
double flam3_lanczos3_filter (double t);
double flam3_lanczos2_filter (double t);
double flam3_mitchell_filter (double t);
double flam3_blackman_filter (double x);
double flam3_catrom_filter (double x);
double flam3_hamming_filter (double x);
double flam3_hanning_filter (double x);
double flam3_quadratic_filter (double x);

double flam3_spatial_filter (int knum, double x);
typedef struct
{
  int max_filtered_counts;
  int max_filter_index;
  int kernel_size;
  double *filter_widths;
  double *filter_coefs;
} flam3_de_helper;

extern double flam3_spatial_support[14];

double flam3_spatial_filter (int knum, double x);
int flam3_create_spatial_filter (flam3_frame * spec, int field,
				 double **filter);
flam3_de_helper flam3_create_de_filters (double max_rad, double min_rad,
					 double curve, int ss);
double flam3_create_temporal_filter (int numsteps, int filter_type,
				     double filter_exp,
				     double filter_width,
				     double **temporal_filter,
				     double **temporal_deltas);

double flam3_spatial_support[14] = {
  1.5,
  1.0,
  0.5,
  1.0,
  1.5,
  2.0,
  2.0,
  1.0,
  2.0,
  1.0,
  1.0,
  3.0,
  2.0,
  1.5
};

double
flam3_hermite_filter (double t)
{

  if (t < 0.0)
    t = -t;
  if (t < 1.0)
    return ((2.0 * t - 3.0) * t * t + 1.0);
  return (0.0);
}

double
flam3_box_filter (double t)
{
  if ((t > -0.5) && (t <= 0.5))
    return (1.0);
  return (0.0);
}

double
flam3_triangle_filter (double t)
{
  if (t < 0.0)
    t = -t;
  if (t < 1.0)
    return (1.0 - t);
  return (0.0);
}

double
flam3_bell_filter (double t)
{

  if (t < 0)
    t = -t;
  if (t < .5)
    return (.75 - (t * t));
  if (t < 1.5)
    {
      t = (t - 1.5);
      return (.5 * (t * t));
    }
  return (0.0);
}

double
flam3_b_spline_filter (double t)
{


  double tt;

  if (t < 0)
    t = -t;
  if (t < 1)
    {
      tt = t * t;
      return ((.5 * tt * t) - tt + (2.0 / 3.0));
    }
  else if (t < 2)
    {
      t = 2 - t;
      return ((1.0 / 6.0) * (t * t * t));
    }
  return (0.0);
}

double
flam3_sinc (double x)
{
  x *= 3.14159265358979323846;
  if (x != 0)
    return (sin (x) / x);
  return (1.0);
}

double
flam3_blackman_filter (double x)
{
  return (0.42 + 0.5 * cos (3.14159265358979323846 * x) + 0.08 * cos (2 * 3.14159265358979323846 * x));
}

double
flam3_catrom_filter (double x)
{
  if (x < -2.0)
    return (0.0);
  if (x < -1.0)
    return (0.5 * (4.0 + x * (8.0 + x * (5.0 + x))));
  if (x < 0.0)
    return (0.5 * (2.0 + x * x * (-5.0 - 3.0 * x)));
  if (x < 1.0)
    return (0.5 * (2.0 + x * x * (-5.0 + 3.0 * x)));
  if (x < 2.0)
    return (0.5 * (4.0 + x * (-8.0 + x * (5.0 - x))));
  return (0.0);
}

double
flam3_mitchell_filter (double t)
{
  double tt;

  tt = t * t;
  if (t < 0)
    t = -t;
  if (t < 1.0)
    {
      t = (((12.0 - 9.0 * (1.0 / 3.0) - 6.0 * (1.0 / 3.0)) * (t * tt))
	   + ((-18.0 + 12.0 * (1.0 / 3.0) + 6.0 * (1.0 / 3.0)) * tt)
	   + (6.0 - 2 * (1.0 / 3.0)));
      return (t / 6.0);
    }
  else if (t < 2.0)
    {
      t = (((-1.0 * (1.0 / 3.0) - 6.0 * (1.0 / 3.0)) * (t * tt))
	   + ((6.0 * (1.0 / 3.0) + 30.0 * (1.0 / 3.0)) * tt)
	   + ((-12.0 * (1.0 / 3.0) - 48.0 * (1.0 / 3.0)) * t)
	   + (8.0 * (1.0 / 3.0) + 24 * (1.0 / 3.0)));
      return (t / 6.0);
    }
  return (0.0);
}

double
flam3_hanning_filter (double x)
{
  return (0.5 + 0.5 * cos (3.14159265358979323846 * x));
}

double
flam3_hamming_filter (double x)
{
  return (0.54 + 0.46 * cos (3.14159265358979323846 * x));
}

double
flam3_lanczos3_filter (double t)
{
  if (t < 0)
    t = -t;
  if (t < 3.0)
    return (flam3_sinc (t) * flam3_sinc (t / 3.0));
  return (0.0);
}

double
flam3_lanczos2_filter (double t)
{
  if (t < 0)
    t = -t;
  if (t < 2.0)
    return (flam3_sinc (t) * flam3_sinc (t / 2.0));
  return (0.0);
}

double
flam3_gaussian_filter (double x)
{
  return (exp ((-2.0 * x * x)) * sqrt (2.0 / 3.14159265358979323846));
}

double
flam3_quadratic_filter (double x)
{
  if (x < -1.5)
    return (0.0);
  if (x < -0.5)
    return (0.5 * (x + 1.5) * (x + 1.5));
  if (x < 0.5)
    return (0.75 - x * x);
  if (x < 1.5)
    return (0.5 * (x - 1.5) * (x - 1.5));
  return (0.0);
}

double
flam3_spatial_filter (int knum, double x)
{

  if (knum == 0)
    return flam3_gaussian_filter (x);
  else if (knum == 1)
    return flam3_hermite_filter (x);
  else if (knum == 2)
    return flam3_box_filter (x);
  else if (knum == 3)
    return flam3_triangle_filter (x);
  else if (knum == 4)
    return flam3_bell_filter (x);
  else if (knum == 5)
    return flam3_b_spline_filter (x);
  else if (knum == 6)
    return flam3_mitchell_filter (x);
  else if (knum == 7)
    return flam3_sinc (x) * flam3_blackman_filter (x);
  else if (knum == 8)
    return flam3_catrom_filter (x);
  else if (knum == 9)
    return flam3_sinc (x) * flam3_hanning_filter (x);
  else if (knum == 10)
    return flam3_sinc (x) * flam3_hamming_filter (x);
  else if (knum == 11)
    return flam3_lanczos3_filter (x) * flam3_sinc (x / 3.0);
  else if (knum == 12)
    return flam3_lanczos2_filter (x) * flam3_sinc (x / 2.0);
  else if (knum == 13)
    return flam3_quadratic_filter (x);
}

int
normalize_vector (double *v, int n)
{
  double t = 0.0;
  int i;
  for (i = 0; i < n; i++)
    t += v[i];
  if (0.0 == t)
    return 1;
  t = 1.0 / t;
  for (i = 0; i < n; i++)
    v[i] *= t;
  return 0;
}


int
flam3_create_spatial_filter (flam3_frame * spec, int field, double **filter)
{

  int sf_kernel = spec->genomes[0].spatial_filter_select;
  int supersample = spec->genomes[0].spatial_oversample;
  double sf_radius = spec->genomes[0].spatial_filter_radius;
  double aspect_ratio = spec->pixel_aspect_ratio;
  double sf_supp = flam3_spatial_support[sf_kernel];

  double fw = 2.0 * sf_supp * supersample * sf_radius / aspect_ratio;
  double adjust, ii, jj;

  int fwidth = ((int) fw) + 1;
  int i, j;



  if ((fwidth ^ supersample) & 1)
    fwidth++;


  if (fw > 0.0)
    adjust = sf_supp * fwidth / fw;
  else
    adjust = 1.0;


  (*filter) = (double *) calloc (fwidth * fwidth, sizeof (double));


  for (i = 0; i < fwidth; i++)
    for (j = 0; j < fwidth; j++)
      {


	ii = ((2.0 * i + 1.0) / (double) fwidth - 1.0) * adjust;
	jj = ((2.0 * j + 1.0) / (double) fwidth - 1.0) * adjust;


	if (field)
	  jj *= 2.0;


	jj /= aspect_ratio;

	(*filter)[i + j * fwidth] =
	  flam3_spatial_filter (sf_kernel,
				ii) * flam3_spatial_filter (sf_kernel, jj);
      }


  if (normalize_vector ((*filter), fwidth * fwidth))
    {
      fprintf (stderr,
	       "Spatial filter value is too small: %g.  Terminating.\n",
	       sf_radius);
      return (-1);
    }

  return (fwidth);
}

flam3_de_helper
flam3_create_de_filters (double max_rad, double min_rad, double curve, int ss)
{

  flam3_de_helper de;
  double comp_max_radius, comp_min_radius;
  double num_de_filters_d;
  int num_de_filters, de_max_ind;
  int de_row_size, de_half_size;
  int filtloop;
  int keep_thresh = 100;

  de.kernel_size = -1;

  if (curve <= 0.0)
    {
      fprintf (stderr, "estimator curve must be > 0\n");
      return (de);
    }

  if (max_rad < min_rad)
    {
      fprintf (stderr, "estimator must be larger than estimator_minimum.\n");
      fprintf (stderr, "(%f > %f) ? \n", max_rad, min_rad);
      return (de);
    }



  comp_max_radius = max_rad * ss + 1;
  comp_min_radius = min_rad * ss + 1;





  num_de_filters_d = pow (comp_max_radius / comp_min_radius, 1.0 / curve);
  if (num_de_filters_d > 1e7)
    {
      fprintf (stderr,
	       "too many filters required in this configuration (%g)\n",
	       num_de_filters_d);
      return (de);
    }
  num_de_filters = (int) ceil (num_de_filters_d);


  if (num_de_filters > keep_thresh)
    {
      de_max_ind = (int) ceil (100 + pow (num_de_filters - 100, curve)) + 1;
      de.max_filtered_counts =
	(int) pow ((double) (de_max_ind - 100), 1.0 / curve) + 100;
    }
  else
    {
      de_max_ind = num_de_filters;
      de.max_filtered_counts = de_max_ind;
    }



  de_row_size = (int) (2 * ceil (comp_max_radius) - 1);
  de_half_size = (de_row_size - 1) / 2;
  de.kernel_size = (de_half_size + 1) * (2 + de_half_size) / 2;

  de.filter_coefs =
    (double *) calloc (de_max_ind * de.kernel_size, sizeof (double));
  de.filter_widths = (double *) calloc (de_max_ind, sizeof (double));


  de.max_filter_index = 0;
  for (filtloop = 0; filtloop < de_max_ind; filtloop++)
    {

      double de_filt_sum = 0.0, de_filt_d;
      double de_filt_h;
      int dej, dek;
      double adjloop;
      int filter_coef_idx;


      if (filtloop < keep_thresh)
	de_filt_h = (comp_max_radius / pow (filtloop + 1, curve));
      else
	{
	  adjloop = pow (filtloop - keep_thresh, (1.0 / curve)) + keep_thresh;
	  de_filt_h = (comp_max_radius / pow (adjloop + 1, curve));
	}


      if (de_filt_h <= comp_min_radius)
	{
	  de_filt_h = comp_min_radius;
	  de.max_filter_index = filtloop;
	}

      de.filter_widths[filtloop] = de_filt_h;


      for (dej = -de_half_size; dej <= de_half_size; dej++)
	{
	  for (dek = -de_half_size; dek <= de_half_size; dek++)
	    {

	      de_filt_d = sqrt ((double) (dej * dej + dek * dek)) / de_filt_h;


	      if (de_filt_d <= 1.0)
		{
		  de_filt_sum += flam3_spatial_filter (0, flam3_spatial_support [0] * de_filt_d);
		}
	    }
	}

      filter_coef_idx = filtloop * de.kernel_size;


      for (dej = 0; dej <= de_half_size; dej++)
	{
	  for (dek = 0; dek <= dej; dek++)
	    {
	      de_filt_d = sqrt ((double) (dej * dej + dek * dek)) / de_filt_h;


	      if (de_filt_d > 1.0)
		de.filter_coefs[filter_coef_idx] = 0.0;
	      else
		{
		  de.filter_coefs[filter_coef_idx] = flam3_spatial_filter (0, flam3_spatial_support[0] * de_filt_d) / de_filt_sum;
		}

	      filter_coef_idx++;
	    }
	}

      if (de.max_filter_index > 0)
	break;
    }

  if (de.max_filter_index == 0)
    de.max_filter_index = de_max_ind - 1;


  return (de);
}

double
flam3_create_temporal_filter (int numsteps, int filter_type,
			      double filter_exp, double filter_width,
			      double **temporal_filter,
			      double **temporal_deltas)
{

  double maxfilt = 0.0;
  double sumfilt = 0.0;
  double slpx, halfsteps;
  double *deltas, *filter;

  int i;


  deltas = (double *) malloc (numsteps * sizeof (double));
  filter = (double *) malloc (numsteps * sizeof (double));


  if (numsteps == 1)
    {
      deltas[0] = 0;
      filter[0] = 1.0;
      *temporal_deltas = deltas;
      *temporal_filter = filter;
      return (1.0);
    }


  for (i = 0; i < numsteps; i++)
    deltas[i] = ((double) i / (double) (numsteps - 1) - 0.5) * filter_width;


  if (2 == filter_type)
    {

      for (i = 0; i < numsteps; i++)
	{

	  if (filter_exp >= 0)
	    slpx = ((double) i + 1.0) / numsteps;
	  else
	    slpx = (double) (numsteps - i) / numsteps;


	  filter[i] = pow (slpx, fabs (filter_exp));


	  if (filter[i] > maxfilt)
	    maxfilt = filter[i];
	}

    }
  else if (1 == filter_type)
    {

      halfsteps = numsteps / 2.0;
      for (i = 0; i < numsteps; i++)
	{


	  filter[i] = flam3_spatial_filter (0, flam3_spatial_support[0] * fabs (i - halfsteps) / halfsteps);
	  if (filter[i] > maxfilt)
	    maxfilt = filter[i];
	}

    }
  else
    {

      for (i = 0; i < numsteps; i++)
	filter[i] = 1.0;

      maxfilt = 1.0;

    }



  for (i = 0; i < numsteps; i++)
    {
      filter[i] /= maxfilt;
      sumfilt += filter[i];
    }

  sumfilt /= numsteps;

  *temporal_deltas = deltas;
  *temporal_filter = filter;

  return (sumfilt);
}