Commit 1712885b authored by Kitware Robot's avatar Kitware Robot Committed by Brad King
Browse files

expat 2019-09-25 (a7bc26b6)

Code extracted from:

    https://github.com/libexpat/libexpat.git

at commit a7bc26b69768f7fb24f0c7976fae24b157b85b13 (R_2_2_9).
parent ba13dc2a
...@@ -21,7 +21,7 @@ check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE) ...@@ -21,7 +21,7 @@ check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)
check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP) check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)
check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM) check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
if(USE_libbsd) if(EXPAT_WITH_LIBBSD)
set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}") set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")
set(_bsd "bsd/") set(_bsd "bsd/")
else() else()
...@@ -62,8 +62,5 @@ check_c_source_compiles(" ...@@ -62,8 +62,5 @@ check_c_source_compiles("
}" }"
HAVE_SYSCALL_GETRANDOM) HAVE_SYSCALL_GETRANDOM)
configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h")
add_definitions(-DHAVE_EXPAT_CONFIG_H)
check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING) check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY) check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) [![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions)
# Expat, Release 2.2.7 # Expat, Release 2.2.9
This is Expat, a C library for parsing XML, started by This is Expat, a C library for parsing XML, started by
[James Clark](https://en.wikipedia.org/wiki/James_Clark_(programmer)) in 1997. [James Clark](https://en.wikipedia.org/wiki/James_Clark_(programmer)) in 1997.
...@@ -13,6 +13,11 @@ are called when the parser discovers the associated structures in the ...@@ -13,6 +13,11 @@ are called when the parser discovers the associated structures in the
document being parsed. A start tag is an example of the kind of 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.
Expat supports the following compilers:
- GNU GCC >=4.5
- LLVM Clang >=3.5
- Microsoft Visual Studio >=8.0/2005
Windows users should use the Windows users should use the
[`expat_win32` package](https://sourceforge.net/projects/expat/files/expat_win32/), [`expat_win32` package](https://sourceforge.net/projects/expat/files/expat_win32/),
which includes both precompiled libraries and executables, and source code for which includes both precompiled libraries and executables, and source code for
...@@ -125,3 +130,59 @@ information. ...@@ -125,3 +130,59 @@ information.
A reference manual is available in the file `doc/reference.html` in this A reference manual is available in the file `doc/reference.html` in this
distribution. distribution.
The CMake build system is still *experimental* and will replace the primary
build system based on GNU Autotools at some point when it is ready.
For an idea of the available (non-advanced) options for building with CMake:
```console
# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,'
// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=
// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
// Path to a program.
DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man
// build man page for xmlwf
EXPAT_BUILD_DOCS:BOOL=ON
// build the examples for expat library
EXPAT_BUILD_EXAMPLES:BOOL=ON
// build fuzzers for the expat library
EXPAT_BUILD_FUZZERS:BOOL=OFF
// build the tests for expat library
EXPAT_BUILD_TESTS:BOOL=ON
// build the xmlwf tool for expat library
EXPAT_BUILD_TOOLS:BOOL=ON
// Character type to use (char|ushort|wchar_t) [default=char]
EXPAT_CHAR_TYPE:STRING=char
// install expat files in cmake install target
EXPAT_ENABLE_INSTALL:BOOL=ON
// Use /MT flag (static CRT) when compiling in MSVC
EXPAT_MSVC_STATIC_CRT:BOOL=OFF
// build a shared expat library
EXPAT_SHARED_LIBS:BOOL=ON
// Treat all compiler warnings as errors
EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF
// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]
EXPAT_WITH_GETRANDOM:STRING=AUTO
// utilize libbsd (for arc4random_buf)
EXPAT_WITH_LIBBSD:BOOL=OFF
// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]
EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO
```
...@@ -57,20 +57,26 @@ ...@@ -57,20 +57,26 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H #cmakedefine HAVE_UNISTD_H
/* Name of package */
#define PACKAGE "@PACKAGE_NAME@"
/* 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. */
#cmakedefine PACKAGE_BUGREPORT #cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */ /* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME #cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING #cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME #cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */ /* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS #cmakedefine STDC_HEADERS
...@@ -78,30 +84,28 @@ ...@@ -78,30 +84,28 @@
/* whether byteorder is bigendian */ /* whether byteorder is bigendian */
#cmakedefine WORDS_BIGENDIAN #cmakedefine WORDS_BIGENDIAN
/* Define to allow retrieving the byte offsets for attribute names and values.
*/
#cmakedefine XML_ATTR_INFO
/* Define to specify how much context to retain around the current parse /* Define to specify how much context to retain around the current parse
point. */ point. */
#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@ #cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
#if ! defined(_WIN32)
/* Define to include code reading entropy from `/dev/urandom'. */
#cmakedefine XML_DEV_URANDOM
#endif
/* Define to make parameter entity parsing functionality available. */ /* Define to make parameter entity parsing functionality available. */
#cmakedefine XML_DTD #cmakedefine XML_DTD
/* Define to make XML Namespaces functionality available. */ /* Define to make XML Namespaces functionality available. */
#cmakedefine XML_NS #cmakedefine XML_NS
#if ! defined(_WIN32)
/* Define to extract entropy from /dev/urandom. */
#cmakedefine XML_DEV_URANDOM
#endif
/* Define to use UTF-16 chars (two bytes). */
#cmakedefine XML_UNICODE
/* Define to use wchar_t as UTF-16 char type instead of unsigned short. */
#cmakedefine XML_UNICODE_WCHAR_T
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER #ifdef _MSC_VER
# define __func__ __FUNCTION__ # define __func__ __FUNCTION__
#endif #endif
/* Define to `long' if <sys/types.h> does not define. */ /* Define to `long' if <sys/types.h> does not define. */
......
...@@ -31,34 +31,34 @@ ...@@ -31,34 +31,34 @@
*/ */
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML, /* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
This diff is collapsed.
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
/* External API definitions */ /* 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 /* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary; defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to each of these can be defined before including this header to
...@@ -62,11 +58,11 @@ ...@@ -62,11 +58,11 @@
system headers may assume the cdecl convention. system headers may assume the cdecl convention.
*/ */
#ifndef XMLCALL #ifndef XMLCALL
# if defined(_MSC_VER) # if defined(_MSC_VER)
# define XMLCALL __cdecl # define XMLCALL __cdecl
# elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) # elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER)
# define XMLCALL __attribute__((cdecl)) # define XMLCALL __attribute__((cdecl))
# else # else
/* For any platform which uses this definition and supports more than /* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to declare the convention used on that platform, if it's possible to
...@@ -77,45 +73,46 @@ ...@@ -77,45 +73,46 @@
pre-processor and how to specify the same calling convention as the pre-processor and how to specify the same calling convention as the
platform's malloc() implementation. platform's malloc() implementation.
*/ */
# define XMLCALL # define XMLCALL
# endif # endif
#endif /* not defined XMLCALL */ #endif /* not defined XMLCALL */
#if !defined(XML_STATIC) && !defined(XMLIMPORT) #if ! defined(XML_STATIC) && ! defined(XMLIMPORT)
# ifndef XML_BUILDING_EXPAT # ifndef XML_BUILDING_EXPAT
/* using Expat from an application */ /* using Expat from an application */
# ifdef XML_USE_MSC_EXTENSIONS # if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
# define XMLIMPORT __declspec(dllimport) # define XMLIMPORT __declspec(dllimport)
# endif # endif
# endif # endif
#endif /* not defined XML_STATIC */ #endif /* not defined XML_STATIC */
#ifndef XML_ENABLE_VISIBILITY #ifndef XML_ENABLE_VISIBILITY
# define XML_ENABLE_VISIBILITY 0 # define XML_ENABLE_VISIBILITY 0
#endif #endif
#if !defined(XMLIMPORT) && XML_ENABLE_VISIBILITY #if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
# define XMLIMPORT __attribute__ ((visibility ("default"))) # define XMLIMPORT __attribute__((visibility("default")))
#endif #endif
/* If we didn't define it above, define it away: */ /* If we didn't define it above, define it away: */
#ifndef XMLIMPORT #ifndef XMLIMPORT
# define XMLIMPORT # define XMLIMPORT
#endif #endif
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) #if defined(__GNUC__) \
# define XML_ATTR_MALLOC __attribute__((__malloc__)) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# define XML_ATTR_MALLOC __attribute__((__malloc__))
#else #else
# define XML_ATTR_MALLOC # define XML_ATTR_MALLOC
#endif #endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #if defined(__GNUC__) \
# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else #else
# define XML_ATTR_ALLOC_SIZE(x) # define XML_ATTR_ALLOC_SIZE(x)
#endif #endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
...@@ -125,35 +122,30 @@ extern "C" { ...@@ -125,35 +122,30 @@ extern "C" {
#endif #endif
#ifdef XML_UNICODE_WCHAR_T #ifdef XML_UNICODE_WCHAR_T
# ifndef XML_UNICODE # ifndef XML_UNICODE
# define XML_UNICODE # define XML_UNICODE
# endif # endif
# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) # if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" # error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
# endif # endif
#endif #endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ #ifdef XML_UNICODE /* Information is UTF-16 encoded. */
# ifdef XML_UNICODE_WCHAR_T # ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char; typedef wchar_t XML_Char;
typedef wchar_t XML_LChar; typedef wchar_t XML_LChar;
# else # else
typedef unsigned short XML_Char; typedef unsigned short XML_Char;
typedef char XML_LChar; typedef char XML_LChar;
# endif /* XML_UNICODE_WCHAR_T */ # endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */ #else /* Information is UTF-8 encoded. */
typedef char XML_Char; typedef char XML_Char;
typedef char XML_LChar; typedef char XML_LChar;
#endif /* XML_UNICODE */ #endif /* XML_UNICODE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ #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 long long XML_Index;
typedef unsigned long long XML_Size; typedef unsigned long long XML_Size;
# endif
#else #else
typedef long XML_Index; typedef long XML_Index;
typedef unsigned long XML_Size; typedef unsigned long XML_Size;
......
...@@ -32,34 +32,34 @@ ...@@ -32,34 +32,34 @@
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */ /* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML, /* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
USE OR OTHER DEALINGS IN THE SOFTWARE. USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__) #if defined(__GNUC__) && defined(__i386__) && ! defined(__MINGW32__)
/* We'll use this version by default only where we know it helps. /* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878. regparm() generates warnings on Solaris boxes. See SF bug #692878.
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
#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 PTRFASTCALL __attribute__((regparm(3))) # define PTRFASTCALL __attribute__((regparm(3)))
#endif #endif
/* Using __fastcall seems to have an unexpected negative effect under /* Using __fastcall seems to have an unexpected negative effect under
...@@ -74,55 +74,49 @@ ...@@ -74,55 +74,49 @@
/* Make sure all of these are defined if they aren't already. */ /* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL #ifndef FASTCALL
#define FASTCALL # define FASTCALL
#endif #endif
#ifndef PTRCALL #ifndef PTRCALL
#define PTRCALL # define PTRCALL
#endif #endif
#ifndef PTRFASTCALL #ifndef PTRFASTCALL
#define PTRFASTCALL # define PTRFASTCALL
#endif #endif
#ifndef XML_MIN_SIZE #ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline) # if ! defined(__cplusplus) && ! defined(inline)
#ifdef __GNUC__ # ifdef __GNUC__
#define inline __inline # define inline __inline
#endif /* __GNUC__ */ # endif /* __GNUC__ */
#endif # endif
#endif /* XML_MIN_SIZE */ #endif /* XML_MIN_SIZE */
#ifdef __cplusplus #ifdef __cplusplus
#define inline inline # define inline inline
#else #else
#ifndef inline # ifndef inline
#define inline # define inline
#endif # endif
#endif #endif
#ifndef UNUSED_P #ifndef UNUSED_P
# ifdef __GNUC__ # define UNUSED_P(p) (void)p
# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
# else
# define UNUSED_P(p) UNUSED_ ## p
# endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifdef XML_ENABLE_VISIBILITY #ifdef XML_ENABLE_VISIBILITY