Update the version of Expat used to 2.1.0.

Merge with the latest version, mostly discarding our changes to 1.95.6 as they
seem to be unnecessary any longer, keep just bakefile-specific addition to
configure.

Also update our own makefile to define HAVE_EXPAT_CONFIG_H which is now needed
by Unix build.

Closes #11677.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-07 12:45:30 +00:00
parent e7b6bef7c5
commit 11a3e7b6da
128 changed files with 39973 additions and 23896 deletions

View File

@@ -207,7 +207,8 @@ WXTIFF_OBJECTS = \
wxtiff_tif_warning.o \ wxtiff_tif_warning.o \
wxtiff_tif_write.o \ wxtiff_tif_write.o \
wxtiff_tif_zip.o wxtiff_tif_zip.o
WXEXPAT_CFLAGS = -DNDEBUG -I./src/expat $(____SHARED) $(CPPFLAGS) $(CFLAGS) WXEXPAT_CFLAGS = -DNDEBUG -I./src/expat -DHAVE_EXPAT_CONFIG_H $(____SHARED) \
$(CPPFLAGS) $(CFLAGS)
WXEXPAT_OBJECTS = \ WXEXPAT_OBJECTS = \
wxexpat_xmlparse.o \ wxexpat_xmlparse.o \
wxexpat_xmlrole.o \ wxexpat_xmlrole.o \

View File

@@ -28,6 +28,9 @@
<dirname>$(LIBDIRNAME)</dirname> <dirname>$(LIBDIRNAME)</dirname>
<include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include> <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include>
<include cond="FORMAT=='autoconf'">$(BUILDDIR)/src/expat</include> <include cond="FORMAT=='autoconf'">$(BUILDDIR)/src/expat</include>
<define cond="FORMAT=='autoconf'">
HAVE_EXPAT_CONFIG_H
</define>
<define cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'"> <define cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'">
COMPILED_FROM_DSP COMPILED_FROM_DSP
</define> </define>

6
src/expat/.cvsignore Normal file
View File

@@ -0,0 +1,6 @@
Makefile
runtests
runtestspp
xmlts.zip
XML-Test-Suite
.libs

42
src/expat/CMake.README Executable file
View File

@@ -0,0 +1,42 @@
== How to build expat with cmake (experimental) ==
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.1.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.1.0$ mkdir build && cd build
~/expat-2.1.0/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.1.0/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.1.0/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.1.0/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
....
-- Installing: /usr/local/lib/pkgconfig/expat.pc
-- Installing: /usr/local/bin/xmlwf
-- Installing: /usr/local/share/man/man1/xmlwf.1
For Windows builds, you must make sure to call cmake from an environment where
your compiler is reachable, that means either you call it from the
Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
make sure that gcc can be called. On Windows, you also might want to specify a
special Generator for CMake:
for Visual Studio builds do:
cmake .. -G "Visual Studio 10" && vcexpress expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
&& gmake && gmake install

111
src/expat/CMakeLists.txt Executable file
View File

@@ -0,0 +1,111 @@
# This file is copyrighted under the BSD-license for buildsystem files of KDE
# copyright 2010, Patrick Spendrin <ps_ml@gmx.de>
project(expat)
cmake_minimum_required(VERSION 2.6)
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
set(PACKAGE_NAME "expat")
set(PACKAGE_VERSION "2.1.0")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
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)
# configuration options
set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
option(XML_DTD "Define to make parameter entity parsing functionality available" ON)
option(XML_NS "Define to make XML Namespaces functionality available" ON)
if(XML_DTD)
set(XML_DTD 1)
else(XML_DTD)
set(XML_DTD 0)
endif(XML_DTD)
if(XML_NS)
set(XML_NS 1)
else(XML_NS)
set(XML_NS 0)
endif(XML_NS)
if(BUILD_tests)
enable_testing()
endif(BUILD_tests)
include(ConfigureChecks.cmake)
include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
endif(MSVC)
set(expat_SRCS
lib/xmlparse.c
lib/xmlrole.c
lib/xmltok.c
lib/xmltok_impl.c
lib/xmltok_ns.c
)
if(WIN32 AND BUILD_shared)
set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
endif(WIN32 AND BUILD_shared)
if(BUILD_shared)
set(_SHARED SHARED)
else(BUILD_shared)
set(_SHARED STATIC)
endif(BUILD_shared)
add_library(expat ${_SHARED} ${expat_SRCS})
install(TARGETS expat RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}/bin")
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)
if(BUILD_tools AND NOT WINCE)
set(xmlwf_SRCS
xmlwf/xmlwf.c
xmlwf/xmlfile.c
xmlwf/codepage.c
xmlwf/readfilemap.c
)
add_executable(xmlwf ${xmlwf_SRCS})
target_link_libraries(xmlwf expat)
install(TARGETS xmlwf DESTINATION bin)
install(FILES doc/xmlwf.1 DESTINATION share/man/man1)
endif(BUILD_tools AND NOT WINCE)
if(BUILD_examples)
add_executable(elements examples/elements.c)
target_link_libraries(elements expat)
add_executable(outline examples/outline.c)
target_link_libraries(outline expat)
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)
target_link_libraries(runtests expat)
add_test(runtests runtests)
add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c)
target_link_libraries(runtestspp expat)
add_test(runtestspp runtestspp)
endif(BUILD_tests)

View File

@@ -1,6 +1,6 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper and Clark Cooper
Copyright (c) 2001, 2002 Expat maintainers. Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the

View File

@@ -1,10 +1,108 @@
Release 2.1.0 Sat March 24 2012
- 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.
#3312568: CMake support.
#3446384: Report byte offsets for attr names and values.
- New Features / API changes:
Added new API member XML_SetHashSalt() that allows setting an intial
value (salt) for hash calculations. This is part of the fix for
bug #3496608 to randomize hash parameters.
When compiled with XML_ATTR_INFO defined, adds new API member
XML_GetAttributeInfo() that allows retrieving the byte
offsets for attribute names and values (patch #3446384).
Added CMake build system.
See bug #2990652 and patch #3312568.
Added run-benchmark target to Makefile.in - relies on testdata module
present in the same relative location as in the repository.
Release 2.0.1 Tue June 5 2007
- Fixed bugs #1515266, #1515600: The character data handler's calling
of XML_StopParser() was not handled properly; if the parser was
stopped and the handler set to NULL, the parser would segfault.
- Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
some character constants to be ASCII encoded.
- Minor cleanups of the test harness.
- Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
- Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
- Fixes and improvements for Windows platform:
bugs #1409451, #1476160, #1548182, #1602769, #1717322.
- Build fixes for various platforms:
HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
All Unix: #1554618 (refreshed config.sub/config.guess).
#1490371, #1613457: support both, DESTDIR and INSTALL_ROOT,
without relying on GNU-Make specific features.
#1647805: Patched configure.in to work better with Intel compiler.
- Fixes to Makefile.in to have make check work correctly:
bugs #1408143, #1535603, #1536684.
- Added Open Watcom support: patch #1523242.
Release 2.0.0 Wed Jan 11 2006
- We no longer use the "check" library for C unit testing; we
always use the (partial) internal implementation of the API.
- Report XML_NS setting via XML_GetFeatureList().
- Fixed headers for use from C++.
- XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber()
now return unsigned integers.
- Added XML_LARGE_SIZE switch to enable 64-bit integers for
byte indexes and line/column numbers.
- Updated to use libtool 1.5.22 (the most recent).
- Added support for AmigaOS.
- Some mostly minor bug fixes. SF issues include: #1006708,
#1021776, #1023646, #1114960, #1156398, #1221160, #1271642.
Release 1.95.8 Fri Jul 23 2004
- Major new feature: suspend/resume. Handlers can now request
that a parse be suspended for later resumption or aborted
altogether. See "Temporarily Stopping Parsing" in the
documentation for more details.
- Some mostly minor bug fixes, but compilation should no
longer generate warnings on most platforms. SF issues
include: #827319, #840173, #846309, #888329, #896188, #923913,
#928113, #961698, #985192.
Release 1.95.7 Mon Oct 20 2003
- Fixed enum XML_Status issue (reported on SourceForge many
times), so compilers that are properly picky will be happy.
- Introduced an XMLCALL macro to control the calling
convention used by the Expat API; this macro should be used
to annotate prototypes and definitions of callback
implementations in code compiled with a calling convention
other than the default convention for the host platform.
- Improved ability to build without the configure-generated
expat_config.h header. This is useful for applications
which embed Expat rather than linking in the library.
- Fixed a variety of bugs: see SF issues #458907, #609603,
#676844, #679754, #692878, #692964, #695401, #699323, #699487,
#820946.
- Improved hash table lookups.
- Added more regression tests and improved documentation.
Release 1.95.6 Tue Jan 28 2003 Release 1.95.6 Tue Jan 28 2003
- Added XML_FreeContentModel(). - Added XML_FreeContentModel().
- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
- Fixed a variety of bugs: see SF issues 615606, 616863, - Fixed a variety of bugs: see SF issues #615606, #616863,
618199, 653180, 673791. #618199, #653180, #673791.
- Enhanced the regression test suite. - Enhanced the regression test suite.
- Man page improvements: includes SF issue 632146. - Man page improvements: includes SF issue #632146.
Release 1.95.5 Fri Sep 6 2002 Release 1.95.5 Fri Sep 6 2002
- Added XML_UseForeignDTD() for improved SAX2 support. - Added XML_UseForeignDTD() for improved SAX2 support.
@@ -22,9 +120,9 @@ Release 1.95.5 Fri Sep 6 2002
- Reduced line-length for all source code and headers to be - Reduced line-length for all source code and headers to be
no longer than 80 characters, to help with AS/400 support. no longer than 80 characters, to help with AS/400 support.
- Reduced memory copying during parsing (SF patch #600964). - Reduced memory copying during parsing (SF patch #600964).
- Fixed a variety of bugs: see SF issues 580793, 434664, - Fixed a variety of bugs: see SF issues #580793, #434664,
483514, 580503, 581069, 584041, 584183, 584832, 585537, #483514, #580503, #581069, #584041, #584183, #584832, #585537,
596555, 596678, 598352, 598944, 599715, 600479, 600971. #596555, #596678, #598352, #598944, #599715, #600479, #600971.
Release 1.95.4 Fri Jul 12 2002 Release 1.95.4 Fri Jul 12 2002
- Added support for VMS, contributed by Craig Berry. See - Added support for VMS, contributed by Craig Berry. See
@@ -33,14 +131,14 @@ Release 1.95.4 Fri Jul 12 2002
contributed by Thomas Wegner and Daryle Walker. contributed by Thomas Wegner and Daryle Walker.
- Added Borland C++ Builder 5 / BCC 5.5 support, contributed - Added Borland C++ Builder 5 / BCC 5.5 support, contributed
by Patrick McConnell (SF patch #538032). by Patrick McConnell (SF patch #538032).
- Fixed a variety of bugs: see SF issues 441449, 563184, - Fixed a variety of bugs: see SF issues #441449, #563184,
564342, 566334, 566901, 569461, 570263, 575168, 579196. #564342, #566334, #566901, #569461, #570263, #575168, #579196.
- Made skippedEntityHandler conform to SAX2 (see source comment) - Made skippedEntityHandler conform to SAX2 (see source comment)
- Re-implemented WFC: Entity Declared from XML 1.0 spec and - Re-implemented WFC: Entity Declared from XML 1.0 spec and
added a new error "entity declared in parameter entity": added a new error "entity declared in parameter entity":
see SF bug report 569461 and SF patch 578161 see SF bug report #569461 and SF patch #578161
- Re-implemented section 5.1 from XML 1.0 spec: - Re-implemented section 5.1 from XML 1.0 spec:
see SF bug report 570263 and SF patch 578161 see SF bug report #570263 and SF patch #578161
Release 1.95.3 Mon Jun 3 2002 Release 1.95.3 Mon Jun 3 2002
- Added a project to the MSVC workspace to create a wchar_t - Added a project to the MSVC workspace to create a wchar_t
@@ -52,9 +150,9 @@ Release 1.95.3 Mon Jun 3 2002
- Made the XML_UNICODE builds usable (thanks, Karl!). - Made the XML_UNICODE builds usable (thanks, Karl!).
- Allow xmlwf to read from standard input. - Allow xmlwf to read from standard input.
- Install a man page for xmlwf on Unix systems. - Install a man page for xmlwf on Unix systems.
- Fixed many bugs; see SF bug reports 231864, 461380, 464837, - Fixed many bugs; see SF bug reports #231864, #461380, #464837,
466885, 469226, 477667, 484419, 487840, 494749, 496505, #466885, #469226, #477667, #484419, #487840, #494749, #496505,
547350. Other bugs which we can't test as easily may also #547350. Other bugs which we can't test as easily may also
have been fixed, especially in the area of build support. have been fixed, especially in the area of build support.
Release 1.95.2 Fri Jul 27 2001 Release 1.95.2 Fri Jul 27 2001

44
src/expat/ConfigureChecks.cmake Executable file
View File

@@ -0,0 +1,44 @@
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(TestBigEndian)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("memory.h" HAVE_MEMORY_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_function_exists("getpagesize" HAVE_GETPAGESIZE)
check_function_exists("bcopy" HAVE_BCOPY)
check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)
check_function_exists("mmap" HAVE_MMAP)
#/* Define to 1 if you have the ANSI C header files. */
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
test_big_endian(WORDS_BIGENDIAN)
#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
if(WORDS_BIGENDIAN)
set(BYTEORDER 4321)
else(WORDS_BIGENDIAN)
set(BYTEORDER 1234)
endif(WORDS_BIGENDIAN)
if(HAVE_SYS_TYPES_H)
check_symbol_exists("off_t" "sys/types.h" OFF_T)
check_symbol_exists("size_t" "sys/types.h" SIZE_T)
else(HAVE_SYS_TYPES_H)
set(OFF_T "long")
set(SIZE_T "unsigned")
endif(HAVE_SYS_TYPES_H)
configure_file(expat_config.h.cmake expat_config.h)
add_definitions(-DHAVE_EXPAT_CONFIG_H)

View File

@@ -1,12 +1,19 @@
Changes amiga/launch.c
COPYING amiga/expat_68k.c
MANIFEST amiga/expat_68k.h
Makefile.in amiga/expat_68k_handler_stubs.c
README amiga/expat_base.h
configure amiga/expat_vectors.c
configure.in amiga/expat_lib.c
expat_config.h.in 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/README.txt
bcb5/all_projects.bpg
bcb5/elements.bpf bcb5/elements.bpf
bcb5/elements.bpr bcb5/elements.bpr
bcb5/elements.mak bcb5/elements.mak
@@ -32,30 +39,64 @@ bcb5/setup.bat
bcb5/xmlwf.bpf bcb5/xmlwf.bpf
bcb5/xmlwf.bpr bcb5/xmlwf.bpr
bcb5/xmlwf.mak bcb5/xmlwf.mak
conftools/PrintPath doc/expat.png
conftools/ac_c_bigendian_cross.m4
conftools/config.guess
conftools/config.sub
conftools/expat.m4
conftools/install-sh
conftools/libtool.m4
conftools/ltmain.sh
conftools/mkinstalldirs
doc/reference.html doc/reference.html
doc/style.css doc/style.css
doc/valid-xhtml10.png doc/valid-xhtml10.png
doc/xmlwf.1 doc/xmlwf.1
doc/xmlwf.sgml doc/xmlwf.sgml
CMakeLists.txt
CMake.README
COPYING
Changes
ConfigureChecks.cmake
MANIFEST
Makefile.in
README
configure
configure.in
expat_config.h.in
expat_config.h.cmake
expat.pc.in
expat.dsw
aclocal.m4
conftools/PrintPath
conftools/ac_c_bigendian_cross.m4
conftools/expat.m4
conftools/get-version.sh
conftools/mkinstalldirs
conftools/config.guess
conftools/config.sub
conftools/install-sh
conftools/ltmain.sh
m4/libtool.m4
m4/ltversion.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/lt~obsolete.m4
examples/elements.c examples/elements.c
examples/elements.dsp
examples/outline.c examples/outline.c
examples/outline.dsp
lib/Makefile.MPW
lib/amigaconfig.h
lib/ascii.h lib/ascii.h
lib/asciitab.h lib/asciitab.h
lib/expat.dsp
lib/expat.h lib/expat.h
lib/expat_external.h
lib/expat_static.dsp
lib/expatw.dsp
lib/expatw_static.dsp
lib/iasciitab.h lib/iasciitab.h
lib/internal.h lib/internal.h
lib/latin1tab.h lib/latin1tab.h
lib/libexpat.def
lib/libexpatw.def
lib/macconfig.h
lib/nametab.h lib/nametab.h
lib/utf8tab.h lib/utf8tab.h
lib/winconfig.h
lib/xmlparse.c lib/xmlparse.c
lib/xmlrole.c lib/xmlrole.c
lib/xmlrole.h lib/xmlrole.h
@@ -64,17 +105,24 @@ lib/xmltok.h
lib/xmltok_impl.c lib/xmltok_impl.c
lib/xmltok_impl.h lib/xmltok_impl.h
lib/xmltok_ns.c lib/xmltok_ns.c
lib/winconfig.h tests/benchmark/README.txt
tests/benchmark/benchmark.c
tests/benchmark/benchmark.dsp
tests/benchmark/benchmark.dsw
tests/README.txt tests/README.txt
tests/chardata.c tests/chardata.c
tests/chardata.h tests/chardata.h
tests/minicheck.c
tests/minicheck.h
tests/runtests.c tests/runtests.c
tests/runtestspp.cpp
tests/xmltest.sh tests/xmltest.sh
vms/README.vms
vms/descrip.mms vms/descrip.mms
vms/expat_config.h vms/expat_config.h
vms/README.vms
win32/expat.iss
win32/MANIFEST.txt win32/MANIFEST.txt
win32/README.txt
win32/expat.iss
xmlwf/codepage.c xmlwf/codepage.c
xmlwf/codepage.h xmlwf/codepage.h
xmlwf/ct.c xmlwf/ct.c
@@ -89,4 +137,5 @@ xmlwf/xmlmime.h
xmlwf/xmltchar.h xmlwf/xmltchar.h
xmlwf/xmlurl.h xmlwf/xmlurl.h
xmlwf/xmlwf.c xmlwf/xmlwf.c
xmlwf/xmlwf.dsp
xmlwf/xmlwin32url.cxx xmlwf/xmlwin32url.cxx

View File

@@ -30,7 +30,8 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
libdir = @libdir@ libdir = @libdir@
includedir = @includedir@ includedir = @includedir@
mandir = ${prefix}/man/man1 man1dir = @mandir@/man1
pkgconfigdir = $(libdir)/pkgconfig
top_builddir = . top_builddir = .
@@ -41,21 +42,23 @@ INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
MANFILE = $(srcdir)/doc/xmlwf.1 MANFILE = $(srcdir)/doc/xmlwf.1
APIHEADER = $(srcdir)/lib/expat.h APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
LIBRARY = libexpat.la LIBRARY = libexpat.la
DESTDIR = $(INSTALL_ROOT)
default: buildlib xmlwf/xmlwf default: buildlib xmlwf/xmlwf@EXEEXT@
buildlib: $(LIBRARY) buildlib: $(LIBRARY) expat.pc
all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
clean: clean:
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd tests && rm -rf .libs runtests runtests.o chardata.o cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
rm -rf .libs libexpat.la rm -rf .libs libexpat.la
rm -f examples/core tests/core xmlwf/core rm -f examples/core tests/core xmlwf/core
@@ -63,32 +66,37 @@ clobber: clean
distclean: clean distclean: clean
rm -f expat_config.h config.status config.log config.cache libtool rm -f expat_config.h config.status config.log config.cache libtool
rm -f Makefile rm -f Makefile expat.pc
extraclean: distclean extraclean: distclean
rm -f expat_config.h.in configure rm -f expat_config.h.in configure
rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4 rm -f aclocal.m4 m4/*
rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
check: tests/runtests check: tests/runtests tests/runtestspp
tests/runtests tests/runtests
tests/runtestspp
install: xmlwf/xmlwf installlib install: xmlwf/xmlwf@EXEEXT@ installlib
$(mkinstalldirs) $(bindir) $(mandir) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
$(INSTALL_DATA) $(MANFILE) $(mandir) $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
installlib: $(LIBRARY) $(APIHEADER) installlib: $(LIBRARY) $(APIHEADER) expat.pc
$(mkinstalldirs) $(libdir) $(includedir) $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY) $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
$(INSTALL_DATA) $(APIHEADER) $(includedir) for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
uninstall: uninstalllib uninstall: uninstalllib
$(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
rm -f $(mandir)/xmlwf.1 rm -f $(DESTDIR)$(man1dir)/xmlwf.1
uninstalllib: uninstalllib:
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY) $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
rm -f $(includedir)/$(APIHEADER) rm -f $(DESTDIR)$(includedir)/expat.h
rm -f $(DESTDIR)$(includedir)/expat_external.h
rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
# for VPATH builds (invoked by configure) # for VPATH builds (invoked by configure)
mkdir-init: mkdir-init:
@@ -97,72 +105,92 @@ mkdir-init:
done done
CC = @CC@ CC = @CC@
CXX = @CXX@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
INCLUDES = -I$(srcdir)/lib -I. INCLUDES = -I$(srcdir)/lib -I.
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
### autoconf this? ### autoconf this?
LTFLAGS = --silent LTFLAGS = --silent
COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) 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) -o $@
LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
$(LIBRARY): $(LIB_OBJS) $(LIBRARY): $(LIB_OBJS)
$(LINK_LIB) $(LIB_OBJS) $(LINK_LIB) $(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/xmlrole.h lib/xmltok.h \
$(top_builddir)/expat_config.h lib/internal.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 \ lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
$(top_builddir)/expat_config.h lib/internal.h $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \ lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \ lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \ lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
$(top_builddir)/expat_config.h $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
xmlwf/xmlwf.o: xmlwf/xmlwf.c xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
xmlwf/xmlfile.o: xmlwf/xmlfile.c xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
xmlwf/codepage.o: xmlwf/codepage.c xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c
xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY) xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY) $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
examples/elements.o: examples/elements.c examples/elements.@OBJEXT@: examples/elements.c
examples/elements: examples/elements.o $(LIBRARY) examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) $< $(LIBRARY) $(LINK_EXE) $< $(LIBRARY)
examples/outline.o: examples/outline.c examples/outline.@OBJEXT@: examples/outline.c
examples/outline: examples/outline.o $(LIBRARY) examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) $< $(LIBRARY) $(LINK_EXE) $< $(LIBRARY)
tests/chardata.o: tests/chardata.c tests/chardata.h tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
tests/runtests.o: tests/runtests.c tests/chardata.h tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
tests/runtests: tests/runtests.o tests/chardata.o $(LIBRARY) tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
$(LINK_EXE) $^ -lcheck 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/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
run-benchmark: tests/benchmark/benchmark
tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
tests/xmlts.zip: tests/xmlts.zip:
wget --output-document=tests/xmlts.zip \ wget --output-document=tests/xmlts.zip \
http://www.w3.org/XML/Test/xmlts20020606.zip http://www.w3.org/XML/Test/xmlts20080827.zip
tests/XML-Test-Suite: tests/xmlts.zip tests/XML-Test-Suite: tests/xmlts.zip
cd tests && unzip -q xmlts.zip cd tests && unzip -q xmlts.zip
run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
tests/xmltest.sh tests/xmltest.sh
.SUFFIXES: .c .lo .o .SUFFIXES: .c .cpp .lo .@OBJEXT@
.c.o: .cpp.@OBJEXT@:
$(CXXCOMPILE) -o $@ -c $<
.c.@OBJEXT@:
$(COMPILE) -o $@ -c $< $(COMPILE) -o $@ -c $<
.c.lo: .c.lo:
$(LTCOMPILE) -o $@ -c $< $(LTCOMPILE) -o $@ -c $<

View File

@@ -1,5 +1,5 @@
Expat, Release 1.95.6 Expat, Release 2.1.0
This is Expat, a C library for parsing XML, written by James Clark. 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 Expat is a stream-oriented XML parser. This means that you register
@@ -9,7 +9,7 @@ document being parsed. A start tag is an example of the kind of
structures for which you may register handlers. structures for which you may register handlers.
Windows users should use the expat_win32bin package, which includes Windows users should use the expat_win32bin package, which includes
both precompiled libraries and executalbes, and source code for both precompiled libraries and executables, and source code for
developers. developers.
Expat is free software. You may copy, distribute, and modify it under Expat is free software. You may copy, distribute, and modify it under
@@ -25,8 +25,7 @@ intended to be production grade software.
If you are building Expat from a check-out from the CVS repository, If you are building Expat from a check-out from the CVS repository,
you need to run a script that generates the configure script using the you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.52 or newer and libtool 1.4 or newer. Run the script like autoconf 2.58 or newer. Run the script like this:
this:
./buildconf.sh ./buildconf.sh
@@ -49,14 +48,24 @@ into /home/me/mystuff/lib, /home/me/mystuff/include, and
./configure --prefix=/home/me/mystuff ./configure --prefix=/home/me/mystuff
Another interesting option is to enable 64-bit integer support for
line and column numbers and the over-all byte index:
./configure CPPFLAGS=-DXML_LARGE_SIZE
However, such a modification would be a breaking change to the ABI
and is therefore not recommended for general use - e.g. as part of
a Linux distribution - but rather for builds with special requirements.
After running the configure script, the "make" command will build After running the configure script, the "make" command will build
things and "make install" will install things into their proper things and "make install" will install things into their proper
location. Note that you need to have write permission into the location. Have a look at the "Makefile" to learn about additional
directories into which things will be installed. "make" options. Note that you need to have write permission into
the directories into which things will be installed.
If you are interested in building Expat to provide document If you are interested in building Expat to provide document
information in UTF-16 rather than the default UTF-8, following these information in UTF-16 encoding rather than the default UTF-8, follow
instructions: these instructions (after having run "make distclean"):
1. For UTF-16 output as unsigned short (and version/error 1. For UTF-16 output as unsigned short (and version/error
strings as char), run: strings as char), run:
@@ -80,8 +89,26 @@ instructions:
(Note the additional "w" in the library name.) (Note the additional "w" in the library name.)
3. Run "make buildlib" (which builds the library only). 3. Run "make buildlib" (which builds the library only).
Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".
4. Run "make installlib" (which installs the library only). 4. Run "make installlib" (which installs the library only).
Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default
value for DESTDIR, and the rest of the make file using only DESTDIR.
It works as follows:
$ make install DESTDIR=/path/to/image
overrides the in-makefile set DESTDIR, while both
$ INSTALL_ROOT=/path/to/image make install
$ make install INSTALL_ROOT=/path/to/image
use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment, because variable-setting priority is
1) commandline
2) in-makefile
3) environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
Note for Solaris users: The "ar" command is usually located in Note for Solaris users: The "ar" command is usually located in
"/usr/ccs/bin", which is not in the default PATH. You will need to "/usr/ccs/bin", which is not in the default PATH. You will need to
@@ -109,4 +136,4 @@ Discussion related to the direction of future expat development takes
place on expat-discuss@mail.libexpat.org. Archives of this list and place on expat-discuss@mail.libexpat.org. Archives of this list and
other Expat-related lists may be found at: other Expat-related lists may be found at:
http://mail.libexpat.org/mailman-21/listinfo/ http://mail.libexpat.org/mailman/listinfo/

9915
src/expat/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

336
src/expat/amiga/Makefile Normal file
View File

@@ -0,0 +1,336 @@
#
# 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,-Map=$@.map
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 $@

View File

@@ -0,0 +1,98 @@
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)

264
src/expat/amiga/expat.xml Normal file
View File

@@ -0,0 +1,264 @@
<?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>

939
src/expat/amiga/expat_68k.c Normal file
View File

@@ -0,0 +1,939 @@
/*
** 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
};

94
src/expat/amiga/expat_68k.h Executable file
View File

@@ -0,0 +1,94 @@
/*
** 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

View File

@@ -0,0 +1,185 @@
/*
** 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);
}

View File

@@ -0,0 +1,40 @@
/*
** 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

247
src/expat/amiga/expat_lib.c Executable file
View File

@@ -0,0 +1,247 @@
/*
** 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);
}
}

View File

@@ -0,0 +1,505 @@
/*
** 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);
}

View File

@@ -0,0 +1,94 @@
#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 */

View File

@@ -0,0 +1,98 @@
#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 */

View File

@@ -0,0 +1,566 @@
#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 */

View File

@@ -0,0 +1,52 @@
#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 */

57
src/expat/amiga/launch.c Executable file
View File

@@ -0,0 +1,57 @@
/*
** 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;
}

View File

@@ -63,7 +63,8 @@ application. Fortunately, it is not hard to do by hand.
Threading Threading
The libexpat libraries are all built with the multi-threaded dynamic RTL's. The libexpat libraries are all built to link with the multi-threaded dynamic RTL's.
That means they require CC32xxMT.DLL present on the installation target.
To create single-threaded libs, do the following: To create single-threaded libs, do the following:
1. The compiler option for multi-threading must be turned off. Following the 1. The compiler option for multi-threading must be turned off. Following the

View File

@@ -0,0 +1,49 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = setup libexpat_mtd.dll libexpats_mtd.lib libexpatw_mtd.dll \
libexpatws_mtd.lib elements.exe outline.exe xmlwf.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
libexpat_mtd.dll: expat.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libexpats_mtd.lib: expat_static.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libexpatw_mtd.dll: expatw.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libexpatws_mtd.lib: expatw_static.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
elements.exe: elements.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
outline.exe: outline.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
xmlwf.exe: xmlwf.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
setup: setup.bat
call $**

View File

@@ -36,7 +36,7 @@ PATHPAS = .;
PATHRC = .; PATHRC = .;
DEBUGLIBPATH = $(BCB)\lib\debug DEBUGLIBPATH = $(BCB)\lib\debug
RELEASELIBPATH = $(BCB)\lib\release RELEASELIBPATH = $(BCB)\lib\release
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
INCLUDEPATH = ..\lib;$(BCB)\include INCLUDEPATH = ..\lib;$(BCB)\include
LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)

View File

@@ -36,7 +36,7 @@ PATHPAS = .;
PATHRC = .; PATHRC = .;
DEBUGLIBPATH = $(BCB)\lib\debug DEBUGLIBPATH = $(BCB)\lib\debug
RELEASELIBPATH = $(BCB)\lib\release RELEASELIBPATH = $(BCB)\lib\release
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
INCLUDEPATH = ..\lib;$(BCB)\include INCLUDEPATH = ..\lib;$(BCB)\include
LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)

View File

@@ -67,6 +67,10 @@ EXPORTS
_XML_MemMalloc @60 _XML_MemMalloc @60
_XML_MemRealloc @61 _XML_MemRealloc @61
_XML_MemFree @62 _XML_MemFree @62
; added with version 1.95.8
_XML_StopParser @63
_XML_ResumeParser @64
_XML_GetParsingStatus @65
; Aliases for MS compatible names ; Aliases for MS compatible names
XML_DefaultCurrent = _XML_DefaultCurrent XML_DefaultCurrent = _XML_DefaultCurrent
@@ -131,3 +135,7 @@ EXPORTS
XML_MemMalloc = _XML_MemMalloc XML_MemMalloc = _XML_MemMalloc
XML_MemRealloc = _XML_MemRealloc XML_MemRealloc = _XML_MemRealloc
XML_MemFree = _XML_MemFree XML_MemFree = _XML_MemFree
XML_StopParser = _XML_StopParser
XML_ResumeParser = _XML_ResumeParser
XML_GetParsingStatus = _XML_GetParsingStatus

View File

@@ -67,6 +67,10 @@ EXPORTS
_XML_MemMalloc @60 _XML_MemMalloc @60
_XML_MemRealloc @61 _XML_MemRealloc @61
_XML_MemFree @62 _XML_MemFree @62
; added with version 1.95.8
_XML_StopParser @63
_XML_ResumeParser @64
_XML_GetParsingStatus @65
; Aliases for MS compatible names ; Aliases for MS compatible names
XML_DefaultCurrent = _XML_DefaultCurrent XML_DefaultCurrent = _XML_DefaultCurrent
@@ -131,3 +135,6 @@ EXPORTS
XML_MemMalloc = _XML_MemMalloc XML_MemMalloc = _XML_MemMalloc
XML_MemRealloc = _XML_MemRealloc XML_MemRealloc = _XML_MemRealloc
XML_MemFree = _XML_MemFree XML_MemFree = _XML_MemFree
XML_StopParser = _XML_StopParser
XML_ResumeParser = _XML_ResumeParser
XML_GetParsingStatus = _XML_GetParsingStatus

26
src/expat/buildconf.sh Executable file
View File

@@ -0,0 +1,26 @@
#! /bin/sh
#--------------------------------------------------------------------------
# autoconf 2.58 or newer
#
ac_version="`${AUTOCONF:-autoconf} --version 2> /dev/null | head -1 | sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`"
if test -z "$ac_version"; then
echo "ERROR: autoconf not found."
echo " You need autoconf version 2.58 or newer installed."
exit 1
fi
IFS=.; set $ac_version; IFS=' '
if test "$1" = "2" -a "$2" -lt "58" || test "$1" -lt "2"; then
echo "ERROR: autoconf version $ac_version found."
echo " You need autoconf version 2.58 or newer installed."
exit 1
fi
echo "Creating configure ..."
${AUTOCONF:-autoreconf} -fvi
# toss this; it gets created by autoconf on some systems
rm -rf autom4te*.cache
# exit with the right value, so any calling script can continue
exit 0

21363
src/expat/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -10,8 +10,8 @@ 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 in the file COPYING that comes with this distribution.
dnl dnl
dnl Ensure that Expat is configured with autoconf 2.52 or newer dnl Ensure that Expat is configured with autoconf 2.58 or newer
AC_PREREQ(2.52) AC_PREREQ(2.58)
dnl Get the version number of Expat, using m4's esyscmd() command to run 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 the command at m4-generation time. This allows us to create an m4
@@ -25,12 +25,13 @@ 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. dnl GNU M4 to test it right now.
define([expat_version], ifdef([__gnu__], define([expat_version], ifdef([__gnu__],
[esyscmd(conftools/get-version.sh lib/expat.h)], [esyscmd(conftools/get-version.sh lib/expat.h)],
[1.95.x])) [2.1.x]))
AC_INIT(expat, expat_version, expat-bugs@mail.libexpat.org) AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
undefine([expat_version]) undefine([expat_version])
AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(conftools) AC_CONFIG_AUX_DIR(conftools)
AC_CONFIG_MACRO_DIR([m4])
dnl dnl
@@ -44,13 +45,12 @@ dnl
dnl If the API changes incompatibly set LIBAGE back to 0 dnl If the API changes incompatibly set LIBAGE back to 0
dnl dnl
LIBCURRENT=4 LIBCURRENT=7
LIBREVISION=0 LIBREVISION=0
LIBAGE=4 LIBAGE=6
AC_CONFIG_HEADER(expat_config.h) AC_CONFIG_HEADER(expat_config.h)
sinclude(conftools/libtool.m4)
sinclude(conftools/ac_c_bigendian_cross.m4) sinclude(conftools/ac_c_bigendian_cross.m4)
@@ -65,6 +65,7 @@ AC_SUBST(LIBREVISION)
AC_SUBST(LIBAGE) AC_SUBST(LIBAGE)
dnl Checks for programs. dnl Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL AC_PROG_INSTALL
if test "$GCC" = yes ; then if test "$GCC" = yes ; then
@@ -75,15 +76,15 @@ if test "$GCC" = yes ; then
dnl dnl
OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
CFLAGS="$OLDCFLAGS -fexceptions" CFLAGS="$OLDCFLAGS -fexceptions"
AC_MSG_CHECKING(whether gcc accepts -fexceptions) AC_MSG_CHECKING(whether $CC accepts -fexceptions)
AC_TRY_COMPILE(,(void)1, AC_TRY_LINK( , ,
AC_MSG_RESULT(yes), AC_MSG_RESULT(yes),
AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS") AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
fi fi
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
@@ -92,12 +93,12 @@ dnl work in a cross compile.
AC_C_BIGENDIAN_CROSS AC_C_BIGENDIAN_CROSS
AC_C_CONST AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_CHECK_FUNCS(memmove bcopy)
dnl Checks for library functions. dnl Only needed for xmlwf:
AC_CHECK_HEADERS(fcntl.h unistd.h)
AC_FUNC_MEMCMP AC_TYPE_OFF_T
AC_FUNC_MMAP AC_FUNC_MMAP
if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
@@ -107,9 +108,39 @@ else
fi fi
AC_SUBST(FILEMAP) AC_SUBST(FILEMAP)
AC_CHECK_FUNCS(memmove bcopy) dnl Needed for the test support code; this was found at
dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html
dnl some basic configuration # 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, AC_DEFINE([XML_NS], 1,
[Define to make XML Namespaces functionality available.]) [Define to make XML Namespaces functionality available.])
AC_DEFINE([XML_DTD], 1, AC_DEFINE([XML_DTD], 1,
@@ -117,7 +148,7 @@ AC_DEFINE([XML_DTD], 1,
AC_DEFINE([XML_CONTEXT_BYTES], 1024, AC_DEFINE([XML_CONTEXT_BYTES], 1024,
[Define to specify how much context to retain around the current parse point.]) [Define to specify how much context to retain around the current parse point.])
AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES([Makefile expat.pc])
AC_OUTPUT AC_OUTPUT
abs_srcdir="`cd $srcdir && pwd`" abs_srcdir="`cd $srcdir && pwd`"

View File

@@ -0,0 +1,3 @@
libtool.m4
ltconfig
ltmain.sh

View File

@@ -45,11 +45,11 @@ done
# #
# First of all, all OS/2 programs have the '.exe' extension. # First of all, all OS/2 programs have the '.exe' extension.
# Next, we adjust PATH (or what was given to us as PATH) to # Next, we adjust PATH (or what was given to us as PATH) to
# be whitespace seperated directories. # be whitespace separated directories.
# Finally, we try to determine the best flag to use for # Finally, we try to determine the best flag to use for
# test/[] to look for an executable file. OS/2 just has '-r' # test/[] to look for an executable file. OS/2 just has '-r'
# but with other OSs, we do some funny stuff to check to see # but with other OSs, we do some funny stuff to check to see
# if test/[] knows about -x, which is the prefered flag. # if test/[] knows about -x, which is the preferred flag.
## ##
if [ "x$os" = "xOS/2" ] if [ "x$os" = "xOS/2" ]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@ dnl If --with-expat has not been specified, set with_expat to 'no'.
dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly. dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly.
dnl This is necessary to adapt a whole lot of packages that have expat dnl This is necessary to adapt a whole lot of packages that have expat
dnl bundled as a static library. dnl bundled as a static library.
AC_DEFUN(AM_WITH_EXPAT, AC_DEFUN([AM_WITH_EXPAT],
[ AC_ARG_WITH(expat, [ AC_ARG_WITH(expat,
[ --with-expat=PREFIX Use system Expat library], [ --with-expat=PREFIX Use system Expat library],
, with_expat=no) , with_expat=no)

View File

@@ -0,0 +1,46 @@
#!/bin/sh
#
# USAGE: get-version.sh path/to/expat.h
#
# This script will print Expat's version number on stdout. For example:
#
# $ ./conftools/get-version.sh ./lib/expat.h
# 1.95.3
# $
#
if test $# = 0; then
echo "ERROR: pathname for expat.h was not provided."
echo ""
echo "USAGE: $0 path/to/expat.h"
exit 1
fi
if test $# != 1; then
echo "ERROR: too many arguments were provided."
echo ""
echo "USAGE: $0 path/to/expat.h"
exit 1
fi
hdr="$1"
if test ! -r "$hdr"; then
echo "ERROR: '$hdr' does not exist, or is not readable."
exit 1
fi
MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`"
MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`"
MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`"
# Determine how to tell echo not to print the trailing \n. This is
# similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't
# generate this file via autoconf (in fact, get-version.sh is used
# to *create* ./configure), so we just do something similar inline.
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ;;
*c*,* ) ECHO_N=-n ECHO_C= ;;
*) ECHO_N= ECHO_C='\c' ;;
esac
echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C"

View File

@@ -118,7 +118,6 @@ if [ x"$dir_arg" != x ]; then
if [ -d $dst ]; then if [ -d $dst ]; then
instcmd=: instcmd=:
chmodcmd=""
else else
instcmd=mkdir instcmd=mkdir
fi fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
src/expat/doc/expat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,37 @@
body { body {
background-color: white background-color: white;
border: 0px;
margin: 0px;
padding: 0px;
}
.corner {
width: 200px;
height: 80px;
text-align: center;
}
.banner {
background-color: rgb(110,139,61);
color: rgb(255,236,176);
padding-left: 2em;
}
.banner h1 {
font-size: 200%;
}
.content {
padding: 0em 2em 1em 2em;
}
.releaseno {
background-color: rgb(110,139,61);
color: rgb(255,236,176);
padding-bottom: 0.3em;
padding-top: 0.5em;
text-align: center;
font-weight: bold;
} }
.noborder { .noborder {
@@ -17,6 +49,17 @@ body {
margin-right: 10%; margin-right: 10%;
} }
.pseudocode {
padding-left: 1em;
padding-top: .5em;
padding-bottom: .5em;
border: solid thin;
margin: 1em 0;
background-color: rgb(250,220,180);
margin-left: 2em;
margin-right: 10%;
}
.handler { .handler {
width: 100%; width: 100%;
border-top-width: thin; border-top-width: thin;
@@ -49,3 +92,10 @@ body {
dd { dd {
margin-bottom: 2em; margin-bottom: 2em;
} }
.cpp-symbols dt {
font-family: monospace;
}
.cpp-symbols dd {
margin-bottom: 1em;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -102,7 +102,7 @@ Also see the \fB-w\fR option.
.TP .TP
\fB-m\fR \fB-m\fR
Outputs some strange sort of XML file that completely Outputs some strange sort of XML file that completely
describes the the input file, including character postitions. describes the input file, including character positions.
Requires \fB-d\fR to specify an output file. Requires \fB-d\fR to specify an output file.
.TP .TP
\fB-n\fR \fB-n\fR

View File

@@ -388,11 +388,6 @@ supports both.
<refsect1> <refsect1>
<title>BUGS</title> <title>BUGS</title>
<para>
According to the W3C standard, an XML file without a
declaration at the beginning is not considered well-formed.
However, <command>&dhpackage;</command> allows this to pass.
</para>
<para> <para>
<command>&dhpackage;</command> returns a 0 - noerr result, <command>&dhpackage;</command> returns a 0 - noerr result,
even if the file is not well-formed. There is no good way for even if the file is not well-formed. There is no good way for

View File

@@ -0,0 +1,8 @@
Makefile
elements
elements.plg
outline
outline.plg
Debug
Release
.libs

View File

@@ -2,26 +2,41 @@
reads an XML document from standard input and writes a line with reads an XML document from standard input and writes a line with
the name of each element to standard output indenting child the name of each element to standard output indenting child
elements by one tab stop more than their parent element. elements by one tab stop more than their parent element.
It must be used with Expat compiled for UTF-8 output.
*/ */
#include <stdio.h> #include <stdio.h>
#include "expat.h" #include "expat.h"
static void #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"
#else
#define XML_FMT_INT_MOD "ll"
#endif
#else
#define XML_FMT_INT_MOD "l"
#endif
static void XMLCALL
startElement(void *userData, const char *name, const char **atts) startElement(void *userData, const char *name, const char **atts)
{ {
int i; int i;
int *depthPtr = userData; int *depthPtr = (int *)userData;
for (i = 0; i < *depthPtr; i++) for (i = 0; i < *depthPtr; i++)
putchar('\t'); putchar('\t');
puts(name); puts(name);
*depthPtr += 1; *depthPtr += 1;
} }
static void static void XMLCALL
endElement(void *userData, const char *name) endElement(void *userData, const char *name)
{ {
int *depthPtr = userData; int *depthPtr = (int *)userData;
*depthPtr -= 1; *depthPtr -= 1;
} }
@@ -35,11 +50,11 @@ main(int argc, char *argv[])
XML_SetUserData(parser, &depth); XML_SetUserData(parser, &depth);
XML_SetElementHandler(parser, startElement, endElement); XML_SetElementHandler(parser, startElement, endElement);
do { do {
size_t len = fread(buf, 1, sizeof(buf), stdin); int len = (int)fread(buf, 1, sizeof(buf), stdin);
done = len < sizeof(buf); done = len < sizeof(buf);
if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) {
fprintf(stderr, fprintf(stderr,
"%s at line %d\n", "%s at line %" XML_FMT_INT_MOD "u\n",
XML_ErrorString(XML_GetErrorCode(parser)), XML_ErrorString(XML_GetErrorCode(parser)),
XML_GetCurrentLineNumber(parser)); XML_GetCurrentLineNumber(parser));
return 1; return 1;

View File

@@ -0,0 +1,103 @@
# 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

View File

@@ -18,19 +18,34 @@
* *
* Read an XML document from standard input and print an element * Read an XML document from standard input and print an element
* outline on standard output. * outline on standard output.
* Must be used with Expat compiled for UTF-8 output.
*/ */
#include <stdio.h> #include <stdio.h>
#include <expat.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"
#else
#define XML_FMT_INT_MOD "ll"
#endif
#else
#define XML_FMT_INT_MOD "l"
#endif
#define BUFFSIZE 8192 #define BUFFSIZE 8192
char Buff[BUFFSIZE]; char Buff[BUFFSIZE];
int Depth; int Depth;
static void static void XMLCALL
start(void *data, const char *el, const char **attr) start(void *data, const char *el, const char **attr)
{ {
int i; int i;
@@ -48,7 +63,7 @@ start(void *data, const char *el, const char **attr)
Depth++; Depth++;
} }
static void static void XMLCALL
end(void *data, const char *el) end(void *data, const char *el)
{ {
Depth--; Depth--;
@@ -69,7 +84,7 @@ main(int argc, char *argv[])
int done; int done;
int len; int len;
len = fread(Buff, 1, BUFFSIZE, stdin); len = (int)fread(Buff, 1, BUFFSIZE, stdin);
if (ferror(stdin)) { if (ferror(stdin)) {
fprintf(stderr, "Read error\n"); fprintf(stderr, "Read error\n");
exit(-1); exit(-1);
@@ -77,7 +92,7 @@ main(int argc, char *argv[])
done = feof(stdin); done = feof(stdin);
if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) { if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) {
fprintf(stderr, "Parse error at line %d:\n%s\n", fprintf(stderr, "Parse error at line %" XML_FMT_INT_MOD "u:\n%s\n",
XML_GetCurrentLineNumber(p), XML_GetCurrentLineNumber(p),
XML_ErrorString(XML_GetErrorCode(p))); XML_ErrorString(XML_GetErrorCode(p)));
exit(-1); exit(-1);
@@ -86,5 +101,6 @@ main(int argc, char *argv[])
if (done) if (done)
break; break;
} }
XML_ParserFree(p);
return 0; return 0;
} }

View File

@@ -0,0 +1,103 @@
# 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

View File

@@ -1,110 +0,0 @@
# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=expat - 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 "expat.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 "expat.mak" CFG="expat - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "expat - 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 "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /w /W0 /O1 /Ob2 /I "../include" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "COMPILED_FROM_DSP" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\lib\expat.lib"
!ELSEIF "$(CFG)" == "expat - 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 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /w /W0 /Zi /Od /I "../include" /I ".." /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "COMPILED_FROM_DSP" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\lib\expatd.lib"
!ENDIF
# Begin Target
# Name "expat - Win32 Release"
# Name "expat - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\lib\xmlparse.c
# End Source File
# Begin Source File
SOURCE=.\lib\xmlrole.c
# End Source File
# Begin Source File
SOURCE=.\lib\xmltok.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h"
# Begin Source File
SOURCE=.\lib\expat.h
# End Source File
# End Group
# End Target
# End Project

110
src/expat/expat.dsw Executable file
View File

@@ -0,0 +1,110 @@
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>
{{{
}}}
###############################################################################

11
src/expat/expat.pc.in Normal file
View File

@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: expat
Version: @PACKAGE_VERSION@
Description: expat XML parser
URL: http://www.libexpat.org
Libs: -L${libdir} -lexpat
Cflags: -I${includedir}

100
src/expat/expat.spec Normal file
View File

@@ -0,0 +1,100 @@
%define version 2.1.0
%define release 1
Summary: Expat is an XML 1.0 parser written in C.
Name: expat
Version: %{version}
Release: %{release}
Copyright: MIT/X
Group: Utilities/parsers
URL: http://www.libexpat.org/
Source: http://download.sourceforge.net/expat/expat-%{version}.tar.gz
BuildRoot: /var/tmp/%{name}-buildroot
%description
Expat is an XML 1.0 parser written in C by James Clark. It aims to be
fully conforming. It is not a validating XML parser.
%prep
%setup
%build
./configure
make lib xmlwf
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/include
make install prefix=$RPM_BUILD_ROOT/usr
install -D xmlwf/xmlwf $RPM_BUILD_ROOT/usr/bin/xmlwf
%files
%doc COPYING Changes MANIFEST README doc/reference.html doc/style.css doc/*.png
/usr/bin/xmlwf
/usr/lib
/usr/include/expat.h
/usr/include/expat_external.h
/usr/man/man1/xmlwf.1.gz
%changelog
* Sat Mar 3 2012 Karl Waclawek <karl@waclawek.net>
[Release 2.1.0-1]
- Update for the 2.1.0 release.
* Sun Nov 26 2006 Karl Waclawek <karl@waclawek.net>
[Release 2.0.1-1]
- Update for the 2.0.1 release.
* Fri Jul 16 2004 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.8-1]
- Update for the 1.95.8 release.
- Add the expat_external.h header to the installed files.
* Tue Oct 21 2003 Fred L. Drake, Jr. <fdrake@acm.org>
- Update list of documentation files; we missed a .png file in the
previous release.
* Mon Oct 20 2003 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.7-1]
- Updated for the 1.95.7 release.
* Sat Jan 25 2003 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.6-1]
- Updated for the 1.95.6 release.
* Wed Sep 4 2002 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.5-1]
- Updated for the 1.95.5 release.
- Updated URL for Expat home page to point to www.libexpat.org.
- Added "Valid XHTML 1.0" icon to the installed documentation.
* Sat Jun 29 2002 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.4-1]
- Updated for the 1.95.4 release.
* Fri May 17 2002 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.3-1]
- Updated for the 1.95.3 release.
- Added xmlwf man page to the list of files.
* Wed Jul 25 2001 Fred L. Drake, Jr. <fdrake@acm.org>
[Release 1.95.2-1]
- Updated for the 1.95.2 release.
* Sun Feb 18 2001 Sean Reifschneider <jafo-rpms@tummy.com>
[Release 1.95.1-1tummy]
- Updated to 1.95.1 release.
- Removed the "/usr/include/expat" directory for headers, as it now uses
"expat.h" instead of "xmlparser.h".
* Thu Jan 25 2001 Sean Reifschneider <jafo-rpms@tummy.com>
[Release 1.1-3tummy]
- Moved xmlparse.h into "/usr/include/expat" directory to prevent conflict
with w3c-libwww-devel package.
* Wed Sep 6 2000 Sean Reifschneider <jafo-rpms@tummy.com>
- Modified to install into /usr.
- Modified to use RPM_BUILD_ROOT instead of writing directly to install
location.

91
src/expat/expat_config.h.cmake Executable file
View File

@@ -0,0 +1,91 @@
/* expat_config.h.in. Generated from configure.in by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#cmakedefine BYTEORDER @BYTEORDER@
/* Define to 1 if you have the `bcopy' function. */
#cmakedefine HAVE_BCOPY
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define to 1 if you have the `getpagesize' function. */
#cmakedefine HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#cmakedefine HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS
/* whether byteorder is bigendian */
#cmakedefine WORDS_BIGENDIAN
/* Define to specify how much context to retain around the current parse
point. */
#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
/* Define to make parameter entity parsing functionality available. */
#cmakedefine XML_DTD
/* Define to make XML Namespaces functionality available. */
#cmakedefine XML_NS
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER
# define __func__ __FUNCTION__
#endif
/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine off_t @OFF_T@
/* Define to `unsigned' if <sys/types.h> does not define. */
#cmakedefine size_t @SIZE_T@

View File

@@ -39,6 +39,9 @@
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H #undef HAVE_STRING_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
@@ -48,6 +51,10 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to the address where bug reports for this package should be sent. */ /* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT
@@ -60,6 +67,9 @@
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME #undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
@@ -79,11 +89,14 @@
/* Define to make XML Namespaces functionality available. */ /* Define to make XML Namespaces functionality available. */
#undef XML_NS #undef XML_NS
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#undef __func__
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
#undef const #undef const
/* Define to `long' if <sys/types.h> does not define. */ /* Define to `long int' if <sys/types.h> does not define. */
#undef off_t #undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */ /* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t #undef size_t

3
src/expat/gennmtab/.cvsignore Executable file
View File

@@ -0,0 +1,3 @@
Debug
Release
gennmtab.plg

429
src/expat/gennmtab/gennmtab.c Executable file
View File

@@ -0,0 +1,429 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#include <string.h>
#include <stdio.h>
#include <stddef.h>
struct range {
int start;
int end;
};
struct range nmstrt[] = {
{ '_' },
{ ':' },
/* BaseChar */
{ 0x0041, 0x005a },
{ 0x0061, 0x007a },
{ 0x00c0, 0x00d6 },
{ 0x00d8, 0x00f6 },
{ 0x00f8, 0x00ff },
{ 0x0100, 0x0131 },
{ 0x0134, 0x013e },
{ 0x0141, 0x0148 },
{ 0x014a, 0x017e },
{ 0x0180, 0x01c3 },
{ 0x01cd, 0x01f0 },
{ 0x01f4, 0x01f5 },
{ 0x01fa, 0x0217 },
{ 0x0250, 0x02a8 },
{ 0x02bb, 0x02c1 },
{ 0x0386 },
{ 0x0388, 0x038a },
{ 0x038c },
{ 0x038e, 0x03a1 },
{ 0x03a3, 0x03ce },
{ 0x03d0, 0x03d6 },
{ 0x03da },
{ 0x03dc },
{ 0x03de },
{ 0x03e0 },
{ 0x03e2, 0x03f3 },
{ 0x0401, 0x040c },
{ 0x040e, 0x044f },
{ 0x0451, 0x045c },
{ 0x045e, 0x0481 },
{ 0x0490, 0x04c4 },
{ 0x04c7, 0x04c8 },
{ 0x04cb, 0x04cc },
{ 0x04d0, 0x04eb },
{ 0x04ee, 0x04f5 },
{ 0x04f8, 0x04f9 },
{ 0x0531, 0x0556 },
{ 0x0559 },
{ 0x0561, 0x0586 },
{ 0x05d0, 0x05ea },
{ 0x05f0, 0x05f2 },
{ 0x0621, 0x063a },
{ 0x0641, 0x064a },
{ 0x0671, 0x06b7 },
{ 0x06ba, 0x06be },
{ 0x06c0, 0x06ce },
{ 0x06d0, 0x06d3 },
{ 0x06d5 },
{ 0x06e5, 0x06e6 },
{ 0x0905, 0x0939 },
{ 0x093d },
{ 0x0958, 0x0961 },
{ 0x0985, 0x098c },
{ 0x098f, 0x0990 },
{ 0x0993, 0x09a8 },
{ 0x09aa, 0x09b0 },
{ 0x09b2 },
{ 0x09b6, 0x09b9 },
{ 0x09dc, 0x09dd },
{ 0x09df, 0x09e1 },
{ 0x09f0, 0x09f1 },
{ 0x0a05, 0x0a0a },
{ 0x0a0f, 0x0a10 },
{ 0x0a13, 0x0a28 },
{ 0x0a2a, 0x0a30 },
{ 0x0a32, 0x0a33 },
{ 0x0a35, 0x0a36 },
{ 0x0a38, 0x0a39 },
{ 0x0a59, 0x0a5c },
{ 0x0a5e },
{ 0x0a72, 0x0a74 },
{ 0x0a85, 0x0a8b },
{ 0x0a8d },
{ 0x0a8f, 0x0a91 },
{ 0x0a93, 0x0aa8 },
{ 0x0aaa, 0x0ab0 },
{ 0x0ab2, 0x0ab3 },
{ 0x0ab5, 0x0ab9 },
{ 0x0abd },
{ 0x0ae0 },
{ 0x0b05, 0x0b0c },
{ 0x0b0f, 0x0b10 },
{ 0x0b13, 0x0b28 },
{ 0x0b2a, 0x0b30 },
{ 0x0b32, 0x0b33 },
{ 0x0b36, 0x0b39 },
{ 0x0b3d },
{ 0x0b5c, 0x0b5d },
{ 0x0b5f, 0x0b61 },
{ 0x0b85, 0x0b8a },
{ 0x0b8e, 0x0b90 },
{ 0x0b92, 0x0b95 },
{ 0x0b99, 0x0b9a },
{ 0x0b9c },
{ 0x0b9e, 0x0b9f },
{ 0x0ba3, 0x0ba4 },
{ 0x0ba8, 0x0baa },
{ 0x0bae, 0x0bb5 },
{ 0x0bb7, 0x0bb9 },
{ 0x0c05, 0x0c0c },
{ 0x0c0e, 0x0c10 },
{ 0x0c12, 0x0c28 },
{ 0x0c2a, 0x0c33 },
{ 0x0c35, 0x0c39 },
{ 0x0c60, 0x0c61 },
{ 0x0c85, 0x0c8c },
{ 0x0c8e, 0x0c90 },
{ 0x0c92, 0x0ca8 },
{ 0x0caa, 0x0cb3 },
{ 0x0cb5, 0x0cb9 },
{ 0x0cde },
{ 0x0ce0, 0x0ce1 },
{ 0x0d05, 0x0d0c },
{ 0x0d0e, 0x0d10 },
{ 0x0d12, 0x0d28 },
{ 0x0d2a, 0x0d39 },
{ 0x0d60, 0x0d61 },
{ 0x0e01, 0x0e2e },
{ 0x0e30 },
{ 0x0e32, 0x0e33 },
{ 0x0e40, 0x0e45 },
{ 0x0e81, 0x0e82 },
{ 0x0e84 },
{ 0x0e87, 0x0e88 },
{ 0x0e8a },
{ 0x0e8d },
{ 0x0e94, 0x0e97 },
{ 0x0e99, 0x0e9f },
{ 0x0ea1, 0x0ea3 },
{ 0x0ea5 },
{ 0x0ea7 },
{ 0x0eaa, 0x0eab },
{ 0x0ead, 0x0eae },
{ 0x0eb0 },
{ 0x0eb2, 0x0eb3 },
{ 0x0ebd },
{ 0x0ec0, 0x0ec4 },
{ 0x0f40, 0x0f47 },
{ 0x0f49, 0x0f69 },
{ 0x10a0, 0x10c5 },
{ 0x10d0, 0x10f6 },
{ 0x1100 },
{ 0x1102, 0x1103 },
{ 0x1105, 0x1107 },
{ 0x1109 },
{ 0x110b, 0x110c },
{ 0x110e, 0x1112 },
{ 0x113c },
{ 0x113e },
{ 0x1140 },
{ 0x114c },
{ 0x114e },
{ 0x1150 },
{ 0x1154, 0x1155 },
{ 0x1159 },
{ 0x115f, 0x1161 },
{ 0x1163 },
{ 0x1165 },
{ 0x1167 },
{ 0x1169 },
{ 0x116d, 0x116e },
{ 0x1172, 0x1173 },
{ 0x1175 },
{ 0x119e },
{ 0x11a8 },
{ 0x11ab },
{ 0x11ae, 0x11af },
{ 0x11b7, 0x11b8 },
{ 0x11ba },
{ 0x11bc, 0x11c2 },
{ 0x11eb },
{ 0x11f0 },
{ 0x11f9 },
{ 0x1e00, 0x1e9b },
{ 0x1ea0, 0x1ef9 },
{ 0x1f00, 0x1f15 },
{ 0x1f18, 0x1f1d },
{ 0x1f20, 0x1f45 },
{ 0x1f48, 0x1f4d },
{ 0x1f50, 0x1f57 },
{ 0x1f59 },
{ 0x1f5b },
{ 0x1f5d },
{ 0x1f5f, 0x1f7d },
{ 0x1f80, 0x1fb4 },
{ 0x1fb6, 0x1fbc },
{ 0x1fbe },
{ 0x1fc2, 0x1fc4 },
{ 0x1fc6, 0x1fcc },
{ 0x1fd0, 0x1fd3 },
{ 0x1fd6, 0x1fdb },
{ 0x1fe0, 0x1fec },
{ 0x1ff2, 0x1ff4 },
{ 0x1ff6, 0x1ffc },
{ 0x2126 },
{ 0x212a, 0x212b },
{ 0x212e },
{ 0x2180, 0x2182 },
{ 0x3041, 0x3094 },
{ 0x30a1, 0x30fa },
{ 0x3105, 0x312c },
{ 0xac00, 0xd7a3 },
/* Ideographic */
{ 0x4e00, 0x9fa5 },
{ 0x3007 },
{ 0x3021, 0x3029 },
};
/* name chars that are not name start chars */
struct range name[] = {
{ '.' },
{ '-' },
/* CombiningChar */
{ 0x0300, 0x0345 },
{ 0x0360, 0x0361 },
{ 0x0483, 0x0486 },
{ 0x0591, 0x05a1 },
{ 0x05a3, 0x05b9 },
{ 0x05bb, 0x05bd },
{ 0x05bf },
{ 0x05c1, 0x05c2 },
{ 0x05c4 },
{ 0x064b, 0x0652 },
{ 0x0670 },
{ 0x06d6, 0x06dc },
{ 0x06dd, 0x06df },
{ 0x06e0, 0x06e4 },
{ 0x06e7, 0x06e8 },
{ 0x06ea, 0x06ed },
{ 0x0901, 0x0903 },
{ 0x093c },
{ 0x093e, 0x094c },
{ 0x094d },
{ 0x0951, 0x0954 },
{ 0x0962, 0x0963 },
{ 0x0981, 0x0983 },
{ 0x09bc },
{ 0x09be },
{ 0x09bf },
{ 0x09c0, 0x09c4 },
{ 0x09c7, 0x09c8 },
{ 0x09cb, 0x09cd },
{ 0x09d7 },
{ 0x09e2, 0x09e3 },
{ 0x0a02 },
{ 0x0a3c },
{ 0x0a3e },
{ 0x0a3f },
{ 0x0a40, 0x0a42 },
{ 0x0a47, 0x0a48 },
{ 0x0a4b, 0x0a4d },
{ 0x0a70, 0x0a71 },
{ 0x0a81, 0x0a83 },
{ 0x0abc },
{ 0x0abe, 0x0ac5 },
{ 0x0ac7, 0x0ac9 },
{ 0x0acb, 0x0acd },
{ 0x0b01, 0x0b03 },
{ 0x0b3c },
{ 0x0b3e, 0x0b43 },
{ 0x0b47, 0x0b48 },
{ 0x0b4b, 0x0b4d },
{ 0x0b56, 0x0b57 },
{ 0x0b82, 0x0b83 },
{ 0x0bbe, 0x0bc2 },
{ 0x0bc6, 0x0bc8 },
{ 0x0bca, 0x0bcd },
{ 0x0bd7 },
{ 0x0c01, 0x0c03 },
{ 0x0c3e, 0x0c44 },
{ 0x0c46, 0x0c48 },
{ 0x0c4a, 0x0c4d },
{ 0x0c55, 0x0c56 },
{ 0x0c82, 0x0c83 },
{ 0x0cbe, 0x0cc4 },
{ 0x0cc6, 0x0cc8 },
{ 0x0cca, 0x0ccd },
{ 0x0cd5, 0x0cd6 },
{ 0x0d02, 0x0d03 },
{ 0x0d3e, 0x0d43 },
{ 0x0d46, 0x0d48 },
{ 0x0d4a, 0x0d4d },
{ 0x0d57 },
{ 0x0e31 },
{ 0x0e34, 0x0e3a },
{ 0x0e47, 0x0e4e },
{ 0x0eb1 },
{ 0x0eb4, 0x0eb9 },
{ 0x0ebb, 0x0ebc },
{ 0x0ec8, 0x0ecd },
{ 0x0f18, 0x0f19 },
{ 0x0f35 },
{ 0x0f37 },
{ 0x0f39 },
{ 0x0f3e },
{ 0x0f3f },
{ 0x0f71, 0x0f84 },
{ 0x0f86, 0x0f8b },
{ 0x0f90, 0x0f95 },
{ 0x0f97 },
{ 0x0f99, 0x0fad },
{ 0x0fb1, 0x0fb7 },
{ 0x0fb9 },
{ 0x20d0, 0x20dc },
{ 0x20e1 },
{ 0x302a, 0x302f },
{ 0x3099 },
{ 0x309a },
/* Digit */
{ 0x0030, 0x0039 },
{ 0x0660, 0x0669 },
{ 0x06f0, 0x06f9 },
{ 0x0966, 0x096f },
{ 0x09e6, 0x09ef },
{ 0x0a66, 0x0a6f },
{ 0x0ae6, 0x0aef },
{ 0x0b66, 0x0b6f },
{ 0x0be7, 0x0bef },
{ 0x0c66, 0x0c6f },
{ 0x0ce6, 0x0cef },
{ 0x0d66, 0x0d6f },
{ 0x0e50, 0x0e59 },
{ 0x0ed0, 0x0ed9 },
{ 0x0f20, 0x0f29 },
/* Extender */
{ 0xb7 },
{ 0x02d0 },
{ 0x02d1 },
{ 0x0387 },
{ 0x0640 },
{ 0x0e46 },
{ 0x0ec6 },
{ 0x3005 },
{ 0x3031, 0x3035 },
{ 0x309d, 0x309e },
{ 0x30fc, 0x30fe },
};
static void
setTab(char *tab, struct range *ranges, size_t nRanges)
{
size_t i;
int j;
for (i = 0; i < nRanges; i++) {
if (ranges[i].end) {
for (j = ranges[i].start; j <= ranges[i].end; j++)
tab[j] = 1;
}
else
tab[ranges[i].start] = 1;
}
}
static void
printTabs(char *tab)
{
int nBitmaps = 2;
int i, j, k;
unsigned char pageIndex[512];
printf(
"static const unsigned namingBitmap[] = {\n\
0x00000000, 0x00000000, 0x00000000, 0x00000000,\n\
0x00000000, 0x00000000, 0x00000000, 0x00000000,\n\
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,\n\
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,\n");
for (i = 0; i < 512; i++) {
int kind = tab[i*256];
for (j = 1; j < 256; j++)
if (tab[i*256 +j] != kind) {
kind = -1;
break;
}
if (i >= 256 && memcmp(tab + (i - 256)*256, tab + i*256, 256) == 0)
pageIndex[i] = pageIndex[i - 256];
else if (kind == -1) {
pageIndex[i] = nBitmaps++;
for (j = 0; j < 8; j++) {
unsigned val = 0;
for (k = 0; k < 32; k++) {
if (tab[i*256 + j*32 +k])
val |= (1 << k);
}
printf("0x%08X,", val);
putchar((((j + 1) & 3) == 0) ? '\n' : ' ');
}
}
else
pageIndex[i] = kind;
}
printf("};\n");
printf("static const unsigned char nmstrtPages[] = {\n");
for (i = 0; i < 512; i++) {
if (i == 256)
printf("};\nstatic const unsigned char namePages[] = {\n");
printf("0x%02X,", pageIndex[i]);
putchar((((i + 1) & 7) == 0) ? '\n' : ' ');
}
printf("};\n");
}
int
main()
{
char tab[2*65536];
memset(tab, 0, 65536);
setTab(tab, nmstrt, sizeof(nmstrt)/sizeof(nmstrt[0]));
memcpy(tab + 65536, tab, 65536);
setTab(tab + 65536, name, sizeof(name)/sizeof(name[0]));
printTabs(tab);
return 0;
}

101
src/expat/gennmtab/gennmtab.dsp Executable file
View File

@@ -0,0 +1,101 @@
# Microsoft Developer Studio Project File - Name="gennmtab" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=gennmtab - 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 "gennmtab.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 "gennmtab.mak" CFG="gennmtab - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gennmtab - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "gennmtab - 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)" == "gennmtab - 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" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "gennmtab - 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 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 /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /c
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
!ENDIF
# Begin Target
# Name "gennmtab - Win32 Release"
# Name "gennmtab - 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=.\gennmtab.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# 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

18
src/expat/lib/.cvsignore Normal file
View File

@@ -0,0 +1,18 @@
Makefile
.libs
*.lo
expat.h
Debug
Debug-w
Release
Release-w
expat.ncb
expat.opt
expat.plg
Debug_static
Debug-w_static
Release_static
Release-w_static
expat_static.plg
expatw.plg
expatw_static.plg

206
src/expat/lib/Makefile.MPW Normal file
View File

@@ -0,0 +1,206 @@
# File: Makefile.MPW
# Targets: All, Dynamic, Static (and Clean, Clean-All)
# Created: Tuesday, July 02, 2002
#
# MPW Makefile for building expat under the "classic" (i.e. pre-X) Mac OS
# Copyright <20> 2002 Daryle Walker
# Portions Copyright <20> 2002 Thomas Wegner
# See the COPYING file for distribution information
#
# Description:
# This Makefile lets you build static, dynamic (i.e. shared) and stub
# versions of the expat library as well as the elements.c and outline.c
# examples (built as tools for MPW). This is for PPC only; it should be
# no problem to build a 68K version of the expat library, though.
#
# Usage:
# Buildprogram All
# or Buildprogram Dynamic
# or Buildprogram Static
#
# Note: You first have to rename this file to "Makefile", or the Buildprogram
# commando will not recognize it.
#
MAKEFILE = Makefile
<EFBFBD>MondoBuild<EFBFBD> = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
ObjDir = :
SrcDir = :
HdrDir = :
ToolDir = ::examples:
Includes = -i {HdrDir}
Sym-PPC = -sym off
Defines = -d MACOS_CLASSIC
PPCCOptions = {Includes} {Sym-PPC} -w 35 {Defines}
FragName = libexpat
### Source Files ###
SrcFiles = <20>
"{SrcDir}xmlparse.c" <20>
"{SrcDir}xmlrole.c" <20>
"{SrcDir}xmltok.c"
ToolSrcFiles = <20>
"{ToolDir}elements.c" <20>
"{ToolDir}outline.c"
### Object Files ###
ObjFiles-PPC = <20>
"{ObjDir}xmlparse.c.o" <20>
"{ObjDir}xmlrole.c.o" <20>
"{ObjDir}xmltok.c.o"
ElementToolObjFile = "{ObjDir}elements.c.o"
OutlineToolObjFile = "{ObjDir}outline.c.o"
### Libraries ###
StLibFiles-PPC = <20>
"{PPCLibraries}StdCRuntime.o" <20>
"{PPCLibraries}PPCCRuntime.o" <20>
"{PPCLibraries}PPCToolLibs.o"
ShLibFiles-PPC = <20>
"{SharedLibraries}InterfaceLib" <20>
"{SharedLibraries}StdCLib" <20>
"{SharedLibraries}MathLib"
LibFiles-PPC = <20>
{StLibFiles-PPC} <20>
{ShLibFiles-PPC}
### Special Files ###
ExportFile = "{ObjDir}{FragName}.exp"
StLibFile = "{ObjDir}{FragName}.MrC.o"
ShLibFile = "{ObjDir}{FragName}"
StubFile = "{ObjDir}{FragName}.stub"
ElementsTool = "{ToolDir}elements"
OutlineTool = "{ToolDir}outline"
### Default Rules ###
.c.o <EFBFBD> .c {<EFBFBD>MondoBuild<EFBFBD>}
{PPCC} {depDir}{default}.c -o {targDir}{default}.c.o {PPCCOptions}
### Build Rules ###
All <EFBFBD> Dynamic {ElementsTool} {OutlineTool}
Static <EFBFBD> {StLibFile}
Dynamic <EFBFBD> Static {ShLibFile} {StubFile}
{StLibFile} <EFBFBD><EFBFBD> {ObjFiles-PPC} {StLibFiles-PPC} {<EFBFBD>MondoBuild<EFBFBD>}
PPCLink <EFBFBD>
-o {Targ} <EFBFBD>
{ObjFiles-PPC} <EFBFBD>
{StLibFiles-PPC} <EFBFBD>
{Sym-PPC} <EFBFBD>
-mf -d <EFBFBD>
-t 'XCOF' <EFBFBD>
-c 'MPS ' <EFBFBD>
-xm l
{ShLibFile} <EFBFBD><EFBFBD> {StLibFile} {ShLibFiles-PPC} {ExportFile} {<EFBFBD>MondoBuild<EFBFBD>}
PPCLink <EFBFBD>
-o {Targ} <EFBFBD>
{StLibFile} <EFBFBD>
{ShLibFiles-PPC} <EFBFBD>
{Sym-PPC} <EFBFBD>
-@export {ExportFile} <EFBFBD>
-fragname {FragName} <EFBFBD>
-mf -d <EFBFBD>
-t 'shlb' <EFBFBD>
-c '????' <EFBFBD>
-xm s
{StubFile} <EFBFBD><EFBFBD> {ShLibFile} {<EFBFBD>MondoBuild<EFBFBD>}
shlb2stub -o {Targ} {ShLibFile}
{ElementsTool} <EFBFBD><EFBFBD> {ElementToolObjFile} {StubFile} {LibFiles-PPC} {<EFBFBD>MondoBuild<EFBFBD>}
PPCLink <EFBFBD>
-o {Targ} <EFBFBD>
{ElementToolObjFile} <EFBFBD>
{StLibFile} <EFBFBD>
{LibFiles-PPC} <EFBFBD>
{Sym-PPC} <EFBFBD>
-mf -d <EFBFBD>
-t 'MPST' <EFBFBD>
-c 'MPS '
{OutlineTool} <EFBFBD><EFBFBD> {OutlineToolObjFile} {StubFile} {LibFiles-PPC} {<EFBFBD>MondoBuild<EFBFBD>}
PPCLink <EFBFBD>
-o {Targ} <EFBFBD>
{OutlineToolObjFile} <EFBFBD>
{StLibFile} <EFBFBD>
{LibFiles-PPC} <EFBFBD>
{Sym-PPC} <EFBFBD>
-mf -d <EFBFBD>
-t 'MPST' <EFBFBD>
-c 'MPS '
### Special Rules ###
{ExportFile} <EFBFBD><EFBFBD> "{HdrDir}expat.h" {<EFBFBD>MondoBuild<EFBFBD>}
StreamEdit -d <EFBFBD>
-e "/<2F>('XMLPARSEAPI('<27>') ')<29>0,1<>'XML_'([A-Za-z0-9_]+)<29>1'('/ Print 'XML_' <20>1" <EFBFBD>
"{HdrDir}expat.h" > {Targ}
### Required Dependencies ###
"{ObjDir}xmlparse.c.o" <EFBFBD> "{SrcDir}xmlparse.c"
"{ObjDir}xmlrole.c.o" <EFBFBD> "{SrcDir}xmlrole.c"
"{ObjDir}xmltok.c.o" <EFBFBD> "{SrcDir}xmltok.c"
"{ObjDir}elements.c.o" <EFBFBD> "{ToolDir}elements.c"
"{ObjDir}outline.c.o" <EFBFBD> "{ToolDir}outline.c"
### Optional Dependencies ###
### Build this target to clean out generated intermediate files. ###
Clean <EFBFBD>
Delete {ObjFiles-PPC} {ExportFile} {ElementToolObjFile} {OutlineToolObjFile}
### Build this target to clean out all generated files. ###
Clean-All <EFBFBD> Clean
Delete {StLibFile} {ShLibFile} {StubFile} {ElementsTool} {OutlineTool}
### Build this target to generate "include file" dependencies. ###
Dependencies <EFBFBD> $OutOfDate
MakeDepend <EFBFBD>
-append {MAKEFILE} <EFBFBD>
-ignore "{CIncludes}" <EFBFBD>
-objdir "{ObjDir}" <EFBFBD>
-objext .o <EFBFBD>
{Defines} <EFBFBD>
{Includes} <EFBFBD>
{SrcFiles}

View File

@@ -0,0 +1,32 @@
#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 <check.h> header file. */
#undef HAVE_CHECK_H
/* 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 */

View File

@@ -83,3 +83,10 @@
#define ASCII_LSQB 0x5B #define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D #define ASCII_RSQB 0x5D
#define ASCII_UNDERSCORE 0x5F #define ASCII_UNDERSCORE 0x5F
#define ASCII_LPAREN 0x28
#define ASCII_RPAREN 0x29
#define ASCII_FF 0x0C
#define ASCII_SLASH 0x2F
#define ASCII_HASH 0x23
#define ASCII_PIPE 0x7C
#define ASCII_COMMA 0x2C

View File

@@ -1,25 +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 DOSCONFIG_H
#define DOSCONFIG_H
#include <memory.h>
#include <string.h>
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* we will assume all DOS platforms are little endian */
#define BYTEORDER 1234
#define HAVE_BCOPY
#endif /* ndef DOSCONFIG_H */

185
src/expat/lib/expat.dsp Normal file
View File

@@ -0,0 +1,185 @@
# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=expat - 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 "expat.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 "expat.mak" CFG="expat - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "expat - 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"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILED_FROM_DSP" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# 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 /dll /machine:I386
# ADD LINK32 /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release\libexpat.dll"
!ELSEIF "$(CFG)" == "expat - 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"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# 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 /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug\libexpat.dll"
!ENDIF
# Begin Target
# Name "expat - Win32 Release"
# Name "expat - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\libexpat.def
# End Source File
# Begin Source File
SOURCE=.\xmlparse.c
!IF "$(CFG)" == "expat - Win32 Release"
!ELSEIF "$(CFG)" == "expat - Win32 Debug"
# ADD CPP /GX- /Od
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\xmlrole.c
# End Source File
# Begin Source File
SOURCE=.\xmltok.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_ns.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\ascii.h
# End Source File
# Begin Source File
SOURCE=.\asciitab.h
# End Source File
# Begin Source File
SOURCE=.\expat.h
# End Source File
# Begin Source File
SOURCE=.\expat_external.h
# End Source File
# Begin Source File
SOURCE=.\iasciitab.h
# End Source File
# Begin Source File
SOURCE=.\internal.h
# End Source File
# Begin Source File
SOURCE=.\latin1tab.h
# End Source File
# Begin Source File
SOURCE=.\nametab.h
# End Source File
# Begin Source File
SOURCE=.\utf8tab.h
# End Source File
# Begin Source File
SOURCE=.\xmlrole.h
# End Source File
# Begin Source File
SOURCE=.\xmltok.h
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.h
# End Source File
# 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

View File

@@ -2,8 +2,8 @@
See the file COPYING for copying permission. See the file COPYING for copying permission.
*/ */
#ifndef XmlParse_INCLUDED #ifndef Expat_INCLUDED
#define XmlParse_INCLUDED 1 #define Expat_INCLUDED 1
#ifdef __VMS #ifdef __VMS
/* 0 1 2 3 0 1 2 3 /* 0 1 2 3 0 1 2 3
@@ -15,40 +15,42 @@
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include "expat_external.h"
#ifndef XMLPARSEAPI
#define XMLPARSEAPI(type) type
#endif /* not defined XMLPARSEAPI */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif
struct XML_ParserStruct; struct XML_ParserStruct;
typedef struct XML_ParserStruct *XML_Parser; typedef struct XML_ParserStruct *XML_Parser;
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
/* Should this be defined using stdbool.h when C99 is available? */ /* Should this be defined using stdbool.h when C99 is available? */
typedef unsigned char XML_Bool; typedef unsigned char XML_Bool;
#define XML_TRUE ((XML_Bool) 1) #define XML_TRUE ((XML_Bool) 1)
#define XML_FALSE ((XML_Bool) 0) #define XML_FALSE ((XML_Bool) 0)
/* The XML_Status enum gives the possible return values for several
API functions. The preprocessor #defines are included so this
stanza can be added to code that still needs to support older
versions of Expat 1.95.x:
#ifndef XML_STATUS_OK
#define XML_STATUS_OK 1
#define XML_STATUS_ERROR 0
#endif
Otherwise, the #define hackery is quite ugly and would have been
dropped.
*/
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 { enum XML_Error {
XML_ERROR_NONE, XML_ERROR_NONE,
XML_ERROR_NO_MEMORY, XML_ERROR_NO_MEMORY,
@@ -76,7 +78,24 @@ enum XML_Error {
XML_ERROR_UNEXPECTED_STATE, XML_ERROR_UNEXPECTED_STATE,
XML_ERROR_ENTITY_DECLARED_IN_PE, XML_ERROR_ENTITY_DECLARED_IN_PE,
XML_ERROR_FEATURE_REQUIRES_XML_DTD, XML_ERROR_FEATURE_REQUIRES_XML_DTD,
XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,
/* Added in 1.95.7. */
XML_ERROR_UNBOUND_PREFIX,
/* Added in 1.95.8. */
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,
/* Added in 2.0. */
XML_ERROR_RESERVED_PREFIX_XML,
XML_ERROR_RESERVED_PREFIX_XMLNS,
XML_ERROR_RESERVED_NAMESPACE_URI
}; };
enum XML_Content_Type { enum XML_Content_Type {
@@ -95,32 +114,6 @@ enum XML_Content_Quant {
XML_CQUANT_PLUS XML_CQUANT_PLUS
}; };
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
The XML_Status enum gives the possible return values for the
XML_Parse and XML_ParseBuffer functions. Though the return values
for these functions has always been described as a Boolean value,
the implementation, at least for the 1.95.x series, has always
returned exactly one of these values. The preprocessor #defines
are included so this stanza can be added to code that still needs
to support older versions of Expat 1.95.x:
#ifndef XML_STATUS_OK
#define XML_STATUS_OK 1
#define XML_STATUS_ERROR 0
#endif
Otherwise, the #define hackery is quite ugly and would have been dropped.
*/
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
};
/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be /* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
XML_CQUANT_NONE, and the other fields will be zero or NULL. XML_CQUANT_NONE, and the other fields will be zero or NULL.
If type == XML_CTYPE_MIXED, then quant will be NONE or REP and If type == XML_CTYPE_MIXED, then quant will be NONE or REP and
@@ -154,9 +147,9 @@ struct XML_cp {
description of the model argument. It's the caller's responsibility description of the model argument. It's the caller's responsibility
to free model when finished with it. to free model when finished with it.
*/ */
typedef void (*XML_ElementDeclHandler) (void *userData, typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData,
const XML_Char *name, const XML_Char *name,
XML_Content *model); XML_Content *model);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetElementDeclHandler(XML_Parser parser, XML_SetElementDeclHandler(XML_Parser parser,
@@ -170,12 +163,13 @@ XML_SetElementDeclHandler(XML_Parser parser,
value will be NULL in the case of "#REQUIRED". If "isrequired" is value will be NULL in the case of "#REQUIRED". If "isrequired" is
true and default is non-NULL, then this is a "#FIXED" default. true and default is non-NULL, then this is a "#FIXED" default.
*/ */
typedef void (*XML_AttlistDeclHandler) (void *userData, typedef void (XMLCALL *XML_AttlistDeclHandler) (
const XML_Char *elname, void *userData,
const XML_Char *attname, const XML_Char *elname,
const XML_Char *att_type, const XML_Char *attname,
const XML_Char *dflt, const XML_Char *att_type,
int isrequired); const XML_Char *dflt,
int isrequired);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetAttlistDeclHandler(XML_Parser parser, XML_SetAttlistDeclHandler(XML_Parser parser,
@@ -189,10 +183,10 @@ XML_SetAttlistDeclHandler(XML_Parser parser,
was no standalone parameter in the declaration, that it was given was no standalone parameter in the declaration, that it was given
as no, or that it was given as yes. as no, or that it was given as yes.
*/ */
typedef void (*XML_XmlDeclHandler) (void *userData, typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData,
const XML_Char *version, const XML_Char *version,
const XML_Char *encoding, const XML_Char *encoding,
int standalone); int standalone);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetXmlDeclHandler(XML_Parser parser, XML_SetXmlDeclHandler(XML_Parser parser,
@@ -219,8 +213,8 @@ XML_ParserCreate(const XML_Char *encoding);
URI, the namespace separator character, and the local part of the URI, the namespace separator character, and the local part of the
name. If the namespace separator is '\0' then the namespace URI name. If the namespace separator is '\0' then the namespace URI
and the local part will be concatenated without any separator. and the local part will be concatenated without any separator.
When a namespace is not declared, the name and prefix will be It is a programming error to use the separator '\0' with namespace
passed through without expansion. triplets (see XML_SetReturnNSTriplet).
*/ */
XMLPARSEAPI(XML_Parser) XMLPARSEAPI(XML_Parser)
XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
@@ -255,29 +249,31 @@ XML_ParserReset(XML_Parser parser, const XML_Char *encoding);
/* atts is array of name/value pairs, terminated by 0; /* atts is array of name/value pairs, terminated by 0;
names and values are 0 terminated. names and values are 0 terminated.
*/ */
typedef void (*XML_StartElementHandler)(void *userData, typedef void (XMLCALL *XML_StartElementHandler) (void *userData,
const XML_Char *name, const XML_Char *name,
const XML_Char **atts); const XML_Char **atts);
typedef void (*XML_EndElementHandler)(void *userData, typedef void (XMLCALL *XML_EndElementHandler) (void *userData,
const XML_Char *name); const XML_Char *name);
/* s is not 0 terminated. */ /* s is not 0 terminated. */
typedef void (*XML_CharacterDataHandler)(void *userData, typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData,
const XML_Char *s, const XML_Char *s,
int len); int len);
/* target and data are 0 terminated */ /* target and data are 0 terminated */
typedef void (*XML_ProcessingInstructionHandler)(void *userData, typedef void (XMLCALL *XML_ProcessingInstructionHandler) (
const XML_Char *target, void *userData,
const XML_Char *data); const XML_Char *target,
const XML_Char *data);
/* data is 0 terminated */ /* data is 0 terminated */
typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data); typedef void (XMLCALL *XML_CommentHandler) (void *userData,
const XML_Char *data);
typedef void (*XML_StartCdataSectionHandler)(void *userData); typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData);
typedef void (*XML_EndCdataSectionHandler)(void *userData); typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData);
/* This is called for any characters in the XML document for which /* This is called for any characters in the XML document for which
there is no applicable handler. This includes both characters that there is no applicable handler. This includes both characters that
@@ -292,14 +288,15 @@ typedef void (*XML_EndCdataSectionHandler)(void *userData);
default handler: for example, a comment might be split between default handler: for example, a comment might be split between
multiple calls. multiple calls.
*/ */
typedef void (*XML_DefaultHandler)(void *userData, typedef void (XMLCALL *XML_DefaultHandler) (void *userData,
const XML_Char *s, const XML_Char *s,
int len); int len);
/* This is called for the start of the DOCTYPE declaration, before /* This is called for the start of the DOCTYPE declaration, before
any DTD or internal subset is parsed. any DTD or internal subset is parsed.
*/ */
typedef void (*XML_StartDoctypeDeclHandler)(void *userData, typedef void (XMLCALL *XML_StartDoctypeDeclHandler) (
void *userData,
const XML_Char *doctypeName, const XML_Char *doctypeName,
const XML_Char *sysid, const XML_Char *sysid,
const XML_Char *pubid, const XML_Char *pubid,
@@ -309,7 +306,7 @@ typedef void (*XML_StartDoctypeDeclHandler)(void *userData,
closing > is encountered, but after processing any external closing > is encountered, but after processing any external
subset. subset.
*/ */
typedef void (*XML_EndDoctypeDeclHandler)(void *userData); typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);
/* This is called for entity declarations. The is_parameter_entity /* This is called for entity declarations. The is_parameter_entity
argument will be non-zero if the entity is a parameter entity, zero argument will be non-zero if the entity is a parameter entity, zero
@@ -329,15 +326,16 @@ typedef void (*XML_EndDoctypeDeclHandler)(void *userData);
Note that is_parameter_entity can't be changed to XML_Bool, since Note that is_parameter_entity can't be changed to XML_Bool, since
that would break binary compatibility. that would break binary compatibility.
*/ */
typedef void (*XML_EntityDeclHandler) (void *userData, typedef void (XMLCALL *XML_EntityDeclHandler) (
const XML_Char *entityName, void *userData,
int is_parameter_entity, const XML_Char *entityName,
const XML_Char *value, int is_parameter_entity,
int value_length, const XML_Char *value,
const XML_Char *base, int value_length,
const XML_Char *systemId, const XML_Char *base,
const XML_Char *publicId, const XML_Char *systemId,
const XML_Char *notationName); const XML_Char *publicId,
const XML_Char *notationName);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetEntityDeclHandler(XML_Parser parser, XML_SetEntityDeclHandler(XML_Parser parser,
@@ -352,22 +350,24 @@ XML_SetEntityDeclHandler(XML_Parser parser,
entityName, systemId and notationName arguments will never be entityName, systemId and notationName arguments will never be
NULL. The other arguments may be. NULL. The other arguments may be.
*/ */
typedef void (*XML_UnparsedEntityDeclHandler)(void *userData, typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) (
const XML_Char *entityName, void *userData,
const XML_Char *base, const XML_Char *entityName,
const XML_Char *systemId, const XML_Char *base,
const XML_Char *publicId, const XML_Char *systemId,
const XML_Char *notationName); const XML_Char *publicId,
const XML_Char *notationName);
/* This is called for a declaration of notation. The base argument is /* This is called for a declaration of notation. The base argument is
whatever was set by XML_SetBase. The notationName will never be whatever was set by XML_SetBase. The notationName will never be
NULL. The other arguments can be. NULL. The other arguments can be.
*/ */
typedef void (*XML_NotationDeclHandler)(void *userData, typedef void (XMLCALL *XML_NotationDeclHandler) (
const XML_Char *notationName, void *userData,
const XML_Char *base, const XML_Char *notationName,
const XML_Char *systemId, const XML_Char *base,
const XML_Char *publicId); const XML_Char *systemId,
const XML_Char *publicId);
/* When namespace processing is enabled, these are called once for /* When namespace processing is enabled, these are called once for
each namespace declaration. The call to the start and end element each namespace declaration. The call to the start and end element
@@ -375,12 +375,14 @@ typedef void (*XML_NotationDeclHandler)(void *userData,
declaration handlers. For an xmlns attribute, prefix will be declaration handlers. For an xmlns attribute, prefix will be
NULL. For an xmlns="" attribute, uri will be NULL. NULL. For an xmlns="" attribute, uri will be NULL.
*/ */
typedef void (*XML_StartNamespaceDeclHandler)(void *userData, typedef void (XMLCALL *XML_StartNamespaceDeclHandler) (
const XML_Char *prefix, void *userData,
const XML_Char *uri); const XML_Char *prefix,
const XML_Char *uri);
typedef void (*XML_EndNamespaceDeclHandler)(void *userData, typedef void (XMLCALL *XML_EndNamespaceDeclHandler) (
const XML_Char *prefix); void *userData,
const XML_Char *prefix);
/* This is called if the document is not standalone, that is, it has an /* This is called if the document is not standalone, that is, it has an
external subset or a reference to a parameter entity, but does not external subset or a reference to a parameter entity, but does not
@@ -391,7 +393,7 @@ typedef void (*XML_EndNamespaceDeclHandler)(void *userData,
conditions above this handler will only be called if the referenced conditions above this handler will only be called if the referenced
entity was actually read. entity was actually read.
*/ */
typedef int (*XML_NotStandaloneHandler)(void *userData); typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData);
/* This is called for a reference to an external parsed general /* This is called for a reference to an external parsed general
entity. The referenced entity is not automatically parsed. The entity. The referenced entity is not automatically parsed. The
@@ -427,11 +429,12 @@ typedef int (*XML_NotStandaloneHandler)(void *userData);
Note that unlike other handlers the first argument is the parser, Note that unlike other handlers the first argument is the parser,
not userData. not userData.
*/ */
typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser, typedef int (XMLCALL *XML_ExternalEntityRefHandler) (
const XML_Char *context, XML_Parser parser,
const XML_Char *base, const XML_Char *context,
const XML_Char *systemId, const XML_Char *base,
const XML_Char *publicId); const XML_Char *systemId,
const XML_Char *publicId);
/* This is called in two situations: /* This is called in two situations:
1) An entity reference is encountered for which no declaration 1) An entity reference is encountered for which no declaration
@@ -443,9 +446,10 @@ typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser,
the event would be out of sync with the reporting of the the event would be out of sync with the reporting of the
declarations or attribute values declarations or attribute values
*/ */
typedef void (*XML_SkippedEntityHandler)(void *userData, typedef void (XMLCALL *XML_SkippedEntityHandler) (
const XML_Char *entityName, void *userData,
int is_parameter_entity); const XML_Char *entityName,
int is_parameter_entity);
/* This structure is filled in by the XML_UnknownEncodingHandler to /* This structure is filled in by the XML_UnknownEncodingHandler to
provide information to the parser about encodings that are unknown provide information to the parser about encodings that are unknown
@@ -502,8 +506,8 @@ typedef void (*XML_SkippedEntityHandler)(void *userData,
typedef struct { typedef struct {
int map[256]; int map[256];
void *data; void *data;
int (*convert)(void *data, const char *s); int (XMLCALL *convert)(void *data, const char *s);
void (*release)(void *data); void (XMLCALL *release)(void *data);
} XML_Encoding; } XML_Encoding;
/* This is called for an encoding that is unknown to the parser. /* This is called for an encoding that is unknown to the parser.
@@ -521,9 +525,10 @@ typedef struct {
If info does not describe a suitable encoding, then the parser will If info does not describe a suitable encoding, then the parser will
return an XML_UNKNOWN_ENCODING error. return an XML_UNKNOWN_ENCODING error.
*/ */
typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData, typedef int (XMLCALL *XML_UnknownEncodingHandler) (
const XML_Char *name, void *encodingHandlerData,
XML_Encoding *info); const XML_Char *name,
XML_Encoding *info);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetElementHandler(XML_Parser parser, XML_SetElementHandler(XML_Parser parser,
@@ -531,10 +536,12 @@ XML_SetElementHandler(XML_Parser parser,
XML_EndElementHandler end); XML_EndElementHandler end);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler); XML_SetStartElementHandler(XML_Parser parser,
XML_StartElementHandler handler);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler); XML_SetEndElementHandler(XML_Parser parser,
XML_EndElementHandler handler);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetCharacterDataHandler(XML_Parser parser, XML_SetCharacterDataHandler(XML_Parser parser,
@@ -623,7 +630,8 @@ XML_SetExternalEntityRefHandler(XML_Parser parser,
instead of the parser object. instead of the parser object.
*/ */
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg); XML_SetExternalEntityRefHandlerArg(XML_Parser parser,
void *arg);
XMLPARSEAPI(void) XMLPARSEAPI(void)
XML_SetSkippedEntityHandler(XML_Parser parser, XML_SetSkippedEntityHandler(XML_Parser parser,
@@ -686,6 +694,9 @@ XML_UseParserAsHandlerArg(XML_Parser parser);
specified in the document. In such a case the parser will call the specified in the document. In such a case the parser will call the
externalEntityRefHandler with a value of NULL for the systemId externalEntityRefHandler with a value of NULL for the systemId
argument (the publicId and context arguments will be NULL as well). argument (the publicId and context arguments will be NULL as well).
Note: For the purpose of checking WFC: Entity Declared, passing
useDTD == XML_TRUE will make the parser behave as if the document
had a DTD with an external subset.
Note: If this function is called, then this must be done before Note: If this function is called, then this must be done before
the first call to XML_Parse or XML_ParseBuffer, since it will the first call to XML_Parse or XML_ParseBuffer, since it will
have no effect after that. Returns have no effect after that. Returns
@@ -731,6 +742,38 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
XMLPARSEAPI(int) XMLPARSEAPI(int)
XML_GetIdAttributeIndex(XML_Parser parser); XML_GetIdAttributeIndex(XML_Parser parser);
#ifdef XML_ATTR_INFO
/* Source file byte offsets for the start and end of attribute names and values.
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
file an attribute value of "blah" will yield:
info->valueEnd - info->valueStart = 4 bytes.
*/
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
passed in last call to the XML_StartElementHandler that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
XML_GetSpecifiedAttributeCount(parser) / 2.
*/
XMLPARSEAPI(const XML_AttrInfo *)
XML_GetAttributeInfo(XML_Parser parser);
#endif
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
Though the return values for these functions has always been
described as a Boolean value, the implementation, at least for the
1.95.x series, has always returned exactly one of the XML_Status
values.
*/
XMLPARSEAPI(enum XML_Status) XMLPARSEAPI(enum XML_Status)
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
@@ -740,6 +783,75 @@ XML_GetBuffer(XML_Parser parser, int len);
XMLPARSEAPI(enum XML_Status) XMLPARSEAPI(enum XML_Status)
XML_ParseBuffer(XML_Parser parser, int len, int isFinal); XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return.
Must be called from within a call-back handler, except when aborting
(resumable = 0) an already suspended parser. Some call-backs may
still follow because they would otherwise get lost. Examples:
- endElementHandler() for empty elements when stopped in
startElementHandler(),
- endNameSpaceDeclHandler() when stopped in endElementHandler(),
and possibly others.
Can be called from most handlers, including DTD related call-backs,
except when parsing an external parameter entity and resumable != 0.
Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise.
Possible error codes:
- XML_ERROR_SUSPENDED: when suspending an already suspended parser.
- XML_ERROR_FINISHED: when the parser has already finished.
- XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE.
When resumable != 0 (true) then parsing is suspended, that is,
XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED.
Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer()
return XML_STATUS_ERROR with error code XML_ERROR_ABORTED.
*Note*:
This will be applied to the current parser instance only, that is, if
there is a parent parser then it will continue parsing when the
externalEntityRefHandler() returns. It is up to the implementation of
the externalEntityRefHandler() to call XML_StopParser() on the parent
parser (recursively), if one wants to stop parsing altogether.
When suspended, parsing can be resumed by calling XML_ResumeParser().
*/
XMLPARSEAPI(enum XML_Status)
XML_StopParser(XML_Parser parser, XML_Bool resumable);
/* Resumes parsing after it has been suspended with XML_StopParser().
Must not be called from within a handler call-back. Returns same
status codes as XML_Parse() or XML_ParseBuffer().
Additional error code XML_ERROR_NOT_SUSPENDED possible.
*Note*:
This must be called on the most deeply nested child parser instance
first, and on its parent parser only after the child parser has finished,
to be applied recursively until the document entity's parser is restarted.
That is, the parent parser will not resume by itself and it is up to the
application to call XML_ResumeParser() on it at the appropriate moment.
*/
XMLPARSEAPI(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;
/* Returns status of parser with respect to being initialized, parsing,
finished, or suspended and processing the final buffer.
XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus,
XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED
*/
XMLPARSEAPI(void)
XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status);
/* Creates an XML_Parser object that can parse an external general /* Creates an XML_Parser object that can parse an external general
entity; context is a '\0'-terminated string specifying the parse entity; context is a '\0'-terminated string specifying the parse
context; encoding is a '\0'-terminated string giving the name of context; encoding is a '\0'-terminated string giving the name of
@@ -794,6 +906,15 @@ XMLPARSEAPI(int)
XML_SetParamEntityParsing(XML_Parser parser, XML_SetParamEntityParsing(XML_Parser parser,
enum XML_ParamEntityParsing parsing); enum XML_ParamEntityParsing parsing);
/* Sets the hash salt to use for internal hash calculations.
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.
*/
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser,
unsigned long hash_salt);
/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error. XML_GetErrorCode returns information about the error.
*/ */
@@ -802,8 +923,13 @@ XML_GetErrorCode(XML_Parser parser);
/* These functions return information about the current parse /* These functions return information about the current parse
location. They may be called from any callback called to report location. They may be called from any callback called to report
some parse event; in this case the location is the location of some parse event; in this case the location is the location of the
the first of the sequence of characters that generated the event. first of the sequence of characters that generated the event. When
called from callbacks generated by declarations in the document
prologue, the location identified isn't as neatly defined, but will
be within the relevant markup. When called outside of the callback
functions, the position indicated will be just past the last parse
event (regardless of whether there was an associated callback).
They may also be called after returning from a call to XML_Parse They may also be called after returning from a call to XML_Parse
or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then
@@ -811,9 +937,9 @@ XML_GetErrorCode(XML_Parser parser);
was detected; otherwise the location is the location of the last was detected; otherwise the location is the location of the last
parse event, as described above. parse event, as described above.
*/ */
XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser); XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser); XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser); XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);
/* Return the number of bytes in the current event. /* Return the number of bytes in the current event.
Returns 0 if the event is in an internal entity. Returns 0 if the event is in an internal entity.
@@ -888,7 +1014,10 @@ enum XML_FeatureEnum {
XML_FEATURE_CONTEXT_BYTES, XML_FEATURE_CONTEXT_BYTES,
XML_FEATURE_MIN_SIZE, XML_FEATURE_MIN_SIZE,
XML_FEATURE_SIZEOF_XML_CHAR, XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR XML_FEATURE_SIZEOF_XML_LCHAR,
XML_FEATURE_NS,
XML_FEATURE_LARGE_SIZE,
XML_FEATURE_ATTR_INFO
/* Additional features must be added to the end of this enum. */ /* Additional features must be added to the end of this enum. */
}; };
@@ -907,12 +1036,12 @@ XML_GetFeatureList(void);
releases. Micro is bumped with each release, and set to 0 with each releases. Micro is bumped with each release, and set to 0 with each
change to major or minor version. change to major or minor version.
*/ */
#define XML_MAJOR_VERSION 1 #define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 95 #define XML_MINOR_VERSION 1
#define XML_MICRO_VERSION 6 #define XML_MICRO_VERSION 0
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* not XmlParse_INCLUDED */ #endif /* not Expat_INCLUDED */

View File

@@ -0,0 +1,115 @@
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
/* External API definitions */
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif
/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.
XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.
XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).
The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.
Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(_MSC_VER)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.
If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
#define XMLCALL
#endif
#endif /* not defined XMLCALL */
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
#ifdef XML_USE_MSC_EXTENSIONS
#define XMLIMPORT __declspec(dllimport)
#endif
#endif
#endif /* not defined XML_STATIC */
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size;
#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */
#ifdef __cplusplus
}
#endif
#endif /* not Expat_External_INCLUDED */

View File

@@ -0,0 +1,162 @@
# Microsoft Developer Studio Project File - Name="expat_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=expat_static - 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 "expat_static.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 "expat_static.mak" CFG="expat_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "expat_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "expat_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "expat_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "expat_static___Win32_Release"
# PROP BASE Intermediate_Dir "expat_static___Win32_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_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x1009 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\win32\bin\Release\libexpatMT.lib"
!ELSEIF "$(CFG)" == "expat_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "expat_static___Win32_Debug"
# PROP BASE Intermediate_Dir "expat_static___Win32_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_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\win32\bin\Debug\libexpatMT.lib"
!ENDIF
# Begin Target
# Name "expat_static - Win32 Release"
# Name "expat_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\xmlparse.c
# End Source File
# Begin Source File
SOURCE=.\xmlrole.c
# End Source File
# Begin Source File
SOURCE=.\xmltok.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_ns.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\ascii.h
# End Source File
# Begin Source File
SOURCE=.\asciitab.h
# End Source File
# Begin Source File
SOURCE=.\expat.h
# End Source File
# Begin Source File
SOURCE=.\expat_external.h
# End Source File
# Begin Source File
SOURCE=.\iasciitab.h
# End Source File
# Begin Source File
SOURCE=.\internal.h
# End Source File
# Begin Source File
SOURCE=.\latin1tab.h
# End Source File
# Begin Source File
SOURCE=.\nametab.h
# End Source File
# Begin Source File
SOURCE=.\utf8tab.h
# End Source File
# Begin Source File
SOURCE=.\xmlrole.h
# End Source File
# Begin Source File
SOURCE=.\xmltok.h
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.h
# End Source File
# End Group
# End Target
# End Project

185
src/expat/lib/expatw.dsp Normal file
View File

@@ -0,0 +1,185 @@
# Microsoft Developer Studio Project File - Name="expatw" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=expatw - 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 "expatw.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 "expatw.mak" CFG="expatw - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "expatw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "expatw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "expatw - 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-w"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# 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 /dll /machine:I386
# ADD LINK32 /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release\libexpatw.dll"
!ELSEIF "$(CFG)" == "expatw - 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-w"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# 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 /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug\libexpatw.dll"
!ENDIF
# Begin Target
# Name "expatw - Win32 Release"
# Name "expatw - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\libexpatw.def
# End Source File
# Begin Source File
SOURCE=.\xmlparse.c
!IF "$(CFG)" == "expatw - Win32 Release"
!ELSEIF "$(CFG)" == "expatw - Win32 Debug"
# ADD CPP /GX- /Od
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\xmlrole.c
# End Source File
# Begin Source File
SOURCE=.\xmltok.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_ns.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\ascii.h
# End Source File
# Begin Source File
SOURCE=.\asciitab.h
# End Source File
# Begin Source File
SOURCE=.\expat.h
# End Source File
# Begin Source File
SOURCE=.\expat_external.h
# End Source File
# Begin Source File
SOURCE=.\iasciitab.h
# End Source File
# Begin Source File
SOURCE=.\internal.h
# End Source File
# Begin Source File
SOURCE=.\latin1tab.h
# End Source File
# Begin Source File
SOURCE=.\nametab.h
# End Source File
# Begin Source File
SOURCE=.\utf8tab.h
# End Source File
# Begin Source File
SOURCE=.\xmlrole.h
# End Source File
# Begin Source File
SOURCE=.\xmltok.h
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.h
# End Source File
# 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

View File

@@ -0,0 +1,162 @@
# Microsoft Developer Studio Project File - Name="expatw_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=expatw_static - 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 "expatw_static.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 "expatw_static.mak" CFG="expatw_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "expatw_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "expatw_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "expatw_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "expatw_static___Win32_Release"
# PROP BASE Intermediate_Dir "expatw_static___Win32_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-w_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x1009 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\win32\bin\Release\libexpatwMT.lib"
!ELSEIF "$(CFG)" == "expatw_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "expatw_static___Win32_Debug"
# PROP BASE Intermediate_Dir "expatw_static___Win32_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-w_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\win32\bin\Debug\libexpatwMT.lib"
!ENDIF
# Begin Target
# Name "expatw_static - Win32 Release"
# Name "expatw_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\xmlparse.c
# End Source File
# Begin Source File
SOURCE=.\xmlrole.c
# End Source File
# Begin Source File
SOURCE=.\xmltok.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.c
# End Source File
# Begin Source File
SOURCE=.\xmltok_ns.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\ascii.h
# End Source File
# Begin Source File
SOURCE=.\asciitab.h
# End Source File
# Begin Source File
SOURCE=.\expat.h
# End Source File
# Begin Source File
SOURCE=.\expat_external.h
# End Source File
# Begin Source File
SOURCE=.\iasciitab.h
# End Source File
# Begin Source File
SOURCE=.\internal.h
# End Source File
# Begin Source File
SOURCE=.\latin1tab.h
# End Source File
# Begin Source File
SOURCE=.\nametab.h
# End Source File
# Begin Source File
SOURCE=.\utf8tab.h
# End Source File
# Begin Source File
SOURCE=.\xmlrole.h
# End Source File
# Begin Source File
SOURCE=.\xmltok.h
# End Source File
# Begin Source File
SOURCE=.\xmltok_impl.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -20,21 +20,20 @@
and therefore subject to change. and therefore subject to change.
*/ */
#ifdef FASTCALL #if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)
#undef FASTCALL /* We'll use this version by default only where we know it helps.
#endif
#if defined(__GNUC__) && defined(__i386__) regparm() generates warnings on Solaris boxes. See SF bug #692878.
/* Instability reported with egcs on a RedHat Linux 7.3.
Let's comment it out: Instability reported with egcs on a RedHat Linux 7.3.
Let's comment out:
#define FASTCALL __attribute__((stdcall, regparm(3))) #define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this: and let's try this:
*/ */
#define FASTCALL __attribute__((regparm(3))) #define FASTCALL __attribute__((regparm(3)))
#define PTRCALL
#define PTRFASTCALL __attribute__((regparm(3))) #define PTRFASTCALL __attribute__((regparm(3)))
#endif
#elif defined(WIN32)
/* Using __fastcall seems to have an unexpected negative effect under /* Using __fastcall seems to have an unexpected negative effect under
MS VC++, especially for function pointers, so we won't use it for MS VC++, especially for function pointers, so we won't use it for
now on that platform. It may be reconsidered for a future release now on that platform. It may be reconsidered for a future release
@@ -42,11 +41,8 @@
Likely reason: __fastcall on Windows is like stdcall, therefore Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters. the compiler cannot perform stack optimizations for call clusters.
*/ */
#define FASTCALL
#define PTRCALL
#define PTRFASTCALL
#endif /* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL #ifndef FASTCALL
#define FASTCALL #define FASTCALL

View File

@@ -0,0 +1,73 @@
; DEF file for MS VC++
LIBRARY
EXPORTS
XML_DefaultCurrent @1
XML_ErrorString @2
XML_ExpatVersion @3
XML_ExpatVersionInfo @4
XML_ExternalEntityParserCreate @5
XML_GetBase @6
XML_GetBuffer @7
XML_GetCurrentByteCount @8
XML_GetCurrentByteIndex @9
XML_GetCurrentColumnNumber @10
XML_GetCurrentLineNumber @11
XML_GetErrorCode @12
XML_GetIdAttributeIndex @13
XML_GetInputContext @14
XML_GetSpecifiedAttributeCount @15
XML_Parse @16
XML_ParseBuffer @17
XML_ParserCreate @18
XML_ParserCreateNS @19
XML_ParserCreate_MM @20
XML_ParserFree @21
XML_SetAttlistDeclHandler @22
XML_SetBase @23
XML_SetCdataSectionHandler @24
XML_SetCharacterDataHandler @25
XML_SetCommentHandler @26
XML_SetDefaultHandler @27
XML_SetDefaultHandlerExpand @28
XML_SetDoctypeDeclHandler @29
XML_SetElementDeclHandler @30
XML_SetElementHandler @31
XML_SetEncoding @32
XML_SetEndCdataSectionHandler @33
XML_SetEndDoctypeDeclHandler @34
XML_SetEndElementHandler @35
XML_SetEndNamespaceDeclHandler @36
XML_SetEntityDeclHandler @37
XML_SetExternalEntityRefHandler @38
XML_SetExternalEntityRefHandlerArg @39
XML_SetNamespaceDeclHandler @40
XML_SetNotStandaloneHandler @41
XML_SetNotationDeclHandler @42
XML_SetParamEntityParsing @43
XML_SetProcessingInstructionHandler @44
XML_SetReturnNSTriplet @45
XML_SetStartCdataSectionHandler @46
XML_SetStartDoctypeDeclHandler @47
XML_SetStartElementHandler @48
XML_SetStartNamespaceDeclHandler @49
XML_SetUnknownEncodingHandler @50
XML_SetUnparsedEntityDeclHandler @51
XML_SetUserData @52
XML_SetXmlDeclHandler @53
XML_UseParserAsHandlerArg @54
; added with version 1.95.3
XML_ParserReset @55
XML_SetSkippedEntityHandler @56
; added with version 1.95.5
XML_GetFeatureList @57
XML_UseForeignDTD @58
; added with version 1.95.6
XML_FreeContentModel @59
XML_MemMalloc @60
XML_MemRealloc @61
XML_MemFree @62
; added with version 1.95.8
XML_StopParser @63
XML_ResumeParser @64
XML_GetParsingStatus @65

View File

@@ -0,0 +1,73 @@
; DEF file for MS VC++
LIBRARY
EXPORTS
XML_DefaultCurrent @1
XML_ErrorString @2
XML_ExpatVersion @3
XML_ExpatVersionInfo @4
XML_ExternalEntityParserCreate @5
XML_GetBase @6
XML_GetBuffer @7
XML_GetCurrentByteCount @8
XML_GetCurrentByteIndex @9
XML_GetCurrentColumnNumber @10
XML_GetCurrentLineNumber @11
XML_GetErrorCode @12
XML_GetIdAttributeIndex @13
XML_GetInputContext @14
XML_GetSpecifiedAttributeCount @15
XML_Parse @16
XML_ParseBuffer @17
XML_ParserCreate @18
XML_ParserCreateNS @19
XML_ParserCreate_MM @20
XML_ParserFree @21
XML_SetAttlistDeclHandler @22
XML_SetBase @23
XML_SetCdataSectionHandler @24
XML_SetCharacterDataHandler @25
XML_SetCommentHandler @26
XML_SetDefaultHandler @27
XML_SetDefaultHandlerExpand @28
XML_SetDoctypeDeclHandler @29
XML_SetElementDeclHandler @30
XML_SetElementHandler @31
XML_SetEncoding @32
XML_SetEndCdataSectionHandler @33
XML_SetEndDoctypeDeclHandler @34
XML_SetEndElementHandler @35
XML_SetEndNamespaceDeclHandler @36
XML_SetEntityDeclHandler @37
XML_SetExternalEntityRefHandler @38
XML_SetExternalEntityRefHandlerArg @39
XML_SetNamespaceDeclHandler @40
XML_SetNotStandaloneHandler @41
XML_SetNotationDeclHandler @42
XML_SetParamEntityParsing @43
XML_SetProcessingInstructionHandler @44
XML_SetReturnNSTriplet @45
XML_SetStartCdataSectionHandler @46
XML_SetStartDoctypeDeclHandler @47
XML_SetStartElementHandler @48
XML_SetStartNamespaceDeclHandler @49
XML_SetUnknownEncodingHandler @50
XML_SetUnparsedEntityDeclHandler @51
XML_SetUserData @52
XML_SetXmlDeclHandler @53
XML_UseParserAsHandlerArg @54
; added with version 1.95.3
XML_ParserReset @55
XML_SetSkippedEntityHandler @56
; added with version 1.95.5
XML_GetFeatureList @57
XML_UseForeignDTD @58
; added with version 1.95.6
XML_FreeContentModel @59
XML_MemMalloc @60
XML_MemRealloc @61
XML_MemFree @62
; added with version 1.95.8
XML_StopParser @63
XML_ResumeParser @64
XML_GetParsingStatus @65

View File

@@ -18,72 +18,15 @@
/* Define to 1 if you have the `bcopy' function. */ /* Define to 1 if you have the `bcopy' function. */
#undef HAVE_BCOPY #undef HAVE_BCOPY
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `memmove' function. */ /* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE #define HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */ /* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP #undef HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#ifndef HAVE_STDLIB_H
#define HAVE_STDLIB_H
#endif
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#ifndef HAVE_STRING_H
#define HAVE_STRING_H
#endif
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#ifndef STDC_HEADERS
#define STDC_HEADERS
#endif
/* whether byteorder is bigendian */ /* whether byteorder is bigendian */
#define WORDS_BIGENDIAN #define WORDS_BIGENDIAN

View File

@@ -0,0 +1,47 @@
/* expat_config.h for use with Open Watcom 1.5 and above. */
#ifndef WATCOMCONFIG_H
#define WATCOMCONFIG_H
#ifdef __NT__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#endif
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#define BYTEORDER 1234
/* 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
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "expat-bugs@mail.libexpat.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 2.0.0"
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.0.0"
/* 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 1
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,8 @@
See the file COPYING for copying permission. See the file COPYING for copying permission.
*/ */
#include <stddef.h>
#ifdef COMPILED_FROM_DSP #ifdef COMPILED_FROM_DSP
#include "winconfig.h" #include "winconfig.h"
#elif defined(OS2_32) #elif defined(OS2_32)
@@ -10,10 +12,17 @@
#include "dosconfig.h" #include "dosconfig.h"
#elif defined(MACOS_CLASSIC) #elif defined(MACOS_CLASSIC)
#include "macconfig.h" #include "macconfig.h"
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
#else #else
#include "expat_config.h" #ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
#endif /* ndef COMPILED_FROM_DSP */ #endif /* ndef COMPILED_FROM_DSP */
#include "expat_external.h"
#include "internal.h" #include "internal.h"
#include "xmlrole.h" #include "xmlrole.h"
#include "ascii.h" #include "ascii.h"
@@ -50,12 +59,16 @@ static const char KW_IDREF[] = {
ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0' }; ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0' };
static const char KW_IDREFS[] = { static const char KW_IDREFS[] = {
ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0' }; ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0' };
#ifdef XML_DTD
static const char KW_IGNORE[] = { static const char KW_IGNORE[] = {
ASCII_I, ASCII_G, ASCII_N, ASCII_O, ASCII_R, ASCII_E, '\0' }; ASCII_I, ASCII_G, ASCII_N, ASCII_O, ASCII_R, ASCII_E, '\0' };
#endif
static const char KW_IMPLIED[] = { static const char KW_IMPLIED[] = {
ASCII_I, ASCII_M, ASCII_P, ASCII_L, ASCII_I, ASCII_E, ASCII_D, '\0' }; ASCII_I, ASCII_M, ASCII_P, ASCII_L, ASCII_I, ASCII_E, ASCII_D, '\0' };
#ifdef XML_DTD
static const char KW_INCLUDE[] = { static const char KW_INCLUDE[] = {
ASCII_I, ASCII_N, ASCII_C, ASCII_L, ASCII_U, ASCII_D, ASCII_E, '\0' }; ASCII_I, ASCII_N, ASCII_C, ASCII_L, ASCII_U, ASCII_D, ASCII_E, '\0' };
#endif
static const char KW_NDATA[] = { static const char KW_NDATA[] = {
ASCII_N, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; ASCII_N, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' };
static const char KW_NMTOKEN[] = { static const char KW_NMTOKEN[] = {
@@ -372,6 +385,8 @@ internalSubset(PROLOG_STATE *state,
case XML_TOK_CLOSE_BRACKET: case XML_TOK_CLOSE_BRACKET:
state->handler = doctype5; state->handler = doctype5;
return XML_ROLE_DOCTYPE_NONE; return XML_ROLE_DOCTYPE_NONE;
case XML_TOK_NONE:
return XML_ROLE_NONE;
} }
return common(state, tok); return common(state, tok);
} }
@@ -790,7 +805,7 @@ attlist2(PROLOG_STATE *state,
return XML_ROLE_ATTLIST_NONE; return XML_ROLE_ATTLIST_NONE;
case XML_TOK_NAME: case XML_TOK_NAME:
{ {
static const char *types[] = { static const char * const types[] = {
KW_CDATA, KW_CDATA,
KW_ID, KW_ID,
KW_IDREF, KW_IDREF,

View File

@@ -2,6 +2,8 @@
See the file COPYING for copying permission. See the file COPYING for copying permission.
*/ */
#include <stddef.h>
#ifdef COMPILED_FROM_DSP #ifdef COMPILED_FROM_DSP
#include "winconfig.h" #include "winconfig.h"
#elif defined(OS2_32) #elif defined(OS2_32)
@@ -10,10 +12,17 @@
#include "dosconfig.h" #include "dosconfig.h"
#elif defined(MACOS_CLASSIC) #elif defined(MACOS_CLASSIC)
#include "macconfig.h" #include "macconfig.h"
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
#else #else
#include "expat_config.h" #ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
#endif /* ndef COMPILED_FROM_DSP */ #endif /* ndef COMPILED_FROM_DSP */
#include "expat_external.h"
#include "internal.h" #include "internal.h"
#include "xmltok.h" #include "xmltok.h"
#include "nametab.h" #include "nametab.h"
@@ -292,7 +301,9 @@ sb_charMatches(const ENCODING *enc, const char *p, int c)
#endif #endif
#define PREFIX(ident) normal_ ## ident #define PREFIX(ident) normal_ ## ident
#define XML_TOK_IMPL_C
#include "xmltok_impl.c" #include "xmltok_impl.c"
#undef XML_TOK_IMPL_C
#undef MINBPC #undef MINBPC
#undef BYTE_TYPE #undef BYTE_TYPE
@@ -689,7 +700,9 @@ little2_isNmstrtMin(const ENCODING *enc, const char *p)
#define IS_NMSTRT_CHAR(enc, p, n) (0) #define IS_NMSTRT_CHAR(enc, p, n) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) #define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p)
#define XML_TOK_IMPL_C
#include "xmltok_impl.c" #include "xmltok_impl.c"
#undef XML_TOK_IMPL_C
#undef MINBPC #undef MINBPC
#undef BYTE_TYPE #undef BYTE_TYPE
@@ -828,7 +841,9 @@ big2_isNmstrtMin(const ENCODING *enc, const char *p)
#define IS_NMSTRT_CHAR(enc, p, n) (0) #define IS_NMSTRT_CHAR(enc, p, n) (0)
#define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) #define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p)
#define XML_TOK_IMPL_C
#include "xmltok_impl.c" #include "xmltok_impl.c"
#undef XML_TOK_IMPL_C
#undef MINBPC #undef MINBPC
#undef BYTE_TYPE #undef BYTE_TYPE
@@ -1235,7 +1250,7 @@ XmlUtf16Encode(int charNum, unsigned short *buf)
struct unknown_encoding { struct unknown_encoding {
struct normal_encoding normal; struct normal_encoding normal;
int (*convert)(void *userData, const char *p); CONVERTER convert;
void *userData; void *userData;
unsigned short utf16[256]; unsigned short utf16[256];
char utf8[256][4]; char utf8[256][4];
@@ -1450,7 +1465,7 @@ static const char KW_UTF_16LE[] = {
static int FASTCALL static int FASTCALL
getEncodingIndex(const char *name) getEncodingIndex(const char *name)
{ {
static const char *encodingNames[] = { static const char * const encodingNames[] = {
KW_ISO_8859_1, KW_ISO_8859_1,
KW_US_ASCII, KW_US_ASCII,
KW_UTF_8, KW_UTF_8,
@@ -1483,7 +1498,7 @@ getEncodingIndex(const char *name)
static int static int
initScan(const ENCODING **encodingTable, initScan(const ENCODING * const *encodingTable,
const INIT_ENCODING *enc, const INIT_ENCODING *enc,
int state, int state,
const char *ptr, const char *ptr,
@@ -1607,7 +1622,9 @@ initScan(const ENCODING **encodingTable,
#define NS(x) x #define NS(x) x
#define ns(x) x #define ns(x) x
#define XML_TOK_NS_C
#include "xmltok_ns.c" #include "xmltok_ns.c"
#undef XML_TOK_NS_C
#undef NS #undef NS
#undef ns #undef ns
@@ -1616,7 +1633,9 @@ initScan(const ENCODING **encodingTable,
#define NS(x) x ## NS #define NS(x) x ## NS
#define ns(x) x ## _ns #define ns(x) x ## _ns
#define XML_TOK_NS_C
#include "xmltok_ns.c" #include "xmltok_ns.c"
#undef XML_TOK_NS_C
#undef NS #undef NS
#undef ns #undef ns

View File

@@ -111,8 +111,8 @@ extern "C" {
typedef struct position { typedef struct position {
/* first line and first column are 0 not 1 */ /* first line and first column are 0 not 1 */
unsigned long lineNumber; XML_Size lineNumber;
unsigned long columnNumber; XML_Size columnNumber;
} POSITION; } POSITION;
typedef struct { typedef struct {
@@ -281,7 +281,8 @@ int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf); int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
int XmlSizeOfUnknownEncoding(void); int XmlSizeOfUnknownEncoding(void);
typedef int (*CONVERTER)(void *userData, const char *p);
typedef int (XMLCALL *CONVERTER) (void *userData, const char *p);
ENCODING * ENCODING *
XmlInitUnknownEncoding(void *mem, XmlInitUnknownEncoding(void *mem,

View File

@@ -2,6 +2,9 @@
See the file COPYING for copying permission. See the file COPYING for copying permission.
*/ */
/* This file is included! */
#ifdef XML_TOK_IMPL_C
#ifndef IS_INVALID_CHAR #ifndef IS_INVALID_CHAR
#define IS_INVALID_CHAR(enc, ptr, n) (0) #define IS_INVALID_CHAR(enc, ptr, n) (0)
#endif #endif
@@ -1714,7 +1717,7 @@ PREFIX(nameLength)(const ENCODING *enc, const char *ptr)
ptr += MINBPC(enc); ptr += MINBPC(enc);
break; break;
default: default:
return ptr - start; return (int)(ptr - start);
} }
} }
} }
@@ -1741,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
const char *end, const char *end,
POSITION *pos) POSITION *pos)
{ {
while (ptr != end) { while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) { switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \ #define LEAD_CASE(n) \
case BT_LEAD ## n: \ case BT_LEAD ## n: \
@@ -1750,7 +1753,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
#undef LEAD_CASE #undef LEAD_CASE
case BT_LF: case BT_LF:
pos->columnNumber = (unsigned)-1; pos->columnNumber = (XML_Size)-1;
pos->lineNumber++; pos->lineNumber++;
ptr += MINBPC(enc); ptr += MINBPC(enc);
break; break;
@@ -1759,7 +1762,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
ptr += MINBPC(enc); ptr += MINBPC(enc);
if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF) if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF)
ptr += MINBPC(enc); ptr += MINBPC(enc);
pos->columnNumber = (unsigned)-1; pos->columnNumber = (XML_Size)-1;
break; break;
default: default:
ptr += MINBPC(enc); ptr += MINBPC(enc);
@@ -1777,3 +1780,4 @@ PREFIX(updatePosition)(const ENCODING *enc,
#undef CHECK_NMSTRT_CASE #undef CHECK_NMSTRT_CASE
#undef CHECK_NMSTRT_CASES #undef CHECK_NMSTRT_CASES
#endif /* XML_TOK_IMPL_C */

View File

@@ -1,3 +1,10 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* This file is included! */
#ifdef XML_TOK_NS_C
const ENCODING * const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void) NS(XmlGetUtf8InternalEncoding)(void)
{ {
@@ -19,7 +26,7 @@ NS(XmlGetUtf16InternalEncoding)(void)
#endif #endif
} }
static const ENCODING *NS(encodings)[] = { static const ENCODING * const NS(encodings)[] = {
&ns(latin1_encoding).enc, &ns(latin1_encoding).enc,
&ns(ascii_encoding).enc, &ns(ascii_encoding).enc,
&ns(utf8_encoding).enc, &ns(utf8_encoding).enc,
@@ -104,3 +111,5 @@ NS(XmlParseXmlDecl)(int isGeneralTextEntity,
encoding, encoding,
standalone); standalone);
} }
#endif /* XML_TOK_NS_C */

7377
src/expat/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

368
src/expat/m4/ltoptions.m4 vendored Normal file
View File

@@ -0,0 +1,368 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [0], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

123
src/expat/m4/ltsugar.m4 vendored Normal file
View File

@@ -0,0 +1,123 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

23
src/expat/m4/ltversion.m4 vendored Normal file
View File

@@ -0,0 +1,23 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# Generated from ltversion.in.
# serial 3017 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
m4_define([LT_PACKAGE_REVISION], [1.3017])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.2.6b'
macro_revision='1.3017'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

92
src/expat/m4/lt~obsolete.m4 vendored Normal file
View File

@@ -0,0 +1,92 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 4 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])

76
src/expat/make-release.sh Executable file
View File

@@ -0,0 +1,76 @@
#! /bin/bash
#
# make-release.sh: make an Expat release
#
# USAGE: make-release.sh tagname
#
# Note: tagname may be HEAD to just grab the head revision (e.g. for testing)
#
#CVSROOT=':ext:cvs.libexpat.org:/cvsroot/expat'
CVSROOT=':pserver:anonymous@expat.cvs.sourceforge.net:/cvsroot/expat'
if test $# != 1; then
echo "USAGE: $0 tagname"
exit 1
fi
tmpdir=expat-release.$$
if test -e $tmpdir; then
echo "ERROR: oops. chose the $tmpdir subdir, but it exists."
exit 1
fi
echo "Checking out into temporary area: $tmpdir"
cvs -fq -d "$CVSROOT" export -r "$1" -d $tmpdir expat || exit 1
echo ""
echo "----------------------------------------------------------------------"
echo "Preparing $tmpdir for release (running buildconf.sh)"
(cd $tmpdir && ./buildconf.sh) || exit 1
# figure out the release version
vsn="`$tmpdir/conftools/get-version.sh $tmpdir/lib/expat.h`"
echo ""
echo "Release version: $vsn"
if test "$1" = HEAD ; then
distdir=expat-`date '+%Y-%m-%d'`
else
distdir=expat-$vsn
fi
if test -e $distdir; then
echo "ERROR: for safety, you must manually remove $distdir."
rm -rf $tmpdir
exit 1
fi
mkdir $distdir || exit 1
CPOPTS=-Pp
if (cp --version 2>/dev/null | grep -q 'Free Software Foundation') ; then
# If we're using GNU cp, we can avoid the warnings about forward
# compatibility of the options.
CPOPTS='--parents --preserve'
fi
echo ""
echo "----------------------------------------------------------------------"
echo "Building $distdir based on the MANIFEST:"
files="`sed -e 's/[ ]:.*$//' $tmpdir/MANIFEST`"
for file in $files; do
echo "Copying $file..."
(cd $tmpdir && cp $CPOPTS $file ../$distdir) || exit 1
done
echo ""
echo "----------------------------------------------------------------------"
echo "Removing (temporary) checkout directory..."
rm -rf $tmpdir
tarball=$distdir.tar.gz
echo "Constructing $tarball..."
tar cf - $distdir | gzip -9 > $tarball || exit $?
rm -r $distdir
echo "Done."

View File

@@ -0,0 +1,6 @@
Makefile
runtests
runtestspp
xmlts.zip
XML-Test-Suite
.libs

View File

@@ -3,12 +3,11 @@ tests provide general unit testing and regression coverage. The tests
are not expected to be useful examples of Expat usage; see the are not expected to be useful examples of Expat usage; see the
examples/ directory for that. examples/ directory for that.
The Expat tests use the "Check" unit testing framework for C. More The Expat tests use a partial internal implementation of the "Check"
information on Check can be found at: unit testing framework for C. More information on Check can be found at:
http://check.sourceforge.net/ http://check.sourceforge.net/
Check 0.8 must be installed before the unit tests can be compiled & run. Expat must be built and, depending on platform, must be installed, before "make check" can be executed.
Since both Check and this test suite are young, it can all change in a This test suite can all change in a later version.
later version.

View File

@@ -0,0 +1,16 @@
Use this benchmark command line utility as follows:
benchmark [-n] <file name> <buffer size> <# iterations>
The command line arguments are:
-n ... optional; if supplied, namespace processing is turned on
<file name> ... name/path of test xml file
<buffer size> ... size of processing buffer;
the file is parsed in chunks of this size
<# iterations> ... how often will the file be parsed
Returns:
The time (in seconds) it takes to parse the test file,
averaged over the number of iterations.

View File

@@ -0,0 +1,114 @@
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#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
#define XML_FMT_INT_MOD "l"
#endif
static void
usage(const char *prog, int rc)
{
fprintf(stderr,
"usage: %s [-n] filename bufferSize nr_of_loops\n", prog);
exit(rc);
}
int main (int argc, char *argv[])
{
XML_Parser parser;
char *XMLBuf, *XMLBufEnd, *XMLBufPtr;
FILE *fd;
struct stat fileAttr;
int nrOfLoops, bufferSize, fileSize, i, isFinal;
int j = 0, ns = 0;
clock_t tstart, tend;
double cpuTime = 0.0;
if (argc > 1) {
if (argv[1][0] == '-') {
if (argv[1][1] == 'n' && argv[1][2] == '\0') {
ns = 1;
j = 1;
}
else
usage(argv[0], 1);
}
}
if (argc != j + 4)
usage(argv[0], 1);
if (stat (argv[j + 1], &fileAttr) != 0) {
fprintf (stderr, "could not access file '%s'\n", argv[j + 1]);
return 2;
}
fd = fopen (argv[j + 1], "r");
if (!fd) {
fprintf (stderr, "could not open file '%s'\n", argv[j + 1]);
exit(2);
}
bufferSize = atoi (argv[j + 2]);
nrOfLoops = atoi (argv[j + 3]);
if (bufferSize <= 0 || nrOfLoops <= 0) {
fprintf (stderr,
"buffer size and nr of loops must be greater than zero.\n");
exit(3);
}
XMLBuf = malloc (fileAttr.st_size);
fileSize = fread (XMLBuf, sizeof (char), fileAttr.st_size, fd);
fclose (fd);
if (ns)
parser = XML_ParserCreateNS(NULL, '!');
else
parser = XML_ParserCreate(NULL);
i = 0;
XMLBufEnd = XMLBuf + fileSize;
while (i < nrOfLoops) {
XMLBufPtr = XMLBuf;
isFinal = 0;
tstart = clock();
do {
int parseBufferSize = XMLBufEnd - XMLBufPtr;
if (parseBufferSize <= bufferSize)
isFinal = 1;
else
parseBufferSize = bufferSize;
if (!XML_Parse (parser, XMLBufPtr, parseBufferSize, isFinal)) {
fprintf (stderr, "error '%s' at line %" XML_FMT_INT_MOD \
"u character %" XML_FMT_INT_MOD "u\n",
XML_ErrorString (XML_GetErrorCode (parser)),
XML_GetCurrentLineNumber (parser),
XML_GetCurrentColumnNumber (parser));
free (XMLBuf);
XML_ParserFree (parser);
exit (4);
}
XMLBufPtr += bufferSize;
} while (!isFinal);
tend = clock();
cpuTime += ((double) (tend - tstart)) / CLOCKS_PER_SEC;
XML_ParserReset(parser, NULL);
i++;
}
XML_ParserFree (parser);
free (XMLBuf);
printf ("%d loops, with buffer size %d. Average time per loop: %f\n",
nrOfLoops, bufferSize, cpuTime / (double) nrOfLoops);
return 0;
}

View File

@@ -0,0 +1,88 @@
# 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

View File

@@ -0,0 +1,44 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,10 +1,19 @@
/* chardata.c /* Copyright (c) 1998-2003 Thai Open Source Software Center Ltd
* See the file COPYING for copying permission.
*
*/ chardata.c
*/
#ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
#ifdef HAVE_CHECK_H
#include <check.h>
#else
#include "minicheck.h"
#endif
#include <assert.h> #include <assert.h>
#include <check.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@@ -4,6 +4,10 @@
and attribute content. and attribute content.
*/ */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef XML_CHARDATA_H #ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1 #define XML_CHARDATA_H 1
@@ -30,3 +34,7 @@ int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
#endif /* XML_CHARDATA_H */ #endif /* XML_CHARDATA_H */
#ifdef __cplusplus
}
#endif

Some files were not shown because too many files have changed in this diff Show More