summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--HTMLtree.c3
-rw-r--r--Makefile.am1
-rwxr-xr-xbuild_glob.py4
-rw-r--r--configure.in2
-rw-r--r--debugXML.c1
-rw-r--r--globals.c60
-rw-r--r--include/libxml/globals.h59
-rw-r--r--include/libxml/parser.h15
-rw-r--r--include/libxml/parserInternals.h2
-rw-r--r--include/libxml/tree.h2
-rw-r--r--include/libxml/xmlmemory.h5
-rw-r--r--include/libxml/xpathInternals.h25
-rw-r--r--parser.c7
-rw-r--r--python/libxml.c2
-rw-r--r--threads.c10
-rw-r--r--tree.c9
-rw-r--r--valid.c1
-rw-r--r--xmlmemory.c9
-rw-r--r--xpath.c3
-rw-r--r--xpointer.c1
21 files changed, 73 insertions, 159 deletions
diff --git a/ChangeLog b/ChangeLog
index 3bc0f47f..b14b116b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Sun Feb 10 14:13:34 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c Makefile.am build_glob.py configure.in debugXML.c
+ globals.c parser.c threads.c tree.c valid.c xmlmemory.c
+ xpath.c xpointer.c include/libxml/globals.h include/libxml/parser.h
+ include/libxml/parserInternals.h include/libxml/tree.h
+ include/libxml/xmlmemory.h include/libxml/xpathInternals.h:
+ Tentatively fixed #69655 , make compiling with -Wredundant-decls
+ clean.
+ * python/libxml.c: fixed a warning.
+
Sun Feb 10 12:02:59 CET 2002 Daniel Veillard <daniel@veillard.com>
* tree.c valid.c xinclude.c: fix #68882, cleanup the XInclude
diff --git a/HTMLtree.c b/HTMLtree.c
index f57f65a0..3113670d 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -788,9 +788,6 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
* *
************************************************************************/
-void
-htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
- const char *encoding, int format);
/**
* htmlDtdDumpOutput:
* @buf: the HTML buffer output
diff --git a/Makefile.am b/Makefile.am
index 8768f231..0512f7e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,6 +85,7 @@ check-local: tests
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests Catatests @TEST_THREADS@
+ @(cd python ; $(MAKE) tests)
HTMLtests : testHTML$(EXEEXT)
@(echo > .memdump)
diff --git a/build_glob.py b/build_glob.py
index 33856cd1..dc42c245 100755
--- a/build_glob.py
+++ b/build_glob.py
@@ -66,7 +66,6 @@ if __name__ == "__main__":
fields = string.split(line, ",")
# Update the header file
writeline(global_functions_hdr)
- writeline(global_functions_hdr, "#ifdef LIBXML_THREAD_ENABLED")
global_functions_hdr.write("extern "+fields[0]+" *")
if len(fields) == 3:
global_functions_hdr.write("(*")
@@ -74,6 +73,7 @@ if __name__ == "__main__":
if len(fields) == 3:
global_functions_hdr.write(")"+fields[2])
writeline(global_functions_hdr,";")
+ writeline(global_functions_hdr, "#ifdef LIBXML_THREAD_ENABLED")
writeline(global_functions_hdr,"#define "+fields[1]+" \\")
writeline(global_functions_hdr,"(*(__"+fields[1]+"()))")
writeline(global_functions_hdr,"#else")
@@ -84,7 +84,7 @@ if __name__ == "__main__":
writeline(global_functions_hdr,"#endif")
# Update the implementation file
writeline(global_functions_impl)
- writeline(global_functions_impl, "extern "+fields[0]+" "+fields[1]+";")
+# writeline(global_functions_impl, "extern "+fields[0]+" "+fields[1]+";")
writeline(global_functions_impl, "#undef\t"+fields[1])
writeline(global_functions_impl, fields[0]+" *")
if len(fields) == 3:
diff --git a/configure.in b/configure.in
index 9326773a..08d2a1e1 100644
--- a/configure.in
+++ b/configure.in
@@ -273,7 +273,7 @@ if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then
if test "${with_xptr}" = "" ; then
with_xptr="yes"
fi
- CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline "
+ CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls "
dnl -Wcast-qual -ansi
fi
diff --git a/debugXML.c b/debugXML.c
index 6300455c..c485038a 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -27,6 +27,7 @@
#include <libxml/HTMLparser.h>
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
+#include <libxml/xpathInternals.h>
/**
* xmlDebugDumpString:
diff --git a/globals.c b/globals.c
index e4817a2b..ff0e3b76 100644
--- a/globals.c
+++ b/globals.c
@@ -442,7 +442,6 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
}
#ifdef LIBXML_DOCB_ENABLED
-extern xmlSAXHandler docbDefaultSAXHandler;
#undef docbDefaultSAXHandler
xmlSAXHandler *
__docbDefaultSAXHandler(void) {
@@ -454,7 +453,6 @@ __docbDefaultSAXHandler(void) {
#endif
#ifdef LIBXML_HTML_ENABLED
-extern xmlSAXHandler htmlDefaultSAXHandler;
#undef htmlDefaultSAXHandler
xmlSAXHandler *
__htmlDefaultSAXHandler(void) {
@@ -472,7 +470,6 @@ __htmlDefaultSAXHandler(void) {
*/
-extern int oldXMLWDcompatibility;
#undef oldXMLWDcompatibility
int *
__oldXMLWDcompatibility(void) {
@@ -482,7 +479,6 @@ __oldXMLWDcompatibility(void) {
return (&xmlGetGlobalState()->oldXMLWDcompatibility);
}
-extern xmlBufferAllocationScheme xmlBufferAllocScheme;
#undef xmlBufferAllocScheme
xmlBufferAllocationScheme *
__xmlBufferAllocScheme(void) {
@@ -492,7 +488,6 @@ __xmlBufferAllocScheme(void) {
return (&xmlGetGlobalState()->xmlBufferAllocScheme);
}
-extern int xmlDefaultBufferSize;
#undef xmlDefaultBufferSize
int *
__xmlDefaultBufferSize(void) {
@@ -502,7 +497,6 @@ __xmlDefaultBufferSize(void) {
return (&xmlGetGlobalState()->xmlDefaultBufferSize);
}
-extern xmlSAXHandler xmlDefaultSAXHandler;
#undef xmlDefaultSAXHandler
xmlSAXHandler *
__xmlDefaultSAXHandler(void) {
@@ -512,7 +506,6 @@ __xmlDefaultSAXHandler(void) {
return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
}
-extern xmlSAXLocator xmlDefaultSAXLocator;
#undef xmlDefaultSAXLocator
xmlSAXLocator *
__xmlDefaultSAXLocator(void) {
@@ -522,7 +515,6 @@ __xmlDefaultSAXLocator(void) {
return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
}
-extern int xmlDoValidityCheckingDefaultValue;
#undef xmlDoValidityCheckingDefaultValue
int *
__xmlDoValidityCheckingDefaultValue(void) {
@@ -532,17 +524,6 @@ __xmlDoValidityCheckingDefaultValue(void) {
return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
}
-extern xmlFreeFunc xmlFree;
-#undef xmlFree
-xmlFreeFunc *
-__xmlFree(void) {
- if (IS_MAIN_THREAD)
- return (&xmlFree);
- else
- return (&xmlGetGlobalState()->xmlFree);
-}
-
-extern xmlGenericErrorFunc xmlGenericError;
#undef xmlGenericError
xmlGenericErrorFunc *
__xmlGenericError(void) {
@@ -552,7 +533,6 @@ __xmlGenericError(void) {
return (&xmlGetGlobalState()->xmlGenericError);
}
-extern void * xmlGenericErrorContext;
#undef xmlGenericErrorContext
void * *
__xmlGenericErrorContext(void) {
@@ -562,7 +542,6 @@ __xmlGenericErrorContext(void) {
return (&xmlGetGlobalState()->xmlGenericErrorContext);
}
-extern int xmlGetWarningsDefaultValue;
#undef xmlGetWarningsDefaultValue
int *
__xmlGetWarningsDefaultValue(void) {
@@ -572,7 +551,6 @@ __xmlGetWarningsDefaultValue(void) {
return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
}
-extern int xmlIndentTreeOutput;
#undef xmlIndentTreeOutput
int *
__xmlIndentTreeOutput(void) {
@@ -582,7 +560,6 @@ __xmlIndentTreeOutput(void) {
return (&xmlGetGlobalState()->xmlIndentTreeOutput);
}
-extern int xmlKeepBlanksDefaultValue;
#undef xmlKeepBlanksDefaultValue
int *
__xmlKeepBlanksDefaultValue(void) {
@@ -592,7 +569,6 @@ __xmlKeepBlanksDefaultValue(void) {
return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
}
-extern int xmlLineNumbersDefaultValue;
#undef xmlLineNumbersDefaultValue
int *
__xmlLineNumbersDefaultValue(void) {
@@ -602,7 +578,6 @@ __xmlLineNumbersDefaultValue(void) {
return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
}
-extern int xmlLoadExtDtdDefaultValue;
#undef xmlLoadExtDtdDefaultValue
int *
__xmlLoadExtDtdDefaultValue(void) {
@@ -612,27 +587,6 @@ __xmlLoadExtDtdDefaultValue(void) {
return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
}
-extern xmlMallocFunc xmlMalloc;
-#undef xmlMalloc
-xmlMallocFunc *
-__xmlMalloc(void) {
- if (IS_MAIN_THREAD)
- return (&xmlMalloc);
- else
- return (&xmlGetGlobalState()->xmlMalloc);
-}
-
-extern xmlStrdupFunc xmlMemStrdup;
-#undef xmlMemStrdup
-xmlStrdupFunc *
-__xmlMemStrdup(void) {
- if (IS_MAIN_THREAD)
- return (&xmlMemStrdup);
- else
- return (&xmlGetGlobalState()->xmlMemStrdup);
-}
-
-extern int xmlParserDebugEntities;
#undef xmlParserDebugEntities
int *
__xmlParserDebugEntities(void) {
@@ -642,7 +596,6 @@ __xmlParserDebugEntities(void) {
return (&xmlGetGlobalState()->xmlParserDebugEntities);
}
-extern const char * xmlParserVersion;
#undef xmlParserVersion
const char * *
__xmlParserVersion(void) {
@@ -652,7 +605,6 @@ __xmlParserVersion(void) {
return (&xmlGetGlobalState()->xmlParserVersion);
}
-extern int xmlPedanticParserDefaultValue;
#undef xmlPedanticParserDefaultValue
int *
__xmlPedanticParserDefaultValue(void) {
@@ -662,17 +614,6 @@ __xmlPedanticParserDefaultValue(void) {
return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
}
-extern xmlReallocFunc xmlRealloc;
-#undef xmlRealloc
-xmlReallocFunc *
-__xmlRealloc(void) {
- if (IS_MAIN_THREAD)
- return (&xmlRealloc);
- else
- return (&xmlGetGlobalState()->xmlRealloc);
-}
-
-extern int xmlSaveNoEmptyTags;
#undef xmlSaveNoEmptyTags
int *
__xmlSaveNoEmptyTags(void) {
@@ -682,7 +623,6 @@ __xmlSaveNoEmptyTags(void) {
return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
}
-extern int xmlSubstituteEntitiesDefaultValue;
#undef xmlSubstituteEntitiesDefaultValue
int *
__xmlSubstituteEntitiesDefaultValue(void) {
diff --git a/include/libxml/globals.h b/include/libxml/globals.h
index 35faed46..8a838ad3 100644
--- a/include/libxml/globals.h
+++ b/include/libxml/globals.h
@@ -138,167 +138,172 @@ LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
-/*
- * Everything starting from the line below is
- * Automatically generated by build_glob.py.
- * Do not modify the previous line.
- */
-
-
-#ifdef LIBXML_THREAD_ENABLED
+#ifdef LIBXML_DOCB_ENABLED
extern xmlSAXHandler *__docbDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
#define docbDefaultSAXHandler \
(*(__docbDefaultSAXHandler()))
#else
LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
#endif
+#endif
-#ifdef LIBXML_THREAD_ENABLED
+#ifdef LIBXML_HTML_ENABLED
extern xmlSAXHandler *__htmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
#define htmlDefaultSAXHandler \
(*(__htmlDefaultSAXHandler()))
#else
LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
#endif
+#endif
+
+
+/*
+ * Everything starting from the line below is
+ * Automatically generated by build_glob.py.
+ * Do not modify the previous line.
+ */
+
-#ifdef LIBXML_THREAD_ENABLED
extern int *__oldXMLWDcompatibility(void);
+#ifdef LIBXML_THREAD_ENABLED
#define oldXMLWDcompatibility \
(*(__oldXMLWDcompatibility()))
#else
LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern xmlBufferAllocationScheme *__xmlBufferAllocScheme(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlBufferAllocScheme \
(*(__xmlBufferAllocScheme()))
#else
LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlDefaultBufferSize(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultBufferSize \
(*(__xmlDefaultBufferSize()))
#else
LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern xmlSAXHandler *__xmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultSAXHandler \
(*(__xmlDefaultSAXHandler()))
#else
LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern xmlSAXLocator *__xmlDefaultSAXLocator(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultSAXLocator \
(*(__xmlDefaultSAXLocator()))
#else
LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlDoValidityCheckingDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlDoValidityCheckingDefaultValue \
(*(__xmlDoValidityCheckingDefaultValue()))
#else
LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern xmlGenericErrorFunc *__xmlGenericError(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlGenericError \
(*(__xmlGenericError()))
#else
LIBXML_DLL_IMPORT extern xmlGenericErrorFunc xmlGenericError;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern void * *__xmlGenericErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlGenericErrorContext \
(*(__xmlGenericErrorContext()))
#else
LIBXML_DLL_IMPORT extern void * xmlGenericErrorContext;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlGetWarningsDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlGetWarningsDefaultValue \
(*(__xmlGetWarningsDefaultValue()))
#else
LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlIndentTreeOutput(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlIndentTreeOutput \
(*(__xmlIndentTreeOutput()))
#else
LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlKeepBlanksDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlKeepBlanksDefaultValue \
(*(__xmlKeepBlanksDefaultValue()))
#else
LIBXML_DLL_IMPORT extern int xmlKeepBlanksDefaultValue;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlLineNumbersDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlLineNumbersDefaultValue \
(*(__xmlLineNumbersDefaultValue()))
#else
LIBXML_DLL_IMPORT extern int xmlLineNumbersDefaultValue;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlLoadExtDtdDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlLoadExtDtdDefaultValue \
(*(__xmlLoadExtDtdDefaultValue()))
#else
LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlParserDebugEntities(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlParserDebugEntities \
(*(__xmlParserDebugEntities()))
#else
LIBXML_DLL_IMPORT extern int xmlParserDebugEntities;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern const char * *__xmlParserVersion(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlParserVersion \
(*(__xmlParserVersion()))
#else
LIBXML_DLL_IMPORT extern const char * xmlParserVersion;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlPedanticParserDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlPedanticParserDefaultValue \
(*(__xmlPedanticParserDefaultValue()))
#else
LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlSaveNoEmptyTags(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlSaveNoEmptyTags \
(*(__xmlSaveNoEmptyTags()))
#else
LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags;
#endif
-#ifdef LIBXML_THREAD_ENABLED
extern int *__xmlSubstituteEntitiesDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
#define xmlSubstituteEntitiesDefaultValue \
(*(__xmlSubstituteEntitiesDefaultValue()))
#else
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index 8271bb96..8d0b26b4 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -617,12 +617,16 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
* Global variables: just the default SAX interface tables and XML
* version infos.
*/
+#if 0
LIBXML_DLL_IMPORT extern const char *xmlParserVersion;
+#endif
+/*
LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
+ */
/*
* entity substitution default behavior.
@@ -636,10 +640,11 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
*/
LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal;
#define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
-#else
-LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
#endif
+#if 0
+LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
+#endif
/*
@@ -770,12 +775,6 @@ int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
xmlNodePtr *lst);
/*
- * SAX initialization routines
- */
-void xmlDefaultSAXHandlerInit(void);
-void htmlDefaultSAXHandlerInit(void);
-
-/*
* Parser contexts handling.
*/
void xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index 32ff30d3..2b4c1a66 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -189,7 +189,6 @@ int xmlIsPubidChar (int c);
int xmlIsLetter (int c);
int xmlIsDigit (int c);
int xmlIsIdeographic(int c);
-int xmlIsCombining (int c);
int xmlIsExtender (int c);
int xmlIsCombining (int c);
int xmlIsChar (int c);
@@ -208,7 +207,6 @@ int xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncoding enc);
int xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);
-void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
/**
* Entities
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 1952763c..80089587 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -512,11 +512,13 @@ struct _xmlDoc {
/*
* Variables.
*/
+#if 0
LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */
LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput; /* try to indent the tree dumps */
LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme; /* alloc scheme to use */
LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags; /* save empty tags as <empty></empty> */
LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize; /* default buffer size */
+#endif
/*
* Handling Buffers.
diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h
index 89386948..25f02c76 100644
--- a/include/libxml/xmlmemory.h
+++ b/include/libxml/xmlmemory.h
@@ -88,11 +88,14 @@ typedef char *(*xmlStrdupFunc)(const char *str);
/*
* The 4 interfaces used for all memory handling within libxml
- */
+ *
+ * Now defined in globals.h
+ *
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
+ */
/*
* The way to overload the existing functions
diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h
index 5d7cd281..19255b0c 100644
--- a/include/libxml/xpathInternals.h
+++ b/include/libxml/xpathInternals.h
@@ -480,48 +480,24 @@ void xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val);
void xmlXPathNodeSetSort (xmlNodeSetPtr set);
-void xmlXPathIdFunction (xmlXPathParserContextPtr ctxt,
- int nargs);
void xmlXPathRoot (xmlXPathParserContextPtr ctxt);
void xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
xmlChar * xmlXPathParseName (xmlXPathParserContextPtr ctxt);
xmlChar * xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
/*
- * Debug
- */
-#ifdef LIBXML_DEBUG_ENABLED
-void xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth);
-#endif
-/*
* Existing functions
*/
double xmlXPathStringEvalNumber(const xmlChar *str);
int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res);
-void xmlXPathInit(void);
-void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt);
-xmlNodeSetPtr xmlXPathNodeSetCreate(xmlNodePtr val);
-void xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val);
xmlNodeSetPtr xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2);
void xmlXPathNodeSetDel(xmlNodeSetPtr cur, xmlNodePtr val);
void xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val);
-void xmlXPathFreeNodeSet(xmlNodeSetPtr obj);
-xmlXPathObjectPtr xmlXPathNewNodeSet(xmlNodePtr val);
xmlXPathObjectPtr xmlXPathNewNodeSetList(xmlNodeSetPtr val);
xmlXPathObjectPtr xmlXPathWrapNodeSet(xmlNodeSetPtr val);
xmlXPathObjectPtr xmlXPathWrapExternal(void *val);
-void xmlXPathFreeNodeSetList(xmlXPathObjectPtr obj);
-
-
-xmlXPathObjectPtr xmlXPathNewFloat(double val);
-xmlXPathObjectPtr xmlXPathNewBoolean(int val);
-xmlXPathObjectPtr xmlXPathNewString(const xmlChar *val);
-xmlXPathObjectPtr xmlXPathNewCString(const char *val);
-void xmlXPathFreeObject(xmlXPathObjectPtr obj);
-xmlXPathContextPtr xmlXPathNewContext(xmlDocPtr doc);
-void xmlXPathFreeContext(xmlXPathContextPtr ctxt);
int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
@@ -566,7 +542,6 @@ xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
/*
* The official core of XPath functions
*/
-void xmlXPathRoot(xmlXPathParserContextPtr ctxt);
void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
diff --git a/parser.c b/parser.c
index 6c93e90b..8a783efe 100644
--- a/parser.c
+++ b/parser.c
@@ -89,7 +89,6 @@ static const char *xmlW3CPIs[] = {
};
/* DEPR void xmlParserHandleReference(xmlParserCtxtPtr ctxt); */
-void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt,
const xmlChar **str);
@@ -1531,12 +1530,6 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
return(1);
}
-/*
- * Forward definition for recursive behavior.
- */
-void xmlParsePEReference(xmlParserCtxtPtr ctxt);
-void xmlParseReference(xmlParserCtxtPtr ctxt);
-
/************************************************************************
* *
* Extra stuff for namespace support *
diff --git a/python/libxml.c b/python/libxml.c
index 7fe93192..2a700b7c 100644
--- a/python/libxml.c
+++ b/python/libxml.c
@@ -1360,7 +1360,7 @@ static PyMethodDef libxmlMethods[] = {
{ "parent", libxml_parent, METH_VARARGS, NULL },
{ "type", libxml_type, METH_VARARGS, NULL },
{ "doc", libxml_doc, METH_VARARGS, NULL },
- { NULL, NULL, NULL, NULL}
+ { NULL }
};
void initlibxml2mod(void) {
diff --git a/threads.c b/threads.c
index dc69f471..37c7d9c8 100644
--- a/threads.c
+++ b/threads.c
@@ -146,7 +146,7 @@ xmlFreeMutex(xmlMutexPtr tok)
* xmlMutexLock() is used to lock a libxml2 token.
*/
void
-xmlMutexLock(xmlMutexPtr tok)
+xmlMutexLock(xmlMutexPtr tok ATTRIBUTE_UNUSED)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&tok->lock);
@@ -163,7 +163,7 @@ xmlMutexLock(xmlMutexPtr tok)
* xmlMutexUnlock() is used to unlock a libxml2 token.
*/
void
-xmlMutexUnlock(xmlMutexPtr tok)
+xmlMutexUnlock(xmlMutexPtr tok ATTRIBUTE_UNUSED)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&tok->lock);
@@ -208,7 +208,7 @@ xmlNewRMutex(void)
* reentrant mutex.
*/
void
-xmlFreeRMutex(xmlRMutexPtr tok)
+xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_destroy(&tok->lock);
@@ -225,7 +225,7 @@ xmlFreeRMutex(xmlRMutexPtr tok)
* xmlRMutexLock() is used to lock a libxml2 token_r.
*/
void
-xmlRMutexLock(xmlRMutexPtr tok)
+xmlRMutexLock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&tok->lock);
@@ -257,7 +257,7 @@ xmlRMutexLock(xmlRMutexPtr tok)
* xmlRMutexUnlock() is used to unlock a libxml2 token_r.
*/
void
-xmlRMutexUnlock(xmlRMutexPtr tok)
+xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&tok->lock);
diff --git a/tree.c b/tree.c
index c871dbbe..19e06012 100644
--- a/tree.c
+++ b/tree.c
@@ -2907,9 +2907,6 @@ xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur) {
*/
static xmlNodePtr
-xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
-
-static xmlNodePtr
xmlStaticCopyNode(const xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
int recursive) {
xmlNodePtr ret;
@@ -5695,9 +5692,6 @@ xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) {
* *
************************************************************************/
-void
-xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
- int format);
static void
xmlNodeListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
int format);
@@ -6121,9 +6115,6 @@ xmlElemDump(FILE *f, xmlDocPtr doc, xmlNodePtr cur) {
* *
************************************************************************/
-void
-xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
- int level, int format, const char *encoding);
static void
xmlNodeListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
int level, int format, const char *encoding);
diff --git a/valid.c b/valid.c
index a6434c22..9df5710d 100644
--- a/valid.c
+++ b/valid.c
@@ -315,7 +315,6 @@ xmlValidStateDebug(xmlValidCtxtPtr ctxt) {
else if ((doc->intSubset == NULL) && \
(doc->extSubset == NULL)) return(0)
-xmlElementPtr xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name);
static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
int create);
xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem);
diff --git a/xmlmemory.c b/xmlmemory.c
index 57a7ce59..b185bb2c 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -11,15 +11,19 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+
#ifdef HAVE_TIME_H
#include <time.h>
#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
#endif
+
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
@@ -40,7 +44,6 @@
void xmlMallocBreakpoint(void);
void * xmlMemMalloc(size_t size);
-void * xmlMallocLoc(size_t size, const char * file, int line);
void * xmlMemRealloc(void *ptr,size_t size);
void xmlMemFree(void *ptr);
char * xmlMemoryStrdup(const char *str);
diff --git a/xpath.c b/xpath.c
index 7861160f..0707b166 100644
--- a/xpath.c
+++ b/xpath.c
@@ -60,8 +60,6 @@
/* #define DEBUG_EXPR */
/* #define DEBUG_EVAL_COUNTS */
-void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
-double xmlXPathStringEvalNumber(const xmlChar *str);
double xmlXPathDivideBy(double f, double fzero);
static xmlNs xmlXPathXMLNamespaceStruct = {
@@ -517,7 +515,6 @@ xmlXPathDebugDumpValueTree(FILE *output, xmlNodeSetPtr cur, int depth) {
xmlXPathDebugDumpNodeList(output, cur->nodeTab[0]->children, depth + 1);
}
#if defined(LIBXML_XPTR_ENABLED)
-void xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth);
static void
xmlXPathDebugDumpLocationSet(FILE *output, xmlLocationSetPtr cur, int depth) {
int i;
diff --git a/xpointer.c b/xpointer.c
index 5a3a84e1..8bed994b 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -1212,7 +1212,6 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
* *
************************************************************************/
-void xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs);