1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
Commit Graph

1205 Commits

Author SHA1 Message Date
Nick Wellnhofer
eca972e682 parser: Add getters for XML declaration to parser context
Access to struct members will be deprecated.
2024-06-27 14:44:49 +02:00
Nick Wellnhofer
598ee0d2c6 error: Remove underscores from xmlRaiseError 2024-06-27 14:43:10 +02:00
Nick Wellnhofer
3ff8a2c4b8 parser: Deprecate xmlIsLetter 2024-06-27 14:43:10 +02:00
Nick Wellnhofer
4b6e68282b cmake: Stop using win32config.h
Move this file to the win32 subdirectory.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
84a4f84c1c build: Don't check for required headers and functions
Unless we are on Windows, the following POSIX headers are required.
They're part of the earliest POSIX specs and it doesn't make sense to
check for them.

- fcntl.h
- unistd.h
- sys/stat.h
- sys/time.h

On Windows, io.h, fcntl.h and sys/stat.h are always available.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
02326d72d3 build: Remove socklen_t checks
socklen_t has been mandated by POSIX for ages. Always use "socklen_t" or
"int" on Win32.
2024-06-22 00:40:40 +02:00
Nick Wellnhofer
c2ccbc0fed meson: Implement option dependencies
This also removes the FreeBSD hack.
2024-06-21 23:13:17 +02:00
Nick Wellnhofer
f9c33a5519 parser: Undeprecate some xmlParserInput members 2024-06-21 18:25:11 +02:00
Nick Wellnhofer
1228b4e0e7 parser: Deprecate xmlParserCtxt->lastError
We alredy have xmlCtxtGetLastError().
2024-06-21 18:22:04 +02:00
Nick Wellnhofer
f82ca02bf5 parser: Undeprecate some xmlParserCtxt members
These are essential for SAX parsers.
2024-06-21 18:17:11 +02:00
Mike Dalessio
bbbbbb4649 parser: implement xmlCtxtGetOptions
In 712a31ab, the `options` struct member was deprecated. To allow
callers to check the status of options bits, introduce
xmlCtxtGetOptions.
2024-06-20 20:39:54 +00:00
Nick Wellnhofer
1112699cfa legacy: Remove most legacy functions from public headers
Also remove warning messages.
2024-06-17 15:47:42 +02:00
Nick Wellnhofer
5fca9498fd doc: Hide internal macro 2024-06-16 19:56:08 +02:00
Nick Wellnhofer
33a1f8978d legacy: Merge SAX.c into legacy.c 2024-06-16 19:17:41 +02:00
Nick Wellnhofer
1341deac13 xmllint: Move shell to xmllint
Move source code for xmllint shell to shell.c and move it from the
libxml2 library to the xmllint executable.

Also allow shell to run without XPath and debug modules.

Add stubs for old shell API functions in legacy build mode.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
1b6403583b schemas: Stop using xmlValidateNotationUse
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
fa01278dcd regexp: Hide experimental legacy code
This was never made public.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
10d60d15d6 regexp: Stop using LIBXML_AUTOMATA_ENABLED
This macro always equals LIBXML_REGEXP_ENABLED.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
11c3f84b6c SAX2: Always make xmlSAX2{Start,End}Element public
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
f307237e14 schemas: Use private copy of global NaN and Inf
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
b0fc67aa22 build: Remove --with-tree configuration option
This option would allow for a smaller, but mostly useless minimal build.
But it complicates the symbol availability logic in an insane way and
requires specialized tools like our custom C parser in doc/apibuild.py.

See #717.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
4967277931 parser: Make XML_INPUT constants signed
Avoid conversion to unsigned which triggers (harmless) UBSan warnings.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
84666581c2 catalog: Fix initialization
Initialize mutex via xmlInitParser.

Fix some other initialization calls.
2024-06-15 21:15:26 +02:00
Nick Wellnhofer
208f27f964 include: Don't define ATTRIBUTE_UNUSED in public header
Stop polluting namespace with unprefixed names.
2024-06-15 19:13:08 +02:00
Nick Wellnhofer
387f0c784f include: Readd circular dependency between tree.h and parser.h
There are dozens of downstream projects that only include tree.h but use
declarations from parser.h. This broke after the recent cleanup of
circular dependencies.

Make tree.h include parser.h again. This is a hack but doesn't change
the include directory struture.

This commit only made it into the 2.12 branch but wasn't applied to
master, so the issue turned up in 2.13.0 again.

Should fix #734.
2024-06-15 16:27:54 +02:00
Nick Wellnhofer
bd208d5fe1 xinclude: Add another missing include 2024-06-15 01:40:06 +02:00
Jan Alexander Steffens (heftig)
599ceaffad
xinclude: Add missing include
Gambas fails to compile with

    error: 'xmlStructuredErrorFunc' has not been declared
2024-06-15 00:59:54 +02:00
Nick Wellnhofer
3b4a84e4b7 encoding: Deprecate xmlCharEncodingHandler members 2024-06-13 18:09:17 +02:00
Nick Wellnhofer
b34dc1e4a3 tree: Deprecate xmlBuffer members 2024-06-13 18:09:17 +02:00
Nick Wellnhofer
712a31abe4 parser: Deprecate most public struct members
This will probably cause many warnings in downstream code abusing
libxml2 internals, but we can always undeprecate some members later.
2024-06-13 18:04:34 +02:00
Nick Wellnhofer
1c1794964e xlink: Deprecate xlinkGetDefault*
These functions read an otherwise unused global and seem useless.
2024-06-12 19:55:47 +02:00
Nick Wellnhofer
046663bc54 xlink: Deprecate xlinkSetDefault*
These functions set an otherwise unused global and seem useless.
2024-06-12 19:43:22 +02:00
Nick Wellnhofer
669bd34993 xpointer: Remove support for XPointer locations
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:

    https://www.w3.org/TR/xptr-xpointer/

The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.

If you configure --with-legacy, old symbols are retained for ABI
compatibility.
2024-06-12 18:20:01 +02:00
Nick Wellnhofer
dba1ed85a3 ftp: Remove FTP support
Remove the built-in FTP client. If you configure --with-legacy, old
symbols are retained for ABI compatibility.
2024-06-12 18:19:55 +02:00
Nick Wellnhofer
5238404325 parser: Pass resource type to resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ab5e6debd1 parser: Introduce XML_INPUT_NETWORK input flag
This allows to disable network access when creating parser inputs with
xmlInputCreateUrl.
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
89fcae4dfd parser: Don't report malloc failures when creating context
We don't want messages to stderr before an error handler could be set on
a parser context.
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ef8dc4f673 schemas: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
fd7d9e5eca reader: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
fa2592b384 xinclude: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
40b76edac4 relaxng: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
64ad272525 parser: Introduce per-context resource loader 2024-06-12 16:22:52 +02:00
Nick Wellnhofer
b9d2f3c911 parser: Introduce new input API
- xmlInputCreateUrl
- xmlInputCreateMemory
- xmlInputCreateString
- xmlInputCreateFd
- xmlInputCreateIO
- xmlInputSetEncoding

These functions don't take a parser context and work on xmlParserInputs,
replacing functions working on xmlParserInputBuffers.

xmlInputCreateUrl and xmlInputSetEncoding offer fine-grained error
handling.

Several XML_INPUT_* flags offer additional control.
2024-06-12 16:22:52 +02:00
Nick Wellnhofer
ff3b091910 parser: Implement XML_PARSE_NO_UNZIP option 2024-06-12 16:14:15 +02:00
Nick Wellnhofer
1432949d3c io: Pass input flags to xmlParserInputBufferCreateUrl 2024-06-12 16:14:15 +02:00
Nick Wellnhofer
b5890cb425 io: Remove xmlParserInputBufferCreateFilenameSafe 2024-06-12 16:14:15 +02:00
Nick Wellnhofer
1b1e8b3c12 io: Stop invoking generic error handler for IO errors 2024-06-12 16:14:15 +02:00
Rosen Penev
f227086380 meson: convert boolean options to feature option
Simpler. Seems like they're only disabled by minimum.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-06 17:13:41 -07:00
Sadaf Ebrahimi
897c73fe24 Add missing _cplusplus processing clause 2024-06-06 09:40:18 +00:00
Nick Wellnhofer
5b1d7ff0b2 parser: Remove redefinitions for legacy globals 2024-05-20 23:59:55 +02:00