[libxml2] Consolidate private header files
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Consolidate private header files
- Date: Fri, 26 Aug 2022 02:59:28 +0000 (UTC)
commit 0f568c0b7376d5013a14e9186ec962b5aa033636
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Fri Aug 26 01:22:33 2022 +0200
Consolidate private header files
Private functions were previously declared
- in header files in the root directory
- in public headers guarded with IN_LIBXML
- in libxml.h
- redundantly in source files that used them.
Consolidate all private header files in include/private.
HTMLparser.c | 8 ++++++--
HTMLtree.c | 12 ++++-------
Makefile.am | 4 ++--
SAX2.c | 4 ++++
buf.c | 4 +++-
c14n.c | 3 ++-
catalog.c | 3 ++-
configure.ac | 2 +-
debugXML.c | 2 ++
dict.c | 2 ++
doc/apibuild.py | 6 ------
enc.h | 32 -----------------------------
encoding.c | 41 ++++++++------------------------------
entities.c | 3 ++-
error.c | 4 +---
globals.c | 13 ++++--------
hash.c | 2 ++
include/Makefile.am | 2 +-
include/libxml/parserInternals.h | 19 ------------------
include/libxml/valid.h | 15 --------------
include/libxml/xmlautomata.h | 6 +++---
include/libxml/xmlerror.h | 29 ---------------------------
include/private/Makefile.am | 15 ++++++++++++++
buf.h => include/private/buf.h | 25 +++--------------------
include/private/dict.h | 7 +++++++
include/private/enc.h | 11 ++++++++++
include/private/entities.h | 9 +++++++++
include/private/error.h | 21 +++++++++++++++++++
include/private/html.h | 13 ++++++++++++
include/private/io.h | 18 +++++++++++++++++
include/private/parser.h | 25 +++++++++++++++++++++++
include/private/regexp.h | 8 ++++++++
include/private/save.h | 16 +++++++++++++++
include/private/string.h | 8 ++++++++
include/private/threads.h | 8 ++++++++
include/private/tree.h | 11 ++++++++++
xzlib.h => include/private/xzlib.h | 8 ++++++++
libxml.h | 37 ----------------------------------
nanoftp.c | 3 +++
nanohttp.c | 3 +++
parser.c | 10 +++++++---
parserInternals.c | 7 +++++--
relaxng.c | 8 ++++----
save.h | 36 ---------------------------------
schematron.c | 2 ++
testapi.c | 40 +------------------------------------
testchar.c | 3 +--
threads.c | 3 +++
tree.c | 6 ++++--
uri.c | 2 ++
valid.c | 3 +++
xinclude.c | 3 ++-
xmlIO.c | 12 +++++------
xmlmodule.c | 2 ++
xmlreader.c | 3 ++-
xmlregexp.c | 5 +++--
xmlsave.c | 16 +++++++--------
xmlschemas.c | 3 +++
xmlschemastypes.c | 2 ++
xmlstring.c | 3 +++
xmlwriter.c | 7 ++++---
xpath.c | 3 ++-
xpointer.c | 2 ++
xzlib.c | 2 +-
64 files changed, 308 insertions(+), 337 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index 4efa7b00..d5fb6ae3 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -28,8 +28,12 @@
#include <libxml/globals.h>
#include <libxml/uri.h>
-#include "buf.h"
-#include "enc.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
+#include "private/html.h"
+#include "private/parser.h"
+#include "private/tree.h"
#define HTML_MAX_NAMELEN 1000
#define HTML_PARSER_BIG_BUFFER_SIZE 1000
diff --git a/HTMLtree.c b/HTMLtree.c
index 3dd78a91..f83c66d2 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -25,7 +25,10 @@
#include <libxml/globals.h>
#include <libxml/uri.h>
-#include "buf.h"
+#include "private/buf.h"
+#include "private/error.h"
+#include "private/io.h"
+#include "private/save.h"
/************************************************************************
* *
@@ -328,11 +331,6 @@ htmlIsBooleanAttr(const xmlChar *name)
}
#ifdef LIBXML_OUTPUT_ENABLED
-/*
- * private routine exported from xmlIO.c
- */
-xmlOutputBufferPtr
-xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
/************************************************************************
* *
* Output error handlers *
@@ -622,8 +620,6 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
* *
************************************************************************/
-void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
-
/**
* htmlDtdDumpOutput:
* @buf: the HTML buffer output
diff --git a/Makefile.am b/Makefile.am
index f5820d15..be404421 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -395,8 +395,8 @@ EXTRA_DIST = xml2-config.in libxml.spec.in \
libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
libxml2-config.cmake.in autogen.sh \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
- triop.h triodef.h libxml.h xzlib.h buf.h \
- enc.h save.h genUnicode.py TODO_SCHEMAS \
+ triop.h triodef.h libxml.h \
+ genUnicode.py TODO_SCHEMAS \
dbgen.pl dbgenattr.pl \
README.tests Makefile.tests libxml2.syms timsort.h \
README.zOS README.md \
diff --git a/SAX2.c b/SAX2.c
index 568e1927..1cf0e8d8 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -28,6 +28,10 @@
#include <libxml/HTMLtree.h>
#include <libxml/globals.h>
+#include "private/error.h"
+#include "private/parser.h"
+#include "private/tree.h"
+
/* Define SIZE_T_MAX unless defined through <limits.h>. */
#ifndef SIZE_T_MAX
# define SIZE_T_MAX ((size_t)-1)
diff --git a/buf.c b/buf.c
index 6749d975..64966016 100644
--- a/buf.c
+++ b/buf.c
@@ -24,7 +24,9 @@
#include <libxml/globals.h>
#include <libxml/tree.h>
#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
-#include "buf.h"
+
+#include "private/buf.h"
+#include "private/error.h"
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
diff --git a/c14n.c b/c14n.c
index d55729cc..bb16ec8b 100644
--- a/c14n.c
+++ b/c14n.c
@@ -25,7 +25,8 @@
#include <libxml/xpathInternals.h>
#include <libxml/c14n.h>
-#include "buf.h"
+#include "private/buf.h"
+#include "private/error.h"
/************************************************************************
* *
diff --git a/catalog.c b/catalog.c
index e03c3e40..0fa45d1f 100644
--- a/catalog.c
+++ b/catalog.c
@@ -39,7 +39,8 @@
#include <libxml/threads.h>
#include <libxml/globals.h>
-#include "buf.h"
+#include "private/buf.h"
+#include "private/error.h"
#define MAX_DELEGATE 50
#define MAX_CATAL_DEPTH 50
diff --git a/configure.ac b/configure.ac
index 44ee6eb1..161672f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1437,7 +1437,7 @@ AC_SUBST(RELDATE)
AC_SUBST(PYTHON_TESTS)
# keep on one line for cygwin c.f. #130896
-AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile
doc/examples/Makefile doc/devhelp/Makefile example/Makefile fuzz/Makefile python/Makefile
python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc
libxml2-config.cmake])
+AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile
include/private/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile
fuzz/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc
libxml-2.0-uninstalled.pc libxml2-config.cmake])
AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
AC_OUTPUT
diff --git a/debugXML.c b/debugXML.c
index f451c9d5..5a8edeff 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -30,6 +30,8 @@
#include <libxml/relaxng.h>
#endif
+#include "private/error.h"
+
#define DUMP_TEXT_TYPE 1
typedef struct _xmlDebugCtxt xmlDebugCtxt;
diff --git a/dict.c b/dict.c
index c29d2af7..af6ea358 100644
--- a/dict.c
+++ b/dict.c
@@ -23,6 +23,8 @@
#include <stdlib.h>
#include <time.h>
+#include "private/dict.h"
+
/*
* Following http://www.ocert.org/advisories/ocert-2011-003.html
* it seems that having hash randomization might be a good idea
diff --git a/doc/apibuild.py b/doc/apibuild.py
index 4848b931..dff5c573 100755
--- a/doc/apibuild.py
+++ b/doc/apibuild.py
@@ -23,14 +23,12 @@ ignored_files = {
"trio.c": "too many non standard macros",
"trionan.c": "too many non standard macros",
"triostr.c": "too many non standard macros",
- "acconfig.h": "generated portability layer",
"config.h": "generated portability layer",
"libxml.h": "internal only",
"testOOM.c": "out of memory tester",
"testOOMlib.h": "out of memory tester",
"testOOMlib.c": "out of memory tester",
"rngparser.c": "not yet integrated",
- "rngparser.h": "not yet integrated",
"testAutomata.c": "test tool",
"testModule.c": "test tool",
"testThreads.c": "test tool",
@@ -41,10 +39,6 @@ ignored_files = {
"test.c": "not part of the library",
"testdso.c": "test for dynamid shared libraries",
"testrecurse.c": "test for entities recursions",
- "xzlib.h": "Internal API only 2.8.0",
- "buf.h": "Internal API only 2.9.0",
- "enc.h": "Internal API only 2.9.0",
- "/save.h": "Internal API only 2.9.0",
"timsort.h": "Internal header only for xpath.c 2.9.0",
}
diff --git a/encoding.c b/encoding.c
index 5465359f..845ff55f 100644
--- a/encoding.c
+++ b/encoding.c
@@ -40,8 +40,9 @@
#include <libxml/globals.h>
#include <libxml/xmlerror.h>
-#include "buf.h"
-#include "enc.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
#ifdef LIBXML_ICU_ENABLED
#include <unicode/ucnv.h>
@@ -2056,11 +2057,10 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
}
/**
- * xmlCharEncFirstLineInt:
+ * xmlCharEncFirstLine:
* @handler: char encoding transformation data structure
* @out: an xmlBuffer for the output.
* @in: an xmlBuffer for the input
- * @len: number of bytes to convert for the first line, or -1
*
* Front-end for the encoding handler input function, but handle only
* the very first line, i.e. limit itself to 45 chars.
@@ -2071,8 +2071,8 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
* the result of transformation can't fit into the encoding we want), or
*/
int
-xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
- xmlBufferPtr in, int len) {
+xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
+ xmlBufferPtr in) {
int ret;
int written;
int toconv;
@@ -2092,13 +2092,8 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
* The actual value depending on guessed encoding is passed as @len
* if provided
*/
- if (len >= 0) {
- if (toconv > len)
- toconv = len;
- } else {
- if (toconv > 180)
- toconv = 180;
- }
+ if (toconv > 180)
+ toconv = 180;
if (toconv * 2 >= written) {
xmlBufferGrow(out, toconv * 2);
written = out->size - out->use - 1;
@@ -2142,26 +2137,6 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
return(written ? written : ret);
}
-/**
- * xmlCharEncFirstLine:
- * @handler: char encoding transformation data structure
- * @out: an xmlBuffer for the output.
- * @in: an xmlBuffer for the input
- *
- * Front-end for the encoding handler input function, but handle only
- * the very first line, i.e. limit itself to 45 chars.
- *
- * Returns the number of byte written if success, or
- * -1 general error
- * -2 if the transcoding fails (for *in is not valid utf8 string or
- * the result of transformation can't fit into the encoding we want), or
- */
-int
-xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
- xmlBufferPtr in) {
- return(xmlCharEncFirstLineInt(handler, out, in, -1));
-}
-
/**
* xmlCharEncFirstLineInput:
* @input: a parser input buffer
diff --git a/entities.c b/entities.c
index 84435515..a25349e7 100644
--- a/entities.c
+++ b/entities.c
@@ -26,7 +26,8 @@
#include <libxml/globals.h>
#include <libxml/dict.h>
-#include "save.h"
+#include "private/entities.h"
+#include "private/error.h"
/*
* The XML predefined entities.
diff --git a/error.c b/error.c
index 5f42eadc..49bd84e0 100644
--- a/error.c
+++ b/error.c
@@ -16,9 +16,7 @@
#include <libxml/xmlmemory.h>
#include <libxml/globals.h>
-void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
- const char *msg,
- ...) LIBXML_ATTR_FORMAT(2,3);
+#include "private/error.h"
#define XML_GET_VAR_STR(msg, str) { \
int size, prev_size = -1; \
diff --git a/globals.c b/globals.c
index 5e50e038..aaff09a6 100644
--- a/globals.c
+++ b/globals.c
@@ -21,6 +21,10 @@
#include <libxml/xmlmemory.h>
#include <libxml/threads.h>
+#include "private/error.h"
+#include "private/threads.h"
+#include "private/tree.h"
+
/* #define DEBUG_GLOBALS */
/*
@@ -325,15 +329,6 @@ static xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilename
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL;
static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef = NULL;
-/*
- * Error handling
- */
-
-/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
-/* Must initialize xmlGenericError in xmlInitParser */
-void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
- const char *msg,
- ...);
/**
* xmlGenericError:
*
diff --git a/hash.c b/hash.c
index 894174fb..2567924f 100644
--- a/hash.c
+++ b/hash.c
@@ -39,6 +39,8 @@
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
+#include "private/dict.h"
+
#define MAX_HASH_LEN 8
/* #define DEBUG_GROW */
diff --git a/include/Makefile.am b/include/Makefile.am
index 7dbfaa5b..2603acc6 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS=libxml
+SUBDIRS=libxml private
EXTRA_DIST = win32config.h wsockcompat.h
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index 191ec784..7cb0f517 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -317,16 +317,6 @@ XMLPUBFUN int XMLCALL
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler);
-#ifdef IN_LIBXML
-/* internal error reporting */
-XMLPUBFUN void XMLCALL
- __xmlErrEncoding (xmlParserCtxtPtr ctxt,
- xmlParserErrors xmlerr,
- const char *msg,
- const xmlChar * str1,
- const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
-#endif
-
/**
* Input Streams.
*/
@@ -645,15 +635,6 @@ XMLPUBFUN void XMLCALL
#endif /* LIBXML_LEGACY_ENABLED */
-#ifdef IN_LIBXML
-/*
- * internal only
- */
-XMLPUBFUN void XMLCALL
- xmlErrMemory (xmlParserCtxtPtr ctxt,
- const char *extra);
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
index 3eaf84ad..78771d44 100644
--- a/include/libxml/valid.h
+++ b/include/libxml/valid.h
@@ -58,21 +58,6 @@ typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
-#ifdef IN_LIBXML
-/**
- * XML_VCTXT_DTD_VALIDATED:
- *
- * Set after xmlValidateDtdFinal was called.
- */
-#define XML_VCTXT_DTD_VALIDATED (1u << 0)
-/**
- * XML_VCTXT_USE_PCTXT:
- *
- * Set if the validation context is part of a parser context.
- */
-#define XML_VCTXT_USE_PCTXT (1u << 1)
-#endif
-
/*
* xmlValidCtxt:
* An xmlValidCtxt is used for error reporting when validating.
diff --git a/include/libxml/xmlautomata.h b/include/libxml/xmlautomata.h
index bf1b131c..c0ef44f1 100644
--- a/include/libxml/xmlautomata.h
+++ b/include/libxml/xmlautomata.h
@@ -11,11 +11,11 @@
#define __XML_AUTOMATA_H__
#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
#ifdef LIBXML_REGEXP_ENABLED
#ifdef LIBXML_AUTOMATA_ENABLED
-#include <libxml/xmlregexp.h>
+
+#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
@@ -131,7 +131,7 @@ XMLPUBFUN int XMLCALL
int min,
int max);
-XMLPUBFUN xmlRegexpPtr XMLCALL
+XMLPUBFUN struct _xmlRegexp * XMLCALL
xmlAutomataCompile (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL
xmlAutomataIsDeterminist (xmlAutomataPtr am);
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index ee95be9c..f92b1aee 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -912,35 +912,6 @@ XMLPUBFUN int XMLCALL
xmlCopyError (xmlErrorPtr from,
xmlErrorPtr to);
-#ifdef IN_LIBXML
-/*
- * Internal callback reporting routine
- */
-XMLPUBFUN void XMLCALL
- __xmlRaiseError (xmlStructuredErrorFunc schannel,
- xmlGenericErrorFunc channel,
- void *data,
- void *ctx,
- void *node,
- int domain,
- int code,
- xmlErrorLevel level,
- const char *file,
- int line,
- const char *str1,
- const char *str2,
- const char *str3,
- int int1,
- int col,
- const char *msg,
- ...) LIBXML_ATTR_FORMAT(16,17);
-XMLPUBFUN void XMLCALL
- __xmlSimpleError (int domain,
- int code,
- xmlNodePtr node,
- const char *msg,
- const char *extra) LIBXML_ATTR_FORMAT(4,0);
-#endif
#ifdef __cplusplus
}
#endif
diff --git a/include/private/Makefile.am b/include/private/Makefile.am
new file mode 100644
index 00000000..a1686980
--- /dev/null
+++ b/include/private/Makefile.am
@@ -0,0 +1,15 @@
+EXTRA_DIST = \
+ buf.h \
+ dict.h \
+ enc.h \
+ entities.h \
+ error.h \
+ html.h \
+ io.h \
+ parser.h \
+ regexp.h \
+ save.h \
+ string.h \
+ threads.h \
+ tree.h \
+ xzlib.h
diff --git a/buf.h b/include/private/buf.h
similarity index 74%
rename from buf.h
rename to include/private/buf.h
index b7bcf61f..12f725de 100644
--- a/buf.h
+++ b/include/private/buf.h
@@ -1,24 +1,8 @@
-/*
- * Summary: Internal Interfaces for memory buffers in libxml2
- * Description: this module describes most of the new xmlBuf buffer
- * entry points, those are private routines, with a
- * few exceptions exported in tree.h. This was added
- * in 2.9.0.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_BUF_H__
-#define __XML_BUF_H__
+#ifndef XML_BUF_H_PRIVATE__
+#define XML_BUF_H_PRIVATE__
#include <libxml/tree.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
xmlBufPtr xmlBufCreate(void);
xmlBufPtr xmlBufCreateSize(size_t size);
xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
@@ -60,8 +44,5 @@ int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
size_t base, size_t cur);
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_BUF_H__ */
+#endif /* XML_BUF_H_PRIVATE__ */
diff --git a/include/private/dict.h b/include/private/dict.h
new file mode 100644
index 00000000..02b18f92
--- /dev/null
+++ b/include/private/dict.h
@@ -0,0 +1,7 @@
+#ifndef XML_DICT_H_PRIVATE__
+#define XML_DICT_H_PRIVATE__
+
+int __xmlInitializeDict(void);
+int __xmlRandom(void);
+
+#endif /* XML_DICT_H_PRIVATE__ */
diff --git a/include/private/enc.h b/include/private/enc.h
new file mode 100644
index 00000000..4fd32342
--- /dev/null
+++ b/include/private/enc.h
@@ -0,0 +1,11 @@
+#ifndef XML_ENC_H_PRIVATE__
+#define XML_ENC_H_PRIVATE__
+
+#include <libxml/encoding.h>
+#include <libxml/tree.h>
+
+int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
+int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
+int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
+
+#endif /* XML_ENC_H_PRIVATE__ */
diff --git a/include/private/entities.h b/include/private/entities.h
new file mode 100644
index 00000000..9be17bb3
--- /dev/null
+++ b/include/private/entities.h
@@ -0,0 +1,9 @@
+#ifndef XML_ENTITIES_H_PRIVATE__
+#define XML_ENTITIES_H_PRIVATE__
+
+#include <libxml/tree.h>
+#include <libxml/xmlstring.h>
+
+xmlChar *xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
+
+#endif /* XML_ENTITIES_H_PRIVATE__ */
diff --git a/include/private/error.h b/include/private/error.h
new file mode 100644
index 00000000..c76e0733
--- /dev/null
+++ b/include/private/error.h
@@ -0,0 +1,21 @@
+#ifndef XML_ERROR_H_PRIVATE__
+#define XML_ERROR_H_PRIVATE__
+
+#include <libxml/xmlerror.h>
+#include <libxml/xmlversion.h>
+
+void
+__xmlRaiseError(xmlStructuredErrorFunc schannel,
+ xmlGenericErrorFunc channel, void *data, void *ctx,
+ void *nod, int domain, int code, xmlErrorLevel level,
+ const char *file, int line, const char *str1,
+ const char *str2, const char *str3, int int1, int col,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(16,17);
+void
+__xmlSimpleError(int domain, int code, xmlNodePtr node,
+ const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4,0);
+void
+xmlGenericErrorDefaultFunc(void *ctx, const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+#endif /* XML_ERROR_H_PRIVATE__ */
diff --git a/include/private/html.h b/include/private/html.h
new file mode 100644
index 00000000..8f77d338
--- /dev/null
+++ b/include/private/html.h
@@ -0,0 +1,13 @@
+#ifndef XML_HTML_H_PRIVATE__
+#define XML_HTML_H_PRIVATE__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+void __htmlParseContent(void *ctx);
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#endif /* XML_HTML_H_PRIVATE__ */
+
diff --git a/include/private/io.h b/include/private/io.h
new file mode 100644
index 00000000..d0994dbd
--- /dev/null
+++ b/include/private/io.h
@@ -0,0 +1,18 @@
+#ifndef XML_IO_H_PRIVATE__
+#define XML_IO_H_PRIVATE__
+
+#include <libxml/encoding.h>
+#include <libxml/tree.h>
+#include <libxml/xmlversion.h>
+
+void __xmlIOErr(int domain, int code, const char *extra);
+void __xmlLoaderErr(void *ctx, const char *msg,
+ const char *filename) LIBXML_ATTR_FORMAT(2,0);
+int xmlInputReadCallbackNop(void *context, char *buffer, int len);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+xmlOutputBufferPtr
+xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
+#endif
+
+#endif /* XML_IO_H_PRIVATE__ */
diff --git a/include/private/parser.h b/include/private/parser.h
new file mode 100644
index 00000000..1bf9ee35
--- /dev/null
+++ b/include/private/parser.h
@@ -0,0 +1,25 @@
+#ifndef XML_PARSER_H_PRIVATE__
+#define XML_PARSER_H_PRIVATE__
+
+#include <libxml/parser.h>
+#include <libxml/xmlversion.h>
+
+/**
+ * XML_VCTXT_DTD_VALIDATED:
+ *
+ * Set after xmlValidateDtdFinal was called.
+ */
+#define XML_VCTXT_DTD_VALIDATED (1u << 0)
+/**
+ * XML_VCTXT_USE_PCTXT:
+ *
+ * Set if the validation context is part of a parser context.
+ */
+#define XML_VCTXT_USE_PCTXT (1u << 1)
+
+void xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra);
+void __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
+ const char *msg, const xmlChar *str1,
+ const xmlChar *str2) LIBXML_ATTR_FORMAT(3,0);
+
+#endif /* XML_PARSER_H_PRIVATE__ */
diff --git a/include/private/regexp.h b/include/private/regexp.h
new file mode 100644
index 00000000..3ffb378a
--- /dev/null
+++ b/include/private/regexp.h
@@ -0,0 +1,8 @@
+#ifndef XML_REGEXP_H_PRIVATE__
+#define XML_REGEXP_H_PRIVATE__
+
+#include <libxml/xmlautomata.h>
+
+void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
+
+#endif /* XML_REGEXP_H_PRIVATE__ */
diff --git a/include/private/save.h b/include/private/save.h
new file mode 100644
index 00000000..ec970851
--- /dev/null
+++ b/include/private/save.h
@@ -0,0 +1,16 @@
+#ifndef XML_SAVE_H_PRIVATE__
+#define XML_SAVE_H_PRIVATE__
+
+#include <libxml/tree.h>
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_OUTPUT_ENABLED
+
+void xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
+ xmlAttrPtr attr, const xmlChar * string);
+void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#endif /* XML_SAVE_H_PRIVATE__ */
+
diff --git a/include/private/string.h b/include/private/string.h
new file mode 100644
index 00000000..0c4bf541
--- /dev/null
+++ b/include/private/string.h
@@ -0,0 +1,8 @@
+#ifndef XML_STRING_H_PRIVATE__
+#define XML_STRING_H_PRIVATE__
+
+#include <libxml/xmlstring.h>
+
+xmlChar *xmlEscapeFormatString(xmlChar **msg);
+
+#endif /* XML_STRING_H_PRIVATE__ */
diff --git a/include/private/threads.h b/include/private/threads.h
new file mode 100644
index 00000000..c054a6fb
--- /dev/null
+++ b/include/private/threads.h
@@ -0,0 +1,8 @@
+#ifndef XML_THREADS_H_PRIVATE__
+#define XML_THREADS_H_PRIVATE__
+
+void __xmlGlobalInitMutexLock(void);
+void __xmlGlobalInitMutexUnlock(void);
+void __xmlGlobalInitMutexDestroy(void);
+
+#endif /* XML_THREADS_H_PRIVATE__ */
diff --git a/include/private/tree.h b/include/private/tree.h
new file mode 100644
index 00000000..8b7f65d4
--- /dev/null
+++ b/include/private/tree.h
@@ -0,0 +1,11 @@
+#ifndef XML_TREE_H_PRIVATE__
+#define XML_TREE_H_PRIVATE__
+
+/*
+ * Internal variable indicating if a callback has been registered for
+ * node creation/destruction. It avoids spending a lot of time in locking
+ * function while checking if the callback exists.
+ */
+extern int __xmlRegisterCallbacks;
+
+#endif /* XML_TREE_H_PRIVATE__ */
diff --git a/xzlib.h b/include/private/xzlib.h
similarity index 86%
rename from xzlib.h
rename to include/private/xzlib.h
index 7b1df15c..001854e5 100644
--- a/xzlib.h
+++ b/include/private/xzlib.h
@@ -9,6 +9,11 @@
#ifndef LIBXML2_XZLIB_H
#define LIBXML2_XZLIB_H
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_LZMA_ENABLED
+
typedef void *xzFile; /* opaque lzma file descriptor */
xzFile __libxml2_xzopen(const char *path, const char *mode);
@@ -16,4 +21,7 @@ xzFile __libxml2_xzdopen(int fd, const char *mode);
int __libxml2_xzread(xzFile file, void *buf, unsigned len);
int __libxml2_xzclose(xzFile file);
int __libxml2_xzcompressed(xzFile f);
+
+#endif /* LIBXML_LZMA_ENABLED */
+
#endif /* LIBXML2_XZLIB_H */
diff --git a/libxml.h b/libxml.h
index 66f164d5..a38f4f7c 100644
--- a/libxml.h
+++ b/libxml.h
@@ -29,7 +29,6 @@
*/
#include "config.h"
#include <libxml/xmlversion.h>
-#include <libxml/xmlstring.h>
#ifndef SYSCONFDIR
#define SYSCONFDIR "/etc"
@@ -74,42 +73,6 @@ int vfprintf(FILE *, const char *, va_list);
#define ATTRIBUTE_NO_SANITIZE(arg)
#endif
-/*
- * Internal variable indicating if a callback has been registered for
- * node creation/destruction. It avoids spending a lot of time in locking
- * function while checking if the callback exists.
- */
-extern int __xmlRegisterCallbacks;
-/*
- * internal error reporting routines, shared but not part of the API.
- */
-void __xmlIOErr(int domain, int code, const char *extra);
-void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
-#ifdef LIBXML_HTML_ENABLED
-/*
- * internal function of HTML parser needed for xmlParseInNodeContext
- * but not part of the API
- */
-void __htmlParseContent(void *ctx);
-#endif
-
-/*
- * internal global initialization critical section routines.
- */
-void __xmlGlobalInitMutexLock(void);
-void __xmlGlobalInitMutexUnlock(void);
-void __xmlGlobalInitMutexDestroy(void);
-
-int __xmlInitializeDict(void);
-
-/*
- * internal thread safe random function
- */
-int __xmlRandom(void);
-
-XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
-int xmlInputReadCallbackNop(void *context, char *buffer, int len);
-
#if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
# define LIBXML_STATIC
#endif
diff --git a/nanoftp.c b/nanoftp.c
index 6de7d300..009a8416 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -59,6 +59,9 @@
#include <libxml/nanoftp.h>
#include <libxml/globals.h>
+#include "private/error.h"
+#include "private/io.h"
+
/* #define DEBUG_FTP 1 */
#ifdef STANDALONE
#ifndef DEBUG_FTP
diff --git a/nanohttp.c b/nanohttp.c
index 2eafd3f4..cfd59eea 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -78,6 +78,9 @@
#include <libxml/globals.h>
#include <libxml/uri.h>
+#include "private/error.h"
+#include "private/io.h"
+
/**
* A couple portability macros
*/
diff --git a/parser.c b/parser.c
index 626d759e..a70879cc 100644
--- a/parser.c
+++ b/parser.c
@@ -72,8 +72,13 @@
#include <libxml/relaxng.h>
#endif
-#include "buf.h"
-#include "enc.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
+#include "private/html.h"
+#include "private/io.h"
+#include "private/parser.h"
+#include "private/threads.h"
struct _xmlStartTag {
const xmlChar *prefix;
@@ -14704,7 +14709,6 @@ xmlSetEntityReferenceFunc(xmlEntityReferenceFunc func)
#include <libxml/xpath.h>
#endif
-extern void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx, const char *msg, ...);
static int xmlParserInitialized = 0;
/**
diff --git a/parserInternals.c b/parserInternals.c
index c74fab9f..eb12e629 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -43,8 +43,11 @@
#define END(ctxt) ctxt->input->end
#define VALID_CTXT(ctxt) (CUR(ctxt) <= END(ctxt))
-#include "buf.h"
-#include "enc.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
+#include "private/io.h"
+#include "private/parser.h"
/*
* Various global defaults for parsing
diff --git a/relaxng.c b/relaxng.c
index 7f0f2e74..42543742 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -34,6 +34,10 @@
#include <libxml/xmlregexp.h>
#include <libxml/xmlschemastypes.h>
+#include "private/error.h"
+#include "private/regexp.h"
+#include "private/string.h"
+
/*
* The Relax-NG namespace
*/
@@ -2875,10 +2879,6 @@ xmlRelaxNGCleanupTypes(void)
* *
************************************************************************/
-/* from automata.c but not exported */
-void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
-
-
static int xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGDefinePtr def);
diff --git a/schematron.c b/schematron.c
index 68a4c622..5f71f060 100644
--- a/schematron.c
+++ b/schematron.c
@@ -34,6 +34,8 @@
#include <libxml/pattern.h>
#include <libxml/schematron.h>
+#include "private/error.h"
+
#define SCHEMATRON_PARSE_OPTIONS XML_PARSE_NOENT
#define SCT_OLD_NS BAD_CAST "http://www.ascc.net/xml/schematron"
diff --git a/testapi.c b/testapi.c
index df186c01..9012cf03 100644
--- a/testapi.c
+++ b/testapi.c
@@ -15329,43 +15329,6 @@ test_xmlCurrentChar(void) {
}
-static int
-test_xmlErrMemory(void) {
- int test_ret = 0;
-
- int mem_base;
- xmlParserCtxtPtr ctxt; /* an XML parser context */
- int n_ctxt;
- char * extra; /* extra information */
- int n_extra;
-
- for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
- for (n_extra = 0;n_extra < gen_nb_const_char_ptr;n_extra++) {
- mem_base = xmlMemBlocks();
- ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
- extra = gen_const_char_ptr(n_extra, 1);
-
- xmlErrMemory(ctxt, (const char *)extra);
- call_tests++;
- des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
- des_const_char_ptr(n_extra, (const char *)extra, 1);
- xmlResetLastError();
- if (mem_base != xmlMemBlocks()) {
- printf("Leak of %d blocks found in xmlErrMemory",
- xmlMemBlocks() - mem_base);
- test_ret++;
- printf(" %d", n_ctxt);
- printf(" %d", n_extra);
- printf("\n");
- }
- }
- }
- function_tests++;
-
- return(test_ret);
-}
-
-
static int
test_xmlIsLetter(void) {
int test_ret = 0;
@@ -16051,7 +16014,7 @@ static int
test_parserInternals(void) {
int test_ret = 0;
- if (quiet == 0) printf("Testing parserInternals : 31 of 88 functions ...\n");
+ if (quiet == 0) printf("Testing parserInternals : 30 of 87 functions ...\n");
test_ret += test_inputPop();
test_ret += test_inputPush();
test_ret += test_namePop();
@@ -16066,7 +16029,6 @@ test_parserInternals(void) {
test_ret += test_xmlCreateMemoryParserCtxt();
test_ret += test_xmlCreateURLParserCtxt();
test_ret += test_xmlCurrentChar();
- test_ret += test_xmlErrMemory();
test_ret += test_xmlIsLetter();
test_ret += test_xmlNewEntityInputStream();
test_ret += test_xmlNewInputFromFile();
diff --git a/testchar.c b/testchar.c
index bd1a8d64..2fc38697 100644
--- a/testchar.c
+++ b/testchar.c
@@ -7,11 +7,10 @@
#include <stdio.h>
#include <string.h>
+#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
-#include "buf.h"
-
int lastError;
static void errorHandler(void *unused, xmlErrorPtr err) {
diff --git a/threads.c b/threads.c
index f462ebf2..cd5a517a 100644
--- a/threads.c
+++ b/threads.c
@@ -35,6 +35,9 @@
#include <note.h>
#endif
+#include "private/dict.h"
+#include "private/threads.h"
+
/* #define DEBUG_THREADS */
#ifdef HAVE_PTHREAD_H
diff --git a/tree.c b/tree.c
index b53fa37e..d0b5c45d 100644
--- a/tree.c
+++ b/tree.c
@@ -44,8 +44,10 @@
#include <libxml/debugXML.h>
#endif
-#include "buf.h"
-#include "save.h"
+#include "private/buf.h"
+#include "private/entities.h"
+#include "private/error.h"
+#include "private/tree.h"
int __xmlRegisterCallbacks = 0;
diff --git a/uri.c b/uri.c
index e5c790eb..95d11fa7 100644
--- a/uri.c
+++ b/uri.c
@@ -19,6 +19,8 @@
#include <libxml/globals.h>
#include <libxml/xmlerror.h>
+#include "private/error.h"
+
/**
* MAX_URI_LENGTH:
*
diff --git a/valid.c b/valid.c
index 1da812ea..f3a69804 100644
--- a/valid.c
+++ b/valid.c
@@ -23,6 +23,9 @@
#include <libxml/list.h>
#include <libxml/globals.h>
+#include "private/error.h"
+#include "private/parser.h"
+
static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
int create);
/* #define DEBUG_VALID_ALGO */
diff --git a/xinclude.c b/xinclude.c
index 0c6b3f29..d4f2314b 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -27,7 +27,8 @@
#ifdef LIBXML_XINCLUDE_ENABLED
#include <libxml/xinclude.h>
-#include "buf.h"
+#include "private/buf.h"
+#include "private/error.h"
#define XINCLUDE_MAX_DEPTH 40
diff --git a/xmlIO.c b/xmlIO.c
index 16c29f57..dbd19446 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -66,8 +66,11 @@
#endif
#include <libxml/globals.h>
-#include "buf.h"
-#include "enc.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
+#include "private/io.h"
+#include "private/parser.h"
/* #define VERBOSE_FAILURE */
/* #define DEBUG_EXTERNAL_ENTITIES */
@@ -111,9 +114,6 @@ typedef struct _xmlOutputCallback {
static xmlOutputCallback xmlOutputCallbackTable[MAX_OUTPUT_CALLBACK];
static int xmlOutputCallbackNr = 0;
static int xmlOutputCallbackInitialized = 0;
-
-xmlOutputBufferPtr
-xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
#endif /* LIBXML_OUTPUT_ENABLED */
/************************************************************************
@@ -1266,7 +1266,7 @@ xmlGzfileClose (void * context) {
* I/O for compressed file accesses *
* *
************************************************************************/
-#include "xzlib.h"
+#include "private/xzlib.h"
/**
* xmlXzfileMatch:
* @filename: the URI for matching
diff --git a/xmlmodule.c b/xmlmodule.c
index 44eba066..8d6ea8dc 100644
--- a/xmlmodule.c
+++ b/xmlmodule.c
@@ -22,6 +22,8 @@
#include <libxml/xmlmodule.h>
#include <libxml/globals.h>
+#include "private/error.h"
+
#ifdef LIBXML_MODULES_ENABLED
struct _xmlModule {
diff --git a/xmlreader.c b/xmlreader.c
index b3299ced..383f07a6 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -39,7 +39,8 @@
#include <libxml/pattern.h>
#endif
-#include "buf.h"
+#include "private/buf.h"
+#include "private/tree.h"
#define MAX_ERR_MSG_SIZE 64000
diff --git a/xmlregexp.c b/xmlregexp.c
index a2a36c49..56cd8629 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -31,6 +31,9 @@
#include <libxml/xmlautomata.h>
#include <libxml/xmlunicode.h>
+#include "private/error.h"
+#include "private/regexp.h"
+
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
#endif
@@ -361,8 +364,6 @@ static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint);
static int xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint,
int neg, int start, int end, const xmlChar *blockName);
-void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
-
/************************************************************************
* *
* Regexp memory error handler *
diff --git a/xmlsave.c b/xmlsave.c
index 9b42c66c..1541d94c 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -19,9 +19,10 @@
#include <libxml/HTMLtree.h>
-#include "buf.h"
-#include "enc.h"
-#include "save.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
+#include "private/save.h"
/************************************************************************
* *
@@ -463,7 +464,7 @@ xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
*
* This will dump the content of the notation table as an XML DTD definition
*/
-void
+static void
xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table) {
xmlBufferPtr buffer;
@@ -487,7 +488,7 @@ xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table) {
* This will dump the content of the element declaration as an XML
* DTD definition
*/
-void
+static void
xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem) {
xmlBufferPtr buffer;
@@ -511,7 +512,7 @@ xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem) {
* This will dump the content of the attribute declaration as an XML
* DTD definition
*/
-void
+static void
xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr) {
xmlBufferPtr buffer;
@@ -534,7 +535,7 @@ xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr) {
*
* This will dump the content of the entity table as an XML DTD definition
*/
-void
+static void
xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent) {
xmlBufferPtr buffer;
@@ -595,7 +596,6 @@ static void
xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
#endif
static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
-void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur);
/**
diff --git a/xmlschemas.c b/xmlschemas.c
index ccbd3ea3..ade10f78 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -76,6 +76,9 @@
#include <libxml/xmlreader.h>
#endif
+#include "private/error.h"
+#include "private/string.h"
+
/* #define DEBUG 1 */
/* #define DEBUG_CONTENT 1 */
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 26c033d4..79825be0 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -33,6 +33,8 @@
#include <libxml/schemasInternals.h>
#include <libxml/xmlschemastypes.h>
+#include "private/error.h"
+
#define DEBUG
#ifndef LIBXML_XPATH_ENABLED
diff --git a/xmlstring.c b/xmlstring.c
index 46301c3b..2bd7e6a6 100644
--- a/xmlstring.c
+++ b/xmlstring.c
@@ -23,6 +23,9 @@
#include <libxml/parserInternals.h>
#include <libxml/xmlstring.h>
+#include "private/parser.h"
+#include "private/string.h"
+
/************************************************************************
* *
* Commodity functions to handle xmlChars *
diff --git a/xmlwriter.c b/xmlwriter.c
index 85c19558..1cf82906 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -21,9 +21,10 @@
#include <libxml/xmlwriter.h>
-#include "buf.h"
-#include "enc.h"
-#include "save.h"
+#include "private/buf.h"
+#include "private/enc.h"
+#include "private/error.h"
+#include "private/save.h"
#define B64LINELEN 72
#define B64CRLF "\r\n"
diff --git a/xpath.c b/xpath.c
index 4a6f0e21..470d4f32 100644
--- a/xpath.c
+++ b/xpath.c
@@ -49,7 +49,8 @@
#include <libxml/pattern.h>
#endif
-#include "buf.h"
+#include "private/buf.h"
+#include "private/error.h"
#ifdef LIBXML_PATTERN_ENABLED
#define XPATH_STREAMING
diff --git a/xpointer.c b/xpointer.c
index ba1e31e0..71807ac8 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -52,6 +52,8 @@
#endif
#endif
+#include "private/error.h"
+
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
diff --git a/xzlib.c b/xzlib.c
index c13e17db..803519ad 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -33,7 +33,7 @@
#include <lzma.h>
#endif
-#include "xzlib.h"
+#include "private/xzlib.h"
#include <libxml/xmlmemory.h>
/* values for xz_state how */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]