Commit d7372d05 authored by Aron Xu's avatar Aron Xu

Imported Upstream version 2.8.0+dfsg1

parent 2d1849b2
......@@ -727,7 +727,7 @@ static const char* const map_contents[] = { BLOCK, "area", NULL } ;
static const char* const name_attr[] = { "name", NULL } ;
static const char* const action_attr[] = { "action", NULL } ;
static const char* const blockli_elt[] = { BLOCK, "li", NULL } ;
static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", NULL } ;
static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", "charset", NULL } ;
static const char* const content_attr[] = { "content", NULL } ;
static const char* const type_attr[] = { "type", NULL } ;
static const char* const noframes_content[] = { "body", FLOW MODIFIER, NULL } ;
......@@ -1080,7 +1080,7 @@ static const char * const htmlStartClose[] = {
"menu", "p", "head", "ul", NULL,
"p", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", FONTSTYLE, NULL,
"div", "p", "head", NULL,
"noscript", "p", "head", NULL,
"noscript", "p", NULL,
"center", "font", "b", "i", "p", "head", NULL,
"a", "a", NULL,
"caption", "p", NULL,
......@@ -3435,34 +3435,26 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
}
/**
* htmlCheckEncoding:
* htmlCheckEncodingDirect:
* @ctxt: an HTML parser context
* @attvalue: the attribute value
*
* Checks an http-equiv attribute from a Meta tag to detect
* Checks an attribute value to detect
* the encoding
* If a new encoding is detected the parser is switched to decode
* it and pass UTF8
*/
static void
htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
const xmlChar *encoding;
htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
if ((ctxt == NULL) || (attvalue == NULL))
if ((ctxt == NULL) || (encoding == NULL) ||
(ctxt->options & HTML_PARSE_IGNORE_ENC))
return;
/* do not change encoding */
if (ctxt->input->encoding != NULL)
return;
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset=");
if (encoding != NULL) {
encoding += 8;
} else {
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset =");
if (encoding != NULL)
encoding += 9;
}
if (encoding != NULL) {
xmlCharEncoding enc;
xmlCharEncodingHandlerPtr handler;
......@@ -3500,7 +3492,9 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
xmlSwitchToEncoding(ctxt, handler);
ctxt->charset = XML_CHAR_ENCODING_UTF8;
} else {
ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING;
htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
"htmlCheckEncoding: unknown encoding %s\n",
encoding, NULL);
}
}
......@@ -3532,6 +3526,38 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
}
}
/**
* htmlCheckEncoding:
* @ctxt: an HTML parser context
* @attvalue: the attribute value
*
* Checks an http-equiv attribute from a Meta tag to detect
* the encoding
* If a new encoding is detected the parser is switched to decode
* it and pass UTF8
*/
static void
htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
const xmlChar *encoding;
if (!attvalue)
return;
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset");
if (encoding != NULL) {
encoding += 7;
}
/*
* skip blank
*/
if (encoding && IS_BLANK_CH(*encoding))
encoding = xmlStrcasestr(attvalue, BAD_CAST"=");
if (encoding && *encoding == '=') {
encoding ++;
htmlCheckEncodingDirect(ctxt, encoding);
}
}
/**
* htmlCheckMeta:
* @ctxt: an HTML parser context
......@@ -3556,6 +3582,8 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) {
if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"http-equiv"))
&& (!xmlStrcasecmp(value, BAD_CAST"Content-Type")))
http = 1;
else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"charset")))
htmlCheckEncodingDirect(ctxt, value);
else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"content")))
content = value;
att = atts[i++];
......@@ -3885,6 +3913,7 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt)
if ((oldname != NULL) && (xmlStrEqual(oldname, name))) {
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
ctxt->sax->endElement(ctxt->userData, name);
htmlNodeInfoPop(ctxt);
htmlnamePop(ctxt);
ret = 1;
} else {
......@@ -5173,6 +5202,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
int avail = 0;
xmlChar cur, next;
htmlParserNodeInfo node_info;
#ifdef DEBUG_PUSH
switch (ctxt->instate) {
case XML_PARSER_EOF:
......@@ -5312,10 +5343,23 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
avail = in->length - (in->cur - in->base);
else
avail = in->buf->buffer->use - (in->cur - in->base);
if (avail < 2)
/*
* no chars in buffer
*/
if (avail < 1)
goto done;
/*
* not enouth chars in buffer
*/
if (avail < 2) {
if (!terminate)
goto done;
else
next = ' ';
} else {
next = in->cur[1];
}
cur = in->cur[0];
next = in->cur[1];
if ((cur == '<') && (next == '!') &&
(in->cur[2] == '-') && (in->cur[3] == '-')) {
if ((!terminate) &&
......@@ -5465,8 +5509,22 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
int failed;
const htmlElemDesc * info;
if (avail < 2)
/*
* no chars in buffer
*/
if (avail < 1)
goto done;
/*
* not enouth chars in buffer
*/
if (avail < 2) {
if (!terminate)
goto done;
else
next = ' ';
} else {
next = in->cur[1];
}
cur = in->cur[0];
if (cur != '<') {
ctxt->instate = XML_PARSER_CONTENT;
......@@ -5476,7 +5534,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
#endif
break;
}
if (in->cur[1] == '/') {
if (next == '/') {
ctxt->instate = XML_PARSER_END_TAG;
ctxt->checkIndex = 0;
#ifdef DEBUG_PUSH
......@@ -5489,6 +5547,14 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
(htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
goto done;
/* Capture start position */
if (ctxt->record_info) {
node_info.begin_pos = ctxt->input->consumed +
(CUR_PTR - ctxt->input->base);
node_info.begin_line = ctxt->input->line;
}
failed = htmlParseStartTag(ctxt);
name = ctxt->name;
if ((failed == -1) ||
......@@ -5538,6 +5604,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
htmlnamePop(ctxt);
}
if (ctxt->record_info)
htmlNodeInfoPush(ctxt, &node_info);
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
......@@ -5554,6 +5623,10 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
ctxt->sax->endElement(ctxt->userData, name);
htmlnamePop(ctxt);
}
if (ctxt->record_info)
htmlNodeInfoPush(ctxt, &node_info);
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
......@@ -6537,6 +6610,14 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
ctxt->options |= HTML_PARSE_NODEFDTD;
options -= HTML_PARSE_NODEFDTD;
}
if (options & HTML_PARSE_IGNORE_ENC) {
ctxt->options |= HTML_PARSE_IGNORE_ENC;
options -= HTML_PARSE_IGNORE_ENC;
}
if (options & HTML_PARSE_NOIMPLIED) {
ctxt->options |= HTML_PARSE_NOIMPLIED;
options -= HTML_PARSE_NOIMPLIED;
}
ctxt->dictNames = 0;
return (options);
}
......@@ -6730,8 +6811,11 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
XML_CHAR_ENCODING_NONE);
if (input == NULL)
if (input == NULL) {
if (ioclose != NULL)
ioclose(ioctx);
return (NULL);
}
ctxt = htmlNewParserCtxt();
if (ctxt == NULL) {
xmlFreeParserInputBuffer(input);
......@@ -6930,8 +7014,11 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
XML_CHAR_ENCODING_NONE);
if (input == NULL)
if (input == NULL) {
if (ioclose != NULL)
ioclose(ioctx);
return (NULL);
}
stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
if (stream == NULL) {
xmlFreeParserInputBuffer(input);
......
......@@ -151,7 +151,7 @@ found_content:
* htmlSetMetaEncoding:
* @doc: the document
* @encoding: the encoding string
*
*
* Sets the current encoding in the Meta tags
* NOTE: this will not change the document content encoding, just
* the META flag associated.
......@@ -164,6 +164,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
const xmlChar *content = NULL;
char newcontent[100];
newcontent[0] = 0;
if (doc == NULL)
return(-1);
......@@ -244,7 +245,7 @@ found_meta:
http = 1;
else
{
if ((value != NULL) &&
if ((value != NULL) &&
(!xmlStrcasecmp(attr->name, BAD_CAST"content")))
content = value;
}
......@@ -278,8 +279,13 @@ create:
xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent);
}
} else {
/* remove the meta tag if NULL is passed */
if (encoding == NULL) {
xmlUnlinkNode(meta);
xmlFreeNode(meta);
}
/* change the document only if there is a real encoding change */
if (xmlStrcasestr(content, encoding) == NULL) {
else if (xmlStrcasestr(content, encoding) == NULL) {
xmlSetProp(meta, BAD_CAST"content", BAD_CAST newcontent);
}
}
......@@ -481,7 +487,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
if (enc != XML_CHAR_ENCODING_UTF8) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL)
return(-1);
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
}
}
......@@ -562,11 +568,9 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
}
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL) {
*mem = NULL;
*size = 0;
return;
}
if (handler == NULL)
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
} else {
handler = xmlFindCharEncodingHandler(encoding);
}
......@@ -587,7 +591,7 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
return;
}
htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
xmlOutputBufferFlush(buf);
if (buf->conv != NULL) {
......@@ -1061,7 +1065,7 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL)
return(-1);
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
} else {
handler = xmlFindCharEncodingHandler(encoding);
}
......@@ -1120,7 +1124,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL)
return(-1);
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
}
}
......@@ -1181,7 +1185,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL)
return(-1);
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
}
htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
} else {
......
......@@ -6,7 +6,7 @@ SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@
DIST_SUBDIRS = include . doc example python xstc
INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @LZMA_CFLAGS@
noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
testThreads testC14N testAutomata testRegexp \
......@@ -18,7 +18,7 @@ bin_PROGRAMS = xmllint xmlcatalog
bin_SCRIPTS=xml2-config
lib_LTLIBRARIES = libxml2.la
libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
if USE_VERSION_SCRIPT
LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
......@@ -40,7 +40,7 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \
xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
xmlmodule.c schematron.c
xmlmodule.c schematron.c xzlib.c
else
libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
......@@ -50,11 +50,11 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
xmlreader.c relaxng.c dict.c SAX2.c \
xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
xmlmodule.c schematron.c
xmlmodule.c schematron.c xzlib.c
endif
DEPS = $(top_builddir)/libxml2.la
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
man_MANS = xml2-config.1 libxml.3
......@@ -1152,14 +1152,14 @@ cleanup:
dist-hook: cleanup libxml2.spec
-cp libxml2.spec $(distdir)
(cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -)
(cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -)
dist-source: distdir
$(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz
dist-test: distdir
(mkdir -p $(distdir))
(cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn xstc/Tests) | (cd $(distdir); tar xf -)
(cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git xstc/Tests) | (cd $(distdir); tar xf -)
tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
@(rm -rf $(distdir)/xstc/Test)
......@@ -1195,7 +1195,7 @@ 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 elfgcchack.h \
triop.h triodef.h libxml.h elfgcchack.h xzlib.h \
testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
dbgen.pl dbgenattr.pl regressions.py regressions.xml \
README.tests Makefile.tests libxml2.syms \
......@@ -1231,7 +1231,7 @@ uninstall-local:
rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
tst: tst.c
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma
sparse: clean
$(MAKE) CC=cgcc
......
This diff is collapsed.
......@@ -31,7 +31,7 @@ The list archive is at:
http://mail.gnome.org/archives/xml/
All technical answers asked privately will be automatically answered on
the list and archived for public access unless pricacy is explicitely
the list and archived for public access unless privacy is explicitly
required and justified.
Daniel Veillard
......
......@@ -14,17 +14,26 @@ program has a different testing purpose:
The command:
make check
or
make -f Makefile.tests check
should be sufficient on an Unix system to build and exercise the tests
for the version of the library installed on the system. Note however
that there isn't backward compatibility provided so if the installed
version is older to the testsuite one, failing to compile or run the tests
version is older than the testsuite one, failing to compile or run the tests
is likely. In any event this won't work with an installed libxml2 older
than 2.6.20.
Building on other platfroms should be a matter of compiling the C files
Building on other platforms should be a matter of compiling the C files
like any other program using libxml2, running the test should be done
simply by launching the resulting executables.
Also note the availability of a "make valgrind" target which will run the
above tests under valgrind to check for memory errors (but this relies
on the availability of the valgrind command and take far more time to
complete).
Daniel Veillard
Thu Jul 24 2008
Mon May 7 2012
......@@ -1756,7 +1756,6 @@ void
xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlParserNodeInfo node_info;
xmlNodePtr cur;
if (ctx == NULL) return;
......@@ -1770,10 +1769,10 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
/* Capture end position and add node */
if (cur != NULL && ctxt->record_info) {
node_info.end_pos = ctxt->input->cur - ctxt->input->base;
node_info.end_line = ctxt->input->line;
node_info.node = cur;
xmlParserAddNodeInfo(ctxt, &node_info);
ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base;
ctxt->nodeInfo->end_line = ctxt->input->line;
ctxt->nodeInfo->node = cur;
xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo);
}
ctxt->nodemem = -1;
......@@ -2163,6 +2162,7 @@ xmlSAX2StartElementNs(void *ctx,
xmlNodePtr parent;
xmlNsPtr last = NULL, ns;
const xmlChar *uri, *pref;
xmlChar *lname = NULL;
int i, j;
if (ctx == NULL) return;
......@@ -2181,6 +2181,20 @@ xmlSAX2StartElementNs(void *ctx,
ctxt->validate = 0;
}
/*
* Take care of the rare case of an undefined namespace prefix
*/
if ((prefix != NULL) && (URI == NULL)) {
if (ctxt->dictNames) {
const xmlChar *fullname;
fullname = xmlDictQLookup(ctxt->dict, prefix, localname);
if (fullname != NULL)
localname = fullname;
} else {
lname = xmlBuildQName(localname, prefix, NULL, 0);
}
}
/*
* allocate the node
*/
......@@ -2194,7 +2208,10 @@ xmlSAX2StartElementNs(void *ctx,
if (ctxt->dictNames)
ret->name = localname;
else {
ret->name = xmlStrdup(localname);
if (lname == NULL)
ret->name = xmlStrdup(localname);
else
ret->name = lname;
if (ret->name == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
return;
......@@ -2206,8 +2223,11 @@ xmlSAX2StartElementNs(void *ctx,
if (ctxt->dictNames)
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
(xmlChar *) localname, NULL);
else
else if (lname == NULL)
ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
else
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
(xmlChar *) lname, NULL);
if (ret == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
return;
......@@ -2222,7 +2242,7 @@ xmlSAX2StartElementNs(void *ctx,
}
}
if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
if (parent == NULL) {
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
}
/*
......@@ -2314,8 +2334,33 @@ xmlSAX2StartElementNs(void *ctx,
*/
if (nb_attributes > 0) {
for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
/*
* Handle the rare case of an undefined atribute prefix
*/
if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
if (ctxt->dictNames) {
const xmlChar *fullname;
fullname = xmlDictQLookup(ctxt->dict, attributes[j+1],
attributes[j]);
if (fullname != NULL) {
xmlSAX2AttributeNs(ctxt, fullname, NULL,
attributes[j+3], attributes[j+4]);
continue;
}
} else {
lname = xmlBuildQName(attributes[j], attributes[j+1],
NULL, 0);
if (lname != NULL) {
xmlSAX2AttributeNs(ctxt, lname, NULL,
attributes[j+3], attributes[j+4]);
xmlFree(lname);
continue;
}
}
}
xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1],
attributes[j+3], attributes[j+4]);
attributes[j+3], attributes[j+4]);
}
}
......@@ -2595,7 +2640,7 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret);
return;
}
if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
if (parent == NULL) {
#ifdef DEBUG_SAX_TREE
xmlGenericError(xmlGenericErrorContext,
"Setting PI %s as root\n", target);
......@@ -2656,7 +2701,7 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret);
return;
}
if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
if (parent == NULL) {
#ifdef DEBUG_SAX_TREE
xmlGenericError(xmlGenericErrorContext,
"Setting xmlSAX2Comment as root\n");
......
#undef PACKAGE
#undef VERSION
#undef HAVE_LIBZ
#undef HAVE_LIBM
#undef HAVE_ISINF
#undef HAVE_ISNAN
#undef HAVE_LIBHISTORY
#undef HAVE_LIBREADLINE
#undef HAVE_LIBPTHREAD
#undef HAVE_PTHREAD_H
/* Define if IPV6 support is there */
#undef SUPPORT_IP6
/* Define if getaddrinfo is there */
#undef HAVE_GETADDRINFO
......@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
[m4_warning([this file was generated for autoconf 2.66.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......@@ -753,32 +753,6 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AC_C_PROTOTYPES])
if test "$ac_cv_prog_cc_stdc" != no; then
U= ANSI2KNR=
else
U=_ ANSI2KNR=./ansi2knr
fi
# Ensure some checks needed by ansi2knr itself.
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS([string.h])