Преглед изворни кода

Expat 2.2.1

Source commit: dde6a9a5bc4c10bd2e63832521d3f18032213537
Martin Prikryl пре 8 година
родитељ
комит
c7cbedd5b5
70 измењених фајлова са 2943 додато и 5522 уклоњено
  1. 1 1
      libs/.gitignore
  2. 10 0
      libs/expat/AUTHORS
  3. 6 6
      libs/expat/CMake.README
  4. 34 15
      libs/expat/CMakeLists.txt
  5. 1 1
      libs/expat/COPYING
  6. 125 5
      libs/expat/Changes
  7. 5 57
      libs/expat/MANIFEST
  8. 18 17
      libs/expat/Makefile.in
  9. 1 1
      libs/expat/README
  10. 0 336
      libs/expat/amiga/Makefile
  11. 0 98
      libs/expat/amiga/README.txt
  12. 0 264
      libs/expat/amiga/expat.xml
  13. 0 939
      libs/expat/amiga/expat_68k.c
  14. 0 94
      libs/expat/amiga/expat_68k.h
  15. 0 185
      libs/expat/amiga/expat_68k_handler_stubs.c
  16. 0 40
      libs/expat/amiga/expat_base.h
  17. 0 247
      libs/expat/amiga/expat_lib.c
  18. 0 505
      libs/expat/amiga/expat_vectors.c
  19. 0 94
      libs/expat/amiga/include/inline4/expat.h
  20. 0 98
      libs/expat/amiga/include/interfaces/expat.h
  21. 0 566
      libs/expat/amiga/include/libraries/expat.h
  22. 0 52
      libs/expat/amiga/include/proto/expat.h
  23. 0 57
      libs/expat/amiga/launch.c
  24. 218 19
      libs/expat/configure
  25. 87 5
      libs/expat/configure.ac
  26. 0 155
      libs/expat/configure.in
  27. 20 12
      libs/expat/conftools/config.guess
  28. 22 9
      libs/expat/conftools/config.sub
  29. 1 1
      libs/expat/doc/reference.html
  30. 0 468
      libs/expat/doc/xmlwf.sgml
  31. 1 5
      libs/expat/examples/elements.c
  32. 0 103
      libs/expat/examples/elements.dsp
  33. 0 4
      libs/expat/examples/outline.c
  34. 0 103
      libs/expat/examples/outline.dsp
  35. 0 110
      libs/expat/expat.dsw
  36. 12 0
      libs/expat/expat_config.h.in
  37. 0 29
      libs/expat/lib/amigaconfig.h
  38. 16 6
      libs/expat/lib/expat.h
  39. 4 1
      libs/expat/lib/expat_external.h
  40. 0 53
      libs/expat/lib/macconfig.h
  41. 344 0
      libs/expat/lib/siphash.h
  42. 10 0
      libs/expat/lib/winconfig.h
  43. 395 108
      libs/expat/lib/xmlparse.c
  44. 2 8
      libs/expat/lib/xmlrole.c
  45. 15 19
      libs/expat/lib/xmltok.c
  46. 9 4
      libs/expat/m4/libtool.m4
  47. 12 0
      libs/expat/run.sh.in
  48. 0 4
      libs/expat/tests/benchmark/benchmark.c
  49. 0 88
      libs/expat/tests/benchmark/benchmark.dsp
  50. 0 44
      libs/expat/tests/benchmark/benchmark.dsw
  51. 173 0
      libs/expat/tests/memcheck.c
  52. 34 0
      libs/expat/tests/memcheck.h
  53. 1 4
      libs/expat/tests/minicheck.c
  54. 2 1
      libs/expat/tests/minicheck.h
  55. 1286 118
      libs/expat/tests/runtests.c
  56. 3 2
      libs/expat/tests/xmltest.sh
  57. 0 23
      libs/expat/vms/README.vms
  58. 0 70
      libs/expat/vms/descrip.mms
  59. 0 52
      libs/expat/vms/expat_config.h
  60. 0 2
      libs/expat/win32/MANIFEST.txt
  61. 4 17
      libs/expat/win32/README.txt
  62. 7 17
      libs/expat/win32/expat.iss
  63. 3 3
      libs/expat/xmlwf/codepage.c
  64. 12 0
      libs/expat/xmlwf/filemap.h
  65. 7 10
      libs/expat/xmlwf/readfilemap.c
  66. 4 0
      libs/expat/xmlwf/unixfilemap.c
  67. 4 3
      libs/expat/xmlwf/win32filemap.c
  68. 32 19
      libs/expat/xmlwf/xmlfile.c
  69. 2 6
      libs/expat/xmlwf/xmlwf.c
  70. 0 139
      libs/expat/xmlwf/xmlwf.dsp

+ 1 - 1
libs/.gitignore

@@ -1,2 +1,2 @@
-lib
+/lib
 openssl/openssl

+ 10 - 0
libs/expat/AUTHORS

@@ -0,0 +1,10 @@
+Expat is brought to you by:
+
+Clark Cooper
+Fred L. Drake, Jr.
+Greg Stein
+James Clark
+Karl Waclawek
+Rhodri James
+Sebastian Pipping
+Steven Solie

+ 6 - 6
libs/expat/CMake.README

@@ -3,25 +3,25 @@
 The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual 
 Studio) and should work on all other platform cmake supports.
 
-Assuming ~/expat-2.2.0 is the source directory of expat, add a subdirectory
+Assuming ~/expat-2.2.1 is the source directory of expat, add a subdirectory
 build and change into that directory:
-~/expat-2.2.0$ mkdir build && cd build
-~/expat-2.2.0/build$
+~/expat-2.2.1$ mkdir build && cd build
+~/expat-2.2.1/build$
 
 From that directory, call cmake first, then call make, make test and 
 make install in the usual way:
-~/expat-2.2.0/build$ cmake ..
+~/expat-2.2.1/build$ cmake ..
 -- The C compiler identification is GNU
 -- The CXX compiler identification is GNU
 ....
 -- Configuring done
 -- Generating done
--- Build files have been written to: /home/patrick/expat-2.2.0/build
+-- Build files have been written to: /home/patrick/expat-2.2.1/build
 
 If you want to specify the install location for your files, append 
 -DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
 
-~/expat-2.2.0/build$ make && make test && make install
+~/expat-2.2.1/build$ make && make test && make install
 Scanning dependencies of target expat
 [  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
 [ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o

+ 34 - 15
libs/expat/CMakeLists.txt

@@ -6,7 +6,7 @@ project(expat)
 cmake_minimum_required(VERSION 2.6)
 set(PACKAGE_BUGREPORT "[email protected]")
 set(PACKAGE_NAME "expat")
-set(PACKAGE_VERSION "2.2.0")
+set(PACKAGE_VERSION "2.2.1")
 set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set(PACKAGE_TARNAME "${PACKAGE_NAME}")
 
@@ -14,6 +14,8 @@ option(BUILD_tools "build the xmlwf tool for expat library" ON)
 option(BUILD_examples "build the examples for expat library" ON)
 option(BUILD_tests "build the tests for expat library" ON)
 option(BUILD_shared "build a shared expat library" ON)
+option(BUILD_doc "build man page for xmlwf" ON)
+option(INSTALL "install expat files in cmake install target" ON)
 
 # configuration options
 set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
@@ -37,20 +39,25 @@ endif(BUILD_tests)
 
 include(ConfigureChecks.cmake)
 
+set(EXTRA_LINK_AND_COMPILE_FLAGS "-fno-strict-aliasing")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
+
 include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
 if(MSVC)
     add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
 endif(MSVC)
 if(WIN32)
-    add_definitions(-DWIN32)
     set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows")
 endif(WIN32)
 
 set(expat_SRCS
     lib/xmlparse.c
     lib/xmlrole.c
-    lib/xmltok.c 
-    lib/xmltok_impl.c 
+    lib/xmltok.c
+    lib/xmltok_impl.c
     lib/xmltok_ns.c
 )
 
@@ -69,7 +76,7 @@ endif(BUILD_shared)
 add_library(expat ${_SHARED} ${expat_SRCS})
 
 set(LIBCURRENT 7)   # sync
-set(LIBREVISION 2)  # with
+set(LIBREVISION 3)  # with
 set(LIBAGE 6)       # configure.ac!
 math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")
 
@@ -79,7 +86,13 @@ if(NOT WIN32)
     set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME})
 endif(NOT WIN32)
 
-install(TARGETS expat RUNTIME DESTINATION bin
+macro(expat_install)
+    if(INSTALL)
+        install(${ARGN})
+    endif()
+endmacro()
+
+expat_install(TARGETS expat RUNTIME DESTINATION bin
                       LIBRARY DESTINATION lib
                       ARCHIVE DESTINATION lib)
 
@@ -89,11 +102,8 @@ set(libdir "\${prefix}/lib")
 set(includedir "\${prefix}/include")
 configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc)
 
-install(FILES lib/expat.h lib/expat_external.h DESTINATION include)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)
-
-
-add_custom_command(TARGET expat PRE_BUILD COMMAND $(MAKE) -C doc xmlwf.1)
+expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION include)
+expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)
 
 if(BUILD_tools AND NOT WINCE)
     set(xmlwf_SRCS
@@ -106,8 +116,17 @@ if(BUILD_tools AND NOT WINCE)
     add_executable(xmlwf ${xmlwf_SRCS})
     set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
     target_link_libraries(xmlwf expat)
-    install(TARGETS xmlwf DESTINATION bin)
-    install(FILES doc/xmlwf.1 DESTINATION share/man/man1)
+    expat_install(TARGETS xmlwf DESTINATION bin)
+    if(BUILD_doc AND NOT MSVC)
+        if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
+            set(make_command "$(MAKE)")
+        else()
+            set(make_command "make")
+        endif()
+
+        add_custom_command(TARGET expat PRE_BUILD COMMAND "${make_command}" -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1)
+        expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1)
+    endif()
 endif(BUILD_tools AND NOT WINCE)
 
 if(BUILD_examples)
@@ -122,12 +141,12 @@ endif(BUILD_examples)
 
 if(BUILD_tests)
     ## these are unittests that can be run on any platform
-    add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c)
+    add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c tests/memcheck.c)
     set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
     target_link_libraries(runtests expat)
     add_test(runtests tests/runtests)
 
-    add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c)
+    add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c tests/memcheck.c)
     set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
     target_link_libraries(runtestspp expat)
     add_test(runtestspp tests/runtestspp)

+ 1 - 1
libs/expat/COPYING

@@ -1,5 +1,5 @@
 Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
-Copyright (c) 2001-2016 Expat maintainers
+Copyright (c) 2001-2017 Expat maintainers
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the

+ 125 - 5
libs/expat/Changes

@@ -1,3 +1,122 @@
+NOTE: We are looking for help with a few things:
+      https://github.com/libexpat/libexpat/labels/help%20wanted
+      If you can help, please get in touch.  Thanks!
+
+Release 2.2.1 Sat June 17 2017
+        Security fixes:
+                  CVE-2017-9233 -- External entity infinite loop DoS
+                    Details: https://libexpat.github.io/doc/cve-2017-9233/
+                    Commit c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
+   [MOX-002]      CVE-2016-9063 -- Detect integer overflow; commit
+                    d4f735b88d9932bd5039df2335eefdd0723dbe20
+                    (Fixed version of existing downstream patches!)
+   (SF.net) #539  Fix regression from fix to CVE-2016-0718 cutting off
+                    longer tag names; commits
+                    * 896b6c1fd3b842f377d1b62135dccf0a579cf65d
+                    * af507cef2c93cb8d40062a0abe43a4f4e9158fb2
+             #16    * 0dbbf43fdb20f593ddf4fa1ff67288000dd4a7fd
+             #25  More integer overflow detection (function poolGrow); commits
+                    * 810b74e4703dcfdd8f404e3cb177d44684775143
+                    * 44178553f3539ce69d34abee77a05e879a7982ac
+   [MOX-002]      Detect overflow from len=INT_MAX call to XML_Parse; commits
+                    * 4be2cb5afcc018d996f34bbbce6374b7befad47f
+                    * 7e5b71b748491b6e459e5c9a1d090820f94544d8
+   [MOX-005] #30  Use high quality entropy for hash initialization:
+                    * arc4random_buf on BSD, systems with libbsd
+                      (when configured with --with-libbsd), CloudABI
+                    * RtlGenRandom on Windows XP / Server 2003 and later
+                    * getrandom on Linux 3.17+
+                    In a way, that's still part of CVE-2016-5300.
+                    https://github.com/libexpat/libexpat/pull/30/commits
+   [MOX-005]      For the low quality entropy extraction fallback code,
+                    the parser instance address can no longer leak, commit
+                    04ad658bd3079dd15cb60fc67087900f0ff4b083
+   [MOX-003]      Prevent use of uninitialised variable; commit
+   [MOX-004]        a4dc944f37b664a3ca7199c624a98ee37babdb4b
+                  Add missing parameter validation to public API functions
+                    and dedicated error code XML_ERROR_INVALID_ARGUMENT:
+   [MOX-006]        * NULL checks; commits
+                      * d37f74b2b7149a3a95a680c4c4cd2a451a51d60a (merge/many)
+                      * 9ed727064b675b7180c98cb3d4f75efba6966681
+                      * 6a747c837c50114dfa413994e07c0ba477be4534
+                    * Negative length (XML_Parse); commit
+   [MOX-002]          70db8d2538a10f4c022655d6895e4c3e78692e7f
+   [MOX-001] #35  Change hash algorithm to William Ahern's version of SipHash
+                    to go further with fixing CVE-2012-0876.
+                    https://github.com/libexpat/libexpat/pull/39/commits
+
+        Bug fixes:
+             #32  Fix sharing of hash salt across parsers;
+                    relevant where XML_ExternalEntityParserCreate is called
+                    prior to XML_Parse, in particular (e.g. FBReader)
+             #28  xmlwf: Auto-disable use of memory-mapping (and parsing
+                    as a single chunk) for files larger than ~1 GB (2^30 bytes)
+                    rather than failing with error "out of memory"
+              #3  Fix double free after malloc failure in DTD code; commit
+                    7ae9c3d3af433cd4defe95234eae7dc8ed15637f
+             #17  Fix memory leak on parser error for unbound XML attribute
+                    prefix with new namespaces defined in the same tag;
+                    found by Google's OSS-Fuzz; commits
+                    * 16f87daae5a16132e479e4f71862128c7a915c73
+                    * b47dbc9745932c160893d433220e462bd605f8cd
+                  xmlwf on Windows: Add missing calls to CloseHandle
+
+        New features:
+             #30  Introduced environment switch EXPAT_ENTROPY_DEBUG=1
+                    for runtime debugging of entropy extraction
+
+        Other changes:
+                  Increase code coverage
+             #33  Reject use of XML_UNICODE_WCHAR_T with sizeof(wchar_t) != 2;
+                    XML_UNICODE_WCHAR_T was never meant to be used outside
+                    of Windows; 4-byte wchar_t is common on Linux
+   (SF.net) #538  Start using -fno-strict-aliasing
+   (SF.net) #540  Support compilation against cloudlibc of CloudABI
+                  Allow MinGW cross-compilation
+   (SF.net) #534  CMake: Introduce option "BUILD_doc" (enabled by default)
+                    to bypass compilation of the xmlwf.1 man page
+   (SF.net)  pr2  CMake: Introduce option "INSTALL" (enabled by default)
+                    to bypass installation of expat files
+                  CMake: Fix ninja support
+                  Autotools: Add parameters --enable-xml-context [COUNT]
+                    and --disable-xml-context; default of context of 1024
+                    bytes enabled unchanged
+             #14  Drop AmigaOS 4.x code and includes
+             #14  Drop ancient build systems:
+                    * Borland C++ Builder
+                    * OpenVMS
+                    * Open Watcom
+                    * Visual Studio 6.0
+                    * Pre-X Mac OS (MPW Makefile)
+                    If you happen to rely on some of these, please get in
+                    touch for joining with maintenance.
+             #10  Move from WIN32 to _WIN32
+             #13  Fix "make run-xmltest" order instability
+                  Address compile warnings
+                  Bump version info from 7:2:6 to 7:3:6
+                  Add AUTHORS file
+
+        Infrastructure:
+              #1  Migrate from SourceForge to GitHub (except downloads):
+                    https://github.com/libexpat/
+              #1  Re-create http://libexpat.org/ project website
+                  Start utilizing Travis CI
+
+        Special thanks to:
+            Andy Wang
+            Don Lewis
+            Ed Schouten
+            Karl Waclawek
+            Pascal Cuoq
+            Rhodri James
+            Sergei Nikulov
+            Tobias Taschner
+            Viktor Szakats
+                 and
+            Core Infrastructure Initiative
+            Mozilla Foundation (MOSS Track 3: Secure Open Source)
+            Radically Open Security
+
 Release 2.2.0 Tue June 21 2016
         Security fixes:
             #537  CVE-2016-0718 -- Fix crash on malformed input
@@ -63,24 +182,25 @@ Release 2.1.1 Sat March 12 2016
             libtool now invoked with --verbose
 
 Release 2.1.0 Sat March 24 2012
+        - Security fixes:
+          #2958794: CVE-2012-1148 - Memory leak in poolGrow.
+          #2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
+          #3496608: CVE-2012-0876 - Hash DOS attack.
+          #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
+          #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
         - Bug Fixes:
           #1742315: Harmful XML_ParserCreateNS suggestion.
-          #2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
           #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
           #1983953, 2517952, 2517962, 2649838: 
                 Build modifications using autoreconf instead of buildconf.sh.
           #2815947, #2884086: OBJEXT and EXEEXT support while building.
-          #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
           #2517938: xmlwf should return non-zero exit status if not well-formed.
           #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
           #2855609: Dangling positionPtr after error.
-          #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
-          #2958794: CVE-2012-1148 - Memory leak in poolGrow.
           #2990652: CMake support.
           #3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
           #3206497: Unitialized memory returned from XML_Parse.
           #3287849: make check fails on mingw-w64.
-          #3496608: CVE-2012-0876 - Hash DOS attack.
         - Patches:
           #1749198: pkg-config support.
           #3010222: Fix for bug #3010819.

+ 5 - 57
libs/expat/MANIFEST

@@ -1,44 +1,4 @@
-amiga/launch.c
-amiga/expat_68k.c
-amiga/expat_68k.h
-amiga/expat_68k_handler_stubs.c
-amiga/expat_base.h
-amiga/expat_vectors.c
-amiga/expat_lib.c
-amiga/expat.xml
-amiga/README.txt
-amiga/Makefile
-amiga/include/proto/expat.h
-amiga/include/libraries/expat.h
-amiga/include/interfaces/expat.h
-amiga/include/inline4/expat.h
-bcb5/README.txt
-bcb5/all_projects.bpg
-bcb5/elements.bpf
-bcb5/elements.bpr
-bcb5/elements.mak
-bcb5/expat.bpf
-bcb5/expat.bpr
-bcb5/expat.mak
-bcb5/expat_static.bpf
-bcb5/expat_static.bpr
-bcb5/expat_static.mak
-bcb5/expatw.bpf
-bcb5/expatw.bpr
-bcb5/expatw.mak
-bcb5/expatw_static.bpf
-bcb5/expatw_static.bpr
-bcb5/expatw_static.mak
-bcb5/libexpat_mtd.def
-bcb5/libexpatw_mtd.def
-bcb5/makefile.mak
-bcb5/outline.bpf
-bcb5/outline.bpr
-bcb5/outline.mak
-bcb5/setup.bat
-bcb5/xmlwf.bpf
-bcb5/xmlwf.bpr
-bcb5/xmlwf.mak
+AUTHORS
 doc/expat.png
 doc/reference.html
 doc/style.css
@@ -58,8 +18,8 @@ configure.ac
 expat_config.h.in
 expat_config.h.cmake
 expat.pc.in
-expat.dsw
 aclocal.m4
+run.sh.in
 conftools/PrintPath
 conftools/ac_c_bigendian_cross.m4
 conftools/expat.m4
@@ -75,26 +35,18 @@ m4/ltoptions.m4
 m4/ltsugar.m4
 m4/lt~obsolete.m4
 examples/elements.c
-examples/elements.dsp
 examples/outline.c
-examples/outline.dsp
-lib/Makefile.MPW
-lib/amigaconfig.h
 lib/ascii.h
 lib/asciitab.h
-lib/expat.dsp
 lib/expat.h
 lib/expat_external.h
-lib/expat_static.dsp
-lib/expatw.dsp
-lib/expatw_static.dsp
 lib/iasciitab.h
 lib/internal.h
 lib/latin1tab.h
 lib/libexpat.def
 lib/libexpatw.def
-lib/macconfig.h
 lib/nametab.h
+lib/siphash.h
 lib/utf8tab.h
 lib/winconfig.h
 lib/xmlparse.c
@@ -107,19 +59,16 @@ lib/xmltok_impl.h
 lib/xmltok_ns.c
 tests/benchmark/README.txt
 tests/benchmark/benchmark.c
-tests/benchmark/benchmark.dsp
-tests/benchmark/benchmark.dsw
 tests/README.txt
 tests/chardata.c
 tests/chardata.h
+tests/memcheck.c
+tests/memcheck.h
 tests/minicheck.c
 tests/minicheck.h
 tests/runtests.c
 tests/runtestspp.cpp
 tests/xmltest.sh
-vms/README.vms
-vms/descrip.mms
-vms/expat_config.h
 win32/MANIFEST.txt
 win32/README.txt
 win32/expat.iss
@@ -137,5 +86,4 @@ xmlwf/xmlmime.h
 xmlwf/xmltchar.h
 xmlwf/xmlurl.h
 xmlwf/xmlwf.c
-xmlwf/xmlwf.dsp
 xmlwf/xmlwin32url.cxx

+ 18 - 17
libs/expat/Makefile.in

@@ -57,8 +57,8 @@ clean:
 	cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
 	cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
 	cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
-	cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
-	cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
+	cd tests && rm -rf .libs runtests@EXEEXT@ runtests.@OBJEXT@ runtestspp@EXEEXT@ runtestspp.@OBJEXT@
+	cd tests && rm -f chardata.@OBJEXT@ memcheck.@OBJEXT@ minicheck.@OBJEXT@
 	rm -rf .libs libexpat.la
 	rm -f examples/core tests/core xmlwf/core
 
@@ -73,9 +73,9 @@ extraclean: distclean
 	rm -f aclocal.m4 m4/*
 	rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
 
-check: tests/runtests tests/runtestspp
-	tests/runtests
-	tests/runtestspp
+check: tests/runtests@EXEEXT@ tests/runtestspp@EXEEXT@
+	./run.sh tests/runtests@EXEEXT@
+	./run.sh tests/runtestspp@EXEEXT@
 
 $(MANFILE):
 	$(MAKE) -C doc xmlwf.1
@@ -124,7 +124,7 @@ LTFLAGS = --verbose
 COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
 CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
 LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
-LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
+LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) @LIBS@ -o $@
 LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
 LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
 
@@ -135,7 +135,7 @@ $(LIBRARY): $(LIB_OBJS)
 expat.pc: $(top_builddir)/config.status
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 
-lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
+lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/siphash.h lib/xmlrole.h lib/xmltok.h \
 	$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
 
 lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
@@ -151,7 +151,7 @@ XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@
 xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
 xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
 xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
-xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@[email protected]
+xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@[email protected] xmlwf/filemap.h
 xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
 	$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
 
@@ -165,12 +165,13 @@ examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
 
 tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
 tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
-tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
-tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
-	$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
-tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
-tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
-	$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
+tests/memcheck.@OBJEXT@: tests/memcheck.c tests/memcheck.h
+tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h tests/memcheck.h lib/siphash.h
+tests/runtests@EXEEXT@: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
+	$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
+tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h tests/memcheck.h
+tests/runtestspp@EXEEXT@: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
+	$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
 
 tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
 tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
@@ -181,14 +182,14 @@ run-benchmark: tests/benchmark/benchmark
 
 tests/xmlts.zip:
 	wget --output-document=tests/xmlts.zip \
-		http://www.w3.org/XML/Test/xmlts20080827.zip
+		https://www.w3.org/XML/Test/xmlts20080827.zip
 
 tests/xmlconf: tests/xmlts.zip
 	cd tests && unzip -q xmlts.zip
 
 run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/xmlconf
-	tests/xmltest.sh 2>&1 | tee tests/xmltest.log
-	diff -u tests/xmltest.log.expected tests/xmltest.log
+	tests/xmltest.sh "$(PWD)/run.sh $(PWD)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee tests/xmltest.log
+	diff -u -b tests/xmltest.log.expected tests/xmltest.log
 
 .PHONY: qa
 qa:

+ 1 - 1
libs/expat/README

@@ -1,5 +1,5 @@
 
-                        Expat, Release 2.2.0
+                        Expat, Release 2.2.1
 
 This is Expat, a C library for parsing XML, written by James Clark.
 Expat is a stream-oriented XML parser.  This means that you register

+ 0 - 336
libs/expat/amiga/Makefile

@@ -1,336 +0,0 @@
-#
-# Makefile for AmigaOS
-#
-
-.PHONY: help all check clean package
-.PHONY: clib2 newlib library so
-
-vpath %.c ../lib ../examples ../xmlwf ../tests ../tests/benchmark
-vpath %.h ../lib ../tests
-
-#############################################################################
-
-help:
-	@echo "Requires:"
-	@echo " AmigaOS 4.x"
-	@echo " SDK 53.13"
-	@echo ""
-	@echo "Targets:"
-	@echo " all     - make libraries, xmlwf, examples and runs tests"
-	@echo " install - install expat libraries and tools into SDK"
-	@echo " clean   - clean object files"
-	@echo " check   - run all the tests"
-	@echo " package - prepare distribution archive"
-
-all: clib2 newlib library so check
-
-clib2: clib2/libexpat.a clib2/xmlwf clib2/elements clib2/outline clib2/runtests clib2/benchmark
-
-newlib: newlib/libexpat.a newlib/xmlwf newlib/elements newlib/outline newlib/runtests newlib/benchmark
-
-library: libs/expat.library libs/xmlwf libs/elements libs/outline libs/runtests libs/benchmark
-
-so: so/libexpat.so so/xmlwf so/elements so/outline so/runtests so/benchmark
-
-check: clib2/runtests newlib/runtests libs/runtests so/runtests
-	clib2/runtests
-	newlib/runtests
-	libs/runtests
-	so/runtests
-
-clean:
-	-delete clib2/#?.o quiet
-	-delete newlib/#?.o quiet
-	-delete libs/#?.o quiet
-	-delete so/#?.o quiet
-
-package:
-	$(MAKE) all
-	-delete T:expat all force quiet
-	makedir all T:expat/Workbench/Libs
-	copy clone libs/expat.library T:expat/Workbench/Libs
-	makedir all T:expat/Workbench/SObjs
-	copy clone so/libexpat.so T:expat/Workbench/SObjs
-	makedir all T:expat/SDK/Local/C
-	copy clone libs/xmlwf T:expat/SDK/Local/C
-	makedir all T:expat/SDK/Local/clib2/lib
-	copy clone clib2/libexpat.a T:expat/SDK/Local/clib2/lib
-	makedir all T:expat/SDK/Local/newlib/lib
-	copy clone newlib/libexpat.a T:expat/SDK/Local/newlib/lib
-	makedir all T:expat/SDK/Local/common/include
-	copy clone /lib/expat.h /lib/expat_external.h T:expat/SDK/Local/common/include
-	makedir all T:expat/SDK/Include/include_h/inline4
-	copy clone include/inline4/expat.h T:expat/SDK/Include/include_h/inline4
-	makedir all T:expat/SDK/Include/include_h/interfaces
-	copy clone include/interfaces/expat.h T:expat/SDK/Include/include_h/interfaces
-	makedir all T:expat/SDK/Include/include_h/libraries
-	copy clone include/libraries/expat.h T:expat/SDK/Include/include_h/libraries
-	makedir all T:expat/SDK/Include/include_h/proto
-	copy clone include/proto/expat.h T:expat/SDK/Include/include_h/proto
-	makedir all T:expat/SDK/Documentation/Libs/Expat
-	copy clone /COPYING T:expat/SDK/Documentation/Libs/Expat
-	copy clone /README T:expat/SDK/Documentation/Libs/Expat
-	copy clone README.txt T:expat/SDK/Documentation/Libs/Expat/README.AmigaOS
-	-delete expat.lha
-	lha -r a expat.lha T:expat
-
-#############################################################################
-
-CC         := gcc
-LIBTOOL    := ar
-STRIP      := strip
-
-CFLAGS     := -DNDEBUG -O3
-LTFLAGS    := -crs
-STRIPFLAGS := -R.comment
-
-#############################################################################
-
-clib2/libexpat.a: clib2/xmlparse.o clib2/xmltok.o clib2/xmlrole.o
-	$(LIBTOOL) $(LTFLAGS) $@ $^
-	protect $@ -e
-
-clib2/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
-	expat_external.h internal.h amigaconfig.h
-
-clib2/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
-	internal.h amigaconfig.h
-
-clib2/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
-	iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
-	expat_external.h internal.h amigaconfig.h
-
-#############################################################################
-
-clib2/xmlwf: clib2/xmlwf.o clib2/xmlfile.o clib2/codepage.o clib2/readfilemap.o
-	$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
-	$(STRIP) $(STRIPFLAGS) $@
-
-clib2/xmlwf.o: xmlwf.c
-
-clib2/xmlfile.o: xmlfile.c
-
-clib2/codepage.o: codepage.c
-
-clib2/readfilemap.o: readfilemap.c
-
-#############################################################################
-
-clib2/elements: clib2/elements.o
-	$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
-	$(STRIP) $(STRIPFLAGS) $@
-
-clib2/elements.o: elements.c
-
-#############################################################################
-
-clib2/outline: clib2/outline.o
-	$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
-	$(STRIP) $(STRIPFLAGS) $@
-
-clib2/outline.o: outline.c
-
-#############################################################################
-
-clib2/runtests: clib2/runtests.o clib2/chardata.o clib2/minicheck.o
-	$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
-
-clib2/chardata.o: chardata.c chardata.h
-
-clib2/minicheck.o: minicheck.c minicheck.h
-
-clib2/runtests.o: runtests.c chardata.h
-
-#############################################################################
-
-clib2/benchmark: clib2/benchmark.o
-	$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a -lm
-
-clib2/benchmark.o: benchmark.c
-
-#############################################################################
-
-newlib/libexpat.a: newlib/xmlparse.o newlib/xmltok.o newlib/xmlrole.o
-	$(LIBTOOL) $(LTFLAGS) $@ $^
-	protect $@ -e
-
-newlib/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
-	expat_external.h internal.h amigaconfig.h
-
-newlib/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
-	internal.h amigaconfig.h
-
-newlib/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
-	iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
-	expat_external.h internal.h amigaconfig.h
-
-#############################################################################
-
-newlib/xmlwf: newlib/xmlwf.o newlib/xmlfile.o newlib/codepage.o newlib/readfilemap.o
-	$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
-	$(STRIP) $(STRIPFLAGS) $@
-
-newlib/xmlwf.o: xmlwf.c
-
-newlib/xmlfile.o: xmlfile.c
-
-newlib/codepage.o: codepage.c
-
-newlib/readfilemap.o: readfilemap.c
-
-#############################################################################
-
-newlib/elements: newlib/elements.o
-	$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
-	$(STRIP) $(STRIPFLAGS) $@
-
-newlib/elements.o: elements.c
-
-#############################################################################
-
-newlib/outline: newlib/outline.o
-	$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
-	$(STRIP) $(STRIPFLAGS) $@
-
-newlib/outline.o: outline.c
-
-#############################################################################
-
-newlib/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o
-	$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
-
-newlib/chardata.o: chardata.c chardata.h
-
-newlib/minicheck.o: minicheck.c minicheck.h
-
-newlib/runtests.o: runtests.c chardata.h
-
-#############################################################################
-
-newlib/benchmark: newlib/benchmark.o
-	$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
-
-newlib/benchmark.o: benchmark.c
-
-#############################################################################
-
-libs/expat.library: libs/expat_lib.o libs/expat_68k.o libs/expat_68k_handler_stubs.o libs/expat_vectors.o newlib/libexpat.a
-	$(CC) -mcrt=newlib -nostartfiles $^ -o $@ newlib/libexpat.a -Wl,--cref,-M,[email protected]
-	protect $@ -e
-	$(STRIP) $(STRIPFLAGS) $@
-
-libs/expat_lib.o: expat_lib.c expat_base.h
-
-libs/expat_68k.o: expat_68k.c expat_68k.h expat_base.h
-
-libs/expat_68k_handler_stubs.o: expat_68k_handler_stubs.c expat_68k.h
-
-libs/expat_vectors.o: expat_vectors.c
-
-libs/launch.o: launch.c
-
-#############################################################################
-
-libs/xmlwf: libs/xmlwf.o libs/xmlfile.o libs/codepage.o libs/readfilemap.o libs/launch.o
-	$(CC) -mcrt=newlib $^ -o $@
-	$(STRIP) $(STRIPFLAGS) $@
-
-libs/xmlwf.o: xmlwf.c
-
-libs/xmlfile.o: xmlfile.c
-
-libs/codepage.o: codepage.c
-
-libs/readfilemap.o: readfilemap.c
-
-#############################################################################
-
-libs/elements: libs/elements.o libs/launch.o
-	$(CC) -mcrt=newlib $^ -o $@
-	$(STRIP) $(STRIPFLAGS) $@
-
-libs/elements.o: elements.c
-
-#############################################################################
-
-libs/outline: libs/outline.o libs/launch.o
-	$(CC) -mcrt=newlib $^ -o $@
-	$(STRIP) $(STRIPFLAGS) $@
-
-libs/outline.o: outline.c
-
-#############################################################################
-
-libs/runtests: libs/runtests.o libs/chardata.o libs/minicheck.o libs/launch.o
-	$(CC) -mcrt=newlib $^ -o $@
-
-libs/chardata.o: chardata.c chardata.h
-
-libs/minicheck.o: minicheck.c minicheck.h
-
-libs/runtests.o: runtests.c chardata.h
-
-#############################################################################
-
-libs/benchmark: libs/benchmark.o libs/launch.o
-	$(CC) -mcrt=newlib $^ -o $@
-
-libs/benchmark.o: benchmark.c
-
-#############################################################################
-
-so/libexpat.so: so/xmlparse.o so/xmltok.o so/xmlrole.o
-	$(CC) -mcrt=newlib -shared -o $@ $^
-	protect $@ -e
-
-so/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
-	expat_external.h internal.h amigaconfig.h
-
-so/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
-	internal.h amigaconfig.h
-
-so/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
-	iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
-	expat_external.h internal.h amigaconfig.h
-
-#############################################################################
-
-so/xmlwf: newlib/xmlwf.o newlib/xmlfile.o newlib/codepage.o newlib/readfilemap.o
-	$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
-	$(STRIP) $(STRIPFLAGS) $@
-
-#############################################################################
-
-so/elements: newlib/elements.o
-	$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
-	$(STRIP) $(STRIPFLAGS) $@
-
-#############################################################################
-
-so/outline: newlib/outline.o
-	$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
-	$(STRIP) $(STRIPFLAGS) $@
-
-#############################################################################
-
-so/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o
-	$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
-
-#############################################################################
-
-so/benchmark: newlib/benchmark.o
-	$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
-
-#############################################################################
-
-clib2/%.o: %.c
-	$(CC) -mcrt=clib2 $(CFLAGS) -I../lib -c $< -o $@
-
-newlib/%.o: %.c
-	$(CC) -mcrt=newlib $(CFLAGS) -I../lib -c $< -o $@
-
-libs/%.o: %.c
-	$(CC) -mcrt=newlib $(CFLAGS) -D__USE_INLINE__ -I. -Iinclude -Iinclude/libraries -I../lib -c $< -o $@
-
-so/%.o: %.c
-	$(CC) -mcrt=newlib $(CFLAGS) -fPIC -I../lib -c $< -o $@

+ 0 - 98
libs/expat/amiga/README.txt

@@ -1,98 +0,0 @@
-SUMMARY
-=======
-This is a port of expat for AmigaOS 4.x which includes the
-SDK, some XML tools and the libraries.
-
-Four library flavours are supported:
-1. static clib2 (libexpat.a)
-2. static newlib (libexpat.a)
-3. AmigaOS library (expat.library)
-4. AmigaOS shared object library (libexpat.so)
-
-The AmigaOS library version is based on the work of Fredrik Wikstrom.
-
-
-BUILDING
-========
-To build all the library flavours, all the tools, examples and run the
-test suite, simply type 'make all' in the amiga subdirectory.
-
-
-INSTALLATION
-============
-To install expat into the standard AmigaOS SDK type 'make install'
-in the amiga subdirectory.
-
-
-CONFIGURATION
-=============
-You may want to edit the lib/amigaconfig.h file to remove
-DTD and/or XML namespace support if they are not required by your
-specific application for a smaller and faster implementation.
-
-
-SOURCE CODE
-===========
-The source code is actively maintained and merged with the official
-Expat repository available at http://expat.sourceforge.net/
-
-
-HISTORY
-=======
-53.1 - bumped version to match AmigaOS streaming
-     - modified to remove all global variables (except INewLib)
-     - removed replacements for malloc(), etc. which are now
-       handled by the respective C library
-     - compiled with the latest binutils which bumps the
-       AMIGAOS_DYNVERSION to 2 for the libexpat.so target
-     - now strips the expat.library binary
-
-5.2  - fixed XML_Parse 68k stub which enables xmlviewer to work
-       without crashing
-     - added some new functions to the 68k jump table available
-       in the latest expat.library for AmigaOS 3.x
-     - patches provided by Fredrik Wikstrom
-
-5.1  - fixed package archive which was missing libexpat.so
-     - fixed library protection bits
-     - fixed up copyright notices
-
-5.0  - integrated 68k patches from Fredrik Wikstrom which means
-       expat.library is now callable from 68k code
-     - bumped version for the addition of the 68k interface so
-       executables can explicitly ask for version 5 and know
-       it includes the 68k interface
-     - refactored Makefile to avoid recursive make calls and
-       build all the library flavours
-     - added static newlib version
-     - added shared objects version
-     - added package target to Makefile
-     - compiled with SDK 53.13 (GCC 4.2.4) at -O3
-
-4.2  - updated to correspond to Expat 2.0.1 release
-     - bumped copyright banners and versions
-     - simplified amigaconfig.h
-     - updated include/libraries/expat.h file
-     - modified launch.c to use contructor/deconstructor
-     - removed need for amiga_main() from expat utilities
-
-4.1  - fixed memory freeing bug in shared library version
-     - now allocates shared memory
-
-4.0  - updated for corresponding Expat 2.0 release
-     - some minor CVS related changes
-
-3.1  - removed obsolete sfd file
-     - added library description xml file
-     - refactored Makefile
-     - removed extraneous VARARGS68K keywords
-     - reworked default memory handling functions in shared lib
-     - updated amigaconfig.h
-
-3.0  - initial release
-     - based on expat 1.95.8
-
-
-TO DO
-=====
-- wide character support (UTF-16)

+ 0 - 264
libs/expat/amiga/expat.xml

@@ -1,264 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE library SYSTEM "library.dtd">
-<!-- autogenerated by fdtrans v51.16 -->
-<library name="expat" basename="ExpatBase" basetype="Library" openname="expat.library">
-	<include>libraries/expat.h</include>
-	<interface name="main" version="1.0" struct="ExpatIFace" prefix="_Expat_" asmprefix="IExpat" global="IExpat">
-		<method name="Obtain" result="uint32"/>
-		<method name="Release" result="uint32"/>
-		<method name="Expunge" result="void" status="unimplemented"/>
-		<method name="Clone" result="struct Interface *" status="unimplemented"/>
-		<method name="XML_ParserCreate" result="XML_Parser">
-			<arg name="encodingName" type="const XML_Char *"/>
-		</method>
-		<method name="XML_ParserCreateNS" result="XML_Parser">
-			<arg name="encodingName" type="const XML_Char *"/>
-			<arg name="nsSep" type="XML_Char"/>
-		</method>
-		<method name="XML_ParserCreate_MM" result="XML_Parser">
-			<arg name="encoding" type="const XML_Char *"/>
-			<arg name="memsuite" type="const XML_Memory_Handling_Suite *"/>
-			<arg name="namespaceSeparator" type="const XML_Char *"/>
-		</method>
-		<method name="XML_ExternalEntityParserCreate" result="XML_Parser">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="context" type="const XML_Char *"/>
-			<arg name="encoding" type="const XML_Char *"/>
-		</method>
-		<method name="XML_ParserFree" result="void">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_Parse" result="enum XML_Status">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="s" type="const char *"/>
-			<arg name="len" type="int"/>
-			<arg name="isFinal" type="int"/>
-		</method>
-		<method name="XML_ParseBuffer" result="enum XML_Status">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="len" type="int"/>
-			<arg name="isFinal" type="int"/>
-		</method>
-		<method name="XML_GetBuffer" result="void *">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="len" type="int"/>
-		</method>
-		<method name="XML_SetStartElementHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartElementHandler"/>
-		</method>
-		<method name="XML_SetEndElementHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="end" type="XML_EndElementHandler"/>
-		</method>
-		<method name="XML_SetElementHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartElementHandler"/>
-			<arg name="end" type="XML_EndElementHandler"/>
-		</method>
-		<method name="XML_SetCharacterDataHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_CharacterDataHandler"/>
-		</method>
-		<method name="XML_SetProcessingInstructionHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_ProcessingInstructionHandler"/>
-		</method>
-		<method name="XML_SetCommentHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_CommentHandler"/>
-		</method>
-		<method name="XML_SetStartCdataSectionHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartCdataSectionHandler"/>
-		</method>
-		<method name="XML_SetEndCdataSectionHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="end" type="XML_EndCdataSectionHandler"/>
-		</method>
-		<method name="XML_SetCdataSectionHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartCdataSectionHandler"/>
-			<arg name="end" type="XML_EndCdataSectionHandler"/>
-		</method>
-		<method name="XML_SetDefaultHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_DefaultHandler"/>
-		</method>
-		<method name="XML_SetDefaultHandlerExpand" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_DefaultHandler"/>
-		</method>
-		<method name="XML_SetExternalEntityRefHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_ExternalEntityRefHandler"/>
-		</method>
-		<method name="XML_SetExternalEntityRefHandlerArg" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="arg" type="void *"/>
-		</method>
-		<method name="XML_SetUnknownEncodingHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_UnknownEncodingHandler"/>
-			<arg name="data" type="void *"/>
-		</method>
-		<method name="XML_SetStartNamespaceDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartNamespaceDeclHandler"/>
-		</method>
-		<method name="XML_SetEndNamespaceDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="end" type="XML_EndNamespaceDeclHandler"/>
-		</method>
-		<method name="XML_SetNamespaceDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartNamespaceDeclHandler"/>
-			<arg name="end" type="XML_EndNamespaceDeclHandler"/>
-		</method>
-		<method name="XML_SetXmlDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_XmlDeclHandler"/>
-		</method>
-		<method name="XML_SetStartDoctypeDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartDoctypeDeclHandler"/>
-		</method>
-		<method name="XML_SetEndDoctypeDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="end" type="XML_EndDoctypeDeclHandler"/>
-		</method>
-		<method name="XML_SetDoctypeDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="start" type="XML_StartDoctypeDeclHandler"/>
-			<arg name="end" type="XML_EndDoctypeDeclHandler"/>
-		</method>
-		<method name="XML_SetElementDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="eldecl" type="XML_ElementDeclHandler"/>
-		</method>
-		<method name="XML_SetAttlistDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="attdecl" type="XML_AttlistDeclHandler"/>
-		</method>
-		<method name="XML_SetEntityDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_EntityDeclHandler"/>
-		</method>
-		<method name="XML_SetUnparsedEntityDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_UnparsedEntityDeclHandler"/>
-		</method>
-		<method name="XML_SetNotationDeclHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_NotationDeclHandler"/>
-		</method>
-		<method name="XML_SetNotStandaloneHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_NotStandaloneHandler"/>
-		</method>
-		<method name="XML_GetErrorCode" result="enum XML_Error">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_ErrorString" result="const XML_LChar *">
-			<arg name="code" type="enum XML_Error"/>
-		</method>
-		<method name="XML_GetCurrentByteIndex" result="long">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetCurrentLineNumber" result="int">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetCurrentColumnNumber" result="int">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetCurrentByteCount" result="int">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetInputContext" result="const char *">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="offset" type="int *"/>
-			<arg name="size" type="int *"/>
-		</method>
-		<method name="XML_SetUserData" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="userData" type="void *"/>
-		</method>
-		<method name="XML_DefaultCurrent" result="void">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_UseParserAsHandlerArg" result="void">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_SetBase" result="enum XML_Status">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="base" type="const XML_Char *"/>
-		</method>
-		<method name="XML_GetBase" result="const XML_Char *">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetSpecifiedAttributeCount" result="int">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetIdAttributeIndex" result="int">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_SetEncoding" result="enum XML_Status">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="encoding" type="const XML_Char *"/>
-		</method>
-		<method name="XML_SetParamEntityParsing" result="int">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="parsing" type="enum XML_ParamEntityParsing"/>
-		</method>
-		<method name="XML_SetReturnNSTriplet" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="do_nst" type="int"/>
-		</method>
-		<method name="XML_ExpatVersion" result="const XML_LChar *">
-		</method>
-		<method name="XML_ExpatVersionInfo" result="XML_Expat_Version">
-		</method>
-		<method name="XML_ParserReset" result="XML_Bool">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="encoding" type="const XML_Char *"/>
-		</method>
-		<method name="XML_SetSkippedEntityHandler" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="handler" type="XML_SkippedEntityHandler"/>
-		</method>
-		<method name="XML_UseForeignDTD" result="enum XML_Error">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="useDTD" type="XML_Bool"/>
-		</method>
-		<method name="XML_GetFeatureList" result="const XML_Feature *">
-		</method>
-		<method name="XML_StopParser" result="enum XML_Status">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="resumable" type="XML_Bool"/>
-		</method>
-		<method name="XML_ResumeParser" result="enum XML_Status">
-			<arg name="parser" type="XML_Parser"/>
-		</method>
-		<method name="XML_GetParsingStatus" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="status" type="XML_ParsingStatus *"/>
-		</method>
-		<method name="XML_FreeContentModel" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="model" type="XML_Content *"/>
-		</method>
-		<method name="XML_MemMalloc" result="void *">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="size" type="size_t"/>
-		</method>
-		<method name="XML_MemRealloc" result="void *">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="ptr" type="void *"/>
-			<arg name="size" type="size_t"/>
-		</method>
-		<method name="XML_MemFree" result="void">
-			<arg name="parser" type="XML_Parser"/>
-			<arg name="ptr" type="void *"/>
-		</method>
-	</interface>
-</library>

+ 0 - 939
libs/expat/amiga/expat_68k.c

@@ -1,939 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/*
-** Note: This file was originally automatically generated by fdtrans.
-*/
-
-#ifdef __USE_INLINE__
-#undef __USE_INLINE__
-#endif
-
-#include <exec/interfaces.h>
-#include <exec/libraries.h>
-#include <exec/emulation.h>
-#include <proto/exec.h>
-#include <interfaces/expat.h>
-#include "expat_68k.h"
-#include "expat_base.h"
-
-
-STATIC ULONG stub_OpenPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;
-
-	return (ULONG) Self->Open(0);
-}
-struct EmuTrap stub_Open = { TRAPINST, TRAPTYPE, stub_OpenPPC };
-
-STATIC ULONG stub_ClosePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;
-
-	return (ULONG) Self->Close();
-}
-struct EmuTrap stub_Close = { TRAPINST, TRAPTYPE, stub_ClosePPC };
-
-STATIC ULONG stub_ExpungePPC(ULONG *regarray)
-{
-	return 0UL;
-}
-struct EmuTrap stub_Expunge = { TRAPINST, TRAPTYPE, stub_ExpungePPC };
-
-STATIC ULONG stub_ReservedPPC(ULONG *regarray)
-{
-	return 0UL;
-}
-struct EmuTrap stub_Reserved = { TRAPINST, TRAPTYPE, stub_ReservedPPC };
-
-static M68kXML_Parser stub_XML_ParserCreatePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-	struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
-
-	M68kXML_Parser p;
-	p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
-	if (p) {
-		p->p = Self->XML_ParserCreate((const XML_Char *)regarray[8]);
-		if (p->p) {
-			p->IExec = IExec;
-			Self->XML_SetUserData(p->p, p);
-			return p;
-		}
-		IExec->FreeVec(p);
-	}
-	return NULL;
-}
-struct EmuTrap stub_XML_ParserCreate = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreatePPC };
-
-static M68kXML_Parser stub_XML_ParserCreateNSPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-	struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
-
-	M68kXML_Parser p;
-	p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
-	if (p) {
-		p->p = Self->XML_ParserCreateNS((const XML_Char *)regarray[8], (XML_Char)regarray[0]);
-		if (p->p) {
-			p->IExec = IExec;
-			Self->XML_SetUserData(p->p, p);
-			return p;
-		}
-		IExec->FreeVec(p);
-	}
-	return NULL;
-}
-struct EmuTrap stub_XML_ParserCreateNS = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreateNSPPC };
-
-static M68kXML_Parser stub_XML_ParserCreate_MMPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-	struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
-
-	M68kXML_Parser p;
-	p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
-	if (p) {
-		p->p = Self->XML_ParserCreate_MM((const XML_Char *)regarray[8],
-			(const XML_Memory_Handling_Suite *)regarray[9],
-			(const XML_Char *)regarray[10]);
-		if (p->p) {
-			p->IExec = IExec;
-			Self->XML_SetUserData(p->p, p);
-			return p;
-		}
-		IExec->FreeVec(p);
-	}
-	return NULL;
-}
-struct EmuTrap stub_XML_ParserCreate_MM = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreate_MMPPC };
-
-static M68kXML_Parser stub_XML_ExternalEntityParserCreatePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-	struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
-
-	M68kXML_Parser p;
-	p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
-	if (p) {
-		p->p = Self->XML_ExternalEntityParserCreate((XML_Parser)regarray[8],
-			(const XML_Char *)regarray[9], (const XML_Char *)regarray[10]);
-		if (p->p) {
-			p->IExec = IExec;
-			Self->XML_SetUserData(p->p, p);
-			return p;
-		}
-		IExec->FreeVec(p);
-	}
-	return NULL;
-}
-struct EmuTrap stub_XML_ExternalEntityParserCreate = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExternalEntityParserCreatePPC };
-
-static void stub_XML_ParserFreePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-	struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	if (p) {
-		Self->XML_ParserFree(p->p);
-		IExec->FreeVec(p);
-	}
-}
-struct EmuTrap stub_XML_ParserFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserFreePPC };
-
-static int stub_XML_ParsePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	Self->XML_SetUserData(p->p, p);
-	return Self->XML_Parse(p->p, (const char *)regarray[9], (int)regarray[0], (int)regarray[1]);
-}
-struct EmuTrap stub_XML_Parse = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParsePPC };
-
-static int stub_XML_ParseBufferPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_ParseBuffer(p->p, (int)regarray[0], (int)regarray[1]);
-}
-struct EmuTrap stub_XML_ParseBuffer = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParseBufferPPC };
-
-static void * stub_XML_GetBufferPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetBuffer(p->p, (int)regarray[0]);
-}
-struct EmuTrap stub_XML_GetBuffer = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetBufferPPC };
-
-static void stub_XML_SetStartElementHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startelementhandler = (void *)regarray[9];
-	Self->XML_SetStartElementHandler(p->p, _68k_startelementhandler);
-}
-struct EmuTrap stub_XML_SetStartElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartElementHandlerPPC };
-
-static void stub_XML_SetEndElementHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->endelementhandler = (void *)regarray[9];
-	Self->XML_SetEndElementHandler(p->p, _68k_endelementhandler);
-}
-struct EmuTrap stub_XML_SetEndElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndElementHandlerPPC };
-
-static void stub_XML_SetElementHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startelementhandler = (void *)regarray[9];
-	p->endelementhandler = (void *)regarray[10];
-	Self->XML_SetElementHandler(p->p, _68k_startelementhandler, _68k_endelementhandler);
-}
-struct EmuTrap stub_XML_SetElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetElementHandlerPPC };
-
-static void stub_XML_SetCharacterDataHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->chardatahandler = (void *)regarray[9];
-	Self->XML_SetCharacterDataHandler(p->p, _68k_chardatahandler);
-}
-struct EmuTrap stub_XML_SetCharacterDataHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCharacterDataHandlerPPC };
-
-static void stub_XML_SetProcessingInstructionHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->procinsthandler = (void *)regarray[9];
-	Self->XML_SetProcessingInstructionHandler(p->p, _68k_procinsthandler);
-}
-struct EmuTrap stub_XML_SetProcessingInstructionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetProcessingInstructionHandlerPPC };
-
-static void stub_XML_SetCommentHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->commenthandler = (void *)regarray[9];
-	Self->XML_SetCommentHandler(p->p, _68k_commenthandler);
-}
-struct EmuTrap stub_XML_SetCommentHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCommentHandlerPPC };
-
-static void stub_XML_SetStartCdataSectionHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startcdatahandler = (void *)regarray[9];
-	Self->XML_SetStartCdataSectionHandler(p->p, _68k_startcdatahandler);
-}
-struct EmuTrap stub_XML_SetStartCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartCdataSectionHandlerPPC };
-
-static void stub_XML_SetEndCdataSectionHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->endcdatahandler = (void *)regarray[9];
-	Self->XML_SetEndCdataSectionHandler(p->p, _68k_endcdatahandler);
-}
-struct EmuTrap stub_XML_SetEndCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndCdataSectionHandlerPPC };
-
-static void stub_XML_SetCdataSectionHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startcdatahandler = (void *)regarray[9];
-	p->endcdatahandler = (void *)regarray[10];
-	Self->XML_SetCdataSectionHandler(p->p, _68k_startcdatahandler, _68k_endcdatahandler);
-}
-struct EmuTrap stub_XML_SetCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCdataSectionHandlerPPC };
-
-static void stub_XML_SetDefaultHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->defaulthandler = (void *)regarray[9];
-	Self->XML_SetDefaultHandler(p->p, _68k_defaulthandler);
-}
-struct EmuTrap stub_XML_SetDefaultHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDefaultHandlerPPC };
-
-static void stub_XML_SetDefaultHandlerExpandPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->defaulthandlerexp = (void *)regarray[9];
-	Self->XML_SetDefaultHandlerExpand(p->p, _68k_defaulthandlerexp);
-}
-struct EmuTrap stub_XML_SetDefaultHandlerExpand = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDefaultHandlerExpandPPC };
-
-static void stub_XML_SetExternalEntityRefHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->extentrefhandler = (void *)regarray[9];
-	Self->XML_SetExternalEntityRefHandler(p->p, _68k_extentrefhandler);
-}
-struct EmuTrap stub_XML_SetExternalEntityRefHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetExternalEntityRefHandlerPPC };
-
-static void stub_XML_SetExternalEntityRefHandlerArgPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->extenthandlerarg = (void *)regarray[9];
-}
-struct EmuTrap stub_XML_SetExternalEntityRefHandlerArg = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetExternalEntityRefHandlerArgPPC };
-
-static void stub_XML_SetUnknownEncodingHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->unknownenchandler = (void *)regarray[9];
-	p->enchandlerarg = (void *)regarray[10];
-	Self->XML_SetUnknownEncodingHandler(p->p, _68k_unknownenchandler, p);
-}
-struct EmuTrap stub_XML_SetUnknownEncodingHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUnknownEncodingHandlerPPC };
-
-static void stub_XML_SetStartNamespaceDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startnamespacehandler = (void *)regarray[9];
-	Self->XML_SetStartNamespaceDeclHandler(p->p, _68k_startnamespacehandler);
-}
-struct EmuTrap stub_XML_SetStartNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartNamespaceDeclHandlerPPC };
-
-static void stub_XML_SetEndNamespaceDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->endnamespacehandler = (void *)regarray[9];
-	Self->XML_SetEndNamespaceDeclHandler(p->p, _68k_endnamespacehandler);
-}
-struct EmuTrap stub_XML_SetEndNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndNamespaceDeclHandlerPPC };
-
-static void stub_XML_SetNamespaceDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startnamespacehandler = (void *)regarray[9];
-	p->endnamespacehandler = (void *)regarray[10];
-	Self->XML_SetNamespaceDeclHandler(p->p, _68k_startnamespacehandler, _68k_endnamespacehandler);
-}
-struct EmuTrap stub_XML_SetNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNamespaceDeclHandlerPPC };
-
-static void stub_XML_SetXmlDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->xmldeclhandler = (void *)regarray[9];
-	Self->XML_SetXmlDeclHandler(p->p, _68k_xmldeclhandler);
-}
-struct EmuTrap stub_XML_SetXmlDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetXmlDeclHandlerPPC };
-
-static void stub_XML_SetStartDoctypeDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startdoctypehandler = (void *)regarray[9];
-	Self->XML_SetStartDoctypeDeclHandler(p->p, _68k_startdoctypehandler);
-}
-struct EmuTrap stub_XML_SetStartDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartDoctypeDeclHandlerPPC };
-
-static void stub_XML_SetEndDoctypeDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->enddoctypehandler = (void *)regarray[9];
-	Self->XML_SetEndDoctypeDeclHandler(p->p, _68k_enddoctypehandler);
-}
-struct EmuTrap stub_XML_SetEndDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndDoctypeDeclHandlerPPC };
-
-static void stub_XML_SetDoctypeDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->startdoctypehandler = (void *)regarray[9];
-	p->enddoctypehandler = (void *)regarray[10];
-	Self->XML_SetDoctypeDeclHandler(p->p, _68k_startdoctypehandler, _68k_enddoctypehandler);
-}
-struct EmuTrap stub_XML_SetDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDoctypeDeclHandlerPPC };
-
-static void stub_XML_SetElementDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->elementdeclhandler = (void *)regarray[9];
-	Self->XML_SetElementDeclHandler(p->p, _68k_elementdeclhandler);
-}
-struct EmuTrap stub_XML_SetElementDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetElementDeclHandlerPPC };
-
-static void stub_XML_SetAttlistDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->attlistdeclhandler = (void *)regarray[9];
-	Self->XML_SetAttlistDeclHandler(p->p, _68k_attlistdeclhandler);
-}
-struct EmuTrap stub_XML_SetAttlistDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetAttlistDeclHandlerPPC };
-
-static void stub_XML_SetEntityDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->entitydeclhandler = (void *)regarray[9];
-	Self->XML_SetEntityDeclHandler(p->p, _68k_entitydeclhandler);
-}
-struct EmuTrap stub_XML_SetEntityDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEntityDeclHandlerPPC };
-
-static void stub_XML_SetUnparsedEntityDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->unparseddeclhandler = (void *)regarray[9];
-	Self->XML_SetUnparsedEntityDeclHandler(p->p, _68k_unparseddeclhandler);
-}
-struct EmuTrap stub_XML_SetUnparsedEntityDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUnparsedEntityDeclHandlerPPC };
-
-static void stub_XML_SetNotationDeclHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->notationdeclhandler = (void *)regarray[9];
-	Self->XML_SetNotationDeclHandler(p->p, _68k_notationdeclhandler);
-}
-struct EmuTrap stub_XML_SetNotationDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNotationDeclHandlerPPC };
-
-static void stub_XML_SetNotStandaloneHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->notstandalonehandler = (void *)regarray[9];
-	Self->XML_SetNotStandaloneHandler(p->p, _68k_notstandalonehandler);
-}
-struct EmuTrap stub_XML_SetNotStandaloneHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNotStandaloneHandlerPPC };
-
-static int stub_XML_GetErrorCodePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetErrorCode(p->p);
-}
-struct EmuTrap stub_XML_GetErrorCode = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetErrorCodePPC };
-
-static const XML_LChar * stub_XML_ErrorStringPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	return Self->XML_ErrorString((int)regarray[0]);
-}
-struct EmuTrap stub_XML_ErrorString = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ErrorStringPPC };
-
-static long stub_XML_GetCurrentByteIndexPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetCurrentByteIndex(p->p);
-}
-struct EmuTrap stub_XML_GetCurrentByteIndex = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentByteIndexPPC };
-
-static int stub_XML_GetCurrentLineNumberPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetCurrentLineNumber(p->p);
-}
-struct EmuTrap stub_XML_GetCurrentLineNumber = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentLineNumberPPC };
-
-static int stub_XML_GetCurrentColumnNumberPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetCurrentColumnNumber(p->p);
-}
-struct EmuTrap stub_XML_GetCurrentColumnNumber = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentColumnNumberPPC };
-
-static int stub_XML_GetCurrentByteCountPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetCurrentByteCount(p->p);
-}
-struct EmuTrap stub_XML_GetCurrentByteCount = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentByteCountPPC };
-
-static const char * stub_XML_GetInputContextPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetInputContext(p->p, (int *)regarray[9], (int *)regarray[10]);
-}
-struct EmuTrap stub_XML_GetInputContext = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetInputContextPPC };
-
-static void stub_XML_SetUserDataPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->handlerarg = (void *)regarray[9];
-}
-struct EmuTrap stub_XML_SetUserData = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUserDataPPC };
-
-static void stub_XML_DefaultCurrentPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	Self->XML_DefaultCurrent(p->p);
-}
-struct EmuTrap stub_XML_DefaultCurrent = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_DefaultCurrentPPC };
-
-static void stub_XML_UseParserAsHandlerArgPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->handlerarg = p;
-}
-struct EmuTrap stub_XML_UseParserAsHandlerArg = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_UseParserAsHandlerArgPPC };
-
-static int stub_XML_SetBasePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_SetBase(p->p, (const XML_Char *)regarray[9]);
-}
-struct EmuTrap stub_XML_SetBase = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetBasePPC };
-
-static const XML_Char * stub_XML_GetBasePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetBase(p->p);
-}
-struct EmuTrap stub_XML_GetBase = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetBasePPC };
-
-static int stub_XML_GetSpecifiedAttributeCountPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetSpecifiedAttributeCount(p->p);
-}
-struct EmuTrap stub_XML_GetSpecifiedAttributeCount = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetSpecifiedAttributeCountPPC };
-
-static int stub_XML_GetIdAttributeIndexPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_GetIdAttributeIndex(p->p);
-}
-struct EmuTrap stub_XML_GetIdAttributeIndex = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetIdAttributeIndexPPC };
-
-static int stub_XML_SetEncodingPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_SetEncoding(p->p, (const XML_Char *)regarray[9]);
-}
-struct EmuTrap stub_XML_SetEncoding = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEncodingPPC };
-
-static int stub_XML_SetParamEntityParsingPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_SetParamEntityParsing(p->p, (enum XML_ParamEntityParsing)regarray[9]);
-}
-struct EmuTrap stub_XML_SetParamEntityParsing = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetParamEntityParsingPPC };
-
-static void stub_XML_SetReturnNSTripletPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	Self->XML_SetReturnNSTriplet(p->p, (int)regarray[0]);
-}
-struct EmuTrap stub_XML_SetReturnNSTriplet = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetReturnNSTripletPPC };
-
-static const XML_LChar * stub_XML_ExpatVersionPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	return Self->XML_ExpatVersion();
-}
-struct EmuTrap stub_XML_ExpatVersion = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExpatVersionPPC };
-
-static XML_Expat_Version stub_XML_ExpatVersionInfoPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	return Self->XML_ExpatVersionInfo();
-}
-struct EmuTrap stub_XML_ExpatVersionInfo = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExpatVersionInfoPPC };
-
-static int stub_XML_ParserResetPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_ParserReset(p->p, (const XML_Char *)regarray[9]);
-}
-struct EmuTrap stub_XML_ParserReset = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserResetPPC };
-
-static void stub_XML_SetSkippedEntityHandlerPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	p->skippedentityhandler = (void *)regarray[9];
-	Self->XML_SetSkippedEntityHandler(p->p, _68k_skippedentityhandler);
-}
-struct EmuTrap stub_XML_SetSkippedEntityHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetSkippedEntityHandlerPPC };
-
-static int stub_XML_UseForeignDTDPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_UseForeignDTD(p->p, (XML_Bool)regarray[0]);
-}
-struct EmuTrap stub_XML_UseForeignDTD = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_UseForeignDTDPPC };
-
-static const XML_Feature * stub_XML_GetFeatureListPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	return Self->XML_GetFeatureList();
-}
-struct EmuTrap stub_XML_GetFeatureList = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetFeatureListPPC };
-
-static int stub_XML_StopParserPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_StopParser(p->p, (XML_Bool)regarray[0]);
-}
-struct EmuTrap stub_XML_StopParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_StopParserPPC };
-
-static int stub_XML_ResumeParserPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_ResumeParser(p->p);
-}
-struct EmuTrap stub_XML_ResumeParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ResumeParserPPC };
-
-static void stub_XML_GetParsingStatusPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	Self->XML_GetParsingStatus(p->p, (XML_ParsingStatus *)regarray[9]);
-}
-struct EmuTrap stub_XML_GetParsingStatus = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetParsingStatusPPC };
-
-static void stub_XML_FreeContentModelPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	Self->XML_FreeContentModel(p->p, (XML_Content *)regarray[9]);
-}
-struct EmuTrap stub_XML_FreeContentModel = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_FreeContentModelPPC };
-
-static void *stub_XML_MemMallocPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_MemMalloc(p->p, (size_t)regarray[0]);
-}
-struct EmuTrap stub_XML_MemMalloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemMallocPPC };
-
-static void *stub_XML_MemReallocPPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	return Self->XML_MemRealloc(p->p, (void *)regarray[9], (size_t)regarray[0]);
-}
-struct EmuTrap stub_XML_MemRealloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemReallocPPC };
-
-static void stub_XML_MemFreePPC(ULONG *regarray)
-{
-	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
-	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
-	struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
-
-	M68kXML_Parser p = (M68kXML_Parser)regarray[8];
-	Self->XML_MemFree(p->p, (void *)regarray[9]);
-}
-struct EmuTrap stub_XML_MemFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemFreePPC };
-
-ULONG VecTable68K[] = {
-	(ULONG)&stub_Open,
-	(ULONG)&stub_Close,
-	(ULONG)&stub_Expunge,
-	(ULONG)&stub_Reserved,
-	(ULONG)&stub_XML_ParserCreate,
-	(ULONG)&stub_XML_ParserCreateNS,
-	(ULONG)&stub_XML_ParserCreate_MM,
-	(ULONG)&stub_XML_ExternalEntityParserCreate,
-	(ULONG)&stub_XML_ParserFree,
-	(ULONG)&stub_XML_Parse,
-	(ULONG)&stub_XML_ParseBuffer,
-	(ULONG)&stub_XML_GetBuffer,
-	(ULONG)&stub_XML_SetStartElementHandler,
-	(ULONG)&stub_XML_SetEndElementHandler,
-	(ULONG)&stub_XML_SetElementHandler,
-	(ULONG)&stub_XML_SetCharacterDataHandler,
-	(ULONG)&stub_XML_SetProcessingInstructionHandler,
-	(ULONG)&stub_XML_SetCommentHandler,
-	(ULONG)&stub_XML_SetStartCdataSectionHandler,
-	(ULONG)&stub_XML_SetEndCdataSectionHandler,
-	(ULONG)&stub_XML_SetCdataSectionHandler,
-	(ULONG)&stub_XML_SetDefaultHandler,
-	(ULONG)&stub_XML_SetDefaultHandlerExpand,
-	(ULONG)&stub_XML_SetExternalEntityRefHandler,
-	(ULONG)&stub_XML_SetExternalEntityRefHandlerArg,
-	(ULONG)&stub_XML_SetUnknownEncodingHandler,
-	(ULONG)&stub_XML_SetStartNamespaceDeclHandler,
-	(ULONG)&stub_XML_SetEndNamespaceDeclHandler,
-	(ULONG)&stub_XML_SetNamespaceDeclHandler,
-	(ULONG)&stub_XML_SetXmlDeclHandler,
-	(ULONG)&stub_XML_SetStartDoctypeDeclHandler,
-	(ULONG)&stub_XML_SetEndDoctypeDeclHandler,
-	(ULONG)&stub_XML_SetDoctypeDeclHandler,
-	(ULONG)&stub_XML_SetElementDeclHandler,
-	(ULONG)&stub_XML_SetAttlistDeclHandler,
-	(ULONG)&stub_XML_SetEntityDeclHandler,
-	(ULONG)&stub_XML_SetUnparsedEntityDeclHandler,
-	(ULONG)&stub_XML_SetNotationDeclHandler,
-	(ULONG)&stub_XML_SetNotStandaloneHandler,
-	(ULONG)&stub_XML_GetErrorCode,
-	(ULONG)&stub_XML_ErrorString,
-	(ULONG)&stub_XML_GetCurrentByteIndex,
-	(ULONG)&stub_XML_GetCurrentLineNumber,
-	(ULONG)&stub_XML_GetCurrentColumnNumber,
-	(ULONG)&stub_XML_GetCurrentByteCount,
-	(ULONG)&stub_XML_GetInputContext,
-	(ULONG)&stub_XML_SetUserData,
-	(ULONG)&stub_XML_DefaultCurrent,
-	(ULONG)&stub_XML_UseParserAsHandlerArg,
-	(ULONG)&stub_XML_SetBase,
-	(ULONG)&stub_XML_GetBase,
-	(ULONG)&stub_XML_GetSpecifiedAttributeCount,
-	(ULONG)&stub_XML_GetIdAttributeIndex,
-	(ULONG)&stub_XML_SetEncoding,
-	(ULONG)&stub_XML_SetParamEntityParsing,
-	(ULONG)&stub_XML_SetReturnNSTriplet,
-	(ULONG)&stub_XML_ExpatVersion,
-	(ULONG)&stub_XML_ExpatVersionInfo,
-	(ULONG)&stub_XML_ParserReset,
-	(ULONG)&stub_XML_SetSkippedEntityHandler,
-	(ULONG)&stub_XML_UseForeignDTD,
-	(ULONG)&stub_XML_GetFeatureList,
-	(ULONG)&stub_XML_StopParser,
-	(ULONG)&stub_XML_ResumeParser,
-	(ULONG)&stub_XML_GetParsingStatus,
-	(ULONG)&stub_XML_FreeContentModel,
-	(ULONG)&stub_XML_MemMalloc,
-	(ULONG)&stub_XML_MemRealloc,
-	(ULONG)&stub_XML_MemFree,
-	(ULONG)-1
-};

