Commit c14c53a3 authored by Mike Hommey's avatar Mike Hommey

Load /tmp/tmp.DIvcnD/libxml2-2.6.11 into

packages/libxml2/branches/upstream/current.
parent d4e028c9
This diff is collapsed.
......@@ -158,7 +158,7 @@ HTMLPushtests : testHTML$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
$(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
else \
log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
......@@ -191,7 +191,7 @@ HTMLPushtests : testHTML$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
$(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
else \
log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
......@@ -328,12 +328,12 @@ Errtests : xmllint$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint $$i \
$(CHECKER) $(top_builddir)/xmllint --stream $$i \
2> $(srcdir)/result/errors/$$name.str \
> $(srcdir)/result/errors/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
else \
log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
diff $(srcdir)/result/errors/$$name result.$$name ; \
diff $(srcdir)/result/errors/$$name.str error.$$name` ; \
......@@ -483,7 +483,7 @@ XIncludetests : xmllint$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --walker --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name | grep -v 'failed to load external entity' ; \
......@@ -523,7 +523,7 @@ Catatests : xmlcatalog$(EXEEXT)
if [ -f $$xml ] ; then \
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > $(srcdir)/result/catalogs/$$name ; \
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
......@@ -642,6 +642,22 @@ Readertests : xmllint$(EXEEXT)
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
@echo "## Reader entities substitution regression tests"
-@(for i in $(srcdir)/test/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/$$name.rde ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/$$name.rde result.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
SAXtests : testSAX$(EXEEXT)
@(echo > .memdump)
@echo "## SAX callbacks regression tests"
......@@ -960,16 +976,16 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
example/Makefile.am example/gjobread.c example/gjobs.xml \
$(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h \
triop.h triodef.h libxml.h elfgcchack.h \
testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
dbgen.pl dbgenattr.pl
dbgen.pl dbgenattr.pl regressions.py regressions.xml
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxml-2.0.pc
#
# Instll the tests program sources as examples
# Install the tests program sources as examples
#
BASE_DIR=$(datadir)/doc
DOC_MODULE=libxml2-$(VERSION)
......
......@@ -51,8 +51,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/libxml-2.0.pc.in $(srcdir)/libxml.spec.in \
$(srcdir)/xml2-config.in $(top_srcdir)/configure AUTHORS \
COPYING ChangeLog INSTALL NEWS TODO acconfig.h config.guess \
config.sub depcomp install-sh ltconfig ltmain.sh missing \
mkinstalldirs
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
......@@ -510,15 +509,15 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
example/Makefile.am example/gjobread.c example/gjobs.xml \
$(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h \
triop.h triodef.h libxml.h elfgcchack.h \
testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
dbgen.pl dbgenattr.pl
dbgen.pl dbgenattr.pl regressions.py regressions.xml
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxml-2.0.pc
#
# Instll the tests program sources as examples
# Install the tests program sources as examples
#
BASE_DIR = $(datadir)/doc
DOC_MODULE = libxml2-$(VERSION)
......@@ -1374,7 +1373,7 @@ HTMLPushtests : testHTML$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
$(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
else \
log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
......@@ -1407,7 +1406,7 @@ HTMLPushtests : testHTML$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
$(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
else \
log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
......@@ -1544,12 +1543,12 @@ Errtests : xmllint$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint $$i \
$(CHECKER) $(top_builddir)/xmllint --stream $$i \
2> $(srcdir)/result/errors/$$name.str \
> $(srcdir)/result/errors/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
else \
log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
diff $(srcdir)/result/errors/$$name result.$$name ; \
diff $(srcdir)/result/errors/$$name.str error.$$name` ; \
......@@ -1699,7 +1698,7 @@ XIncludetests : xmllint$(EXEEXT)
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --walker --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name | grep -v 'failed to load external entity' ; \
......@@ -1739,7 +1738,7 @@ Catatests : xmlcatalog$(EXEEXT)
if [ -f $$xml ] ; then \
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > $(srcdir)/result/catalogs/$$name ; \
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
......@@ -1858,6 +1857,22 @@ Readertests : xmllint$(EXEEXT)
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
@echo "## Reader entities substitution regression tests"
-@(for i in $(srcdir)/test/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/$$name.rde ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/$$name.rde result.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
SAXtests : testSAX$(EXEEXT)
@(echo > .memdump)
@echo "## SAX callbacks regression tests"
......
......@@ -10,6 +10,56 @@ to help those - More testing on RelaxNG
Schemas
There is the list of public releases:
2.6.11: July 5 2004:
- Schemas: a lot of changes and improvements by Kasimier Buchcik for
attributes, namespaces and simple types.
- build fixes: --with-minimum (William Brack), some gcc cleanup
(William), --with-thread-alloc (William)
- portability: Windows binary package change (Igor Zlatkovic), Catalog
path on Windows
- documentation: update to the tutorial (John Fleck), xmllint return code
(John Fleck), man pages (Ville Skytta),
- bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX
properly initialize the library (William), empty node set in XPath
(William), xmlSchemas errors (William), invalid charref problem pointed
by Morus Walter, XInclude xml:base generation (William), Relax-NG bug
with div processing (William), XPointer and xml:base problem(William),
Reader and entities, xmllint return code for schemas (William), reader
streaming problem (Steve Ball), DTD serialization problem (William),
libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on
Python classes, xmlReader buffer bug, Python bindings memory interfaces
improvement (with Stphane Bidoul), Fixed the push parser to be back to
synchronous behaviour.
- improvement: custom per-thread I/O enhancement (Rob Richards), register
namespace in debug shell (Stefano Debenedetti), Python based regression
test for non-Unix users (William), dynamically increase the number of
XPath extension functions in Python and fix a memory leak (Marc-Antoine
Parent and William)
- performance: hack done with Arjan van de Ven to reduce ELF footprint
and generated code on Linux, plus use gcc runtime profiling to optimize
the code generated in the RPM packages.
2.6.10: May 17 2004:
- Web page generated for ChangeLog
- build fixes: --without-html problems, make check without make all
- portability: problem with xpath.c on Windows (MSC and Borland), memcmp
vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not
use "list" as parameter name, make tests work with Python 1.5 (Ed
Davis),
- improvements: made xmlTextReaderMode public, small buffers resizing
(Morten Welinder), add --maxmem option to xmllint, add
xmlPopInputCallback() for Matt Sergeant, refactoring of serialization
escaping, added escaping customization
- bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William
Brack), xmlReader end of stream problem, node deregistration with reader,
URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp
transition reduction (William), various XSD Schemas fixes (Kasimier
Buchcik), XInclude fallback problem (William), weird problems with DTD
(William), structured error handler callback context (William), reverse
xmlEncodeSpecialChars() behaviour back to escaping '"'
2.6.9: Apr 18 2004:
- implement xml:id Working Draft, relaxed XPath id() checking
- bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
......
......@@ -1958,11 +1958,13 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
*/
if (dup == NULL)
dup = xmlStrndup(value, valueend - value);
#ifdef LIBXML_VALID_ENABLED
if (xmlValidateNCName(dup, 1) != 0) {
xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
"xml:id : attribute value %s is not an NCName\n",
(const char *) dup, NULL);
}
#endif
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
}
}
......@@ -2511,9 +2513,10 @@ static int xmlSAX2DefaultVersionValue = 2;
* @version: the version, 1 or 2
*
* Set the default version of SAX used globally by the library.
* Note that this may not be a good thing to do from a library
* it is better to use xmlSAXVersion() to set up specifically the
* version for a given parsing context.
* By default, during initialization the default is set to 2.
* Note that it is generally a better coding style to use
* xmlSAXVersion() to set up the version explicitly for a given
* parsing context.
*
* Returns the previous value in case of success and -1 in case of error.
*/
......
......@@ -757,7 +757,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
*/
if((attr->ns != NULL) && xmlC14NIsVisible(ctx, attr, cur)) {
already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, (xmlNodePtr)attr);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
if(!already_rendered && visible) {
xmlListInsert(list, attr->ns);
}
......
......@@ -68,6 +68,13 @@
#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
#endif
#if defined(_WIN32) && defined(_MSC_VER)
#undef XML_XML_DEFAULT_CATALOG
static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
void* __stdcall GetModuleHandleA(const char*);
unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
#endif
static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
/************************************************************************
......@@ -2925,7 +2932,35 @@ xmlInitializeCatalog(void) {
catalogs = (const char *) getenv("XML_CATALOG_FILES");
if (catalogs == NULL)
#if defined(_WIN32) && defined(_MSC_VER)
{
void* hmodule;
hmodule = GetModuleHandleA("libxml2.dll");
if (hmodule == NULL)
hmodule = GetModuleHandleA(NULL);
if (hmodule != NULL) {
char buf[256];
unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
if (len != 0) {
char* p = &(buf[len]);
while (*p != '\\' && p > buf)
p--;
if (p != buf) {
xmlChar* uri;
strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
uri = xmlCanonicPath(buf);
if (uri != NULL) {
strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
xmlFree(uri);
}
}
}
}
catalogs = XML_XML_DEFAULT_CATALOG;
}
#else
catalogs = XML_XML_DEFAULT_CATALOG;
#endif
catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
xmlCatalogDefaultPrefer);
......@@ -3510,7 +3545,7 @@ xmlCatalogLocalResolveURI(void *catalogs, const xmlChar *URI) {
const xmlChar *
xmlCatalogGetSystem(const xmlChar *sysID) {
xmlChar *ret;
xmlChar result[1000];
static xmlChar result[1000];
static int msg = 0;
if (!xmlCatalogInitialized)
......@@ -3554,7 +3589,7 @@ xmlCatalogGetSystem(const xmlChar *sysID) {
const xmlChar *
xmlCatalogGetPublic(const xmlChar *pubID) {
xmlChar *ret;
xmlChar result[1000];
static xmlChar result[1000];
static int msg = 0;
if (!xmlCatalogInitialized)
......
......@@ -1615,7 +1615,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
LIBXML_MICRO_VERSION=10
LIBXML_MICRO_VERSION=11
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
......@@ -26456,8 +26456,9 @@ then
fi
if [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ] || \
[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ] || \
[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmltest" ] || \
[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmlnew" ]
[ "${LOGNAME}" = "wbrack" -a "`pwd`" = "/Users/wbrack/gnomecvs/xmltest" ]
then
if test "$with_minimum" != "yes"
then
......@@ -26758,7 +26759,7 @@ if test "$with_minimum" = "yes" -a "$with_thread_alloc" = ""
then
with_thread_alloc=no
fi
if test "$with_threads_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
fi
......@@ -28091,8 +28092,13 @@ then
with_mem_debug=no
fi
if test "$with_mem_debug" = "yes" ; then
echo Enabling memory debug support
WITH_MEM_DEBUG=1
if test "$with_thread_alloc" = "yes" ; then
echo Disabling memory debug - cannot use mem-debug with thread-alloc!
WITH_MEM_DEBUG=0
else
echo Enabling memory debug support
WITH_MEM_DEBUG=1
fi
else
WITH_MEM_DEBUG=0
fi
......
......@@ -6,7 +6,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
LIBXML_MICRO_VERSION=10
LIBXML_MICRO_VERSION=11
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
......@@ -421,8 +421,9 @@ dnl specific tests to setup DV's devel environment with debug etc ...
dnl (-Wunreachable-code)
dnl
if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
[[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \
[[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmltest" ]] || \
[[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmlnew" ]]
[[ "${LOGNAME}" = "wbrack" -a "`pwd`" = "/Users/wbrack/gnomecvs/xmltest" ]]
then
if test "$with_minimum" != "yes"
then
......@@ -498,7 +499,7 @@ if test "$with_minimum" = "yes" -a "$with_thread_alloc" = ""
then
with_thread_alloc=no
fi
if test "$with_threads_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
fi
......@@ -1007,8 +1008,13 @@ then
with_mem_debug=no
fi
if test "$with_mem_debug" = "yes" ; then
echo Enabling memory debug support
WITH_MEM_DEBUG=1
if test "$with_thread_alloc" = "yes" ; then
echo Disabling memory debug - cannot use mem-debug with thread-alloc!
WITH_MEM_DEBUG=0
else
echo Enabling memory debug support
WITH_MEM_DEBUG=1
fi
else
WITH_MEM_DEBUG=0
fi
......
......@@ -1561,6 +1561,66 @@ xmlShellSetBase(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
}
#endif
#ifdef LIBXML_XPATH_ENABLED
/**
* xmlShellRegisterNamespace:
* @ctxt: the shell context
* @arg: a string in prefix=nsuri format
* @node: unused
* @node2: unused
*
* Implements the XML shell function "setns"
* register/unregister a prefix=namespace pair
* on the XPath context
*
* Returns 0 on success and a negative value otherwise.
*/
static int
xmlShellRegisterNamespace(xmlShellCtxtPtr ctxt, char *arg,
xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr node2 ATTRIBUTE_UNUSED)
{
xmlChar* nsListDup;
xmlChar* prefix;
xmlChar* href;
xmlChar* next;
nsListDup = xmlStrdup((xmlChar *) arg);
next = nsListDup;
while(next != NULL) {
/* skip spaces */
/*while((*next) == ' ') next++;*/
if((*next) == '\0') break;
/* find prefix */
prefix = next;
next = (xmlChar*)xmlStrchr(next, '=');
if(next == NULL) {
fprintf(ctxt->output, "setns: prefix=[nsuri] required\n");
xmlFree(nsListDup);
return(-1);
}
*(next++) = '\0';
/* find href */
href = next;
next = (xmlChar*)xmlStrchr(next, ' ');
if(next != NULL) {
*(next++) = '\0';
}
/* do register namespace */
if(xmlXPathRegisterNs(ctxt->pctxt, prefix, href) != 0) {
fprintf(ctxt->output,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", prefix, href);
xmlFree(nsListDup);
return(-1);
}
}
xmlFree(nsListDup);
return(0);
}
#endif
/**
* xmlShellGrep:
* @ctxt: the shell context
......@@ -2246,6 +2306,8 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
fprintf(ctxt->output, "\tls [path] list contents of path or the current directory\n");
#ifdef LIBXML_XPATH_ENABLED
fprintf(ctxt->output, "\txpath expr evaluate the XPath expression in that context and print the result\n");
fprintf(ctxt->output, "\tsetns nsreg register a namespace to a prefix in the XPath evaluation context\n");
fprintf(ctxt->output, "\t format for nsreg is: prefix=[nsuri] (i.e. prefix= unsets a prefix)\n");
#endif /* LIBXML_XPATH_ENABLED */
fprintf(ctxt->output, "\tpwd display current working directory\n");
fprintf(ctxt->output, "\tquit leave shell\n");
......@@ -2297,6 +2359,13 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
} else if (!strcmp(command, "base")) {
xmlShellBase(ctxt, NULL, ctxt->node, NULL);
#ifdef LIBXML_XPATH_ENABLED
} else if (!strcmp(command, "setns")) {
if (arg[0] == 0) {
xmlGenericError(xmlGenericErrorContext,
"setns: prefix=[nsuri] required\n");
} else {
xmlShellRegisterNamespace(ctxt, arg, NULL, NULL);
}
} else if (!strcmp(command, "xpath")) {
if (arg[0] == 0) {
xmlGenericError(xmlGenericErrorContext,
......
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
scriptversion=2003-11-08.23
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# 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
......@@ -25,6 +27,36 @@
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF