Nick Wellnhofer
8d06ccd479
Fix --without-debug build
...
Broken in commit 2cc93f77
.
Fixes #354 .
2022-03-09 22:37:38 +01:00
Nick Wellnhofer
5ffe2981b7
Fix weak pthread symbols after commit 4adb7677
...
Add missing mutexattr symbols.
2022-03-06 19:27:19 +01:00
Nick Wellnhofer
b35c55282d
Use critical sections as mutex on Windows
...
They're more lightweight than ordinary Windows mutexes. Also stop
counting recursive locks. This only hides potential locking bugs.
2022-03-06 16:01:59 +01:00
Nick Wellnhofer
4adb767763
Simplify recursive pthread mutex
...
Use a PTHREAD_MUTEX_RECURSIVE mutex instead of the hand-rolled approach.
2022-03-06 16:01:59 +01:00
Nick Wellnhofer
3241c47c1f
Use non-recursive mutex in dict.c
...
The mutex is never locked recursively.
2022-03-06 16:01:51 +01:00
Nick Wellnhofer
40483d0ce2
Deprecate module init and cleanup functions
...
These functions shouldn't be part of the public API. Most init
functions are only thread-safe when called from xmlInitParser. Global
variables should only be cleaned up by calling xmlCleanupParser.
2022-03-06 15:59:43 +01:00
Nick Wellnhofer
7d02c7291f
Fix parser progress checks
...
Testing the current input pointer for modification is unreliable since
the input buffer could have been freed and realloced. Check whether the
input id and the up-to-date number of bytes consumed match.
2022-03-06 02:33:01 +01:00
Nick Wellnhofer
4951c462ea
Avoid arithmetic on freed pointers
2022-03-06 02:29:00 +01:00
Nick Wellnhofer
84823b8634
Continue to parse entity refs in recovery mode
...
There doesn't seem to be a good reason to abort in xmlParseReference
if a well-formedness error was detected. Removing this check allows to
parse entity references after an error in recovery mode.
Fixes #270 .
2022-03-06 02:26:22 +01:00
Nick Wellnhofer
d99ddd9bd5
Improve buffer allocation scheme
...
In most places, we really need the double-it scheme to avoid quadratic
behavior. The hybrid scheme still can cause many reallocations and the
bounded scheme doesn't seem to provide meaningful protection in
xmlreader.c.
2022-03-06 02:26:22 +01:00
Nick Wellnhofer
422176ad29
Don't set HAVE_WIN32_THREADS in win32config.h
...
This flag must be set on the command line.
2022-03-06 02:09:29 +01:00
Nick Wellnhofer
10291f838f
Fix potential double-free in xmlXPtrStringRangeFunction
...
Fix double-free in an unlikely error condition. Thanks to Wentao Liang
for the report.
Fixes #341 .
2022-03-05 18:27:16 +01:00
Nick Wellnhofer
f2072a8b2f
Fix memory leak in xmlFindCharEncodingHandler
...
Fix memory leak in an unlikely error condition. Thanks to Wentao Liang
for the report.
Fixes #342 .
2022-03-05 18:27:12 +01:00
Nick Wellnhofer
57b81c208c
Normalize XPath strings in-place
...
Simplify the code and fix a potential memory leak.
Fixes #343 .
2022-03-05 18:22:51 +01:00
Nick Wellnhofer
ff36770845
Make examples a standalone HTML page
...
Also upload to GitLab Pages.
2022-03-05 17:51:58 +01:00
Nick Wellnhofer
28d0399682
Remove obsolete XML Software Autoupdate (XSA) file
2022-03-05 17:27:14 +01:00
Nick Wellnhofer
d4f90698f4
Add XML_DEPRECATED to ignored keywords
...
Fixes the API documentation generator.
2022-03-05 17:27:14 +01:00
Nick Wellnhofer
4a8c71eb7c
Remove DOCBparser
...
This code has been broken and deprecated since version 2.6.0, released
in 2003. Because of a bug in commit 961b535c
, DOCBparser.c was never
compiled since 2012. I couldn't find a Debian package using any of its
symbols, so it seems safe to remove this module.
2022-03-04 22:56:21 +01:00
Nick Wellnhofer
ebb1797030
Remove unneeded #includes
2022-03-04 22:11:49 +01:00
Nick Wellnhofer
f025d6ebd0
Use stdint.h with newer MSVC
...
stdint.h is available since Visual Studio 2010.
2022-03-04 22:08:58 +01:00
Nick Wellnhofer
84085a26e4
Remove cruft from win32config.h
2022-03-04 22:08:58 +01:00
Nick Wellnhofer
21ddad5284
Remove ICONV_CONST test
...
We can simply cast the offending pointer to (void *).
2022-03-04 22:08:58 +01:00
Joey Arhar
1a112c7ba2
Remove regressions.py from Makefile.am
...
This patch removes regressions.py and regressions.xml from Makefile.am.
These files were removed in 5ec1ef1c
and since they are still in
Makefile.am, it causes "make dist-all" to fail.
2022-03-04 09:05:36 -08:00
Nick Wellnhofer
ae3cf4831c
Remove isinf/isnan emulation in win32config.h
...
There's already a better fallback in xpath.c.
2022-03-03 23:57:59 +01:00
Nick Wellnhofer
bc06a522c1
Fix recursion check in xinclude.c
...
Compare the included URL with the document's URL to detect local
inclusions.
Fixes #348 .
2022-03-02 20:44:41 +01:00
Nick Wellnhofer
78d7a5ca3c
Update genChRanges.py
...
Remove trailing whitespace. The output now matches the generated files
in version control.
2022-03-02 20:40:41 +01:00
Nick Wellnhofer
eca472effe
Update build_glob.py
...
This script generated parts of globals.c. Some adjustments are still
needed to make it usable again.
2022-03-02 20:34:37 +01:00
Nick Wellnhofer
5dcfbc4900
Move xmlCleanupGlobals to non-generated section
...
The bottom of the file was generated by build_glob.py. The generator
script needs some updates, but might still be useful.
2022-03-02 20:34:37 +01:00
Nick Wellnhofer
5ec1ef1ca5
Remove obsolete Python test framework
2022-03-02 20:34:37 +01:00
Damjan Jovanovic
37ebf8a8b2
Document support for the non-standard escape sequences.
...
Support non-BMP code points in surrogate pairs of '\uXXXX\uXXXX'.
2022-03-02 15:25:21 +00:00
Damjan Jovanovic
b66c19612c
Use strtoul() instead of sscanf, and correct data types that break GCC.
2022-03-02 15:25:21 +00:00
Damjan Jovanovic
ec8ff95ce3
Add support for some non-standard escapes in regular expressions.
...
This adds support for some non-standard escape sequences observed
in Microsoft's MSXML DLLs and used by Windows apps, and thus
needed by Wine. Some are also used in other XML implementations,
eg. Java's.
This isn't intended to be final. We probably wish to toggle these
non-standard escape sequences on and off somehow, as needed by
the caller.
Further discussion: https://gitlab.gnome.org/GNOME/libxml2/-/issues/260
2022-03-02 15:25:21 +00:00
Mike Dalessio
d7b287b94c
htmlParseComment: handle abruptly-closed comments
...
See guidance provided on abrutply-closed comments here:
https://html.spec.whatwg.org/multipage/parsing.html#parse-error-abrupt-closing-of-empty-comment
2022-03-02 14:42:47 +00:00
Mike Dalessio
24cdc89006
test coverage for abruptly-closed comments
...
These establish baseline behavior so that the subsequent commit is
clear about the behavior it will modify.
2022-03-02 14:42:47 +00:00
Damjan Jovanovic
2fe372a0aa
Properly fold whitespace around the QName value when validating an XSD schema.
...
(May also need fixing in other places.)
Issue: 239
2022-03-02 14:22:36 +00:00
Damjan Jovanovic
966b0f21c1
Add whitespace folding for some atomic data types that it's missing on.
...
XSD validation fails when some atomic types contain surrounding whitespace
even though XML Schema Part 2: Datatypes Second Edition, section 4.3.6
says they should be collapsed. Fix this.
(I am not sure whether the test is correct.)
Issue: #278
2022-03-02 14:05:51 +00:00
Oliver Diehl
e5cdb02d64
Add let variable tag support
2022-03-02 14:45:43 +01:00
Oliver Diehl
2cc93f7754
Add value-of tag support
2022-03-02 14:42:47 +01:00
Oliver Diehl
85cb388ff1
Replaced tabs by 4 spaces
2022-03-02 14:42:47 +01:00
Nick Wellnhofer
5c009c668b
Remove obsolete AC_HEADER checks
2022-03-02 01:31:56 +01:00
Nick Wellnhofer
72119afe00
Don't check for standard C89 library functions
...
Don't check for
- fprintf
- localtime
- printf
- rand
- sprintf
- srand
- sscanf
- strftime
- time
- vfprintf
- vsprintf
If the C99 functions snprintf and vsnprintf are missing, Trio is
enabled.
2022-03-02 01:14:08 +01:00
Nick Wellnhofer
776d15d383
Don't check for standard C89 headers
...
Don't check for
- ctype.h
- errno.h
- float.h
- limits.h
- math.h
- signal.h
- stdarg.h
- stdlib.h
- string.h
- time.h
Stop including non-standard headers
- malloc.h
- strings.h
2022-03-02 00:43:54 +01:00
Nick Wellnhofer
8f3bd26241
Remove broken VxWorks support
2022-03-01 17:18:56 +01:00
Nick Wellnhofer
041ed3d6b0
Remove broken Mac OS 9 support
2022-03-01 17:17:19 +01:00
Nick Wellnhofer
551b558db0
Remove useless call to xmlRelaxNGCleanupTypes
...
xmlRelaxNGCleanupTypes is called from xmlCleanupParser later.
2022-03-01 17:15:12 +01:00
Nick Wellnhofer
89d9ef3ee8
Reset last error in xmlCleanupGlobals
...
Before, we tried to reset the last error in xmlCleanupParser. But if
xmlCleanupParser wasn't called from the main thread, this would reset
the thread-local error object. xmlCleanupGlobals has access to the
error object of the main thread and can reset it reliably.
2022-03-01 15:14:00 +01:00
Nick Wellnhofer
ebc5009793
Warn when using deprecated functions from Python bindings
...
This requires Python code to be run with -Wd.
2022-03-01 13:57:16 +01:00
Nick Wellnhofer
b66ce0bba8
Don't include ICU headers in public headers
...
There's no need to make these implementation details public.
2022-03-01 13:02:49 +01:00
Nick Wellnhofer
50f6feb9c9
Remove broken bakefile support
2022-03-01 00:05:54 +01:00
Nick Wellnhofer
d7c7425cd1
Remove broken Visual Studio 2010 support
2022-03-01 00:03:24 +01:00