+ 0 - 94
libs/expat/amiga/expat_68k.h

@@ -1,94 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef EXPAT_68K_H
-#define EXPAT_68K_H
-
-#ifndef LIBRARIES_EXPAT_H
-#include <libraries/expat.h>
-#endif
-
-typedef struct M68kXML_ParserStruct {
-	XML_Parser p;
-	struct ExecIFace *IExec;
-	void *handlerarg;
-	void *extenthandlerarg;
-	void *enchandlerarg;
-	void *startelementhandler;
-	void *endelementhandler;
-	void *chardatahandler;
-	void *procinsthandler;
-	void *commenthandler;
-	void *startcdatahandler;
-	void *endcdatahandler;
-	void *defaulthandler;
-	void *defaulthandlerexp;
-	void *extentrefhandler;
-	void *unknownenchandler;
-	void *startnamespacehandler;
-	void *endnamespacehandler;
-	void *xmldeclhandler;
-	void *startdoctypehandler;
-	void *enddoctypehandler;
-	void *elementdeclhandler;
-	void *attlistdeclhandler;
-	void *entitydeclhandler;
-	void *unparseddeclhandler;
-	void *notationdeclhandler;
-	void *notstandalonehandler;
-	void *skippedentityhandler;
-} *M68kXML_Parser;
-
-/* expat_68k_handler_stubs.c */
-void _68k_startelementhandler(void *userdata, const char *name, const char **attrs);
-void _68k_endelementhandler(void *userdata, const char *name);
-void _68k_chardatahandler(void *userdata, const char *s, int len);
-void _68k_procinsthandler(void *userdata, const char *target, const char *data);
-void _68k_commenthandler(void *userdata, const char *data);
-void _68k_startcdatahandler(void *userdata);
-void _68k_endcdatahandler(void *userdata);
-void _68k_defaulthandler(void *userdata, const char *s, int len);
-void _68k_defaulthandlerexp(void *userdata, const char *s, int len);
-int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base,
-	const char *sysid, const char *pubid);
-int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info);
-void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri);
-void _68k_endnamespacehandler(void *userdata, const char *prefix);
-void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone);
-void _68k_startdoctypehandler(void *userdata, const char *doctypename,
-	const char *sysid, const char *pubid, int has_internal_subset);
-void _68k_enddoctypehandler(void *userdata);
-void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model);
-void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname,
-	const char *att_type, const char *dflt, int isrequired);
-void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity,
-	const char *value, int value_length, const char *base, const char *sysid, const char *pubid,
-	const char *notationname);
-void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base,
-	const char *sysid, const char *pubid, const char *notationname);
-void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base,
-	const char *sysid, const char *pubid);
-int _68k_notstandalonehandler(void *userdata);
-void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity);
-
-#endif

+ 0 - 185
libs/expat/amiga/expat_68k_handler_stubs.c

@@ -1,185 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifdef __USE_INLINE__
-#undef __USE_INLINE__
-#endif
-
-#include "expat_68k.h"
-#include <exec/emulation.h>
-#include <proto/exec.h>
-#include <stdarg.h>
-
-static uint32 VARARGS68K call_68k_code (struct ExecIFace *IExec, void *code, int num_args, ...) {
-	uint32 res = 0;
-
-	va_list vargs;
-	va_startlinear(vargs, num_args);
-	uint32 *args = va_getlinearva(vargs, uint32 *);
-
-	uint8 *stack = IExec->AllocVec(4096, MEMF_SHARED);
-	if (stack) {
-		uint32 *sp = (uint32 *)(stack + 4096);
-		args += num_args;
-		while (num_args--) {
-			*--sp = *--args;
-		}
-
-		res = IExec->EmulateTags(code, ET_StackPtr, sp, TAG_END);
-		IExec->FreeVec(stack);
-	}
-
-	va_end(vargs);
-
-	return res;
-}
-
-void _68k_startelementhandler(void *userdata, const char *name, const char **attrs) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->startelementhandler, 3, p->handlerarg, name, attrs);
-}
-
-void _68k_endelementhandler(void *userdata, const char *name) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->endelementhandler, 2, p->handlerarg, name);
-}
-
-void _68k_chardatahandler(void *userdata, const char *s, int len) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->chardatahandler, 3, p->handlerarg, s, len);
-}
-
-void _68k_procinsthandler(void *userdata, const char *target, const char *data) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->procinsthandler, 3, p->handlerarg, target, data);
-}
-
-void _68k_commenthandler(void *userdata, const char *data) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->commenthandler, 2, p->handlerarg, data);
-}
-
-void _68k_startcdatahandler(void *userdata) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->startcdatahandler, 1, p->handlerarg);
-}
-
-void _68k_endcdatahandler(void *userdata) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->endcdatahandler, 1, p->handlerarg);
-}
-
-void _68k_defaulthandler(void *userdata, const char *s, int len) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->defaulthandler, 3, p->handlerarg, s, len);
-}
-
-void _68k_defaulthandlerexp(void *userdata, const char *s, int len) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->defaulthandlerexp, 3, p->handlerarg, s, len);
-}
-
-int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base,
-	const char *sysid, const char *pubid)
-{
-	M68kXML_Parser p = XML_GetUserData(parser);
-	void *arg = p->extenthandlerarg;
-	return (int)call_68k_code(p->IExec, p->extentrefhandler, 5, arg ? arg : p, context, base, sysid, pubid);
-}
-
-int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info) {
-	M68kXML_Parser p = enchandlerdata;
-	return (int)call_68k_code(p->IExec, p->unknownenchandler, 3, p->enchandlerarg, name, info);
-}
-
-void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->startnamespacehandler, 3, p->handlerarg, prefix, uri);
-}
-
-void _68k_endnamespacehandler(void *userdata, const char *prefix) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->endnamespacehandler, 2, p->handlerarg, prefix);
-}
-
-void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->xmldeclhandler, 4, p->handlerarg, version, encoding, standalone);
-}
-
-void _68k_startdoctypehandler(void *userdata, const char *doctypename,
-	const char *sysid, const char *pubid, int has_internal_subset)
-{
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->startdoctypehandler, 5, p->handlerarg, doctypename, sysid, pubid, has_internal_subset);
-}
-
-void _68k_enddoctypehandler(void *userdata) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->enddoctypehandler, 1, p->handlerarg);
-}
-
-void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->elementdeclhandler, 3, p->handlerarg, name, model);
-}
-
-void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname,
-	const char *att_type, const char *dflt, int isrequired)
-{
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->attlistdeclhandler, 6, p->handlerarg, elname, attname, att_type, dflt, isrequired);
-}
-
-void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity,
-	const char *value, int value_length, const char *base, const char *sysid, const char *pubid,
-	const char *notationname)
-{
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->entitydeclhandler, 9, p->handlerarg, entityname, is_param_entity,
-		value, value_length, base, sysid, pubid, notationname);
-}
-
-void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base,
-	const char *sysid, const char *pubid, const char *notationname)
-{
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->unparseddeclhandler, 6, p->handlerarg, entityname, base, sysid, pubid, notationname);
-}
-
-void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base,
-	const char *sysid, const char *pubid)
-{
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->notationdeclhandler, 5, p->handlerarg, notationname, base, sysid, pubid);
-}
-
-int _68k_notstandalonehandler(void *userdata) {
-	M68kXML_Parser p = userdata;
-	return (int)call_68k_code(p->IExec, p->notstandalonehandler, 1, p->handlerarg);
-}
-
-void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity) {
-	M68kXML_Parser p = userdata;
-	call_68k_code(p->IExec, p->skippedentityhandler, 3, p->handlerarg, entityname, is_param_entity);
-}

+ 0 - 40
libs/expat/amiga/expat_base.h

@@ -1,40 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef EXPAT_BASE_H
-#define EXPAT_BASE_H
-
-#include <exec/libraries.h>
-#include <dos/dos.h>
-#include <interfaces/exec.h>
-#include <interfaces/utility.h>
-
-
-struct ExpatBase {
-	struct Library libNode;
-	uint16 pad;
-	BPTR SegList;
-	struct ExecIFace *IExec;
-};
-
-#endif

+ 0 - 247
libs/expat/amiga/expat_lib.c

@@ -1,247 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifdef __USE_INLINE__
-#undef __USE_INLINE__
-#endif
-
-#define __NOLIBBASE__
-#define __NOGLOBALIFACE__
-
-#include <dos/dos.h>
-#include <proto/exec.h>
-
-#include "expat_base.h"
-
-
-#define LIBNAME		"expat.library"
-#define LIBPRI		0
-#define VERSION		53
-#define REVISION	1
-#define VSTRING		"expat.library 53.1 (7.8.2009)"  /* dd.mm.yyyy */
-
-
-static const char* __attribute__((used)) verstag = "\0$VER: " VSTRING;
-
-
-struct Interface *INewlib = 0;
-
-
-struct ExpatBase * libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *ISys);
-uint32 libObtain (struct LibraryManagerInterface *Self);
-uint32 libRelease (struct LibraryManagerInterface *Self);
-struct ExpatBase *libOpen (struct LibraryManagerInterface *Self, uint32 version);
-BPTR libClose (struct LibraryManagerInterface *Self);
-BPTR libExpunge (struct LibraryManagerInterface *Self);
-struct Interface *openInterface(struct ExecIFace *IExec, CONST_STRPTR libName, uint32 libVer);
-void closeInterface(struct ExecIFace *IExec, struct Interface *iface);
-
-
-static APTR lib_manager_vectors[] = {
-	libObtain,
-	libRelease,
-	NULL,
-	NULL,
-	libOpen,
-	libClose,
-	libExpunge,
-	NULL,
-	(APTR)-1,
-};
-
-
-static struct TagItem lib_managerTags[] = {
-	{ MIT_Name, (uint32)"__library" },
-	{ MIT_VectorTable, (uint32)lib_manager_vectors },
-	{ MIT_Version, 1 },
-	{ TAG_END, 0 }
-};
-
-
-extern void *main_vectors[];
-
-static struct TagItem lib_mainTags[] = {
-	{ MIT_Name, (uint32)"main" },
-	{ MIT_VectorTable, (uint32)main_vectors },
-	{ MIT_Version, 1 },
-	{ TAG_END, 0 }
-};
-
-
-static APTR libInterfaces[] = {
-	lib_managerTags,
-	lib_mainTags,
-	NULL
-};
-
-
-extern void *VecTable68K[];
-
-static struct TagItem libCreateTags[] = {
-	{ CLT_DataSize, sizeof(struct ExpatBase) },
-	{ CLT_InitFunc, (uint32)libInit },
-	{ CLT_Interfaces, (uint32)libInterfaces },
-	{ CLT_Vector68K, (uint32)VecTable68K },
-	{ TAG_END, 0 }
-};
-
-
-static struct Resident __attribute__((used)) lib_res = {
-	RTC_MATCHWORD,	// rt_MatchWord
-	&lib_res,		// rt_MatchTag
-	&lib_res+1,		// rt_EndSkip
-	RTF_NATIVE | RTF_AUTOINIT,	// rt_Flags
-	VERSION,		// rt_Version
-	NT_LIBRARY,		// rt_Type
-	LIBPRI,			// rt_Pri
-	LIBNAME,		// rt_Name
-	VSTRING,		// rt_IdString
-	libCreateTags	// rt_Init
-};
-
-
-int32 _start()
-{
-	return RETURN_FAIL;
-}
-
-
-struct ExpatBase *libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *iexec)
-{
-	libBase->libNode.lib_Node.ln_Type = NT_LIBRARY;
-	libBase->libNode.lib_Node.ln_Pri = LIBPRI;
-	libBase->libNode.lib_Node.ln_Name = LIBNAME;
-	libBase->libNode.lib_Flags = LIBF_SUMUSED|LIBF_CHANGED;
-	libBase->libNode.lib_Version = VERSION;
-	libBase->libNode.lib_Revision = REVISION;
-	libBase->libNode.lib_IdString = VSTRING;
-
-	libBase->SegList = seglist;
-
-	libBase->IExec = iexec;
-	INewlib        = openInterface(iexec, "newlib.library", 0);
-
-	if ( INewlib != 0 )  {
-		return libBase;
-	}
-
-	closeInterface(iexec, INewlib);
-	INewlib = 0;
-
-	iexec->DeleteLibrary(&libBase->libNode);
-
-	return NULL;
-}
-
-
-uint32 libObtain( struct LibraryManagerInterface *Self )
-{
-	++Self->Data.RefCount;
-	return Self->Data.RefCount;
-}
-
-
-uint32 libRelease( struct LibraryManagerInterface *Self )
-{
-	--Self->Data.RefCount;
-	return Self->Data.RefCount;
-}
-
-
-struct ExpatBase *libOpen( struct LibraryManagerInterface *Self, uint32 version )
-{
-	struct ExpatBase *libBase;
-
-	libBase = (struct ExpatBase *)Self->Data.LibBase;
-
-	++libBase->libNode.lib_OpenCnt;
-	libBase->libNode.lib_Flags &= ~LIBF_DELEXP;
-
-	return libBase;
-}
-
-
-BPTR libClose( struct LibraryManagerInterface *Self )
-{
-	struct ExpatBase *libBase;
-
-	libBase = (struct ExpatBase *)Self->Data.LibBase;
-
-	--libBase->libNode.lib_OpenCnt;
-	if ( libBase->libNode.lib_OpenCnt ) {
-		return 0;
-	}
-
-	if ( libBase->libNode.lib_Flags & LIBF_DELEXP ) {
-		return (BPTR)Self->LibExpunge();
-	}
-	else {
-		return ZERO;
-	}
-}
-
-
-BPTR libExpunge( struct LibraryManagerInterface *Self )
-{
-	struct ExpatBase *libBase = (struct ExpatBase *)Self->Data.LibBase;
-	BPTR result = ZERO;
-
-	if (libBase->libNode.lib_OpenCnt == 0) {
-		libBase->IExec->Remove(&libBase->libNode.lib_Node);
-
-		result = libBase->SegList;
-
-		closeInterface(libBase->IExec, INewlib);
-		INewlib = 0;
-
-		libBase->IExec->DeleteLibrary(&libBase->libNode);
-	}
-	else {
-		libBase->libNode.lib_Flags |= LIBF_DELEXP;
-	}
-
-	return result;
-}
-
-
-struct Interface *openInterface(struct ExecIFace *IExec, CONST_STRPTR libName, uint32 libVer)
-{
-	struct Library *base = IExec->OpenLibrary(libName, libVer);
-	struct Interface *iface = IExec->GetInterface(base, "main", 1, 0);
-	if (iface == 0) {
-		IExec->CloseLibrary(base);
-	}
-
-	return iface;
-}
-
-
-void closeInterface(struct ExecIFace *IExec, struct Interface *iface)
-{
-	if (iface != 0)
-	{
-		struct Library *base = iface->Data.LibBase;
-		IExec->DropInterface(iface);
-		IExec->CloseLibrary(base);
-	}
-}

+ 0 - 505
libs/expat/amiga/expat_vectors.c

@@ -1,505 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#include <exec/types.h>
-#include <exec/exec.h>
-#include <exec/interfaces.h>
-#include <interfaces/expat.h>
-
-extern uint32                _Expat_Obtain(struct ExpatIFace *);
-extern uint32                _Expat_Release(struct ExpatIFace *);
-extern XML_Parser            _Expat_XML_ParserCreate(struct ExpatIFace *, const XML_Char * encodingName);
-extern XML_Parser            _Expat_XML_ParserCreateNS(struct ExpatIFace *, const XML_Char * encodingName, XML_Char nsSep);
-extern XML_Parser            _Expat_XML_ParserCreate_MM(struct ExpatIFace *, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator);
-extern XML_Parser            _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace *, XML_Parser parser, const XML_Char * context, const XML_Char * encoding);
-extern void                  _Expat_XML_ParserFree(struct ExpatIFace *, XML_Parser parser);
-extern enum XML_Status       _Expat_XML_Parse(struct ExpatIFace *, XML_Parser parser, const char * s, int len, int isFinal);
-extern enum XML_Status       _Expat_XML_ParseBuffer(struct ExpatIFace *, XML_Parser parser, int len, int isFinal);
-extern void *                _Expat_XML_GetBuffer(struct ExpatIFace *, XML_Parser parser, int len);
-extern void                  _Expat_XML_SetStartElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start);
-extern void                  _Expat_XML_SetEndElementHandler(struct ExpatIFace *, XML_Parser parser, XML_EndElementHandler end);
-extern void                  _Expat_XML_SetElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end);
-extern void                  _Expat_XML_SetCharacterDataHandler(struct ExpatIFace *, XML_Parser parser, XML_CharacterDataHandler handler);
-extern void                  _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace *, XML_Parser parser, XML_ProcessingInstructionHandler handler);
-extern void                  _Expat_XML_SetCommentHandler(struct ExpatIFace *, XML_Parser parser, XML_CommentHandler handler);
-extern void                  _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start);
-extern void                  _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_EndCdataSectionHandler end);
-extern void                  _Expat_XML_SetCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end);
-extern void                  _Expat_XML_SetDefaultHandler(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler);
-extern void                  _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler);
-extern void                  _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace *, XML_Parser parser, XML_ExternalEntityRefHandler handler);
-extern void                  _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace *, XML_Parser parser, void * arg);
-extern void                  _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace *, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data);
-extern void                  _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start);
-extern void                  _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndNamespaceDeclHandler end);
-extern void                  _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end);
-extern void                  _Expat_XML_SetXmlDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_XmlDeclHandler handler);
-extern void                  _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start);
-extern void                  _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndDoctypeDeclHandler end);
-extern void                  _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end);
-extern void                  _Expat_XML_SetElementDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_ElementDeclHandler eldecl);
-extern void                  _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_AttlistDeclHandler attdecl);
-extern void                  _Expat_XML_SetEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EntityDeclHandler handler);
-extern void                  _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_UnparsedEntityDeclHandler handler);
-extern void                  _Expat_XML_SetNotationDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_NotationDeclHandler handler);
-extern void                  _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace *, XML_Parser parser, XML_NotStandaloneHandler handler);
-extern enum XML_Error        _Expat_XML_GetErrorCode(struct ExpatIFace *, XML_Parser parser);
-extern const XML_LChar *     _Expat_XML_ErrorString(struct ExpatIFace *, enum XML_Error code);
-extern long                  _Expat_XML_GetCurrentByteIndex(struct ExpatIFace *, XML_Parser parser);
-extern int                   _Expat_XML_GetCurrentLineNumber(struct ExpatIFace *, XML_Parser parser);
-extern int                   _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace *, XML_Parser parser);
-extern int                   _Expat_XML_GetCurrentByteCount(struct ExpatIFace *, XML_Parser parser);
-extern const char *          _Expat_XML_GetInputContext(struct ExpatIFace *, XML_Parser parser, int * offset, int * size);
-extern void                  _Expat_XML_SetUserData(struct ExpatIFace *, XML_Parser parser, void * userData);
-extern void                  _Expat_XML_DefaultCurrent(struct ExpatIFace *, XML_Parser parser);
-extern void                  _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace *, XML_Parser parser);
-extern enum XML_Status       _Expat_XML_SetBase(struct ExpatIFace *, XML_Parser parser, const XML_Char * base);
-extern const XML_Char *      _Expat_XML_GetBase(struct ExpatIFace *, XML_Parser parser);
-extern int                   _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace *, XML_Parser parser);
-extern int                   _Expat_XML_GetIdAttributeIndex(struct ExpatIFace *, XML_Parser parser);
-extern enum XML_Status       _Expat_XML_SetEncoding(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding);
-extern int                   _Expat_XML_SetParamEntityParsing(struct ExpatIFace *, XML_Parser parser, enum XML_ParamEntityParsing parsing);
-extern void                  _Expat_XML_SetReturnNSTriplet(struct ExpatIFace *, XML_Parser parser, int do_nst);
-extern const XML_LChar *     _Expat_XML_ExpatVersion(struct ExpatIFace *);
-extern XML_Expat_Version     _Expat_XML_ExpatVersionInfo(struct ExpatIFace *);
-extern XML_Bool              _Expat_XML_ParserReset(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding);
-extern void                  _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace *, XML_Parser parser, XML_SkippedEntityHandler handler);
-extern enum XML_Error        _Expat_XML_UseForeignDTD(struct ExpatIFace *, XML_Parser parser, XML_Bool useDTD);
-extern const XML_Feature *   _Expat_XML_GetFeatureList(struct ExpatIFace *);
-extern enum XML_Status       _Expat_XML_StopParser(struct ExpatIFace *, XML_Parser parser, XML_Bool resumable);
-extern enum XML_Status       _Expat_XML_ResumeParser(struct ExpatIFace *, XML_Parser parser);
-extern void                  _Expat_XML_GetParsingStatus(struct ExpatIFace *, XML_Parser parser, XML_ParsingStatus * status);
-extern void                  _Expat_XML_FreeContentModel(struct ExpatIFace *, XML_Parser parser, XML_Content * model);
-extern void *                _Expat_XML_MemMalloc(struct ExpatIFace *, XML_Parser parser, size_t size);
-extern void *                _Expat_XML_MemRealloc(struct ExpatIFace *, XML_Parser parser, void * ptr, size_t size);
-extern void                  _Expat_XML_MemFree(struct ExpatIFace *, XML_Parser parser, void * ptr);
-
-
-CONST APTR main_vectors[] =
-{
-    _Expat_Obtain,
-    _Expat_Release,
-    NULL,
-    NULL,
-    _Expat_XML_ParserCreate,
-    _Expat_XML_ParserCreateNS,
-    _Expat_XML_ParserCreate_MM,
-    _Expat_XML_ExternalEntityParserCreate,
-    _Expat_XML_ParserFree,
-    _Expat_XML_Parse,
-    _Expat_XML_ParseBuffer,
-    _Expat_XML_GetBuffer,
-    _Expat_XML_SetStartElementHandler,
-    _Expat_XML_SetEndElementHandler,
-    _Expat_XML_SetElementHandler,
-    _Expat_XML_SetCharacterDataHandler,
-    _Expat_XML_SetProcessingInstructionHandler,
-    _Expat_XML_SetCommentHandler,
-    _Expat_XML_SetStartCdataSectionHandler,
-    _Expat_XML_SetEndCdataSectionHandler,
-    _Expat_XML_SetCdataSectionHandler,
-    _Expat_XML_SetDefaultHandler,
-    _Expat_XML_SetDefaultHandlerExpand,
-    _Expat_XML_SetExternalEntityRefHandler,
-    _Expat_XML_SetExternalEntityRefHandlerArg,
-    _Expat_XML_SetUnknownEncodingHandler,
-    _Expat_XML_SetStartNamespaceDeclHandler,
-    _Expat_XML_SetEndNamespaceDeclHandler,
-    _Expat_XML_SetNamespaceDeclHandler,
-    _Expat_XML_SetXmlDeclHandler,
-    _Expat_XML_SetStartDoctypeDeclHandler,
-    _Expat_XML_SetEndDoctypeDeclHandler,
-    _Expat_XML_SetDoctypeDeclHandler,
-    _Expat_XML_SetElementDeclHandler,
-    _Expat_XML_SetAttlistDeclHandler,
-    _Expat_XML_SetEntityDeclHandler,
-    _Expat_XML_SetUnparsedEntityDeclHandler,
-    _Expat_XML_SetNotationDeclHandler,
-    _Expat_XML_SetNotStandaloneHandler,
-    _Expat_XML_GetErrorCode,
-    _Expat_XML_ErrorString,
-    _Expat_XML_GetCurrentByteIndex,
-    _Expat_XML_GetCurrentLineNumber,
-    _Expat_XML_GetCurrentColumnNumber,
-    _Expat_XML_GetCurrentByteCount,
-    _Expat_XML_GetInputContext,
-    _Expat_XML_SetUserData,
-    _Expat_XML_DefaultCurrent,
-    _Expat_XML_UseParserAsHandlerArg,
-    _Expat_XML_SetBase,
-    _Expat_XML_GetBase,
-    _Expat_XML_GetSpecifiedAttributeCount,
-    _Expat_XML_GetIdAttributeIndex,
-    _Expat_XML_SetEncoding,
-    _Expat_XML_SetParamEntityParsing,
-    _Expat_XML_SetReturnNSTriplet,
-    _Expat_XML_ExpatVersion,
-    _Expat_XML_ExpatVersionInfo,
-    _Expat_XML_ParserReset,
-    _Expat_XML_SetSkippedEntityHandler,
-    _Expat_XML_UseForeignDTD,
-    _Expat_XML_GetFeatureList,
-    _Expat_XML_StopParser,
-    _Expat_XML_ResumeParser,
-    _Expat_XML_GetParsingStatus,
-    _Expat_XML_FreeContentModel,
-    _Expat_XML_MemMalloc,
-    _Expat_XML_MemRealloc,
-    _Expat_XML_MemFree,
-    (APTR)-1
-};
-
-uint32 _Expat_Obtain(struct ExpatIFace *Self)
-{
-	return ++Self->Data.RefCount;
-}
-
-uint32 _Expat_Release(struct ExpatIFace *Self)
-{
-	return --Self->Data.RefCount;
-}
-
-XML_Parser _Expat_XML_ParserCreate(struct ExpatIFace * Self, const XML_Char *encoding)
-{
-	return XML_ParserCreate(encoding);
-}
-
-XML_Parser _Expat_XML_ParserCreateNS(struct ExpatIFace * Self, const XML_Char *encoding, XML_Char nsSep)
-{
-	return XML_ParserCreateNS(encoding, nsSep);
-}
-
-XML_Parser _Expat_XML_ParserCreate_MM(struct ExpatIFace * Self, const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator)
-{
-	return XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator);
-}
-
-XML_Parser _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *context, const XML_Char *encoding)
-{
-	return XML_ExternalEntityParserCreate(parser, context, encoding);
-}
-
-void _Expat_XML_ParserFree(struct ExpatIFace *Self, XML_Parser parser)
-{
-	XML_ParserFree(parser);
-}
-
-enum XML_Status _Expat_XML_Parse(struct ExpatIFace * Self, XML_Parser parser, const char * s, int len, int isFinal)
-{
-	return XML_Parse(parser, s, len, isFinal);
-}
-
-enum XML_Status _Expat_XML_ParseBuffer(struct ExpatIFace * Self, XML_Parser parser, int len, int isFinal)
-{
-	return XML_ParseBuffer(parser, len, isFinal);
-}
-
-void * _Expat_XML_GetBuffer(struct ExpatIFace * Self, XML_Parser parser, int len)
-{
-	return XML_GetBuffer(parser, len);
-}
-
-void _Expat_XML_SetStartElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start)
-{
-	XML_SetStartElementHandler(parser, start);
-}
-
-void _Expat_XML_SetEndElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndElementHandler end)
-{
-	XML_SetEndElementHandler(parser, end);
-}
-
-void _Expat_XML_SetElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)
-{
-	XML_SetElementHandler(parser, start, end);
-}
-
-void _Expat_XML_SetCharacterDataHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CharacterDataHandler handler)
-{
-	XML_SetCharacterDataHandler(parser, handler);
-}
-
-void _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ProcessingInstructionHandler handler)
-{
-	XML_SetProcessingInstructionHandler(parser, handler);
-}
-
-void _Expat_XML_SetCommentHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CommentHandler handler)
-{
-	XML_SetCommentHandler(parser, handler);
-}
-
-void _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start)
-{
-	XML_SetStartCdataSectionHandler(parser, start);
-}
-
-void _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndCdataSectionHandler end)
-{
-	XML_SetEndCdataSectionHandler(parser, end);
-}
-
-void _Expat_XML_SetCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end)
-{
-	XML_SetCdataSectionHandler(parser, start, end);
-}
-
-void _Expat_XML_SetDefaultHandler(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler)
-{
-	XML_SetDefaultHandler(parser, handler);
-}
-
-void _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler)
-{
-	XML_SetDefaultHandlerExpand(parser, handler);
-}
-
-void _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ExternalEntityRefHandler handler)
-{
-	XML_SetExternalEntityRefHandler(parser, handler);
-}
-
-void _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace * Self, XML_Parser parser, void * arg)
-{
-	XML_SetExternalEntityRefHandlerArg(parser, arg);
-}
-
-void _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data)
-{
-	XML_SetUnknownEncodingHandler(parser, handler, data);
-}
-
-void _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start)
-{
-	XML_SetStartNamespaceDeclHandler(parser, start);
-}
-
-void _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndNamespaceDeclHandler end)
-{
-	XML_SetEndNamespaceDeclHandler(parser, end);
-}
-
-void _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end)
-{
-	XML_SetNamespaceDeclHandler(parser, start, end);
-}
-
-void _Expat_XML_SetXmlDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_XmlDeclHandler handler)
-{
-	XML_SetXmlDeclHandler(parser, handler);
-}
-
-void _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start)
-{
-	XML_SetStartDoctypeDeclHandler(parser, start);
-}
-
-void _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndDoctypeDeclHandler end)
-{
-	XML_SetEndDoctypeDeclHandler(parser, end);
-}
-
-void _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end)
-{
-	XML_SetDoctypeDeclHandler(parser, start, end);
-}
-
-void _Expat_XML_SetElementDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ElementDeclHandler eldecl)
-{
-	XML_SetElementDeclHandler(parser, eldecl);
-}
-
-void _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_AttlistDeclHandler attdecl)
-{
-	XML_SetAttlistDeclHandler(parser, attdecl);
-}
-
-void _Expat_XML_SetEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EntityDeclHandler handler)
-{
-	XML_SetEntityDeclHandler(parser, handler);
-}
-
-void _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler)
-{
-	XML_SetUnparsedEntityDeclHandler(parser, handler);
-}
-
-void _Expat_XML_SetNotationDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotationDeclHandler handler)
-{
-	XML_SetNotationDeclHandler(parser, handler);
-}
-
-void _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotStandaloneHandler handler)
-{
-	XML_SetNotStandaloneHandler(parser, handler);
-}
-
-enum XML_Error _Expat_XML_GetErrorCode(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetErrorCode(parser);
-}
-
-const XML_LChar * _Expat_XML_ErrorString(struct ExpatIFace * Self, enum XML_Error code)
-{
-	return XML_ErrorString(code);
-}
-
-long _Expat_XML_GetCurrentByteIndex(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetCurrentByteIndex(parser);
-}
-
-int _Expat_XML_GetCurrentLineNumber(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetCurrentLineNumber(parser);
-}
-
-int _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetCurrentColumnNumber(parser);
-}
-
-int _Expat_XML_GetCurrentByteCount(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetCurrentByteCount(parser);
-}
-
-const char * _Expat_XML_GetInputContext(struct ExpatIFace * Self, XML_Parser parser, int * offset, int * size)
-{
-	return XML_GetInputContext(parser, offset, size);
-}
-
-void _Expat_XML_SetUserData(struct ExpatIFace * Self, XML_Parser parser, void * userData)
-{
-	XML_SetUserData(parser, userData);
-}
-
-void _Expat_XML_DefaultCurrent(struct ExpatIFace * Self, XML_Parser parser)
-{
-	XML_DefaultCurrent(parser);
-}
-
-void _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace * Self, XML_Parser parser)
-{
-	XML_UseParserAsHandlerArg(parser);
-}
-
-enum XML_Status _Expat_XML_SetBase(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *p)
-{
-	return XML_SetBase(parser, p);
-}
-
-const XML_Char * _Expat_XML_GetBase(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetBase(parser);
-}
-
-int _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetSpecifiedAttributeCount(parser);
-}
-
-int _Expat_XML_GetIdAttributeIndex(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_GetIdAttributeIndex(parser);
-}
-
-enum XML_Status _Expat_XML_SetEncoding(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding)
-{
-	return XML_SetEncoding(parser, encoding);
-}
-
-int _Expat_XML_SetParamEntityParsing(struct ExpatIFace * Self, XML_Parser parser, enum XML_ParamEntityParsing parsing)
-{
-	return XML_SetParamEntityParsing(parser, parsing);
-}
-
-void _Expat_XML_SetReturnNSTriplet(struct ExpatIFace * Self, XML_Parser parser, int do_nst)
-{
-	XML_SetReturnNSTriplet(parser, do_nst);
-}
-
-const XML_LChar * _Expat_XML_ExpatVersion(struct ExpatIFace * Self)
-{
-	return XML_ExpatVersion();
-}
-
-XML_Expat_Version _Expat_XML_ExpatVersionInfo(struct ExpatIFace * Self)
-{
-	return XML_ExpatVersionInfo();
-}
-
-XML_Bool _Expat_XML_ParserReset(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding)
-{
-	return XML_ParserReset(parser, encoding);
-}
-
-void _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace * Self, XML_Parser parser, XML_SkippedEntityHandler handler)
-{
-	XML_SetSkippedEntityHandler(parser, handler);
-}
-
-enum XML_Error _Expat_XML_UseForeignDTD(struct ExpatIFace * Self, XML_Parser parser, XML_Bool useDTD)
-{
-	return XML_UseForeignDTD(parser, useDTD);
-}
-
-const XML_Feature * _Expat_XML_GetFeatureList(struct ExpatIFace * Self)
-{
-	return XML_GetFeatureList();
-}
-
-enum XML_Status _Expat_XML_StopParser(struct ExpatIFace * Self, XML_Parser parser, XML_Bool resumable)
-{
-	return XML_StopParser(parser, resumable);
-}
-
-enum XML_Status _Expat_XML_ResumeParser(struct ExpatIFace * Self, XML_Parser parser)
-{
-	return XML_ResumeParser(parser);
-}
-
-void _Expat_XML_GetParsingStatus(struct ExpatIFace * Self, XML_Parser parser, XML_ParsingStatus * status)
-{
-	XML_GetParsingStatus(parser, status);
-}
-
-void _Expat_XML_FreeContentModel(struct ExpatIFace * Self, XML_Parser parser, XML_Content * model)
-{
-	XML_FreeContentModel(parser, model);
-}
-
-void * _Expat_XML_MemMalloc(struct ExpatIFace * Self, XML_Parser parser, size_t size)
-{
-	return XML_MemMalloc(parser, size);
-}
-
-void * _Expat_XML_MemRealloc(struct ExpatIFace * Self, XML_Parser parser, void * ptr, size_t size)
-{
-	XML_MemRealloc(parser, ptr, size);
-}
-
-void _Expat_XML_MemFree(struct ExpatIFace * Self, XML_Parser parser, void * ptr)
-{
-	XML_MemFree(parser, ptr);
-}

+ 0 - 94
libs/expat/amiga/include/inline4/expat.h

@@ -1,94 +0,0 @@
-#ifndef INLINE4_EXPAT_H
-#define INLINE4_EXPAT_H
-
-/*
-** This file was auto generated by idltool 51.6.
-**
-** It provides compatibility to OS3 style library
-** calls by substituting functions.
-**
-** Do not edit manually.
-*/ 
-
-#ifndef EXEC_TYPES_H
-#include <exec/types.h>
-#endif
-#ifndef EXEC_EXEC_H
-#include <exec/exec.h>
-#endif
-#ifndef EXEC_INTERFACES_H
-#include <exec/interfaces.h>
-#endif
-
-#ifndef LIBRARIES_EXPAT_H
-#include <libraries/expat.h>
-#endif
-
-/* Inline macros for Interface "main" */
-#define XML_ParserCreate(encodingName) IExpat->XML_ParserCreate(encodingName) 
-#define XML_ParserCreateNS(encodingName, nsSep) IExpat->XML_ParserCreateNS(encodingName, nsSep) 
-#define XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator) IExpat->XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator) 
-#define XML_ExternalEntityParserCreate(parser, context, encoding) IExpat->XML_ExternalEntityParserCreate(parser, context, encoding) 
-#define XML_ParserFree(parser) IExpat->XML_ParserFree(parser) 
-#define XML_Parse(parser, s, len, isFinal) IExpat->XML_Parse(parser, s, len, isFinal) 
-#define XML_ParseBuffer(parser, len, isFinal) IExpat->XML_ParseBuffer(parser, len, isFinal) 
-#define XML_GetBuffer(parser, len) IExpat->XML_GetBuffer(parser, len) 
-#define XML_SetStartElementHandler(parser, start) IExpat->XML_SetStartElementHandler(parser, start) 
-#define XML_SetEndElementHandler(parser, end) IExpat->XML_SetEndElementHandler(parser, end) 
-#define XML_SetElementHandler(parser, start, end) IExpat->XML_SetElementHandler(parser, start, end) 
-#define XML_SetCharacterDataHandler(parser, handler) IExpat->XML_SetCharacterDataHandler(parser, handler) 
-#define XML_SetProcessingInstructionHandler(parser, handler) IExpat->XML_SetProcessingInstructionHandler(parser, handler) 
-#define XML_SetCommentHandler(parser, handler) IExpat->XML_SetCommentHandler(parser, handler) 
-#define XML_SetStartCdataSectionHandler(parser, start) IExpat->XML_SetStartCdataSectionHandler(parser, start) 
-#define XML_SetEndCdataSectionHandler(parser, end) IExpat->XML_SetEndCdataSectionHandler(parser, end) 
-#define XML_SetCdataSectionHandler(parser, start, end) IExpat->XML_SetCdataSectionHandler(parser, start, end) 
-#define XML_SetDefaultHandler(parser, handler) IExpat->XML_SetDefaultHandler(parser, handler) 
-#define XML_SetDefaultHandlerExpand(parser, handler) IExpat->XML_SetDefaultHandlerExpand(parser, handler) 
-#define XML_SetExternalEntityRefHandler(parser, handler) IExpat->XML_SetExternalEntityRefHandler(parser, handler) 
-#define XML_SetExternalEntityRefHandlerArg(parser, arg) IExpat->XML_SetExternalEntityRefHandlerArg(parser, arg) 
-#define XML_SetUnknownEncodingHandler(parser, handler, data) IExpat->XML_SetUnknownEncodingHandler(parser, handler, data) 
-#define XML_SetStartNamespaceDeclHandler(parser, start) IExpat->XML_SetStartNamespaceDeclHandler(parser, start) 
-#define XML_SetEndNamespaceDeclHandler(parser, end) IExpat->XML_SetEndNamespaceDeclHandler(parser, end) 
-#define XML_SetNamespaceDeclHandler(parser, start, end) IExpat->XML_SetNamespaceDeclHandler(parser, start, end) 
-#define XML_SetXmlDeclHandler(parser, handler) IExpat->XML_SetXmlDeclHandler(parser, handler) 
-#define XML_SetStartDoctypeDeclHandler(parser, start) IExpat->XML_SetStartDoctypeDeclHandler(parser, start) 
-#define XML_SetEndDoctypeDeclHandler(parser, end) IExpat->XML_SetEndDoctypeDeclHandler(parser, end) 
-#define XML_SetDoctypeDeclHandler(parser, start, end) IExpat->XML_SetDoctypeDeclHandler(parser, start, end) 
-#define XML_SetElementDeclHandler(parser, eldecl) IExpat->XML_SetElementDeclHandler(parser, eldecl) 
-#define XML_SetAttlistDeclHandler(parser, attdecl) IExpat->XML_SetAttlistDeclHandler(parser, attdecl) 
-#define XML_SetEntityDeclHandler(parser, handler) IExpat->XML_SetEntityDeclHandler(parser, handler) 
-#define XML_SetUnparsedEntityDeclHandler(parser, handler) IExpat->XML_SetUnparsedEntityDeclHandler(parser, handler) 
-#define XML_SetNotationDeclHandler(parser, handler) IExpat->XML_SetNotationDeclHandler(parser, handler) 
-#define XML_SetNotStandaloneHandler(parser, handler) IExpat->XML_SetNotStandaloneHandler(parser, handler) 
-#define XML_GetErrorCode(parser) IExpat->XML_GetErrorCode(parser) 
-#define XML_ErrorString(code) IExpat->XML_ErrorString(code) 
-#define XML_GetCurrentByteIndex(parser) IExpat->XML_GetCurrentByteIndex(parser) 
-#define XML_GetCurrentLineNumber(parser) IExpat->XML_GetCurrentLineNumber(parser) 
-#define XML_GetCurrentColumnNumber(parser) IExpat->XML_GetCurrentColumnNumber(parser) 
-#define XML_GetCurrentByteCount(parser) IExpat->XML_GetCurrentByteCount(parser) 
-#define XML_GetInputContext(parser, offset, size) IExpat->XML_GetInputContext(parser, offset, size) 
-#define XML_SetUserData(parser, userData) IExpat->XML_SetUserData(parser, userData) 
-#define XML_DefaultCurrent(parser) IExpat->XML_DefaultCurrent(parser) 
-#define XML_UseParserAsHandlerArg(parser) IExpat->XML_UseParserAsHandlerArg(parser) 
-#define XML_SetBase(parser, base) IExpat->XML_SetBase(parser, base) 
-#define XML_GetBase(parser) IExpat->XML_GetBase(parser) 
-#define XML_GetSpecifiedAttributeCount(parser) IExpat->XML_GetSpecifiedAttributeCount(parser) 
-#define XML_GetIdAttributeIndex(parser) IExpat->XML_GetIdAttributeIndex(parser) 
-#define XML_SetEncoding(parser, encoding) IExpat->XML_SetEncoding(parser, encoding) 
-#define XML_SetParamEntityParsing(parser, parsing) IExpat->XML_SetParamEntityParsing(parser, parsing) 
-#define XML_SetReturnNSTriplet(parser, do_nst) IExpat->XML_SetReturnNSTriplet(parser, do_nst) 
-#define XML_ExpatVersion() IExpat->XML_ExpatVersion() 
-#define XML_ExpatVersionInfo() IExpat->XML_ExpatVersionInfo() 
-#define XML_ParserReset(parser, encoding) IExpat->XML_ParserReset(parser, encoding) 
-#define XML_SetSkippedEntityHandler(parser, handler) IExpat->XML_SetSkippedEntityHandler(parser, handler) 
-#define XML_UseForeignDTD(parser, useDTD) IExpat->XML_UseForeignDTD(parser, useDTD) 
-#define XML_GetFeatureList() IExpat->XML_GetFeatureList() 
-#define XML_StopParser(parser, resumable) IExpat->XML_StopParser(parser, resumable) 
-#define XML_ResumeParser(parser) IExpat->XML_ResumeParser(parser) 
-#define XML_GetParsingStatus(parser, status) IExpat->XML_GetParsingStatus(parser, status) 
-#define XML_FreeContentModel(parser, model) IExpat->XML_FreeContentModel(parser, model) 
-#define XML_MemMalloc(parser, size) IExpat->XML_MemMalloc(parser, size) 
-#define XML_MemRealloc(parser, ptr, size) IExpat->XML_MemRealloc(parser, ptr, size) 
-#define XML_MemFree(parser, ptr) IExpat->XML_MemFree(parser, ptr) 
-
-#endif /* INLINE4_EXPAT_H */

+ 0 - 98
libs/expat/amiga/include/interfaces/expat.h

@@ -1,98 +0,0 @@
-#ifndef EXPAT_INTERFACE_DEF_H
-#define EXPAT_INTERFACE_DEF_H
-
-/*
-** This file was machine generated by idltool 51.6.
-** Do not edit
-*/ 
-
-#ifndef EXEC_TYPES_H
-#include <exec/types.h>
-#endif
-#ifndef EXEC_EXEC_H
-#include <exec/exec.h>
-#endif
-#ifndef EXEC_INTERFACES_H
-#include <exec/interfaces.h>
-#endif
-
-#ifndef LIBRARIES_EXPAT_H
-#include <libraries/expat.h>
-#endif
-
-struct ExpatIFace
-{
-	struct InterfaceData Data;
-
-	uint32 APICALL (*Obtain)(struct ExpatIFace *Self);
-	uint32 APICALL (*Release)(struct ExpatIFace *Self);
-	void APICALL (*Expunge)(struct ExpatIFace *Self);
-	struct Interface * APICALL (*Clone)(struct ExpatIFace *Self);
-	XML_Parser APICALL (*XML_ParserCreate)(struct ExpatIFace *Self, const XML_Char * encodingName);
-	XML_Parser APICALL (*XML_ParserCreateNS)(struct ExpatIFace *Self, const XML_Char * encodingName, XML_Char nsSep);
-	XML_Parser APICALL (*XML_ParserCreate_MM)(struct ExpatIFace *Self, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator);
-	XML_Parser APICALL (*XML_ExternalEntityParserCreate)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * context, const XML_Char * encoding);
-	void APICALL (*XML_ParserFree)(struct ExpatIFace *Self, XML_Parser parser);
-	enum XML_Status APICALL (*XML_Parse)(struct ExpatIFace *Self, XML_Parser parser, const char * s, int len, int isFinal);
-	enum XML_Status APICALL (*XML_ParseBuffer)(struct ExpatIFace *Self, XML_Parser parser, int len, int isFinal);
-	void * APICALL (*XML_GetBuffer)(struct ExpatIFace *Self, XML_Parser parser, int len);
-	void APICALL (*XML_SetStartElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartElementHandler start);
-	void APICALL (*XML_SetEndElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndElementHandler end);
-	void APICALL (*XML_SetElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end);
-	void APICALL (*XML_SetCharacterDataHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_CharacterDataHandler handler);
-	void APICALL (*XML_SetProcessingInstructionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ProcessingInstructionHandler handler);
-	void APICALL (*XML_SetCommentHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_CommentHandler handler);
-	void APICALL (*XML_SetStartCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartCdataSectionHandler start);
-	void APICALL (*XML_SetEndCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndCdataSectionHandler end);
-	void APICALL (*XML_SetCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end);
-	void APICALL (*XML_SetDefaultHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_DefaultHandler handler);
-	void APICALL (*XML_SetDefaultHandlerExpand)(struct ExpatIFace *Self, XML_Parser parser, XML_DefaultHandler handler);
-	void APICALL (*XML_SetExternalEntityRefHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ExternalEntityRefHandler handler);
-	void APICALL (*XML_SetExternalEntityRefHandlerArg)(struct ExpatIFace *Self, XML_Parser parser, void * arg);
-	void APICALL (*XML_SetUnknownEncodingHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data);
-	void APICALL (*XML_SetStartNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartNamespaceDeclHandler start);
-	void APICALL (*XML_SetEndNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndNamespaceDeclHandler end);
-	void APICALL (*XML_SetNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end);
-	void APICALL (*XML_SetXmlDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_XmlDeclHandler handler);
-	void APICALL (*XML_SetStartDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartDoctypeDeclHandler start);
-	void APICALL (*XML_SetEndDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndDoctypeDeclHandler end);
-	void APICALL (*XML_SetDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end);
-	void APICALL (*XML_SetElementDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ElementDeclHandler eldecl);
-	void APICALL (*XML_SetAttlistDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_AttlistDeclHandler attdecl);
-	void APICALL (*XML_SetEntityDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EntityDeclHandler handler);
-	void APICALL (*XML_SetUnparsedEntityDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler);
-	void APICALL (*XML_SetNotationDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_NotationDeclHandler handler);
-	void APICALL (*XML_SetNotStandaloneHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_NotStandaloneHandler handler);
-	enum XML_Error APICALL (*XML_GetErrorCode)(struct ExpatIFace *Self, XML_Parser parser);
-	const XML_LChar * APICALL (*XML_ErrorString)(struct ExpatIFace *Self, enum XML_Error code);
-	long APICALL (*XML_GetCurrentByteIndex)(struct ExpatIFace *Self, XML_Parser parser);
-	int APICALL (*XML_GetCurrentLineNumber)(struct ExpatIFace *Self, XML_Parser parser);
-	int APICALL (*XML_GetCurrentColumnNumber)(struct ExpatIFace *Self, XML_Parser parser);
-	int APICALL (*XML_GetCurrentByteCount)(struct ExpatIFace *Self, XML_Parser parser);
-	const char * APICALL (*XML_GetInputContext)(struct ExpatIFace *Self, XML_Parser parser, int * offset, int * size);
-	void APICALL (*XML_SetUserData)(struct ExpatIFace *Self, XML_Parser parser, void * userData);
-	void APICALL (*XML_DefaultCurrent)(struct ExpatIFace *Self, XML_Parser parser);
-	void APICALL (*XML_UseParserAsHandlerArg)(struct ExpatIFace *Self, XML_Parser parser);
-	enum XML_Status APICALL (*XML_SetBase)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * base);
-	const XML_Char * APICALL (*XML_GetBase)(struct ExpatIFace *Self, XML_Parser parser);
-	int APICALL (*XML_GetSpecifiedAttributeCount)(struct ExpatIFace *Self, XML_Parser parser);
-	int APICALL (*XML_GetIdAttributeIndex)(struct ExpatIFace *Self, XML_Parser parser);
-	enum XML_Status APICALL (*XML_SetEncoding)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * encoding);
-	int APICALL (*XML_SetParamEntityParsing)(struct ExpatIFace *Self, XML_Parser parser, enum XML_ParamEntityParsing parsing);
-	void APICALL (*XML_SetReturnNSTriplet)(struct ExpatIFace *Self, XML_Parser parser, int do_nst);
-	const XML_LChar * APICALL (*XML_ExpatVersion)(struct ExpatIFace *Self);
-	XML_Expat_Version APICALL (*XML_ExpatVersionInfo)(struct ExpatIFace *Self);
-	XML_Bool APICALL (*XML_ParserReset)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * encoding);
-	void APICALL (*XML_SetSkippedEntityHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_SkippedEntityHandler handler);
-	enum XML_Error APICALL (*XML_UseForeignDTD)(struct ExpatIFace *Self, XML_Parser parser, XML_Bool useDTD);
-	const XML_Feature * APICALL (*XML_GetFeatureList)(struct ExpatIFace *Self);
-	enum XML_Status APICALL (*XML_StopParser)(struct ExpatIFace *Self, XML_Parser parser, XML_Bool resumable);
-	enum XML_Status APICALL (*XML_ResumeParser)(struct ExpatIFace *Self, XML_Parser parser);
-	void APICALL (*XML_GetParsingStatus)(struct ExpatIFace *Self, XML_Parser parser, XML_ParsingStatus * status);
-	void APICALL (*XML_FreeContentModel)(struct ExpatIFace *Self, XML_Parser parser, XML_Content * model);
-	void * APICALL (*XML_MemMalloc)(struct ExpatIFace *Self, XML_Parser parser, size_t size);
-	void * APICALL (*XML_MemRealloc)(struct ExpatIFace *Self, XML_Parser parser, void * ptr, size_t size);
-	void APICALL (*XML_MemFree)(struct ExpatIFace *Self, XML_Parser parser, void * ptr);
-};
-
-#endif /* EXPAT_INTERFACE_DEF_H */

+ 0 - 566
libs/expat/amiga/include/libraries/expat.h

@@ -1,566 +0,0 @@
-#ifndef LIBRARIES_EXPAT_H
-#define LIBRARIES_EXPAT_H
-
-/*
-** Copyright (c) 2001-2007 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-** 
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-** 
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-
-/****************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __GNUC__
-   #ifdef __PPC__
-    #pragma pack(2)
-   #endif
-#elif defined(__VBCC__)
-   #pragma amiga-align
-#endif
-
-/****************************************************************************/
-
-
-#include <stdlib.h>
-
-#ifndef XMLCALL
-#define XMLCALL
-#endif
-
-typedef char XML_Char;
-typedef char XML_LChar;
-typedef long XML_Index;
-typedef unsigned long XML_Size;
-
-struct XML_ParserStruct;
-typedef struct XML_ParserStruct *XML_Parser;
-
-typedef unsigned char XML_Bool;
-#define XML_TRUE   ((XML_Bool) 1)
-#define XML_FALSE  ((XML_Bool) 0)
-
-enum XML_Status {
-  XML_STATUS_ERROR = 0,
-#define XML_STATUS_ERROR XML_STATUS_ERROR
-  XML_STATUS_OK = 1,
-#define XML_STATUS_OK XML_STATUS_OK
-  XML_STATUS_SUSPENDED = 2,
-#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
-};
-
-enum XML_Error {
-  XML_ERROR_NONE,
-  XML_ERROR_NO_MEMORY,
-  XML_ERROR_SYNTAX,
-  XML_ERROR_NO_ELEMENTS,
-  XML_ERROR_INVALID_TOKEN,
-  XML_ERROR_UNCLOSED_TOKEN,
-  XML_ERROR_PARTIAL_CHAR,
-  XML_ERROR_TAG_MISMATCH,
-  XML_ERROR_DUPLICATE_ATTRIBUTE,
-  XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
-  XML_ERROR_PARAM_ENTITY_REF,
-  XML_ERROR_UNDEFINED_ENTITY,
-  XML_ERROR_RECURSIVE_ENTITY_REF,
-  XML_ERROR_ASYNC_ENTITY,
-  XML_ERROR_BAD_CHAR_REF,
-  XML_ERROR_BINARY_ENTITY_REF,
-  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
-  XML_ERROR_MISPLACED_XML_PI,
-  XML_ERROR_UNKNOWN_ENCODING,
-  XML_ERROR_INCORRECT_ENCODING,
-  XML_ERROR_UNCLOSED_CDATA_SECTION,
-  XML_ERROR_EXTERNAL_ENTITY_HANDLING,
-  XML_ERROR_NOT_STANDALONE,
-  XML_ERROR_UNEXPECTED_STATE,
-  XML_ERROR_ENTITY_DECLARED_IN_PE,
-  XML_ERROR_FEATURE_REQUIRES_XML_DTD,
-  XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,
-  XML_ERROR_UNBOUND_PREFIX,
-  XML_ERROR_UNDECLARING_PREFIX,
-  XML_ERROR_INCOMPLETE_PE,
-  XML_ERROR_XML_DECL,
-  XML_ERROR_TEXT_DECL,
-  XML_ERROR_PUBLICID,
-  XML_ERROR_SUSPENDED,
-  XML_ERROR_NOT_SUSPENDED,
-  XML_ERROR_ABORTED,
-  XML_ERROR_FINISHED,
-  XML_ERROR_SUSPEND_PE,
-  XML_ERROR_RESERVED_PREFIX_XML,
-  XML_ERROR_RESERVED_PREFIX_XMLNS,
-  XML_ERROR_RESERVED_NAMESPACE_URI
-};
-
-enum XML_Content_Type {
-  XML_CTYPE_EMPTY = 1,
-  XML_CTYPE_ANY,
-  XML_CTYPE_MIXED,
-  XML_CTYPE_NAME,
-  XML_CTYPE_CHOICE,
-  XML_CTYPE_SEQ
-};
-
-enum XML_Content_Quant {
-  XML_CQUANT_NONE,
-  XML_CQUANT_OPT,
-  XML_CQUANT_REP,
-  XML_CQUANT_PLUS
-};
-
-typedef struct XML_cp XML_Content;
-
-struct XML_cp {
-  enum XML_Content_Type         type;
-  enum XML_Content_Quant        quant;
-  XML_Char *                    name;
-  unsigned int                  numchildren;
-  XML_Content *                 children;
-};
-
-
-typedef void (*XML_ElementDeclHandler) (void *userData,
-                                        const XML_Char *name,
-                                        XML_Content *model);
-
-void
-XML_SetElementDeclHandler(XML_Parser parser,
-                          XML_ElementDeclHandler eldecl);
-
-typedef void (*XML_AttlistDeclHandler) (
-                                    void            *userData,
-                                    const XML_Char  *elname,
-                                    const XML_Char  *attname,
-                                    const XML_Char  *att_type,
-                                    const XML_Char  *dflt,
-                                    int              isrequired);
-
-void
-XML_SetAttlistDeclHandler(XML_Parser parser,
-                          XML_AttlistDeclHandler attdecl);
-
-typedef void (*XML_XmlDeclHandler) (void *userData,
-                                    const XML_Char *version,
-                                    const XML_Char *encoding,
-                                    int             standalone);
-
-void
-XML_SetXmlDeclHandler(XML_Parser parser,
-                      XML_XmlDeclHandler xmldecl);
-
-
-typedef struct {
-  void *(*malloc_fcn)(size_t size);
-  void *(*realloc_fcn)(void *ptr, size_t size);
-  void (*free_fcn)(void *ptr);
-} XML_Memory_Handling_Suite;
-
-XML_Parser
-XML_ParserCreate(const XML_Char *encoding);
-
-XML_Parser
-XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
-
-
-XML_Parser
-XML_ParserCreate_MM(const XML_Char *encoding,
-                    const XML_Memory_Handling_Suite *memsuite,
-                    const XML_Char *namespaceSeparator);
-
-XML_Bool
-XML_ParserReset(XML_Parser parser, const XML_Char *encoding);
-
-typedef void (*XML_StartElementHandler) (void *userData,
-                                         const XML_Char *name,
-                                         const XML_Char **atts);
-
-typedef void (*XML_EndElementHandler) (void *userData,
-                                       const XML_Char *name);
-
-
-typedef void (*XML_CharacterDataHandler) (void *userData,
-                                          const XML_Char *s,
-                                          int len);
-
-typedef void (*XML_ProcessingInstructionHandler) (
-                                                void *userData,
-                                                const XML_Char *target,
-                                                const XML_Char *data);
-
-typedef void (*XML_CommentHandler) (void *userData,
-                                    const XML_Char *data);
-
-typedef void (*XML_StartCdataSectionHandler) (void *userData);
-typedef void (*XML_EndCdataSectionHandler) (void *userData);
-
-typedef void (*XML_DefaultHandler) (void *userData,
-                                    const XML_Char *s,
-                                    int len);
-
-typedef void (*XML_StartDoctypeDeclHandler) (
-                                            void *userData,
-                                            const XML_Char *doctypeName,
-                                            const XML_Char *sysid,
-                                            const XML_Char *pubid,
-                                            int has_internal_subset);
-
-typedef void (*XML_EndDoctypeDeclHandler)(void *userData);
-
-typedef void (*XML_EntityDeclHandler) (
-                              void *userData,
-                              const XML_Char *entityName,
-                              int is_parameter_entity,
-                              const XML_Char *value,
-                              int value_length,
-                              const XML_Char *base,
-                              const XML_Char *systemId,
-                              const XML_Char *publicId,
-                              const XML_Char *notationName);
-
-void
-XML_SetEntityDeclHandler(XML_Parser parser,
-                         XML_EntityDeclHandler handler);
-
-typedef void (*XML_UnparsedEntityDeclHandler) (
-                                    void *userData,
-                                    const XML_Char *entityName,
-                                    const XML_Char *base,
-                                    const XML_Char *systemId,
-                                    const XML_Char *publicId,
-                                    const XML_Char *notationName);
-
-typedef void (*XML_NotationDeclHandler) (
-                                    void *userData,
-                                    const XML_Char *notationName,
-                                    const XML_Char *base,
-                                    const XML_Char *systemId,
-                                    const XML_Char *publicId);
-
-typedef void (*XML_StartNamespaceDeclHandler) (
-                                    void *userData,
-                                    const XML_Char *prefix,
-                                    const XML_Char *uri);
-
-typedef void (*XML_EndNamespaceDeclHandler) (
-                                    void *userData,
-                                    const XML_Char *prefix);
-
-typedef int (*XML_NotStandaloneHandler) (void *userData);
-
-typedef int (*XML_ExternalEntityRefHandler) (
-                                    XML_Parser parser,
-                                    const XML_Char *context,
-                                    const XML_Char *base,
-                                    const XML_Char *systemId,
-                                    const XML_Char *publicId);
-
-typedef void (*XML_SkippedEntityHandler) (
-                                    void *userData,
-                                    const XML_Char *entityName,
-                                    int is_parameter_entity);
-
-typedef struct {
-  int map[256];
-  void *data;
-  int (*convert)(void *data, const char *s);
-  void (*release)(void *data);
-} XML_Encoding;
-
-typedef int (*XML_UnknownEncodingHandler) (
-                                    void *encodingHandlerData,
-                                    const XML_Char *name,
-                                    XML_Encoding *info);
-
-void
-XML_SetElementHandler(XML_Parser parser,
-                      XML_StartElementHandler start,
-                      XML_EndElementHandler end);
-
-void
-XML_SetStartElementHandler(XML_Parser parser,
-                           XML_StartElementHandler handler);
-
-void
-XML_SetEndElementHandler(XML_Parser parser,
-                         XML_EndElementHandler handler);
-
-void
-XML_SetCharacterDataHandler(XML_Parser parser,
-                            XML_CharacterDataHandler handler);
-
-void
-XML_SetProcessingInstructionHandler(XML_Parser parser,
-                                    XML_ProcessingInstructionHandler handler);
-void
-XML_SetCommentHandler(XML_Parser parser,
-                      XML_CommentHandler handler);
-
-void
-XML_SetCdataSectionHandler(XML_Parser parser,
-                           XML_StartCdataSectionHandler start,
-                           XML_EndCdataSectionHandler end);
-
-void
-XML_SetStartCdataSectionHandler(XML_Parser parser,
-                                XML_StartCdataSectionHandler start);
-
-void
-XML_SetEndCdataSectionHandler(XML_Parser parser,
-                              XML_EndCdataSectionHandler end);
-
-void
-XML_SetDefaultHandler(XML_Parser parser,
-                      XML_DefaultHandler handler);
-
-void
-XML_SetDefaultHandlerExpand(XML_Parser parser,
-                            XML_DefaultHandler handler);
-
-void
-XML_SetDoctypeDeclHandler(XML_Parser parser,
-                          XML_StartDoctypeDeclHandler start,
-                          XML_EndDoctypeDeclHandler end);
-
-void
-XML_SetStartDoctypeDeclHandler(XML_Parser parser,
-                               XML_StartDoctypeDeclHandler start);
-
-void
-XML_SetEndDoctypeDeclHandler(XML_Parser parser,
-                             XML_EndDoctypeDeclHandler end);
-
-void
-XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
-                                 XML_UnparsedEntityDeclHandler handler);
-
-void
-XML_SetNotationDeclHandler(XML_Parser parser,
-                           XML_NotationDeclHandler handler);
-
-void
-XML_SetNamespaceDeclHandler(XML_Parser parser,
-                            XML_StartNamespaceDeclHandler start,
-                            XML_EndNamespaceDeclHandler end);
-
-void
-XML_SetStartNamespaceDeclHandler(XML_Parser parser,
-                                 XML_StartNamespaceDeclHandler start);
-
-void
-XML_SetEndNamespaceDeclHandler(XML_Parser parser,
-                               XML_EndNamespaceDeclHandler end);
-
-void
-XML_SetNotStandaloneHandler(XML_Parser parser,
-                            XML_NotStandaloneHandler handler);
-
-void
-XML_SetExternalEntityRefHandler(XML_Parser parser,
-                                XML_ExternalEntityRefHandler handler);
-
-void
-XML_SetExternalEntityRefHandlerArg(XML_Parser parser,
-                                   void *arg);
-
-void
-XML_SetSkippedEntityHandler(XML_Parser parser,
-                            XML_SkippedEntityHandler handler);
-
-void
-XML_SetUnknownEncodingHandler(XML_Parser parser,
-                              XML_UnknownEncodingHandler handler,
-                              void *encodingHandlerData);
-
-void
-XML_DefaultCurrent(XML_Parser parser);
-
-void
-XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
-
-void
-XML_SetUserData(XML_Parser parser, void *userData);
-
-#define XML_GetUserData(parser) (*(void **)(parser))
-
-enum XML_Status
-XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
-
-void
-XML_UseParserAsHandlerArg(XML_Parser parser);
-
-enum XML_Error
-XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
-
-
-enum XML_Status
-XML_SetBase(XML_Parser parser, const XML_Char *base);
-
-const XML_Char *
-XML_GetBase(XML_Parser parser);
-
-int
-XML_GetSpecifiedAttributeCount(XML_Parser parser);
-
-int
-XML_GetIdAttributeIndex(XML_Parser parser);
-
-enum XML_Status
-XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
-
-void *
-XML_GetBuffer(XML_Parser parser, int len);
-
-enum XML_Status
-XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
-
-enum XML_Status
-XML_StopParser(XML_Parser parser, XML_Bool resumable);
-
-enum XML_Status
-XML_ResumeParser(XML_Parser parser);
-
-enum XML_Parsing {
-  XML_INITIALIZED,
-  XML_PARSING,
-  XML_FINISHED,
-  XML_SUSPENDED
-};
-
-typedef struct {
-  enum XML_Parsing parsing;
-  XML_Bool finalBuffer;
-} XML_ParsingStatus;
-
-void
-XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status);
-
-XML_Parser
-XML_ExternalEntityParserCreate(XML_Parser parser,
-                               const XML_Char *context,
-                               const XML_Char *encoding);
-
-enum XML_ParamEntityParsing {
-  XML_PARAM_ENTITY_PARSING_NEVER,
-  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
-  XML_PARAM_ENTITY_PARSING_ALWAYS
-};
-
-int
-XML_SetParamEntityParsing(XML_Parser parser,
-                          enum XML_ParamEntityParsing parsing);
-
-enum XML_Error
-XML_GetErrorCode(XML_Parser parser);
-
-int XML_GetCurrentLineNumber(XML_Parser parser);
-int XML_GetCurrentColumnNumber(XML_Parser parser);
-long XML_GetCurrentByteIndex(XML_Parser parser);
-
-int
-XML_GetCurrentByteCount(XML_Parser parser);
-
-const char *
-XML_GetInputContext(XML_Parser parser,
-                    int *offset,
-                    int *size);
-
-#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber
-#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
-#define XML_GetErrorByteIndex    XML_GetCurrentByteIndex
-
-void
-XML_FreeContentModel(XML_Parser parser, XML_Content *model);
-
-void *
-XML_MemMalloc(XML_Parser parser, size_t size);
-
-void *
-XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
-
-void
-XML_MemFree(XML_Parser parser, void *ptr);
-
-void
-XML_ParserFree(XML_Parser parser);
-
-const XML_LChar *
-XML_ErrorString(enum XML_Error code);
-
-const XML_LChar *
-XML_ExpatVersion(void);
-
-typedef struct {
-  int major;
-  int minor;
-  int micro;
-} XML_Expat_Version;
-
-XML_Expat_Version 
-XML_ExpatVersionInfo(void);
-
-enum XML_FeatureEnum {
-  XML_FEATURE_END = 0,
-  XML_FEATURE_UNICODE,
-  XML_FEATURE_UNICODE_WCHAR_T,
-  XML_FEATURE_DTD,
-  XML_FEATURE_CONTEXT_BYTES,
-  XML_FEATURE_MIN_SIZE,
-  XML_FEATURE_SIZEOF_XML_CHAR,
-  XML_FEATURE_SIZEOF_XML_LCHAR,
-  XML_FEATURE_NS,
-  XML_FEATURE_LARGE_SIZE
-};
-
-typedef struct {
-  enum XML_FeatureEnum  feature;
-  const XML_LChar       *name;
-  long int              value;
-} XML_Feature;
-
-const XML_Feature *
-XML_GetFeatureList(void);
-
-
-#define XML_MAJOR_VERSION 2
-#define XML_MINOR_VERSION 0
-#define XML_MICRO_VERSION 1
-
-
-/****************************************************************************/
-
-#ifdef __GNUC__
-   #ifdef __PPC__
-    #pragma pack()
-   #endif
-#elif defined(__VBCC__)
-   #pragma default-align
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/****************************************************************************/
-
-#endif  /* EXPAT_EXPAT_H */

+ 0 - 52
libs/expat/amiga/include/proto/expat.h

@@ -1,52 +0,0 @@
-#ifndef PROTO_EXPAT_H
-#define PROTO_EXPAT_H
-
-#ifndef LIBRARIES_EXPAT_H
-#include <libraries/expat.h>
-#endif
-
-/****************************************************************************/
-
-#ifndef __NOLIBBASE__
- #ifndef __USE_BASETYPE__
-  extern struct Library * ExpatBase;
- #else
-  extern struct Library * ExpatBase;
- #endif /* __USE_BASETYPE__ */
-#endif /* __NOLIBBASE__ */
-
-/****************************************************************************/
-
-#ifdef __amigaos4__
- #include <interfaces/expat.h>
- #ifdef __USE_INLINE__
-  #include <inline4/expat.h>
- #endif /* __USE_INLINE__ */
- #ifndef CLIB_EXPAT_PROTOS_H
-  #define CLIB_EXPAT_PROTOS_H 1
- #endif /* CLIB_EXPAT_PROTOS_H */
- #ifndef __NOGLOBALIFACE__
-  extern struct ExpatIFace *IExpat;
- #endif /* __NOGLOBALIFACE__ */
-#else /* __amigaos4__ */
- #ifndef CLIB_EXPAT_PROTOS_H
-  #include <clib/expat_protos.h>
- #endif /* CLIB_EXPAT_PROTOS_H */
- #if defined(__GNUC__)
-  #ifndef __PPC__
-   #include <inline/expat.h>
-  #else
-   #include <ppcinline/expat.h>
-  #endif /* __PPC__ */
- #elif defined(__VBCC__)
-  #ifndef __PPC__
-   #include <inline/expat_protos.h>
-  #endif /* __PPC__ */
- #else
-  #include <pragmas/expat_pragmas.h>
- #endif /* __GNUC__ */
-#endif /* __amigaos4__ */
-
-/****************************************************************************/
-
-#endif /* PROTO_EXPAT_H */

+ 0 - 57
libs/expat/amiga/launch.c

@@ -1,57 +0,0 @@
-/*
-** Copyright (c) 2001-2009 Expat maintainers.
-**
-** Permission is hereby granted, free of charge, to any person obtaining
-** a copy of this software and associated documentation files (the
-** "Software"), to deal in the Software without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Software, and to
-** permit persons to whom the Software is furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Software.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifdef __USE_INLINE__
-#undef __USE_INLINE__
-#endif
-
-#include <stdlib.h>
-#include <proto/exec.h>
-
-struct Library* ExpatBase = 0;
-struct ExpatIFace* IExpat = 0;
-
-
-void setup() __attribute__((constructor));
-void cleanup() __attribute__((destructor));
-
-
-void setup()
-{
-	ExpatBase = IExec->OpenLibrary("expat.library", 53);
-	IExpat = (struct ExpatIFace*)IExec->GetInterface(ExpatBase, "main", 1, NULL);
-
-	if ( IExpat == 0 )  {
-		IExec->DebugPrintF("Can't open expat.library\n");
-	}
-}
-
-
-void cleanup()
-{
-	IExec->DropInterface((struct Interface*)IExpat);
-	IExpat = 0;
-
-	IExec->CloseLibrary(ExpatBase);
-	ExpatBase = 0;
-}

+ 218 - 19
libs/expat/configure

@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for expat 2.2.0.
+# Generated by GNU Autoconf 2.69 for expat 2.2.1.
 #
 # Report bugs to <[email protected]>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='expat'
 PACKAGE_TARNAME='expat'
-PACKAGE_VERSION='2.2.0'
-PACKAGE_STRING='expat 2.2.0'
+PACKAGE_VERSION='2.2.1'
+PACKAGE_STRING='expat 2.2.1'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -736,6 +736,8 @@ with_aix_soname
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
+with_libbsd
+enable_xml_context
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1291,7 +1293,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures expat 2.2.0 to adapt to many kinds of systems.
+\`configure' configures expat 2.2.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1356,7 +1358,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of expat 2.2.0:";;
+     short | recursive ) echo "Configuration of expat 2.2.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1369,6 +1371,10 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-xml-context [COUNT]
+                          Retain context around the current parse point;
+                          default is enabled and a size of 1024 bytes
+  --disable-xml-context   Do not retain context around the current parse point
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1382,6 +1388,9 @@ Optional Packages:
   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
                           compiler's sysroot if not specified).
 
+  --with-libbsd           utilize libbsd (for arc4random_buf)
+
+
 Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
@@ -1463,7 +1472,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-expat configure 2.2.0
+expat configure 2.2.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2007,7 +2016,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by expat $as_me 2.2.0, which was
+It was created by expat $as_me 2.2.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2395,7 +2404,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 LIBCURRENT=7   # sync
-LIBREVISION=2  # with
+LIBREVISION=3  # with
 LIBAGE=6       # CMakeLists.txt!
 
 ac_config_headers="$ac_config_headers expat_config.h"
@@ -4330,6 +4339,11 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -6135,10 +6149,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*)
+	  powerpcle-*linux*|powerpc64le-*linux*)
 	    LD="${LD-ld} -m elf64lppc"
 	    ;;
-	  powerpc-*linux*)
+	  powerpc-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -10322,11 +10336,11 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
   soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
 
   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
@@ -15131,11 +15145,11 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
   soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
 
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
@@ -15863,6 +15877,10 @@ rm -f core conftest.err conftest.$ac_objext \
     if test "x$CXXFLAGS" = x ; then
     CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
     fi
+
+    CFLAGS="${CFLAGS} -fno-strict-aliasing"
+    CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
+    LDFLAGS="${LDFLAGS} -fno-strict-aliasing"
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
@@ -16212,6 +16230,165 @@ fi
 done
 
 
+
+
+# Check whether --with-libbsd was given.
+if test "${with_libbsd+set}" = set; then :
+  withval=$with_libbsd;
+else
+  with_libbsd=no
+fi
+
+if test "x${with_libbsd}" != xno; then :
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf in -lbsd" >&5
+$as_echo_n "checking for arc4random_buf in -lbsd... " >&6; }
+if ${ac_cv_lib_bsd_arc4random_buf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char arc4random_buf ();
+int
+main ()
+{
+return arc4random_buf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bsd_arc4random_buf=yes
+else
+  ac_cv_lib_bsd_arc4random_buf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_arc4random_buf" >&5
+$as_echo "$ac_cv_lib_bsd_arc4random_buf" >&6; }
+if test "x$ac_cv_lib_bsd_arc4random_buf" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBBSD 1
+_ACEOF
+
+  LIBS="-lbsd $LIBS"
+
+else
+
+    if test "x${with_libbsd}" = xyes; then :
+
+      as_fn_error $? "Enforced use of libbsd cannot be satisfied." "$LINENO" 5
+
+fi
+
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf (BSD or libbsd)" >&5
+$as_echo_n "checking for arc4random_buf (BSD or libbsd)... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  #include <stdlib.h>  /* for arc4random_buf on BSD, for NULL */
+  #if defined(HAVE_LIBBSD)
+  # include <bsd/stdlib.h>
+  #endif
+  int main() {
+    arc4random_buf(NULL, 0U);
+    return 0;
+  }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+
+$as_echo "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getrandom (Linux 3.17+, glibc 2.25+)" >&5
+$as_echo_n "checking for getrandom (Linux 3.17+, glibc 2.25+)... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  #include <stdlib.h>  /* for NULL */
+  #include <sys/random.h>
+  int main() {
+    return getrandom(NULL, 0U, 0U);
+  }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+
+$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syscall SYS_getrandom (Linux 3.17+)" >&5
+$as_echo_n "checking for syscall SYS_getrandom (Linux 3.17+)... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+      #include <stdlib.h>  /* for NULL */
+      #include <unistd.h>  /* for syscall */
+      #include <sys/syscall.h>  /* for SYS_getrandom */
+      int main() {
+        syscall(SYS_getrandom, NULL, 0, 0);
+        return 0;
+      }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+
+$as_echo "#define HAVE_SYSCALL_GETRANDOM 1" >>confdefs.h
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
 for ac_header in fcntl.h unistd.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -16756,7 +16933,7 @@ else
 int
 main ()
 {
-char *foo = __func__;
+const char *foo = __func__;
   ;
   return 0;
 }
@@ -16770,7 +16947,7 @@ else
 int
 main ()
 {
-char *foo = __FUNCTION__;
+const char *foo = __FUNCTION__;
   ;
   return 0;
 }
@@ -16805,11 +16982,31 @@ $as_echo "#define XML_NS 1" >>confdefs.h
 $as_echo "#define XML_DTD 1" >>confdefs.h
 
 
-$as_echo "#define XML_CONTEXT_BYTES 1024" >>confdefs.h
+# Check whether --enable-xml-context was given.
+if test "${enable_xml_context+set}" = set; then :
+  enableval=$enable_xml_context; enable_xml_context=${enableval}
+fi
+
+if test "x${enable_xml_context}" != "xno"; then :
+
+  if test "x${enable_xml_context}" == "xyes" \
+      -o "x${enable_xml_context}" == "x"; then :
+
+    enable_xml_context=1024
 
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define XML_CONTEXT_BYTES ${enable_xml_context}
+_ACEOF
+
+
+fi
 
 ac_config_files="$ac_config_files Makefile expat.pc"
 
+ac_config_files="$ac_config_files run.sh"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -17316,7 +17513,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by expat $as_me 2.2.0, which was
+This file was extended by expat $as_me 2.2.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17382,7 +17579,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-expat config.status 2.2.0
+expat config.status 2.2.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -17896,6 +18093,7 @@ do
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "expat.pc") CONFIG_FILES="$CONFIG_FILES expat.pc" ;;
+    "run.sh") CONFIG_FILES="$CONFIG_FILES run.sh" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -19164,6 +19362,7 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 _LT_EOF
 
  ;;
+    "run.sh":F) chmod +x run.sh ;;
 
   esac
 done # for ac_tag

+ 87 - 5
libs/expat/configure.ac

@@ -46,7 +46,7 @@ dnl If the API changes incompatibly set LIBAGE back to 0
 dnl
 
 LIBCURRENT=7   # sync
-LIBREVISION=2  # with
+LIBREVISION=3  # with
 LIBAGE=6       # CMakeLists.txt!
 
 AC_CONFIG_HEADER(expat_config.h)
@@ -80,6 +80,10 @@ if test "$GCC" = yes ; then
     if test "x$CXXFLAGS" = x ; then
     CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
     fi
+
+    CFLAGS="${CFLAGS} -fno-strict-aliasing"
+    CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
+    LDFLAGS="${LDFLAGS} -fno-strict-aliasing"
 fi
 
 dnl Checks for header files.
@@ -95,6 +99,69 @@ AC_C_CONST
 AC_TYPE_SIZE_T
 AC_CHECK_FUNCS(memmove bcopy)
 
+
+AC_ARG_WITH([libbsd], [
+AS_HELP_STRING([--with-libbsd], [utilize libbsd (for arc4random_buf)])
+], [], [with_libbsd=no])
+AS_IF([test "x${with_libbsd}" != xno], [
+  AC_CHECK_LIB([bsd], [arc4random_buf], [], [
+    AS_IF([test "x${with_libbsd}" = xyes], [
+      AC_MSG_ERROR([Enforced use of libbsd cannot be satisfied.])
+    ])
+  ])
+])
+AC_MSG_CHECKING([for arc4random_buf (BSD or libbsd)])
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+  #include <stdlib.h>  /* for arc4random_buf on BSD, for NULL */
+  #if defined(HAVE_LIBBSD)
+  # include <bsd/stdlib.h>
+  #endif
+  int main() {
+    arc4random_buf(NULL, 0U);
+    return 0;
+  }
+])], [
+    AC_DEFINE([HAVE_ARC4RANDOM_BUF], [1],
+        [Define to 1 if you have the `arc4random_buf' function.])
+    AC_MSG_RESULT([yes])
+], [
+    AC_MSG_RESULT([no])
+])
+
+
+AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+  #include <stdlib.h>  /* for NULL */
+  #include <sys/random.h>
+  int main() {
+    return getrandom(NULL, 0U, 0U);
+  }
+])], [
+    AC_DEFINE([HAVE_GETRANDOM], [1],
+        [Define to 1 if you have the `getrandom' function.])
+    AC_MSG_RESULT([yes])
+], [
+    AC_MSG_RESULT([no])
+
+    AC_MSG_CHECKING([for syscall SYS_getrandom (Linux 3.17+)])
+    AC_LINK_IFELSE([AC_LANG_SOURCE([
+      #include <stdlib.h>  /* for NULL */
+      #include <unistd.h>  /* for syscall */
+      #include <sys/syscall.h>  /* for SYS_getrandom */
+      int main() {
+        syscall(SYS_getrandom, NULL, 0, 0);
+        return 0;
+      }
+    ])], [
+        AC_DEFINE([HAVE_SYSCALL_GETRANDOM], [1],
+            [Define to 1 if you have `syscall' and `SYS_getrandom'.])
+        AC_MSG_RESULT([yes])
+    ], [
+        AC_MSG_RESULT([no])
+    ])
+])
+
+
 dnl Only needed for xmlwf:
 AC_CHECK_HEADERS(fcntl.h unistd.h)
 AC_TYPE_OFF_T
@@ -119,10 +186,10 @@ AC_DEFUN([AC_CPP_FUNC],
 [AC_REQUIRE([AC_PROG_CC_STDC])dnl
 AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func,
 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
-[[char *foo = __func__;]])],
+[[const char *foo = __func__;]])],
   [ac_cv_cpp_func=yes], 
   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
-[[char *foo = __FUNCTION__;]])],
+[[const char *foo = __FUNCTION__;]])],
   [ac_cv_cpp_func=__FUNCTION__], 
   [ac_cv_cpp_func=no])])])
 if test $ac_cv_cpp_func = __FUNCTION__; then
@@ -144,10 +211,25 @@ AC_DEFINE([XML_NS], 1,
           [Define to make XML Namespaces functionality available.])
 AC_DEFINE([XML_DTD], 1,
           [Define to make parameter entity parsing functionality available.])
-AC_DEFINE([XML_CONTEXT_BYTES], 1024,
-          [Define to specify how much context to retain around the current parse point.])
+
+AC_ARG_ENABLE([xml-context],
+  AS_HELP_STRING([--enable-xml-context @<:@COUNT@:>@],
+    [Retain context around the current parse point;
+        default is enabled and a size of 1024 bytes])
+AS_HELP_STRING([--disable-xml-context],
+    [Do not retain context around the current parse point]),
+  [enable_xml_context=${enableval}])
+AS_IF([test "x${enable_xml_context}" != "xno"], [
+  AS_IF([test "x${enable_xml_context}" == "xyes" \
+      -o "x${enable_xml_context}" == "x"], [
+    enable_xml_context=1024
+  ])
+  AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}],
+    [Define to specify how much context to retain around the current parse point.])
+])
 
 AC_CONFIG_FILES([Makefile expat.pc])
+AC_CONFIG_FILES([run.sh], [chmod +x run.sh])
 AC_OUTPUT
 
 abs_srcdir="`cd $srcdir && pwd`"

+ 0 - 155
libs/expat/configure.in

@@ -1,155 +0,0 @@
-dnl   configuration script for expat
-dnl   Process this file with autoconf to produce a configure script.
-dnl
-dnl   Copyright 2000 Clark Cooper
-dnl
-dnl   This file is part of EXPAT.
-dnl
-dnl   EXPAT is free software; you can redistribute it and/or modify it
-dnl   under the terms of the License (based on the MIT/X license) contained
-dnl   in the file COPYING that comes with this distribution.
-dnl
-
-dnl Ensure that Expat is configured with autoconf 2.58 or newer
-AC_PREREQ(2.58)
-
-dnl Get the version number of Expat, using m4's esyscmd() command to run
-dnl the command at m4-generation time. This allows us to create an m4
-dnl symbol holding the correct version number. AC_INIT() requires the
-dnl version number at m4-time, rather than when ./configure is run, so
-dnl all this must happen as part of m4, not as part of the shell code
-dnl contained in ./configure.
-dnl
-dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
-dnl test. I believe this test will work, but I don't have a place with non-
-dnl GNU M4 to test it right now.
-define([expat_version], ifdef([__gnu__],
-                              [esyscmd(conftools/get-version.sh lib/expat.h)],
-                              [2.1.x]))
-AC_INIT(expat, expat_version, [email protected])
-undefine([expat_version])
-
-AC_CONFIG_SRCDIR(Makefile.in)
-AC_CONFIG_AUX_DIR(conftools)
-AC_CONFIG_MACRO_DIR([m4])
-
-
-dnl
-dnl Increment LIBREVISION if source code has changed at all
-dnl
-dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
-dnl
-dnl If the API changes compatibly (i.e. simply adding a new function
-dnl without changing or removing earlier interfaces), then increment LIBAGE.
-dnl 
-dnl If the API changes incompatibly set LIBAGE back to 0
-dnl
-
-LIBCURRENT=7
-LIBREVISION=0
-LIBAGE=6
-
-AC_CONFIG_HEADER(expat_config.h)
-
-sinclude(conftools/ac_c_bigendian_cross.m4)
-
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
-
-AC_SUBST(LIBCURRENT)
-AC_SUBST(LIBREVISION)
-AC_SUBST(LIBAGE)
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_INSTALL
-
-if test "$GCC" = yes ; then
-    dnl
-    dnl Be careful about adding the -fexceptions option; some versions of
-    dnl GCC don't support it and it causes extra warnings that are only
-    dnl distracting; avoid.
-    dnl
-    OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
-    CFLAGS="$OLDCFLAGS -fexceptions"
-    AC_MSG_CHECKING(whether $CC accepts -fexceptions)
-    AC_TRY_LINK( , ,
-                   AC_MSG_RESULT(yes),
-                   AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
-    CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
-fi
-
-dnl Checks for header files.
-AC_HEADER_STDC
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-
-dnl Note: Avoid using AC_C_BIGENDIAN because it does not
-dnl work in a cross compile.
-AC_C_BIGENDIAN_CROSS
-
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_CHECK_FUNCS(memmove bcopy)
-
-dnl Only needed for xmlwf:
-AC_CHECK_HEADERS(fcntl.h unistd.h)
-AC_TYPE_OFF_T
-AC_FUNC_MMAP
-
-if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
-    FILEMAP=unixfilemap
-else
-    FILEMAP=readfilemap
-fi
-AC_SUBST(FILEMAP)
-
-dnl Needed for the test support code; this was found at
-dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html
-
-# AC_CPP_FUNC
-# ------------------ #
-# Checks to see if ANSI C99 CPP variable __func__ works.
-# If not, perhaps __FUNCTION__ works instead. 
-# If not, we'll just define __func__ to "". 
-AC_DEFUN([AC_CPP_FUNC],
-[AC_REQUIRE([AC_PROG_CC_STDC])dnl
-AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
-[[char *foo = __func__;]])],
-  [ac_cv_cpp_func=yes], 
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
-[[char *foo = __FUNCTION__;]])],
-  [ac_cv_cpp_func=__FUNCTION__], 
-  [ac_cv_cpp_func=no])])])
-if test $ac_cv_cpp_func = __FUNCTION__; then
-  AC_DEFINE(__func__,__FUNCTION__,
-            [Define to __FUNCTION__ or "" if `__func__' does not conform to 
-ANSI C.])
-elif test $ac_cv_cpp_func = no; then
-  AC_DEFINE(__func__,"",
-            [Define to __FUNCTION__ or "" if `__func__' does not conform to 
-ANSI C.])
-fi
-])# AC_CPP_FUNC
-
-AC_CPP_FUNC
-
-
-dnl Some basic configuration:
-AC_DEFINE([XML_NS], 1,
-          [Define to make XML Namespaces functionality available.])
-AC_DEFINE([XML_DTD], 1,
-          [Define to make parameter entity parsing functionality available.])
-AC_DEFINE([XML_CONTEXT_BYTES], 1024,
-          [Define to specify how much context to retain around the current parse point.])
-
-AC_CONFIG_FILES([Makefile expat.pc])
-AC_OUTPUT
-
-abs_srcdir="`cd $srcdir && pwd`"
-abs_builddir="`pwd`"
-if test "$abs_srcdir" != "$abs_builddir"; then
-  make mkdir-init
-fi

+ 20 - 12
libs/expat/conftools/config.guess

@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2016-04-02'
+timestamp='2017-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
+	# to ELF recently (or will in the future) and ABI.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -997,6 +1000,9 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    mips64el:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     openrisc*:Linux:*:*)
 	echo or1k-unknown-linux-${LIBC}
 	exit ;;
@@ -1029,6 +1035,9 @@ EOF
     ppcle:Linux:*:*)
 	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
@@ -1419,18 +1428,17 @@ esac
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <[email protected]> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to [email protected] to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 

+ 22 - 9
libs/expat/conftools/config.sub

@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2016-03-30'
+timestamp='2017-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ Report bugs and patches to <[email protected]>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@ case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | \
+  kopensolaris*-gnu* | cloudabi*-eabi* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -301,6 +301,7 @@ case $basic_machine in
 	| open8 | or1k | or1knd | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pru \
 	| pyramid \
 	| riscv32 | riscv64 \
 	| rl78 | rx \
@@ -428,6 +429,7 @@ case $basic_machine in
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pru-* \
 	| pyramid-* \
 	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
@@ -643,6 +645,14 @@ case $basic_machine in
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
+	e500v[12])
+		basic_machine=powerpc-unknown
+		os=$os"spe"
+		;;
+	e500v[12]-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=$os"spe"
+		;;
 	ebmon29k)
 		basic_machine=a29k-amd
 		os=-ebmon
@@ -1040,7 +1050,7 @@ case $basic_machine in
 	ppc-* | ppcbe-*)
 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
+	ppcle | powerpclittle)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
@@ -1050,7 +1060,7 @@ case $basic_machine in
 		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+	ppc64le | powerpc64little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
@@ -1405,9 +1415,9 @@ case $os in
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -1417,7 +1427,7 @@ case $os in
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos*)
+	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1646,6 +1656,9 @@ case $basic_machine in
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
+	pru-*)
+		os=-elf
+		;;
 	*-be)
 		os=-beos
 		;;

+ 1 - 1
libs/expat/doc/reference.html

@@ -277,7 +277,7 @@ directions or Unix directions below.</p>
 <p>If you're using the GNU compiler under cygwin, follow the Unix
 directions in the next section. Otherwise if you have Microsoft's
 Developer Studio installed, then from Windows Explorer double-click on
-"expat.dsp" in the lib directory and build and install in the usual
+"expat.vcxproj" in the lib directory and build and install in the usual
 manner.</p>
 
 <p>Alternatively, you may download the Win32 binary package that

+ 0 - 468
libs/expat/doc/xmlwf.sgml

@@ -1,468 +0,0 @@
-<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
-
-<!-- Process this file with docbook-to-man to generate an nroff manual
-     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
-     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
-     less'.  A typical entry in a Makefile or Makefile.am is:
-
-manpage.1: manpage.sgml
-	docbook-to-man $< > $@
-  -->
-
-  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
-  <!ENTITY dhfirstname "<firstname>Scott</firstname>">
-  <!ENTITY dhsurname   "<surname>Bronson</surname>">
-  <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>December  5, 2001</date>">
-  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
-       allowed: see man(7), man(1). -->
-  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
-  <!ENTITY dhemail     "<email>[email protected]</email>">
-  <!ENTITY dhusername  "Scott Bronson">
-  <!ENTITY dhucpackage "<refentrytitle>XMLWF</refentrytitle>">
-  <!ENTITY dhpackage   "xmlwf">
-
-  <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
-  <!ENTITY gnu         "<acronym>GNU</acronym>">
-]>
-
-<refentry>
-  <refentryinfo>
-    <address>
-      &dhemail;
-    </address>
-    <author>
-      &dhfirstname;
-      &dhsurname;
-    </author>
-    <copyright>
-      <year>2001</year>
-      <holder>&dhusername;</holder>
-    </copyright>
-    &dhdate;
-  </refentryinfo>
-  <refmeta>
-    &dhucpackage;
-
-    &dhsection;
-  </refmeta>
-  <refnamediv>
-    <refname>&dhpackage;</refname>
-
-    <refpurpose>Determines if an XML document is well-formed</refpurpose>
-  </refnamediv>
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>&dhpackage;</command>
-	  <arg><option>-s</option></arg>
-	  <arg><option>-n</option></arg>
-	  <arg><option>-p</option></arg>
-	  <arg><option>-x</option></arg>
-
-	  <arg><option>-e <replaceable>encoding</replaceable></option></arg>
-	  <arg><option>-w</option></arg>
-
-	  <arg><option>-d <replaceable>output-dir</replaceable></option></arg>
-	  <arg><option>-c</option></arg>
-	  <arg><option>-m</option></arg>
-
-	  <arg><option>-r</option></arg>
-	  <arg><option>-t</option></arg>
-
-	  <arg><option>-v</option></arg>
-
-	  <arg>file ...</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
- 
-  <refsect1>
-    <title>DESCRIPTION</title>
-
-    <para>
-	<command>&dhpackage;</command> uses the Expat library to
-	determine if an XML document is well-formed.  It is
-	non-validating.
-	</para>
-
-	<para>
-	If you do not specify any files on the command-line, and you
-	have a recent version of <command>&dhpackage;</command>, the
-	input file will be read from standard input.
-	</para>
-
-  </refsect1>
-
-  <refsect1>
-    <title>WELL-FORMED DOCUMENTS</title>
-
-	<para>
-	  A well-formed document must adhere to the
-	  following rules:
-	</para>
-
-	<itemizedlist>
-      <listitem><para>
-	    The file begins with an XML declaration.  For instance,
-		<literal>&lt;?xml version="1.0" standalone="yes"?&gt;</literal>.
-		<emphasis>NOTE:</emphasis>
-		<command>&dhpackage;</command> does not currently
-		check for a valid XML declaration.
-      </para></listitem>
-      <listitem><para>
-		Every start tag is either empty (&lt;tag/&gt;)
-		or has a corresponding end tag.
-      </para></listitem>
-      <listitem><para>
-	    There is exactly one root element.  This element must contain
-		all other elements in the document.  Only comments, white
-		space, and processing instructions may come after the close
-		of the root element.
-      </para></listitem>
-      <listitem><para>
-		All elements nest properly.
-      </para></listitem>
-      <listitem><para>
-		All attribute values are enclosed in quotes (either single
-		or double).
-      </para></listitem>
-    </itemizedlist>
-
-	<para>
-	  If the document has a DTD, and it strictly complies with that
-	  DTD, then the document is also considered <emphasis>valid</emphasis>.
-	  <command>&dhpackage;</command> is a non-validating parser --
-	  it does not check the DTD.  However, it does support
-	  external entities (see the <option>-x</option> option).
-	</para>
-  </refsect1>
-
-  <refsect1>
-    <title>OPTIONS</title>
-
-<para>
-When an option includes an argument, you may specify the argument either
-separately ("<option>-d</option> output") or concatenated with the
-option ("<option>-d</option>output").  <command>&dhpackage;</command>
-supports both.
-</para>
-
-    <variablelist>
-
-      <varlistentry>
-        <term><option>-c</option></term>
-        <listitem>
-		<para>
-  If the input file is well-formed and <command>&dhpackage;</command>
-  doesn't encounter any errors, the input file is simply copied to
-  the output directory unchanged.
-  This implies no namespaces (turns off <option>-n</option>) and
-  requires <option>-d</option> to specify an output file.
-  		</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-d output-dir</option></term>
-        <listitem>
-		<para>
-  Specifies a directory to contain transformed
-  representations of the input files.
-  By default, <option>-d</option> outputs a canonical representation
-  (described below).
-  You can select different output formats using <option>-c</option>
-  and <option>-m</option>.
-	  </para>
-	  <para>
-  The output filenames will
-  be exactly the same as the input filenames or "STDIN" if the input is
-  coming from standard input.  Therefore, you must be careful that the
-  output file does not go into the same directory as the input
-  file.  Otherwise, <command>&dhpackage;</command> will delete the
-  input file before it generates the output file (just like running
-  <literal>cat &lt; file &gt; file</literal> in most shells).
-	  </para>
-	  <para> 
-  Two structurally equivalent XML documents have a byte-for-byte
-  identical canonical XML representation.
-  Note that ignorable white space is considered significant and
-  is treated equivalently to data.
-  More on canonical XML can be found at
-  http://www.jclark.com/xml/canonxml.html .
-	  </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-e encoding</option></term>
-        <listitem>
-		<para>
-   Specifies the character encoding for the document, overriding
-   any document encoding declaration.  <command>&dhpackage;</command>
-   supports four built-in encodings:
-   	<literal>US-ASCII</literal>,
-	<literal>UTF-8</literal>,
-	<literal>UTF-16</literal>, and
-	<literal>ISO-8859-1</literal>.
-   Also see the <option>-w</option> option.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-m</option></term>
-        <listitem>
-		<para>
-  Outputs some strange sort of XML file that completely
-  describes the the input file, including character postitions.
-  Requires <option>-d</option> to specify an output file.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-n</option></term>
-        <listitem>
-		<para>
-  Turns on namespace processing.  (describe namespaces)
-  <option>-c</option> disables namespaces.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-p</option></term>
-        <listitem>
-		<para>
-    Tells xmlwf to process external DTDs and parameter
-    entities.
-	 </para>
-	 <para>
-   Normally <command>&dhpackage;</command> never parses parameter
-   entities.  <option>-p</option> tells it to always parse them.
-   <option>-p</option> implies <option>-x</option>.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-r</option></term>
-        <listitem>
-		<para>
-   Normally <command>&dhpackage;</command> memory-maps the XML file
-   before parsing; this can result in faster parsing on many
-   platforms.
-   <option>-r</option> turns off memory-mapping and uses normal file
-   IO calls instead.
-   Of course, memory-mapping is automatically turned off
-   when reading from standard input.
-	   </para>
-		<para>
-   Use of memory-mapping can cause some platforms to report
-   substantially higher memory usage for
-   <command>&dhpackage;</command>, but this appears to be a matter of
-   the operating system reporting memory in a strange way; there is
-   not a leak in <command>&dhpackage;</command>.
-           </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-s</option></term>
-        <listitem>
-		<para>
-  Prints an error if the document is not standalone. 
-  A document is standalone if it has no external subset and no
-  references to parameter entities.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-t</option></term>
-        <listitem>
-		<para>
-  Turns on timings.  This tells Expat to parse the entire file,
-  but not perform any processing.
-  This gives a fairly accurate idea of the raw speed of Expat itself
-  without client overhead.
-  <option>-t</option> turns off most of the output options
-  (<option>-d</option>, <option>-m</option>, <option>-c</option>,
-  ...).
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-v</option></term>
-        <listitem>
-		<para>
-  Prints the version of the Expat library being used, including some
-  information on the compile-time configuration of the library, and
-  then exits.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-w</option></term>
-        <listitem>
-		<para>
-  Enables support for Windows code pages.
-  Normally, <command>&dhpackage;</command> will throw an error if it
-  runs across an encoding that it is not equipped to handle itself.  With
-  <option>-w</option>, &dhpackage; will try to use a Windows code
-  page.  See also <option>-e</option>.
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-x</option></term>
-        <listitem>
-		<para>
-  Turns on parsing external entities.
-  </para>
-<para>
-  Non-validating parsers are not required to resolve external
-  entities, or even expand entities at all.
-  Expat always expands internal entities (?),
-  but external entity parsing must be enabled explicitly.
-  </para>
-  <para>
-  External entities are simply entities that obtain their
-  data from outside the XML file currently being parsed.
-  </para>
-  <para>
-  This is an example of an internal entity:
-<literallayout>
-&lt;!ENTITY vers '1.0.2'&gt;
-</literallayout>
-  </para>
-  <para>
-  And here are some examples of external entities:
-
-<literallayout>
-&lt;!ENTITY header SYSTEM "header-&amp;vers;.xml"&gt;  (parsed)
-&lt;!ENTITY logo SYSTEM "logo.png" PNG&gt;         (unparsed)
-</literallayout>
-
-	   </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--</option></term>
-        <listitem>
-		<para>
-    (Two hyphens.)
-    Terminates the list of options.  This is only needed if a filename
-    starts with a hyphen.  For example:
-	   </para>
-<literallayout>
-&dhpackage; -- -myfile.xml
-</literallayout>
-		<para>
-    will run <command>&dhpackage;</command> on the file
-    <filename>-myfile.xml</filename>.
-	   </para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-
-	<para>
-    Older versions of <command>&dhpackage;</command> do not support
-    reading from standard input.
-	</para>
-  </refsect1>
-
-  <refsect1>
-  <title>OUTPUT</title>
-    <para>
-	If an input file is not well-formed,
-	<command>&dhpackage;</command> prints a single line describing
-	the problem to standard output.  If a file is well formed,
-	<command>&dhpackage;</command> outputs nothing.
-	Note that the result code is <emphasis>not</emphasis> set.
-	</para>
-  </refsect1>
-  
-  <refsect1>
-    <title>BUGS</title>
-	<para>
-	<command>&dhpackage;</command> returns a 0 - noerr result,
-	even if the file is not well-formed.  There is no good way for
-	a program to use <command>&dhpackage;</command> to quickly
-	check a file -- it must parse <command>&dhpackage;</command>'s
-	standard output.
-	</para>
-	<para>
-	The errors should go to standard error, not standard output.
-	</para>
-	<para>
-	There should be a way to get <option>-d</option> to send its
-	output to standard output rather than forcing the user to send
-	it to a file.
-	</para>
-	<para>
-	I have no idea why anyone would want to use the
-	<option>-d</option>, <option>-c</option>, and
-	<option>-m</option> options.  If someone could explain it to
-	me, I'd like to add this information to this manpage.
-	</para>
-  </refsect1>
-
-  <refsect1>
-    <title>ALTERNATIVES</title>
-	<para>
-	  Here are some XML validators on the web:
-
-<literallayout>
-http://www.hcrc.ed.ac.uk/~richard/xml-check.html
-http://www.stg.brown.edu/service/xmlvalid/
-http://www.scripting.com/frontier5/xml/code/xmlValidator.html
-http://www.xml.com/pub/a/tools/ruwf/check.html
-</literallayout>
-
-		 </para>
-  </refsect1>
-
-  <refsect1>
-    <title>SEE ALSO</title>
-	<para>
-
-<literallayout>
-The Expat home page:        http://www.libexpat.org/
-The W3 XML specification:   http://www.w3.org/TR/REC-xml
-</literallayout>
-
-	</para>
-  </refsect1>
-
-  <refsect1>
-    <title>AUTHOR</title>
-    <para>
-	  This manual page was written by &dhusername; &dhemail; for
-      the &debian; system (but may be used by others).  Permission is
-      granted to copy, distribute and/or modify this document under
-      the terms of the <acronym>GNU</acronym> Free Documentation
-      License, Version 1.1.
-	</para>
-  </refsect1>
-</refentry>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:2
-sgml-indent-data:t
-sgml-parent-document:nil
-sgml-default-dtd-file:nil
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
--->

+ 1 - 5
libs/expat/examples/elements.c

@@ -6,11 +6,7 @@
 */
 
 #include <stdio.h>
-#include "expat.h"
-
-#if defined(__amigaos__) && defined(__USE_INLINE__)
-#include <proto/expat.h>
-#endif
+#include <expat.h>
 
 #ifdef XML_LARGE_SIZE
 #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400

+ 0 - 103
libs/expat/examples/elements.dsp

@@ -1,103 +0,0 @@
-# Microsoft Developer Studio Project File - Name="elements" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=elements - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "elements.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "elements.mak" CFG="elements - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "elements - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "elements - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "elements - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\win32\bin\Release"
-# PROP Intermediate_Dir "..\win32\tmp\Release-elements"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c
-# SUBTRACT CPP /X /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\elements.exe"
-
-!ELSEIF  "$(CFG)" == "elements - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\win32\bin\Debug"
-# PROP Intermediate_Dir "..\win32\tmp\Debug-elements"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\elements.exe"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "elements - Win32 Release"
-# Name "elements - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\elements.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

+ 0 - 4
libs/expat/examples/outline.c

@@ -25,10 +25,6 @@
 #include <stdio.h>
 #include <expat.h>
 
-#if defined(__amigaos__) && defined(__USE_INLINE__)
-#include <proto/expat.h>
-#endif
-
 #ifdef XML_LARGE_SIZE
 #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
 #define XML_FMT_INT_MOD "I64"

+ 0 - 103
libs/expat/examples/outline.dsp

@@ -1,103 +0,0 @@
-# Microsoft Developer Studio Project File - Name="outline" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=outline - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "outline.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "outline.mak" CFG="outline - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "outline - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "outline - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "outline - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\win32\bin\Release"
-# PROP Intermediate_Dir "..\win32\tmp\Release-outline"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /X /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\outline.exe"
-
-!ELSEIF  "$(CFG)" == "outline - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\win32\bin\Debug"
-# PROP Intermediate_Dir "..\win32\tmp\Debug-outline"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\outline.exe"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "outline - Win32 Release"
-# Name "outline - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\outline.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

+ 0 - 110
libs/expat/expat.dsw

@@ -1,110 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "elements"=.\examples\elements.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name expat_static
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "expat"=.\lib\expat.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "expat_static"=.\lib\expat_static.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "expatw_static"=.\lib\expatw_static.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "outline"=.\examples\outline.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name expat
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name expat
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-

+ 12 - 0
libs/expat/expat_config.h.in

@@ -3,6 +3,9 @@
 /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
 #undef BYTEORDER
 
+/* Define to 1 if you have the `arc4random_buf' function. */
+#undef HAVE_ARC4RANDOM_BUF
+
 /* Define to 1 if you have the `bcopy' function. */
 #undef HAVE_BCOPY
 
@@ -15,9 +18,15 @@
 /* Define to 1 if you have the `getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 
+/* Define to 1 if you have the `getrandom' function. */
+#undef HAVE_GETRANDOM
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+#undef HAVE_LIBBSD
+
 /* Define to 1 if you have the `memmove' function. */
 #undef HAVE_MEMMOVE
 
@@ -39,6 +48,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have `syscall' and `SYS_getrandom'. */
+#undef HAVE_SYSCALL_GETRANDOM
+
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 

+ 0 - 29
libs/expat/lib/amigaconfig.h

@@ -1,29 +0,0 @@
-#ifndef AMIGACONFIG_H
-#define AMIGACONFIG_H
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#define BYTEORDER 4321
-
-/* Define to 1 if you have the `bcopy' function. */
-#define HAVE_BCOPY 1
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* whether byteorder is bigendian */
-#define WORDS_BIGENDIAN
-
-/* Define to specify how much context to retain around the current parse
-   point. */
-#define XML_CONTEXT_BYTES 1024
-
-/* Define to make parameter entity parsing functionality available. */
-#define XML_DTD
-
-/* Define to make XML Namespaces functionality available. */
-#define XML_NS
-
-#endif  /* AMIGACONFIG_H */

+ 16 - 6
libs/expat/lib/expat.h

@@ -95,7 +95,9 @@ enum XML_Error {
   /* Added in 2.0. */
   XML_ERROR_RESERVED_PREFIX_XML,
   XML_ERROR_RESERVED_PREFIX_XMLNS,
-  XML_ERROR_RESERVED_NAMESPACE_URI
+  XML_ERROR_RESERVED_NAMESPACE_URI,
+  /* Added in 2.2.1. */
+  XML_ERROR_INVALID_ARGUMENT
 };
 
 enum XML_Content_Type {
@@ -706,6 +708,7 @@ XML_UseParserAsHandlerArg(XML_Parser parser);
      be called, despite an external subset being parsed.
    Note: If XML_DTD is not defined when Expat is compiled, returns
      XML_ERROR_FEATURE_REQUIRES_XML_DTD.
+   Note: If parser == NULL, returns XML_ERROR_INVALID_ARGUMENT.
 */
 XMLPARSEAPI(enum XML_Error)
 XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
@@ -729,15 +732,16 @@ XML_GetBase(XML_Parser parser);
    to the XML_StartElementHandler that were specified in the start-tag
    rather than defaulted. Each attribute/value pair counts as 2; thus
    this correspondds to an index into the atts array passed to the
-   XML_StartElementHandler.
+   XML_StartElementHandler.  Returns -1 if parser == NULL.
 */
 XMLPARSEAPI(int)
 XML_GetSpecifiedAttributeCount(XML_Parser parser);
 
 /* Returns the index of the ID attribute passed in the last call to
-   XML_StartElementHandler, or -1 if there is no ID attribute.  Each
-   attribute/value pair counts as 2; thus this correspondds to an
-   index into the atts array passed to the XML_StartElementHandler.
+   XML_StartElementHandler, or -1 if there is no ID attribute or
+   parser == NULL.  Each attribute/value pair counts as 2; thus this
+   correspondds to an index into the atts array passed to the
+   XML_StartElementHandler.
 */
 XMLPARSEAPI(int)
 XML_GetIdAttributeIndex(XML_Parser parser);
@@ -901,6 +905,7 @@ enum XML_ParamEntityParsing {
    entities is requested; otherwise it will return non-zero.
    Note: If XML_SetParamEntityParsing is called after XML_Parse or
       XML_ParseBuffer, then it has no effect and will always return 0.
+   Note: If parser == NULL, the function will do nothing and return 0.
 */
 XMLPARSEAPI(int)
 XML_SetParamEntityParsing(XML_Parser parser,
@@ -910,6 +915,7 @@ XML_SetParamEntityParsing(XML_Parser parser,
    Helps in preventing DoS attacks based on predicting hash
    function behavior. This must be called before parsing is started.
    Returns 1 if successful, 0 when called after parsing has started.
+   Note: If parser == NULL, the function will do nothing and return 0.
 */
 XMLPARSEAPI(int)
 XML_SetHashSalt(XML_Parser parser,
@@ -936,6 +942,10 @@ XML_GetErrorCode(XML_Parser parser);
    the location is the location of the character at which the error
    was detected; otherwise the location is the location of the last
    parse event, as described above.
+
+   Note: XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber
+   return 0 to indicate an error.
+   Note: XML_GetCurrentByteIndex returns -1 to indicate an error.
 */
 XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
 XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
@@ -1039,7 +1049,7 @@ XML_GetFeatureList(void);
 */
 #define XML_MAJOR_VERSION 2
 #define XML_MINOR_VERSION 2
-#define XML_MICRO_VERSION 0
+#define XML_MICRO_VERSION 1
 
 #ifdef __cplusplus
 }

+ 4 - 1
libs/expat/lib/expat_external.h

@@ -93,7 +93,10 @@ extern "C" {
 #endif
 
 #ifdef XML_UNICODE_WCHAR_T
-#define XML_UNICODE
+# define XML_UNICODE
+# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
+#  error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
+# endif
 #endif
 
 #ifdef XML_UNICODE     /* Information is UTF-16 encoded. */

+ 0 - 53
libs/expat/lib/macconfig.h

@@ -1,53 +0,0 @@
-/*================================================================
-** Copyright 2000, Clark Cooper
-** All rights reserved.
-**
-** This is free software. You are permitted to copy, distribute, or modify
-** it under the terms of the MIT/X license (contained in the COPYING file
-** with this distribution.)
-**
-*/
-
-#ifndef MACCONFIG_H
-#define MACCONFIG_H
-
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#define BYTEORDER  4321
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE
-
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* whether byteorder is bigendian */
-#define WORDS_BIGENDIAN
-
-/* Define to specify how much context to retain around the current parse
-   point. */
-#undef XML_CONTEXT_BYTES
-
-/* Define to make parameter entity parsing functionality available. */
-#define XML_DTD
-
-/* Define to make XML Namespaces functionality available. */
-#define XML_NS
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `long' if <sys/types.h> does not define. */
-#define off_t  long
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-
-#endif /* ifndef MACCONFIG_H */

+ 344 - 0
libs/expat/lib/siphash.h

@@ -0,0 +1,344 @@
+/* ==========================================================================
+ * siphash.h - SipHash-2-4 in a single header file
+ * --------------------------------------------------------------------------
+ * Derived by William Ahern from the reference implementation[1] published[2]
+ * by Jean-Philippe Aumasson and Daniel J. Berstein. Licensed in kind.
+ * by Jean-Philippe Aumasson and Daniel J. Berstein.
+ * Minimal changes by Sebastian Pipping on top, details below.
+ * Licensed under the CC0 Public Domain Dedication license.
+ *
+ * 1. https://www.131002.net/siphash/siphash24.c
+ * 2. https://www.131002.net/siphash/
+ * --------------------------------------------------------------------------
+ * HISTORY:
+ *
+ * 2017-06-10  (Sebastian Pipping)
+ *   - Clarify license note in the header
+ *   - Address C89 issues:
+ *     - Stop using inline keyword (and let compiler decide)
+ *     - Turn integer suffix ULL to UL
+ *     - Replace _Bool by int
+ *     - Turn macro siphash24 into a function
+ *     - Address invalid conversion (void pointer) by explicit cast
+ *   - Always expose sip24_valid (for self-tests)
+ *
+ * 2012-11-04 - Born.  (William Ahern)
+ * --------------------------------------------------------------------------
+ * USAGE:
+ *
+ * SipHash-2-4 takes as input two 64-bit words as the key, some number of
+ * message bytes, and outputs a 64-bit word as the message digest. This
+ * implementation employs two data structures: a struct sipkey for
+ * representing the key, and a struct siphash for representing the hash
+ * state.
+ *
+ * For converting a 16-byte unsigned char array to a key, use either the
+ * macro sip_keyof or the routine sip_tokey. The former instantiates a
+ * compound literal key, while the latter requires a key object as a
+ * parameter.
+ *
+ * 	unsigned char secret[16];
+ * 	arc4random_buf(secret, sizeof secret);
+ * 	struct sipkey *key = sip_keyof(secret);
+ *
+ * For hashing a message, use either the convenience macro siphash24 or the
+ * routines sip24_init, sip24_update, and sip24_final.
+ *
+ * 	struct siphash state;
+ * 	void *msg;
+ * 	size_t len;
+ * 	uint64_t hash;
+ *
+ * 	sip24_init(&state, key);
+ * 	sip24_update(&state, msg, len);
+ * 	hash = sip24_final(&state);
+ *
+ * or
+ *
+ * 	hash = siphash24(msg, len, key);
+ *
+ * To convert the 64-bit hash value to a canonical 8-byte little-endian
+ * binary representation, use either the macro sip_binof or the routine
+ * sip_tobin. The former instantiates and returns a compound literal array,
+ * while the latter requires an array object as a parameter.
+ * --------------------------------------------------------------------------
+ * NOTES:
+ *
+ * o Neither sip_keyof, sip_binof, nor siphash24 will work with compilers
+ *   lacking compound literal support. Instead, you must use the lower-level
+ *   interfaces which take as parameters the temporary state objects.
+ *
+ * o Uppercase macros may evaluate parameters more than once. Lowercase
+ *   macros should not exhibit any such side effects.
+ * ==========================================================================
+ */
+#ifndef SIPHASH_H
+#define SIPHASH_H
+
+#include <stddef.h> /* size_t */
+#include <stdint.h> /* uint64_t uint32_t uint8_t */
+
+
+#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ( (x) >> (64 - (b))))
+
+#define SIP_U32TO8_LE(p, v) \
+	(p)[0] = (uint8_t)((v) >>  0); (p)[1] = (uint8_t)((v) >>  8); \
+	(p)[2] = (uint8_t)((v) >> 16); (p)[3] = (uint8_t)((v) >> 24);
+
+#define SIP_U64TO8_LE(p, v) \
+	SIP_U32TO8_LE((p) + 0, (uint32_t)((v) >>  0)); \
+	SIP_U32TO8_LE((p) + 4, (uint32_t)((v) >> 32));
+
+#define SIP_U8TO64_LE(p) \
+	(((uint64_t)((p)[0]) <<  0) | \
+	 ((uint64_t)((p)[1]) <<  8) | \
+	 ((uint64_t)((p)[2]) << 16) | \
+	 ((uint64_t)((p)[3]) << 24) | \
+	 ((uint64_t)((p)[4]) << 32) | \
+	 ((uint64_t)((p)[5]) << 40) | \
+	 ((uint64_t)((p)[6]) << 48) | \
+	 ((uint64_t)((p)[7]) << 56))
+
+
+#define SIPHASH_INITIALIZER { 0, 0, 0, 0, { 0 }, 0, 0 }
+
+struct siphash {
+	uint64_t v0, v1, v2, v3;
+
+	unsigned char buf[8], *p;
+	uint64_t c;
+}; /* struct siphash */
+
+
+#define SIP_KEYLEN 16
+
+struct sipkey {
+	uint64_t k[2];
+}; /* struct sipkey */
+
+#define sip_keyof(k) sip_tokey(&(struct sipkey){ { 0 } }, (k))
+
+static struct sipkey *sip_tokey(struct sipkey *key, const void *src) {
+	key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
+	key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
+	return key;
+} /* sip_tokey() */
+
+
+#define sip_binof(v) sip_tobin((unsigned char[8]){ 0 }, (v))
+
+static void *sip_tobin(void *dst, uint64_t u64) {
+	SIP_U64TO8_LE((unsigned char *)dst, u64);
+	return dst;
+} /* sip_tobin() */
+
+
+static void sip_round(struct siphash *H, const int rounds) {
+	int i;
+
+	for (i = 0; i < rounds; i++) {
+		H->v0 += H->v1;
+		H->v1 = SIP_ROTL(H->v1, 13);
+		H->v1 ^= H->v0;
+		H->v0 = SIP_ROTL(H->v0, 32);
+
+		H->v2 += H->v3;
+		H->v3 = SIP_ROTL(H->v3, 16);
+		H->v3 ^= H->v2;
+
+		H->v0 += H->v3;
+		H->v3 = SIP_ROTL(H->v3, 21);
+		H->v3 ^= H->v0;
+
+		H->v2 += H->v1;
+		H->v1 = SIP_ROTL(H->v1, 17);
+		H->v1 ^= H->v2;
+		H->v2 = SIP_ROTL(H->v2, 32);
+	}
+} /* sip_round() */
+
+
+static struct siphash *sip24_init(struct siphash *H, const struct sipkey *key) {
+	H->v0 = 0x736f6d6570736575UL ^ key->k[0];
+	H->v1 = 0x646f72616e646f6dUL ^ key->k[1];
+	H->v2 = 0x6c7967656e657261UL ^ key->k[0];
+	H->v3 = 0x7465646279746573UL ^ key->k[1];
+
+	H->p = H->buf;
+	H->c = 0;
+
+	return H;
+} /* sip24_init() */
+
+
+#define sip_endof(a) (&(a)[sizeof (a) / sizeof *(a)])
+
+static struct siphash *sip24_update(struct siphash *H, const void *src, size_t len) {
+	const unsigned char *p = (const unsigned char *)src, *pe = p + len;
+	uint64_t m;
+
+	do {
+		while (p < pe && H->p < sip_endof(H->buf))
+			*H->p++ = *p++;
+
+		if (H->p < sip_endof(H->buf))
+			break;
+
+		m = SIP_U8TO64_LE(H->buf);
+		H->v3 ^= m;
+		sip_round(H, 2);
+		H->v0 ^= m;
+
+		H->p = H->buf;
+		H->c += 8;
+	} while (p < pe);
+
+	return H;
+} /* sip24_update() */
+
+
+static uint64_t sip24_final(struct siphash *H) {
+	char left = H->p - H->buf;
+	uint64_t b = (H->c + left) << 56;
+
+	switch (left) {
+	case 7: b |= (uint64_t)H->buf[6] << 48;
+	case 6: b |= (uint64_t)H->buf[5] << 40;
+	case 5: b |= (uint64_t)H->buf[4] << 32;
+	case 4: b |= (uint64_t)H->buf[3] << 24;
+	case 3: b |= (uint64_t)H->buf[2] << 16;
+	case 2: b |= (uint64_t)H->buf[1] << 8;
+	case 1: b |= (uint64_t)H->buf[0] << 0;
+	case 0: break;
+	}
+
+	H->v3 ^= b;
+	sip_round(H, 2);
+	H->v0 ^= b;
+	H->v2 ^= 0xff;
+	sip_round(H, 4);
+
+	return H->v0 ^ H->v1 ^ H->v2  ^ H->v3;
+} /* sip24_final() */
+
+
+static uint64_t siphash24(const void *src, size_t len, const struct sipkey *key) {
+	struct siphash state = SIPHASH_INITIALIZER;
+	return sip24_final(sip24_update(sip24_init(&state, key), src, len));
+} /* siphash24() */
+
+
+/*
+ * SipHash-2-4 output with
+ * k = 00 01 02 ...
+ * and
+ * in = (empty string)
+ * in = 00 (1 byte)
+ * in = 00 01 (2 bytes)
+ * in = 00 01 02 (3 bytes)
+ * ...
+ * in = 00 01 02 ... 3e (63 bytes)
+ */
+static int sip24_valid(void) {
+	static const unsigned char vectors[64][8] = {
+		{ 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, },
+		{ 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, },
+		{ 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, },
+		{ 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, },
+		{ 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, },
+		{ 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, },
+		{ 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, },
+		{ 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, },
+		{ 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, },
+		{ 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, },
+		{ 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, },
+		{ 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, },
+		{ 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, },
+		{ 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, },
+		{ 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, },
+		{ 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, },
+		{ 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, },
+		{ 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, },
+		{ 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, },
+		{ 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, },
+		{ 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, },
+		{ 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, },
+		{ 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, },
+		{ 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, },
+		{ 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, },
+		{ 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, },
+		{ 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, },
+		{ 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, },
+		{ 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, },
+		{ 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, },
+		{ 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, },
+		{ 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, },
+		{ 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, },
+		{ 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, },
+		{ 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, },
+		{ 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, },
+		{ 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, },
+		{ 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, },
+		{ 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, },
+		{ 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, },
+		{ 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, },
+		{ 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, },
+		{ 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, },
+		{ 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, },
+		{ 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, },
+		{ 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, },
+		{ 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, },
+		{ 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, },
+		{ 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, },
+		{ 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, },
+		{ 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, },
+		{ 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, },
+		{ 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, },
+		{ 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, },
+		{ 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, },
+		{ 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, },
+		{ 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, },
+		{ 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, },
+		{ 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, },
+		{ 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, },
+		{ 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, },
+		{ 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, },
+		{ 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, },
+		{ 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, }
+	};
+	unsigned char in[64];
+	struct sipkey k;
+	size_t i;
+
+	sip_tokey(&k, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017");
+
+	for (i = 0; i < sizeof in; ++i) {
+		in[i] = i;
+
+		if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i]))
+			return 0;
+	}
+
+	return 1;
+} /* sip24_valid() */
+
+
+#if SIPHASH_MAIN
+
+#include <stdio.h>
+
+int main(void) {
+	int ok = sip24_valid();
+
+	if (ok)
+		puts("OK");
+	else
+		puts("FAIL");
+
+	return !ok;
+} /* main() */
+
+#endif /* SIPHASH_MAIN */
+
+
+#endif /* SIPHASH_H */

+ 10 - 0
libs/expat/lib/winconfig.h

@@ -17,6 +17,12 @@
 #include <memory.h>
 #include <string.h>
 
+
+#if defined(HAVE_EXPAT_CONFIG_H)  /* e.g. MinGW */
+# include <expat_config.h>
+#else  /* !defined(HAVE_EXPAT_CONFIG_H) */
+
+
 #define XML_NS 1
 #define XML_DTD 1
 #define XML_CONTEXT_BYTES 1024
@@ -27,4 +33,8 @@
 /* Windows has memmove() available. */
 #define HAVE_MEMMOVE
 
+
+#endif /* !defined(HAVE_EXPAT_CONFIG_H) */
+
+
 #endif /* ndef WINCONFIG_H */

Разлика између датотеке није приказан због своје велике величине
+ 395 - 108
libs/expat/lib/xmlparse.c


+ 2 - 8
libs/expat/lib/xmlrole.c

@@ -4,19 +4,13 @@
 
 #include <stddef.h>
 
-#ifdef WIN32
+#ifdef _WIN32
 #include "winconfig.h"
-#elif defined(MACOS_CLASSIC)
-#include "macconfig.h"
-#elif defined(__amigaos__)
-#include "amigaconfig.h"
-#elif defined(__WATCOMC__)
-#include "watcomconfig.h"
 #else
 #ifdef HAVE_EXPAT_CONFIG_H
 #include <expat_config.h>
 #endif
-#endif /* ndef WIN32 */
+#endif /* ndef _WIN32 */
 
 #include "expat_external.h"
 #include "internal.h"

+ 15 - 19
libs/expat/lib/xmltok.c

@@ -4,19 +4,13 @@
 
 #include <stddef.h>
 
-#ifdef WIN32
+#ifdef _WIN32
 #include "winconfig.h"
-#elif defined(MACOS_CLASSIC)
-#include "macconfig.h"
-#elif defined(__amigaos__)
-#include "amigaconfig.h"
-#elif defined(__WATCOMC__)
-#include "watcomconfig.h"
 #else
 #ifdef HAVE_EXPAT_CONFIG_H
 #include <expat_config.h>
 #endif
-#endif /* ndef WIN32 */
+#endif /* ndef _WIN32 */
 
 #include "expat_external.h"
 #include "internal.h"
@@ -369,24 +363,24 @@ utf8_toUtf8(const ENCODING *UNUSED_P(enc),
             const char **fromP, const char *fromLim,
             char **toP, const char *toLim)
 {
-  enum XML_Convert_Result res = XML_CONVERT_COMPLETED;
   char *to;
   const char *from;
-  if (fromLim - *fromP > toLim - *toP) {
-    /* Avoid copying partial characters. */
-    res = XML_CONVERT_OUTPUT_EXHAUSTED;
-    fromLim = *fromP + (toLim - *toP);
-    align_limit_to_full_utf8_characters(*fromP, &fromLim);
-  }
+  const char *fromLimInitial = fromLim;
+
+  /* Avoid copying partial characters. */
+  align_limit_to_full_utf8_characters(*fromP, &fromLim);
+
   for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++)
     *to = *from;
   *fromP = from;
   *toP = to;
 
-  if ((to == toLim) && (from < fromLim))
+  if (fromLim < fromLimInitial)
+    return XML_CONVERT_INPUT_INCOMPLETE;
+  else if ((to == toLim) && (from < fromLim))
     return XML_CONVERT_OUTPUT_EXHAUSTED;
   else
-    return res;
+    return XML_CONVERT_COMPLETED;
 }
 
 static enum XML_Convert_Result PTRCALL
@@ -402,7 +396,7 @@ utf8_toUtf16(const ENCODING *enc,
     case BT_LEAD2:
       if (fromLim - from < 2) {
         res = XML_CONVERT_INPUT_INCOMPLETE;
-        break;
+        goto after;
       }
       *to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f));
       from += 2;
@@ -410,7 +404,7 @@ utf8_toUtf16(const ENCODING *enc,
     case BT_LEAD3:
       if (fromLim - from < 3) {
         res = XML_CONVERT_INPUT_INCOMPLETE;
-        break;
+        goto after;
       }
       *to++ = (unsigned short)(((from[0] & 0xf) << 12)
                                | ((from[1] & 0x3f) << 6) | (from[2] & 0x3f));
@@ -441,6 +435,8 @@ utf8_toUtf16(const ENCODING *enc,
       break;
     }
   }
+  if (from < fromLim)
+    res = XML_CONVERT_OUTPUT_EXHAUSTED;
 after:
   *fromP = from;
   *toP = to;

+ 9 - 4
libs/expat/m4/libtool.m4

@@ -1417,10 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*)
+	  powerpcle-*linux*|powerpc64le-*linux*)
 	    LD="${LD-ld} -m elf64lppc"
 	    ;;
-	  powerpc-*linux*)
+	  powerpc-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1708,6 +1708,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -2636,11 +2641,11 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
   soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
 m4_if([$1], [],[
   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'

+ 12 - 0
libs/expat/run.sh.in

@@ -0,0 +1,12 @@
+#! /usr/bin/env bash
+# Copyright (C) 2017 Expat development team
+# Licensed under the MIT license
+
+case "@host@" in
+*-mingw*)
+    exec wine "$@"
+    ;;
+*)
+    exec "$@"
+    ;;
+esac

+ 0 - 4
libs/expat/tests/benchmark/benchmark.c

@@ -4,10 +4,6 @@
 #include <time.h>
 #include "expat.h"
 
-#if defined(__amigaos__) && defined(__USE_INLINE__)
-#include <proto/expat.h>
-#endif
-
 #ifdef XML_LARGE_SIZE
 #define XML_FMT_INT_MOD "ll"
 #else

+ 0 - 88
libs/expat/tests/benchmark/benchmark.dsp

@@ -1,88 +0,0 @@
-# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=benchmark - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "benchmark.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "benchmark - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x1009 /d "NDEBUG"
-# ADD RSC /l 0x1009 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 libexpat.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\win32\bin\Release"
-
-!ELSEIF  "$(CFG)" == "benchmark - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x1009 /d "_DEBUG"
-# ADD RSC /l 0x1009 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libexpat.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\win32\bin\Debug"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "benchmark - Win32 Release"
-# Name "benchmark - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\benchmark.c
-# End Source File
-# End Target
-# End Project

+ 0 - 44
libs/expat/tests/benchmark/benchmark.dsw

@@ -1,44 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "benchmark"=.\benchmark.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name expat
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-

+ 173 - 0
libs/expat/tests/memcheck.c

@@ -0,0 +1,173 @@
+/* Copyright (c) 2017 The Expat Maintainers
+ * Copying is permitted under the MIT license.  See the file COPYING
+ * for details.
+ *
+ * memcheck.c : debug allocators for the Expat test suite
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "memcheck.h"
+
+
+/* Structures to keep track of what has been allocated.  Speed isn't a
+ * big issue for the tests this is required for, so we will use a
+ * doubly-linked list to make deletion easier.
+ */
+
+typedef struct allocation_entry {
+    struct allocation_entry * next;
+    struct allocation_entry * prev;
+    void * allocation;
+    size_t num_bytes;
+} AllocationEntry;
+
+static AllocationEntry *alloc_head = NULL;
+static AllocationEntry *alloc_tail = NULL;
+
+static AllocationEntry *find_allocation(void *ptr);
+
+
+/* Allocate some memory and keep track of it. */
+void *
+tracking_malloc(size_t size)
+{
+    AllocationEntry *entry = malloc(sizeof(AllocationEntry));
+
+    if (entry == NULL) {
+        printf("Allocator failure\n");
+        return NULL;
+    }
+    entry->num_bytes = size;
+    entry->allocation = malloc(size);
+    if (entry->allocation == NULL) {
+        free(entry);
+        return NULL;
+    }
+    entry->next = NULL;
+
+    /* Add to the list of allocations */
+    if (alloc_head == NULL) {
+        entry->prev = NULL;
+        alloc_head = alloc_tail = entry;
+    } else {
+        entry->prev = alloc_tail;
+        alloc_tail->next = entry;
+        alloc_tail = entry;
+    }
+
+    return entry->allocation;
+}
+
+static AllocationEntry *
+find_allocation(void *ptr)
+{
+    AllocationEntry *entry;
+
+    for (entry = alloc_head; entry != NULL; entry = entry->next) {
+        if (entry->allocation == ptr) {
+            return entry;
+        }
+    }
+    return NULL;
+}
+
+/* Free some memory and remove the tracking for it */
+void
+tracking_free(void *ptr)
+{
+    AllocationEntry *entry;
+
+    if (ptr == NULL) {
+        /* There won't be an entry for this */
+        return;
+    }
+
+    entry = find_allocation(ptr);
+    if (entry != NULL) {
+        /* This is the relevant allocation.  Unlink it */
+        if (entry->prev != NULL)
+            entry->prev->next = entry->next;
+        else
+            alloc_head = entry->next;
+        if (entry->next != NULL)
+            entry->next->prev = entry->prev;
+        else
+            alloc_tail = entry->next;
+        free(entry);
+    } else {
+        printf("Attempting to free unallocated memory at %p\n", ptr);
+    }
+    free(ptr);
+}
+
+/* Reallocate some memory and keep track of it */
+void *
+tracking_realloc(void *ptr, size_t size)
+{
+    AllocationEntry *entry;
+
+    if (ptr == NULL) {
+        /* By definition, this is equivalent to malloc(size) */
+        return tracking_malloc(size);
+    }
+    if (size == 0) {
+        /* By definition, this is equivalent to free(ptr) */
+        tracking_free(ptr);
+        return NULL;
+    }
+
+    /* Find the allocation entry for this memory */
+    entry = find_allocation(ptr);
+    if (entry == NULL) {
+        printf("Attempting to realloc unallocated memory at %p\n", ptr);
+        entry = malloc(sizeof(AllocationEntry));
+        if (entry == NULL) {
+            printf("Reallocator failure\n");
+            return NULL;
+        }
+        entry->allocation = realloc(ptr, size);
+        if (entry->allocation == NULL) {
+            free(entry);
+            return NULL;
+        }
+
+        /* Add to the list of allocations */
+        entry->next = NULL;
+        if (alloc_head == NULL) {
+            entry->prev = NULL;
+            alloc_head = alloc_tail = entry;
+        } else {
+            entry->prev = alloc_tail;
+            alloc_tail->next = entry;
+            alloc_tail = entry;
+        }
+    } else {
+        entry->allocation = realloc(ptr, size);
+        if (entry->allocation == NULL) {
+            /* Realloc semantics say the original is still allocated */
+            entry->allocation = ptr;
+            return NULL;
+        }
+    }
+
+    entry->num_bytes = size;
+    return entry->allocation;
+}
+
+int
+tracking_report(void)
+{
+    AllocationEntry *entry;
+
+    if (alloc_head == NULL)
+        return 1;
+
+    /* Otherwise we have allocations that haven't been freed */
+    for (entry = alloc_head; entry != NULL; entry = entry->next)
+    {
+        printf("Allocated %lu bytes at %p\n",
+               entry->num_bytes, entry->allocation);
+    }
+    return 0;
+}

+ 34 - 0
libs/expat/tests/memcheck.h

@@ -0,0 +1,34 @@
+/* Copyright (c) 2017 The Expat Maintainers
+ * Copying is permitted under the MIT license.  See the file COPYING
+ * for details.
+ *
+ * memcheck.h
+ *
+ * Interface to allocation functions that will track what has or has
+ * not been freed.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef XML_MEMCHECK_H
+#define XML_MEMCHECK_H 1
+
+/* Allocation declarations */
+
+void *tracking_malloc(size_t size);
+void tracking_free(void *ptr);
+void *tracking_realloc(void *ptr, size_t size);
+
+/* End-of-test check to see if unfreed allocations remain. Returns
+ * TRUE (1) if there is nothing, otherwise prints a report of the
+ * remaining allocations and returns FALSE (0).
+ */
+int tracking_report(void);
+
+#endif /* XML_MEMCHECK_H */
+
+#ifdef __cplusplus
+}
+#endif

+ 1 - 4
libs/expat/tests/minicheck.c

@@ -63,10 +63,7 @@ tcase_add_test(TCase *tc, tcase_test_function test)
         size_t new_size = sizeof(tcase_test_function) * nalloc;
         tcase_test_function *new_tests = realloc(tc->tests, new_size);
         assert(new_tests != NULL);
-        if (new_tests != tc->tests) {
-            free(tc->tests);
-            tc->tests = new_tests;
-        }
+        tc->tests = new_tests;
         tc->allocated = nalloc;
     }
     tc->tests[tc->ntests] = test;

+ 2 - 1
libs/expat/tests/minicheck.h

@@ -27,7 +27,8 @@ extern "C" {
 #endif
 
 /* ISO C90 does not support '__func__' predefined identifier */
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901)
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901)) || \
+    (defined(__GNUC__) && !defined(__STDC_VERSION__))
 # define __func__ "(unknown)"
 #endif
 

Разлика између датотеке није приказан због своје велике величине
+ 1286 - 118
libs/expat/tests/runtests.c


+ 3 - 2
libs/expat/tests/xmltest.sh

@@ -25,7 +25,7 @@ shopt -s nullglob
 MYDIR="`dirname \"$0\"`"
 cd "$MYDIR"
 MYDIR="`pwd`"
-XMLWF="`dirname \"$MYDIR\"`/xmlwf/xmlwf"
+XMLWF="${1:-`dirname \"$MYDIR\"`/xmlwf/xmlwf}"
 # XMLWF=/usr/local/bin/xmlwf
 TS="$MYDIR"
 # OUTPUT must terminate with the directory separator.
@@ -98,7 +98,8 @@ for xmldir in ibm/valid/P* \
               sun/invalid ; do
   cd "$TS/xmlconf/$xmldir"
   mkdir -p "$OUTPUT$xmldir"
-  for xmlfile in *.xml ; do
+  for xmlfile in $(ls -1 *.xml | sort -d) ; do
+      [[ -f "$xmlfile" ]] || continue
       RunXmlwfWF "$xmlfile" "$xmldir/"
       UpdateStatus $?
   done

+ 0 - 23
libs/expat/vms/README.vms

@@ -1,23 +0,0 @@
-4-jun-2002	Craig A. Berry
-		Added rudimentary build procedures for 
-		OpenVMS based on work by Martin Vorlaender.
-
-
-You'll need MMS or its freeware equivalent MMK.  Just go to the 
-top-level directory and type
-
-$ MMS/DESCRIPTION=[.vms]
- 
-  or
-
-$ MMK/DESCRIPTION=[.vms]
-
-You'll end up with the object library expat.olb.  For now, installation
-consists merely of copying the object library, include files, and
-documentation to a suitable location.  
-
-To-do list:
-
-	-- create a shareable image
-	-- build and run the tests and build the xmlwf utility
-	-- create an install target

+ 0 - 70
libs/expat/vms/descrip.mms

@@ -1,70 +0,0 @@
-# Bare bones description file (Makefile) for OpenVMS
-
-PACKAGE = expat
-VERSION = 1.95.8
-EXPAT_MAJOR_VERSION=1
-EXPAT_MINOR_VERSION=95
-EXPAT_EDIT=8
-
-O = .obj
-OLB = .olb
- 
-LIBRARY = expat$(OLB)
-LIBDIR = [.lib]
-SOURCES = $(LIBDIR)xmlparse.c $(LIBDIR)xmltok.c $(LIBDIR)xmlrole.c
-OBJECTS = xmlparse$(O) xmltok$(O) xmlrole$(O)
- 
-TEMPLATES = xmltok_impl.c xmltok_ns.c
-APIHEADER = $(LIBDIR)expat.h
-HEADERS = $(LIBDIR)ascii.h $(LIBDIR)iasciitab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h \
-	$(LIBDIR)asciitab.h $(LIBDIR)latin1tab.h \
-	$(LIBDIR)nametab.h $(LIBDIR)xmldef.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok_impl.h
- 
-CONFIG_HEADER = expat_config.h
-INCLUDES = /INCLUDE=([],[.lib])
-DEFS = /DEFINE=(PACKAGE="""$(PACKAGE)""",VERSION="""$(PACKAGE)_$(VERSION)""",HAVE_EXPAT_CONFIG_H)
-LIBREVISION = 0
-LIBCURRENT  = 1
-LIBAGE      = 0
-# 
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-# 
-# DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEMPLATES) $(APIHEADER) $(HEADERS) 
-# 
-# TAR = gtar
-# GZIP_ENV = --best
-# 
-.FIRST :
-       IF F$SEARCH("$(LIBRARY)") .EQS. "" THEN $(LIBR) /CREATE /OBJECT $(LIBRARY)
-
-all : $(LIBRARY)
-        @ write sys$output "All made."
- 
-.SUFFIXES : 
-.SUFFIXES : $(OLB) $(O) .C .H  
- 
-.c$(O) :
-       $(COMPILE) $(MMS$SOURCE)
- 
-$(O)$(OLB) :
-        @ IF F$SEARCH("$(MMS$TARGET)") .EQS. "" -
-                THEN LIBRARY/CREATE/LOG $(MMS$TARGET)
-        @ LIBRARY /REPLACE /LOG $(MMS$TARGET) $(MMS$SOURCE)
- 
-clean :
-       DELETE $(LIBRARY);*,*$(O);*
- 
-$(LIBRARY) : $(LIBRARY)( $(OBJECTS) ) 
-       $(LIBR) /COMPRESS $(MMS$TARGET)
-
-$(CONFIG_HEADER) : [.vms]expat_config.h
-        COPY/LOG $(MMS$SOURCE) $(MMS$TARGET)
-
-xmlparse$(O) : $(LIBDIR)xmlparse.c $(LIBDIR)expat.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok.h $(CONFIG_HEADER)
- 
-xmlrole$(O) : $(LIBDIR)xmlrole.c $(LIBDIR)ascii.h $(LIBDIR)xmlrole.h $(CONFIG_HEADER)
- 
-xmltok$(O) : $(LIBDIR)xmltok.c $(LIBDIR)xmltok_impl.c $(LIBDIR)xmltok_ns.c \
-        $(LIBDIR)ascii.h $(LIBDIR)asciitab.h $(LIBDIR)iasciitab.h $(LIBDIR)latin1tab.h \
-	$(LIBDIR)nametab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h $(LIBDIR)xmltok_impl.h $(CONFIG_HEADER)
-

+ 0 - 52
libs/expat/vms/expat_config.h

@@ -1,52 +0,0 @@
-/* Copyright 2000, Clark Cooper
-   All rights reserved.
-
-   This is free software. You are permitted to copy, distribute, or modify
-   it under the terms of the MIT/X license (contained in the COPYING file
-   with this distribution.)
-*/
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define if you have a working `mmap' system call.  */
-#undef HAVE_MMAP
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN
-
-/* Define if you have the bcopy function.  */
-#undef HAVE_BCOPY
-
-/* Define if you have the memmove function.  */
-#define HAVE_MEMMOVE 1
-
-/* Define if you have the <unistd.h> header file.  */
-#define HAVE_UNISTD_H 1
-
-#define XML_NS
-#define XML_DTD
-
-#ifdef WORDS_BIGENDIAN
-#define XML_BYTE_ORDER 21
-#else
-#define XML_BYTE_ORDER 12
-#endif
-
-#define XML_CONTEXT_BYTES 1024
-
-#ifndef HAVE_MEMMOVE
-#ifdef HAVE_BCOPY
-#define memmove(d,s,l) bcopy((s),(d),(l))
-#else
-#define memmove(d,s,l) ;punting on memmove;
-#endif
-
-#endif

+ 0 - 2
libs/expat/win32/MANIFEST.txt

@@ -22,6 +22,4 @@ directory you specified to the installer.
                       formedness checker, and a couple of small sample
                       applications.
 
-  <top>\Source\bcb5\  Project files for Borland C++ Builder 5 and BCC 5.5.
-
 

+ 4 - 17
libs/expat/win32/README.txt

@@ -1,27 +1,14 @@
 
-Expat can be built on Windows in three ways: 
-  using MS Visual C++ (6.0 or .NET), Borland C++ Builder 5 or Cygwin.
+Expat can be built on Windows in two ways:
+  using MS Visual Studio .NET or Cygwin.
 
 * Cygwin:
   This follows the Unix build procedures.
 
-* C++ Builder 5:
-  Possible with make files in the BCB5 subdirectory.
-  Details can be found in the ReadMe file located there.
-
-* MS Visual C++ 6:
-  Based on the workspace file expat.dsw. The related project
-  files (.dsp) are located in the lib subdirectory.
-
-* MS Visual Studio .NET 2002, 2003, 2005, 2008, 2010:
-  The VC++ 6 workspace file (expat.dsw) and project files (.dsp)
-  can be opened and imported in VS.NET without problems.
-  Note: Tests have their own *.dsw files.
-  
-* MS Visual Studio 2013 and 2015:
+* MS Visual Studio 2013, 2015 and 2017:
   A solution file for Visual Studio 2013 is provided: expat.sln.
   The associated project files (*.vcxproj) reside in the appropriate
-  project directories. This solution file can be opened in VS 2015
+  project directories. This solution file can be opened in VS 2015 or VS 2017
   and should be upgraded automatically if VS 2013 is not also installed.
   Note: Tests have their own solution files.
 

+ 7 - 17
libs/expat/win32/expat.iss

@@ -7,17 +7,17 @@
 [Setup]
 AppName=Expat
 AppId=expat
-AppVersion=2.2.0
-AppVerName=Expat 2.2.0
-AppCopyright=Copyright © 1998-2016 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
+AppVersion=2.2.1
+AppVerName=Expat 2.2.1
+AppCopyright=Copyright � 1998-2017 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
 AppPublisher=The Expat Developers
 AppPublisherURL=http://www.libexpat.org/
 AppSupportURL=http://www.libexpat.org/
 AppUpdatesURL=http://www.libexpat.org/
-UninstallDisplayName=Expat XML Parser 2.2.0
-VersionInfoVersion=2.2.0
+UninstallDisplayName=Expat XML Parser 2.2.1
+VersionInfoVersion=2.2.1
 
-DefaultDirName={pf}\Expat 2.2.0
+DefaultDirName={pf}\Expat 2.2.1
 UninstallFilesDir={app}\Uninstall
 
 Compression=lzma
@@ -32,6 +32,7 @@ DisableReadyPage=yes
 [Files]
 Flags: ignoreversion; Source: win32\bin\Release\xmlwf.exe;  DestDir: "{app}\Bin"
 Flags: ignoreversion; Source: win32\MANIFEST.txt;           DestDir: "{app}"
+Flags: ignoreversion; Source: AUTHORS;                      DestDir: "{app}"; DestName: AUTHORS.txt
 Flags: ignoreversion; Source: Changes;                      DestDir: "{app}"; DestName: Changes.txt
 Flags: ignoreversion; Source: COPYING;                      DestDir: "{app}"; DestName: COPYING.txt
 Flags: ignoreversion; Source: README;                       DestDir: "{app}"; DestName: README.txt
@@ -40,40 +41,29 @@ Flags: ignoreversion; Source: doc\*.css;                    DestDir: "{app}\Doc"
 Flags: ignoreversion; Source: doc\*.png;                    DestDir: "{app}\Doc"
 Flags: ignoreversion; Source: win32\bin\Release\*.dll;      DestDir: "{app}\Bin"
 Flags: ignoreversion; Source: win32\bin\Release\*.lib;      DestDir: "{app}\Bin"
-Flags: ignoreversion; Source: expat.dsw;                    DestDir: "{app}\Source"
 Flags: ignoreversion; Source: expat.sln;                    DestDir: "{app}\Source"
 Flags: ignoreversion; Source: win32\README.txt;             DestDir: "{app}\Source"
-Flags: ignoreversion; Source: bcb5\*.bp*;                   DestDir: "{app}\Source\bcb5"
-Flags: ignoreversion; Source: bcb5\*.mak;                   DestDir: "{app}\Source\bcb5"
-Flags: ignoreversion; Source: bcb5\*.def;                   DestDir: "{app}\Source\bcb5"
-Flags: ignoreversion; Source: bcb5\*.txt;                   DestDir: "{app}\Source\bcb5"
-Flags: ignoreversion; Source: bcb5\*.bat;                   DestDir: "{app}\Source\bcb5"
 Flags: ignoreversion; Source: lib\*.c;                      DestDir: "{app}\Source\lib"
 Flags: ignoreversion; Source: lib\*.h;                      DestDir: "{app}\Source\lib"
 Flags: ignoreversion; Source: lib\*.def;                    DestDir: "{app}\Source\lib"
-Flags: ignoreversion; Source: lib\*.dsp;                    DestDir: "{app}\Source\lib"
 Flags: ignoreversion; Source: lib\*.vcxproj;                DestDir: "{app}\Source\lib"
 Flags: ignoreversion; Source: lib\*.vcxproj.filters;        DestDir: "{app}\Source\lib"
 Flags: ignoreversion; Source: examples\*.c;                 DestDir: "{app}\Source\examples"
-Flags: ignoreversion; Source: examples\*.dsp;               DestDir: "{app}\Source\examples"
 Flags: ignoreversion; Source: examples\*.vcxproj;           DestDir: "{app}\Source\examples"
 Flags: ignoreversion; Source: examples\*.vcxproj.filters;   DestDir: "{app}\Source\examples"
 Flags: ignoreversion; Source: tests\*.c;                    DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\*.cpp;                  DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\*.h;                    DestDir: "{app}\Source\tests"
-Flags: ignoreversion; Source: tests\*.ds*;                  DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\*.sln;                  DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\*.vcxproj;              DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\*.vcxproj.filters;      DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\README.txt;             DestDir: "{app}\Source\tests"
 Flags: ignoreversion; Source: tests\benchmark\*.c;          DestDir: "{app}\Source\tests\benchmark"
-Flags: ignoreversion; Source: tests\benchmark\*.ds*;        DestDir: "{app}\Source\tests\benchmark"
 Flags: ignoreversion; Source: tests\benchmark\*.sln;        DestDir: "{app}\Source\tests\benchmark"
 Flags: ignoreversion; Source: tests\benchmark\*.vcxproj;    DestDir: "{app}\Source\tests\benchmark"
 Flags: ignoreversion; Source: tests\benchmark\README.txt;   DestDir: "{app}\Source\tests\benchmark"
 Flags: ignoreversion; Source: xmlwf\*.c*;                   DestDir: "{app}\Source\xmlwf"
 Flags: ignoreversion; Source: xmlwf\*.h;                    DestDir: "{app}\Source\xmlwf"
-Flags: ignoreversion; Source: xmlwf\*.dsp;                  DestDir: "{app}\Source\xmlwf"
 Flags: ignoreversion; Source: xmlwf\*.vcxproj;              DestDir: "{app}\Source\xmlwf"
 Flags: ignoreversion; Source: xmlwf\*.vcxproj.filters;      DestDir: "{app}\Source\xmlwf"
 

+ 3 - 3
libs/expat/xmlwf/codepage.c

@@ -5,7 +5,7 @@
 #include "codepage.h"
 #include "internal.h"  /* for UNUSED_P only */
 
-#if (defined(WIN32) || (defined(__WATCOMC__) && defined(__NT__)))
+#if defined(_WIN32)
 #define STRICT 1
 #define WIN32_LEAN_AND_MEAN 1
 
@@ -52,7 +52,7 @@ codepageConvert(int cp, const char *p)
   return -1;
 }
 
-#else /* not WIN32 */
+#else /* not _WIN32 */
 
 int
 codepageMap(int UNUSED_P(cp), int *UNUSED_P(map))
@@ -66,4 +66,4 @@ codepageConvert(int UNUSED_P(cp), const char *UNUSED_P(p))
   return -1;
 }
 
-#endif /* not WIN32 */
+#endif /* not _WIN32 */

+ 12 - 0
libs/expat/xmlwf/filemap.h

@@ -2,8 +2,20 @@
    See the file COPYING for copying permission.
 */
 
+#include <limits.h>  /* INT_MAX */
 #include <stddef.h>
 
+
+/* The following limit (for XML_Parse's int len) derives from
+ * this loop in xmparse.c:
+ *
+ *    do {
+ *      bufferSize = (int) (2U * (unsigned) bufferSize);
+ *    } while (bufferSize < neededSize && bufferSize > 0);
+ */
+#define XML_MAX_CHUNK_LEN  (INT_MAX / 2 + 1)
+
+
 #ifdef XML_UNICODE
 int filemap(const wchar_t *name,
             void (*processor)(const void *, size_t,

+ 7 - 10
libs/expat/xmlwf/readfilemap.c

@@ -9,16 +9,8 @@
 #include <stdio.h>
 
 /* Functions close(2) and read(2) */
-#ifdef __WATCOMC__
-#ifndef __LINUX__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-#else
-# if !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64)
-#  include <unistd.h>
-# endif
+#if !defined(_WIN32) && !defined(_WIN64)
+# include <unistd.h>
 #endif
 
 #ifndef S_ISREG
@@ -67,6 +59,11 @@ filemap(const char *name,
     close(fd);
     return 0;
   }
+  if (sb.st_size > XML_MAX_CHUNK_LEN) {
+    close(fd);
+    return 2;  /* Cannot be passed to XML_Parse in one go */
+  }
+
   nbytes = sb.st_size;
   /* malloc will return NULL with nbytes == 0, handle files with size 0 */
   if (nbytes == 0) {

+ 4 - 0
libs/expat/xmlwf/unixfilemap.c

@@ -42,6 +42,10 @@ filemap(const char *name,
     fprintf(stderr, "%s: not a regular file\n", name);
     return 0;
   }
+  if (sb.st_size > XML_MAX_CHUNK_LEN) {
+    close(fd);
+    return 2;  /* Cannot be passed to XML_Parse in one go */
+  }
 
   nbytes = sb.st_size;
   /* mmap fails for zero length files */

+ 4 - 3
libs/expat/xmlwf/win32filemap.c

@@ -42,11 +42,12 @@ filemap(const TCHAR *name,
   size = GetFileSize(f, &sizeHi);
   if (size == (DWORD)-1) {
     win32perror(name);
+    CloseHandle(f);
     return 0;
   }
-  if (sizeHi) {
-    _ftprintf(stderr, _T("%s: bigger than 2Gb\n"), name);
-    return 0;
+  if (sizeHi || (size > XML_MAX_CHUNK_LEN)) {
+    CloseHandle(f);
+    return 2;  /* Cannot be passed to XML_Parse in one go */
   }
   /* CreateFileMapping barfs on zero length files */
   if (size == 0) {

+ 32 - 19
libs/expat/xmlwf/xmlfile.c

@@ -8,17 +8,11 @@
 #include <string.h>
 #include <fcntl.h>
 
-#ifdef WIN32
+#ifdef _WIN32
 #include "winconfig.h"
-#elif defined(MACOS_CLASSIC)
-#include "macconfig.h"
-#elif defined(__amigaos__)
-#include "amigaconfig.h"
-#elif defined(__WATCOMC__)
-#include "watcomconfig.h"
 #elif defined(HAVE_EXPAT_CONFIG_H)
 #include <expat_config.h>
-#endif /* ndef WIN32 */
+#endif /* ndef _WIN32 */
 
 #include "expat.h"
 #include "internal.h"  /* for UNUSED_P only */
@@ -26,14 +20,10 @@
 #include "xmltchar.h"
 #include "filemap.h"
 
-#if (defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__LINUX__)))
+#if defined(_MSC_VER)
 #include <io.h>
 #endif
 
-#if defined(__amigaos__) && defined(__USE_INLINE__)
-#include <proto/expat.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -58,6 +48,9 @@ typedef struct {
   int *retPtr;
 } PROCESS_ARGS;
 
+static int
+processStream(const XML_Char *filename, XML_Parser parser);
+
 static void
 reportError(XML_Parser parser, const XML_Char *filename)
 {
@@ -88,7 +81,7 @@ processFile(const void *data, size_t size,
     *retPtr = 1;
 }
 
-#if (defined(WIN32) || defined(__WATCOMC__))
+#if defined(_WIN32)
 
 static int
 isAsciiLetter(XML_Char c)
@@ -96,7 +89,7 @@ isAsciiLetter(XML_Char c)
   return (T('a') <= c && c <= T('z')) || (T('A') <= c && c <= T('Z'));
 }
 
-#endif /* WIN32 */
+#endif /* _WIN32 */
 
 static const XML_Char *
 resolveSystemId(const XML_Char *base, const XML_Char *systemId,
@@ -106,7 +99,7 @@ resolveSystemId(const XML_Char *base, const XML_Char *systemId,
   *toFree = 0;
   if (!base
       || *systemId == T('/')
-#if (defined(WIN32) || defined(__WATCOMC__))
+#if defined(_WIN32)
       || *systemId == T('\\')
       || (isAsciiLetter(systemId[0]) && systemId[1] == T(':'))
 #endif
@@ -120,7 +113,7 @@ resolveSystemId(const XML_Char *base, const XML_Char *systemId,
   s = *toFree;
   if (tcsrchr(s, T('/')))
     s = tcsrchr(s, T('/')) + 1;
-#if (defined(WIN32) || defined(__WATCOMC__))
+#if defined(_WIN32)
   if (tcsrchr(s, T('\\')))
     s = tcsrchr(s, T('\\')) + 1;
 #endif
@@ -139,13 +132,23 @@ externalEntityRefFilemap(XML_Parser parser,
   XML_Char *s;
   const XML_Char *filename;
   XML_Parser entParser = XML_ExternalEntityParserCreate(parser, context, 0);
+  int filemapRes;
   PROCESS_ARGS args;
   args.retPtr = &result;
   args.parser = entParser;
   filename = resolveSystemId(base, systemId, &s);
   XML_SetBase(entParser, filename);
-  if (!filemap(filename, processFile, &args))
+  filemapRes = filemap(filename, processFile, &args);
+  switch (filemapRes) {
+  case 0:
     result = 0;
+    break;
+  case 2:
+    ftprintf(stderr, T("%s: file too large for memory-mapping")
+        T(", switching to streaming\n"), filename);
+    result = processStream(filename, entParser);
+    break;
+  }
   free(s);
   XML_ParserFree(entParser);
   return result;
@@ -233,11 +236,21 @@ XML_ProcessFile(XML_Parser parser,
                                       ? externalEntityRefFilemap
                                       : externalEntityRefStream);
   if (flags & XML_MAP_FILE) {
+    int filemapRes;
     PROCESS_ARGS args;
     args.retPtr = &result;
     args.parser = parser;
-    if (!filemap(filename, processFile, &args))
+    filemapRes = filemap(filename, processFile, &args);
+    switch (filemapRes) {
+    case 0:
       result = 0;
+      break;
+    case 2:
+      ftprintf(stderr, T("%s: file too large for memory-mapping")
+          T(", switching to streaming\n"), filename);
+      result = processStream(filename, parser);
+      break;
+    }
   }
   else
     result = processStream(filename, parser);

+ 2 - 6
libs/expat/xmlwf/xmlwf.c

@@ -17,10 +17,6 @@
 #include <crtdbg.h>
 #endif
 
-#if defined(__amigaos__) && defined(__USE_INLINE__)
-#include <proto/expat.h>
-#endif
-
 /* This ensures proper sorting. */
 
 #define NSSEP T('\001')
@@ -608,7 +604,7 @@ showVersion(XML_Char *prog)
   const XML_Feature *features = XML_GetFeatureList();
   while ((ch = *s) != 0) {
     if (ch == '/'
-#if (defined(WIN32) || defined(__WATCOMC__))
+#if defined(_WIN32)
         || ch == '\\'
 #endif
         )
@@ -785,7 +781,7 @@ tmain(int argc, XML_Char **argv)
         const XML_Char * lastDelim = tcsrchr(file, delim[0]);
         if (lastDelim)
           file = lastDelim + 1;
-#if (defined(WIN32) || defined(__WATCOMC__))
+#if defined(_WIN32)
         else {
           const XML_Char * winDelim = T("\\");
           lastDelim = tcsrchr(file, winDelim[0]);

+ 0 - 139
libs/expat/xmlwf/xmlwf.dsp

@@ -1,139 +0,0 @@
-# Microsoft Developer Studio Project File - Name="xmlwf" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=xmlwf - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "xmlwf.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "xmlwf.mak" CFG="xmlwf - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "xmlwf - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "xmlwf - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "xmlwf - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\win32\bin\Release"
-# PROP Intermediate_Dir "..\win32\tmp\Release-xmlwf"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 libexpat.lib setargv.obj /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\xmlwf.exe"
-# SUBTRACT LINK32 /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "xmlwf - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\win32\bin\Debug"
-# PROP Intermediate_Dir "..\win32\tmp\Debug-xmlwf"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 libexpat.lib setargv.obj /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\xmlwf.exe"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "xmlwf - Win32 Release"
-# Name "xmlwf - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\codepage.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\readfilemap.c
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\unixfilemap.c
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32filemap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\xmlfile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\xmlwf.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\codepage.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\xmlfile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\xmltchar.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

Неке датотеке нису приказане због велике количине промена