From 7042e17490515a990a45aa7237d11bc49ab0eaf0 Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Wed, 9 Jul 2014 04:01:07 +0800 Subject: Imported Upstream version 2.8.0+dfsg1 --- tree.c | 301 +++++++++++++++++++++-------------------------------------------- 1 file changed, 98 insertions(+), 203 deletions(-) (limited to 'tree.c') diff --git a/tree.c b/tree.c index 7e5af26..8baae3d 100644 --- a/tree.c +++ b/tree.c @@ -41,9 +41,6 @@ #include #endif -#include "buf.h" -#include "save.h" - int __xmlRegisterCallbacks = 0; /************************************************************************ @@ -314,7 +311,7 @@ xmlSplitQName2(const xmlChar *name, xmlChar **prefix) { * parse an XML qualified name string,i * * returns NULL if it is not a Qualified Name, otherwise, update len - * with the length in byte of the prefix and return a pointer + * with the lenght in byte of the prefix and return a pointer * to the start of the name without the prefix */ @@ -1268,13 +1265,13 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { const xmlChar *cur = value, *end = cur + len; const xmlChar *q; xmlEntityPtr ent; - xmlBufPtr buf; + xmlBufferPtr buffer; if (value == NULL) return(NULL); - buf = xmlBufCreateSize(0); - if (buf == NULL) return(NULL); - xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_HYBRID); + buffer = xmlBufferCreateSize(0); + if (buffer == NULL) return(NULL); + xmlBufferSetAllocationScheme(buffer, XML_BUFFER_ALLOC_HYBRID); q = cur; while ((cur < end) && (*cur != 0)) { @@ -1286,7 +1283,7 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { * Save the current text. */ if (cur != q) { - if (xmlBufAdd(buf, q, cur - q)) + if (xmlBufferAdd(buffer, q, cur - q)) goto out; } q = cur; @@ -1363,20 +1360,20 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { if ((ent != NULL) && (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { - if (xmlBufCat(buf, ent->content)) + if (xmlBufferCat(buffer, ent->content)) goto out; } else { /* * Flush buffer so far */ - if (!xmlBufIsEmpty(buf)) { + if (buffer->use) { node = xmlNewDocText(doc, NULL); if (node == NULL) { if (val != NULL) xmlFree(val); goto out; } - node->content = xmlBufDetach(buf); + node->content = xmlBufferDetach(buffer); if (last == NULL) { last = ret = node; @@ -1418,13 +1415,13 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { q = cur; } if (charval != 0) { - xmlChar buffer[10]; + xmlChar buf[10]; int l; - l = xmlCopyCharMultiByte(buffer, charval); - buffer[l] = 0; + l = xmlCopyCharMultiByte(buf, charval); + buf[l] = 0; - if (xmlBufCat(buf, buffer)) + if (xmlBufferCat(buffer, buf)) goto out; charval = 0; } @@ -1436,14 +1433,14 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { /* * Handle the last piece of text. */ - if (xmlBufAdd(buf, q, cur - q)) + if (xmlBufferAdd(buffer, q, cur - q)) goto out; } - if (!xmlBufIsEmpty(buf)) { + if (buffer->use) { node = xmlNewDocText(doc, NULL); if (node == NULL) goto out; - node->content = xmlBufDetach(buf); + node->content = xmlBufferDetach(buffer); if (last == NULL) { last = ret = node; @@ -1455,7 +1452,7 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { } out: - xmlBufFree(buf); + xmlBufferFree(buffer); return(ret); } @@ -1476,13 +1473,13 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { const xmlChar *cur = value; const xmlChar *q; xmlEntityPtr ent; - xmlBufPtr buf; + xmlBufferPtr buffer; if (value == NULL) return(NULL); - buf = xmlBufCreateSize(0); - if (buf == NULL) return(NULL); - xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_HYBRID); + buffer = xmlBufferCreateSize(0); + if (buffer == NULL) return(NULL); + xmlBufferSetAllocationScheme(buffer, XML_BUFFER_ALLOC_HYBRID); q = cur; while (*cur != 0) { @@ -1494,7 +1491,7 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { * Save the current text. */ if (cur != q) { - if (xmlBufAdd(buf, q, cur - q)) + if (xmlBufferAdd(buffer, q, cur - q)) goto out; } q = cur; @@ -1559,16 +1556,16 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { if ((ent != NULL) && (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { - if (xmlBufCat(buf, ent->content)) + if (xmlBufferCat(buffer, ent->content)) goto out; } else { /* * Flush buffer so far */ - if (!xmlBufIsEmpty(buf)) { + if (buffer->use) { node = xmlNewDocText(doc, NULL); - node->content = xmlBufDetach(buf); + node->content = xmlBufferDetach(buffer); if (last == NULL) { last = ret = node; @@ -1609,13 +1606,13 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { q = cur; } if (charval != 0) { - xmlChar buffer[10]; + xmlChar buf[10]; int len; - len = xmlCopyCharMultiByte(buffer, charval); - buffer[len] = 0; + len = xmlCopyCharMultiByte(buf, charval); + buf[len] = 0; - if (xmlBufCat(buf, buffer)) + if (xmlBufferCat(buffer, buf)) goto out; charval = 0; } @@ -1626,12 +1623,12 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { /* * Handle the last piece of text. */ - xmlBufAdd(buf, q, cur - q); + xmlBufferAdd(buffer, q, cur - q); } - if (!xmlBufIsEmpty(buf)) { + if (buffer->use) { node = xmlNewDocText(doc, NULL); - node->content = xmlBufDetach(buf); + node->content = xmlBufferDetach(buffer); if (last == NULL) { last = ret = node; @@ -1641,7 +1638,7 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { } out: - xmlBufFree(buf); + xmlBufferFree(buffer); return(ret); } @@ -1662,14 +1659,9 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) xmlNodePtr node = list; xmlChar *ret = NULL; xmlEntityPtr ent; - int attr; if (list == NULL) return (NULL); - if ((list->parent != NULL) && (list->parent->type == XML_ATTRIBUTE_NODE)) - attr = 1; - else - attr = 0; while (node != NULL) { if ((node->type == XML_TEXT_NODE) || @@ -1679,10 +1671,7 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) } else { xmlChar *buffer; - if (attr) - buffer = xmlEncodeAttributeEntities(doc, node->content); - else - buffer = xmlEncodeEntitiesReentrant(doc, node->content); + buffer = xmlEncodeEntitiesReentrant(doc, node->content); if (buffer != NULL) { ret = xmlStrcat(ret, buffer); xmlFree(buffer); @@ -2788,7 +2777,7 @@ void xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { xmlAttrPtr prop; - if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL)) + if (tree == NULL) return; if (tree->doc != doc) { if(tree->type == XML_ELEMENT_NODE) { @@ -2816,7 +2805,7 @@ void xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) { xmlNodePtr cur; - if ((list == NULL) || (list->type == XML_NAMESPACE_DECL)) + if (list == NULL) return; cur = list; while (cur != NULL) { @@ -2923,9 +2912,7 @@ static xmlNodePtr xmlAddPropSibling(xmlNodePtr prev, xmlNodePtr cur, xmlNodePtr prop) { xmlAttrPtr attr; - if ((cur == NULL) || (cur->type != XML_ATTRIBUTE_NODE) || - (prop == NULL) || (prop->type != XML_ATTRIBUTE_NODE) || - ((prev != NULL) && (prev->type != XML_ATTRIBUTE_NODE))) + if (cur->type != XML_ATTRIBUTE_NODE) return(NULL); /* check if an attribute with the same name exists */ @@ -2973,14 +2960,14 @@ xmlAddPropSibling(xmlNodePtr prev, xmlNodePtr cur, xmlNodePtr prop) { */ xmlNodePtr xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { + if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddNextSibling : cur == NULL\n"); #endif return(NULL); } - if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) { + if (elem == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddNextSibling : elem == NULL\n"); @@ -3051,14 +3038,14 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { */ xmlNodePtr xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { + if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddPrevSibling : cur == NULL\n"); #endif return(NULL); } - if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) { + if (elem == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddPrevSibling : elem == NULL\n"); @@ -3129,7 +3116,7 @@ xmlNodePtr xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) { xmlNodePtr parent; - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { + if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddSibling : cur == NULL\n"); @@ -3137,7 +3124,7 @@ xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) { return(NULL); } - if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) { + if (elem == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddSibling : elem == NULL\n"); @@ -3205,7 +3192,7 @@ xmlNodePtr xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) { xmlNodePtr prev; - if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) { + if (parent == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddChildList : parent == NULL\n"); @@ -3213,7 +3200,7 @@ xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) { return(NULL); } - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { + if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddChildList : child == NULL\n"); @@ -3291,7 +3278,7 @@ xmlNodePtr xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { xmlNodePtr prev; - if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) { + if (parent == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddChild : parent == NULL\n"); @@ -3299,7 +3286,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { return(NULL); } - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { + if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddChild : child == NULL\n"); @@ -3413,7 +3400,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { */ xmlNodePtr xmlGetLastChild(xmlNodePtr parent) { - if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) { + if (parent == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlGetLastChild : parent == NULL\n"); @@ -3765,8 +3752,6 @@ xmlFreeNode(xmlNodePtr cur) { * Unlink a node from it's current context, the node is not freed * If one need to free the node, use xmlFreeNode() routine after the * unlink to discard it. - * Note that namespace nodes can't be unlinked as they do not have - * pointer to their parent. */ void xmlUnlinkNode(xmlNodePtr cur) { @@ -3777,8 +3762,6 @@ xmlUnlinkNode(xmlNodePtr cur) { #endif return; } - if (cur->type == XML_NAMESPACE_DECL) - return; if (cur->type == XML_DTD_NODE) { xmlDocPtr doc; doc = cur->doc; @@ -3847,15 +3830,14 @@ xmlUnlinkNode(xmlNodePtr cur) { xmlNodePtr xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) { if (old == cur) return(NULL); - if ((old == NULL) || (old->type == XML_NAMESPACE_DECL) || - (old->parent == NULL)) { + if ((old == NULL) || (old->parent == NULL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlReplaceNode : old == NULL or without parent\n"); #endif return(NULL); } - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { + if (cur == NULL) { xmlUnlinkNode(old); return(old); } @@ -3969,8 +3951,6 @@ xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) { xmlAttrPtr ret; if (cur == NULL) return(NULL); - if ((target != NULL) && (target->type != XML_ELEMENT_NODE)) - return(NULL); if (target != NULL) ret = xmlNewDocProp(target->doc, cur->name, NULL); else if (doc != NULL) @@ -4090,8 +4070,6 @@ xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur) { xmlAttrPtr ret = NULL; xmlAttrPtr p = NULL,q; - if ((target != NULL) && (target->type != XML_ELEMENT_NODE)) - return(NULL); while (cur != NULL) { q = xmlCopyProp(target, cur); if (q == NULL) @@ -4537,71 +4515,39 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) { ************************************************************************/ /** - * xmlGetLineNoInternal: + * xmlGetLineNo: * @node: valid node - * @depth: used to limit any risk of recursion * - * Get line number of @node. - * Try to override the limitation of lines being store in 16 bits ints + * Get line number of @node. This requires activation of this option + * before invoking the parser by calling xmlLineNumbersDefault(1) * * Returns the line number if successful, -1 otherwise */ -static long -xmlGetLineNoInternal(xmlNodePtr node, int depth) +long +xmlGetLineNo(xmlNodePtr node) { long result = -1; - if (depth >= 5) - return(-1); - if (!node) return result; if ((node->type == XML_ELEMENT_NODE) || (node->type == XML_TEXT_NODE) || (node->type == XML_COMMENT_NODE) || - (node->type == XML_PI_NODE)) { - if (node->line == 65535) { - if ((node->type == XML_TEXT_NODE) && (node->psvi != NULL)) - result = (long) node->psvi; - else if ((node->type == XML_ELEMENT_NODE) && - (node->children != NULL)) - result = xmlGetLineNoInternal(node->children, depth + 1); - else if (node->next != NULL) - result = xmlGetLineNoInternal(node->next, depth + 1); - else if (node->prev != NULL) - result = xmlGetLineNoInternal(node->prev, depth + 1); - } - if ((result == -1) || (result == 65535)) - result = (long) node->line; - } else if ((node->prev != NULL) && + (node->type == XML_PI_NODE)) + result = (long) node->line; + else if ((node->prev != NULL) && ((node->prev->type == XML_ELEMENT_NODE) || (node->prev->type == XML_TEXT_NODE) || (node->prev->type == XML_COMMENT_NODE) || (node->prev->type == XML_PI_NODE))) - result = xmlGetLineNoInternal(node->prev, depth + 1); + result = xmlGetLineNo(node->prev); else if ((node->parent != NULL) && (node->parent->type == XML_ELEMENT_NODE)) - result = xmlGetLineNoInternal(node->parent, depth + 1); + result = xmlGetLineNo(node->parent); return result; } -/** - * xmlGetLineNo: - * @node: valid node - * - * Get line number of @node. - * Try to override the limitation of lines being store in 16 bits ints - * if XML_PARSE_BIG_LINES parser option was used - * - * Returns the line number if successful, -1 otherwise - */ -long -xmlGetLineNo(xmlNodePtr node) -{ - return(xmlGetLineNoInternal(node, 0)); -} - #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) /** * xmlGetNodePath: @@ -4624,7 +4570,7 @@ xmlGetNodePath(xmlNodePtr node) char nametemp[100]; int occur = 0, generic; - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) + if (node == NULL) return (NULL); buf_len = 500; @@ -4889,7 +4835,7 @@ xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) { xmlNodePtr old = NULL; if (doc == NULL) return(NULL); - if ((root == NULL) || (root->type == XML_NAMESPACE_DECL)) + if (root == NULL) return(NULL); xmlUnlinkNode(root); xmlSetTreeDoc(root, doc); @@ -4976,8 +4922,6 @@ xmlChar * xmlNodeGetLang(xmlNodePtr cur) { xmlChar *lang; - if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) - return(NULL); while (cur != NULL) { lang = xmlGetNsProp(cur, BAD_CAST "lang", XML_XML_NAMESPACE); if (lang != NULL) @@ -5057,8 +5001,6 @@ int xmlNodeGetSpacePreserve(xmlNodePtr cur) { xmlChar *space; - if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE)) - return(-1); while (cur != NULL) { space = xmlGetNsProp(cur, BAD_CAST "space", XML_XML_NAMESPACE); if (space != NULL) { @@ -5225,8 +5167,6 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) { if ((cur == NULL) && (doc == NULL)) return(NULL); - if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL)) - return(NULL); if (doc == NULL) doc = cur->doc; if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) { cur = doc->children; @@ -5306,39 +5246,11 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) { int xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur) { - xmlBufPtr buf; - int ret; - if ((cur == NULL) || (buffer == NULL)) return(-1); - buf = xmlBufFromBuffer(buffer); - ret = xmlBufGetNodeContent(buf, cur); - buffer = xmlBufBackToBuffer(buf); - if ((ret < 0) || (buffer == NULL)) - return(-1); - return(0); -} - -/** - * xmlBufGetNodeContent: - * @buf: a buffer xmlBufPtr - * @cur: the node being read - * - * Read the value of a node @cur, this can be either the text carried - * directly by this node if it's a TEXT node or the aggregate string - * of the values carried by this node child's (TEXT and ENTITY_REF). - * Entity references are substituted. - * Fills up the buffer @buffer with this value - * - * Returns 0 in case of success and -1 in case of error. - */ -int -xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur) -{ - if ((cur == NULL) || (buf == NULL)) return(-1); switch (cur->type) { case XML_CDATA_SECTION_NODE: case XML_TEXT_NODE: - xmlBufCat(buf, cur->content); + xmlBufferCat(buffer, cur->content); break; case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE:{ @@ -5349,10 +5261,10 @@ xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur) case XML_CDATA_SECTION_NODE: case XML_TEXT_NODE: if (tmp->content != NULL) - xmlBufCat(buf, tmp->content); + xmlBufferCat(buffer, tmp->content); break; case XML_ENTITY_REF_NODE: - xmlBufGetNodeContent(buf, tmp); + xmlNodeBufGetContent(buffer, tmp); break; default: break; @@ -5396,16 +5308,16 @@ xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur) while (tmp != NULL) { if (tmp->type == XML_TEXT_NODE) - xmlBufCat(buf, tmp->content); + xmlBufferCat(buffer, tmp->content); else - xmlBufGetNodeContent(buf, tmp); + xmlNodeBufGetContent(buffer, tmp); tmp = tmp->next; } break; } case XML_COMMENT_NODE: case XML_PI_NODE: - xmlBufCat(buf, cur->content); + xmlBufferCat(buffer, cur->content); break; case XML_ENTITY_REF_NODE:{ xmlEntityPtr ent; @@ -5423,7 +5335,7 @@ xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur) * xmlNodeGetContent() which handles all possible node types */ tmp = ent->children; while (tmp) { - xmlBufGetNodeContent(buf, tmp); + xmlNodeBufGetContent(buffer, tmp); tmp = tmp->next; } break; @@ -5445,13 +5357,13 @@ xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur) if ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_TEXT_NODE) || (cur->type == XML_CDATA_SECTION_NODE)) { - xmlBufGetNodeContent(buf, cur); + xmlNodeBufGetContent(buffer, cur); } cur = cur->next; } break; case XML_NAMESPACE_DECL: - xmlBufCat(buf, ((xmlNsPtr) cur)->href); + xmlBufferCat(buffer, ((xmlNsPtr) cur)->href); break; case XML_ELEMENT_DECL: case XML_ATTRIBUTE_DECL: @@ -5460,7 +5372,6 @@ xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur) } return(0); } - /** * xmlNodeGetContent: * @cur: the node being read @@ -5480,15 +5391,16 @@ xmlNodeGetContent(xmlNodePtr cur) switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE:{ - xmlBufPtr buf; + xmlBufferPtr buffer; xmlChar *ret; - buf = xmlBufCreateSize(64); - if (buf == NULL) + buffer = xmlBufferCreateSize(64); + if (buffer == NULL) return (NULL); - xmlBufGetNodeContent(buf, cur); - ret = xmlBufDetach(buf); - xmlBufFree(buf); + xmlNodeBufGetContent(buffer, cur); + ret = buffer->content; + buffer->content = NULL; + xmlBufferFree(buffer); return (ret); } case XML_ATTRIBUTE_NODE: @@ -5500,7 +5412,7 @@ xmlNodeGetContent(xmlNodePtr cur) return (NULL); case XML_ENTITY_REF_NODE:{ xmlEntityPtr ent; - xmlBufPtr buf; + xmlBufferPtr buffer; xmlChar *ret; /* lookup entity declaration */ @@ -5508,14 +5420,15 @@ xmlNodeGetContent(xmlNodePtr cur) if (ent == NULL) return (NULL); - buf = xmlBufCreate(); - if (buf == NULL) + buffer = xmlBufferCreate(); + if (buffer == NULL) return (NULL); - xmlBufGetNodeContent(buf, cur); + xmlNodeBufGetContent(buffer, cur); - ret = xmlBufDetach(buf); - xmlBufFree(buf); + ret = buffer->content; + buffer->content = NULL; + xmlBufferFree(buffer); return (ret); } case XML_ENTITY_NODE: @@ -5530,17 +5443,18 @@ xmlNodeGetContent(xmlNodePtr cur) case XML_DOCB_DOCUMENT_NODE: #endif case XML_HTML_DOCUMENT_NODE: { - xmlBufPtr buf; + xmlBufferPtr buffer; xmlChar *ret; - buf = xmlBufCreate(); - if (buf == NULL) + buffer = xmlBufferCreate(); + if (buffer == NULL) return (NULL); - xmlBufGetNodeContent(buf, (xmlNodePtr) cur); + xmlNodeBufGetContent(buffer, (xmlNodePtr) cur); - ret = xmlBufDetach(buf); - xmlBufFree(buf); + ret = buffer->content; + buffer->content = NULL; + xmlBufferFree(buffer); return (ret); } case XML_NAMESPACE_DECL: { @@ -5861,9 +5775,6 @@ xmlGetNsList(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node) int maxns = 10; int i; - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) - return(NULL); - while (node != NULL) { if (node->type == XML_ELEMENT_NODE) { cur = node->nsDef; @@ -5962,7 +5873,7 @@ xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) { xmlNsPtr cur; xmlNodePtr orig = node; - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) return(NULL); + if (node == NULL) return(NULL); if ((nameSpace != NULL) && (xmlStrEqual(nameSpace, (const xmlChar *)"xml"))) { if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) { @@ -6092,7 +6003,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) xmlNodePtr orig = node; int is_attr; - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) || (href == NULL)) + if ((node == NULL) || (href == NULL)) return (NULL); if (xmlStrEqual(href, XML_XML_NAMESPACE)) { /* @@ -6183,7 +6094,7 @@ xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) { xmlChar prefix[50]; int counter = 1; - if ((tree == NULL) || (tree->type != XML_ELEMENT_NODE)) { + if (tree == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewReconciliedNs : tree == NULL\n"); @@ -8040,8 +7951,6 @@ xmlDOMWrapNSNormGatherInScopeNs(xmlNsMapPtr *map, if ((map == NULL) || (*map != NULL)) return (-1); - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) - return (-1); /* * Get in-scope ns-decls of @parent. */ @@ -8309,8 +8218,6 @@ xmlSearchNsByNamespaceStrict(xmlDocPtr doc, xmlNodePtr node, if ((doc == NULL) || (nsName == NULL) || (retNs == NULL)) return (-1); - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) - return(-1); *retNs = NULL; if (xmlStrEqual(nsName, XML_XML_NAMESPACE)) { @@ -8409,8 +8316,8 @@ xmlSearchNsByPrefixStrict(xmlDocPtr doc, xmlNodePtr node, xmlNodePtr cur; xmlNsPtr ns; - if ((doc == NULL) || (node == NULL) || (node->type == XML_NAMESPACE_DECL)) - return(-1); + if ((doc == NULL) || (node == NULL)) + return (-1); if (retNs) *retNs = NULL; @@ -8478,9 +8385,6 @@ xmlDOMWrapNSNormDeclareNsForced(xmlDocPtr doc, char buf[50]; const xmlChar *pref; int counter = 0; - - if ((doc == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE)) - return(NULL); /* * Create a ns-decl on @anchor. */ @@ -8997,9 +8901,6 @@ xmlDOMWrapAdoptBranch(xmlDOMWrapCtxtPtr ctxt, parnsdone = 0; cur = node; - if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL)) - goto internal_error; - while (cur != NULL) { /* * Paranoid source-doc sanity check. @@ -9379,9 +9280,6 @@ xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt, *resNode = NULL; cur = node; - if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL)) - return(-1); - while (cur != NULL) { if (cur->doc != sourceDoc) { /* @@ -9899,8 +9797,6 @@ xmlDOMWrapAdoptAttr(xmlDOMWrapCtxtPtr ctxt, if (attr->children == NULL) return (0); cur = attr->children; - if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL)) - goto internal_error; while (cur != NULL) { cur->doc = destDoc; switch (cur->type) { @@ -9985,8 +9881,7 @@ xmlDOMWrapAdoptNode(xmlDOMWrapCtxtPtr ctxt, xmlNodePtr destParent, int options) { - if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) || - (destDoc == NULL) || + if ((node == NULL) || (destDoc == NULL) || ((destParent != NULL) && (destParent->doc != destDoc))) return(-1); /* -- cgit v1.2.3 From 3871a83a5f0aebd8c00879eab14fe901c93dbfcf Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Sun, 26 Oct 2014 07:02:25 +0800 Subject: Imported Upstream version 2.9.2+dfsg1 --- COPYING | 14 +- ChangeLog | 2 +- Copyright | 14 +- DOCBparser.c | 12 +- HTMLparser.c | 172 +- HTMLtree.c | 141 +- INSTALL | 15 +- Makefile.am | 133 +- Makefile.in | 934 +- NEWS | 658 +- SAX.c | 2 +- SAX2.c | 173 +- acinclude.m4 | 8 +- aclocal.m4 | 783 +- buf.c | 1304 +++ buf.h | 72 + c14n.c | 641 +- catalog.c | 110 +- chvalid.c | 164 +- config.guess | 405 +- config.h.in | 37 +- config.sub | 279 +- configure | 1593 +-- configure.ac | 1664 +++ configure.in | 1559 --- debugXML.c | 40 +- depcomp | 531 +- dict.c | 222 +- doc/APIchunk0.html | 14 +- doc/APIchunk1.html | 8 +- doc/APIchunk10.html | 37 +- doc/APIchunk11.html | 33 +- doc/APIchunk12.html | 25 +- doc/APIchunk13.html | 36 +- doc/APIchunk14.html | 16 +- doc/APIchunk15.html | 16 +- doc/APIchunk16.html | 17 +- doc/APIchunk17.html | 27 +- doc/APIchunk18.html | 28 +- doc/APIchunk19.html | 15 +- doc/APIchunk2.html | 13 +- doc/APIchunk20.html | 8 +- doc/APIchunk21.html | 20 +- doc/APIchunk22.html | 19 +- doc/APIchunk23.html | 18 +- doc/APIchunk24.html | 25 +- doc/APIchunk25.html | 14 +- doc/APIchunk26.html | 21 +- doc/APIchunk27.html | 15 +- doc/APIchunk28.html | 26 +- doc/APIchunk29.html | 8 +- doc/APIchunk3.html | 24 +- doc/APIchunk4.html | 19 +- doc/APIchunk5.html | 9 +- doc/APIchunk6.html | 12 +- doc/APIchunk7.html | 13 +- doc/APIchunk8.html | 10 +- doc/APIchunk9.html | 20 +- doc/APIconstructors.html | 10 + doc/APIfiles.html | 34 +- doc/APIfunctions.html | 103 +- doc/APIsymbols.html | 34 +- doc/FAQ.html | 51 +- doc/Makefile.am | 298 +- doc/Makefile.in | 731 +- doc/apibuild.py | 3262 +++--- doc/architecture.html | 3 +- doc/bugs.html | 6 +- doc/catalog.html | 15 +- doc/contribs.html | 3 +- doc/devhelp/Makefile.am | 32 +- doc/devhelp/Makefile.in | 227 +- doc/devhelp/general.html | 2 +- doc/devhelp/libxml2-dict.html | 12 +- doc/devhelp/libxml2-entities.html | 8 +- doc/devhelp/libxml2-parser.html | 9 +- doc/devhelp/libxml2-parserInternals.html | 21 +- doc/devhelp/libxml2-relaxng.html | 2 +- doc/devhelp/libxml2-tree.html | 208 +- doc/devhelp/libxml2-valid.html | 2 +- doc/devhelp/libxml2-xmlIO.html | 10 + doc/devhelp/libxml2-xmlerror.html | 11 +- doc/devhelp/libxml2-xmlmodule.html | 4 +- doc/devhelp/libxml2-xmlregexp.html | 6 +- doc/devhelp/libxml2-xmlschemas.html | 15 + doc/devhelp/libxml2-xmlschemastypes.html | 4 +- doc/devhelp/libxml2-xmlversion.html | 5 + doc/devhelp/libxml2-xmlwriter.html | 11 +- doc/devhelp/libxml2-xpath.html | 11 + doc/devhelp/libxml2-xpathInternals.html | 18 +- doc/devhelp/libxml2.devhelp | 32 +- doc/docs.html | 5 +- doc/downloads.html | 9 +- doc/encoding.html | 30 +- doc/example.html | 3 +- doc/examples/Makefile.am | 241 +- doc/examples/Makefile.in | 611 +- doc/examples/examples.xml | 450 +- doc/examples/index.html | 14 + doc/examples/index.py | 92 +- doc/examples/io1.c | 2 +- doc/examples/io1.res | 2 +- doc/examples/io2.c | 2 +- doc/examples/reader1.c | 2 +- doc/examples/reader2.c | 2 +- doc/examples/reader3.c | 2 +- doc/examples/reader4.c | 2 +- doc/examples/testWriter.c | 10 +- doc/examples/tree1.c | 2 +- doc/examples/tree2.c | 2 +- doc/examples/xpath1.c | 2 +- doc/examples/xpath2.c | 2 +- doc/help.html | 3 +- doc/html/book1.html | 2 +- doc/html/index.html | 2 +- doc/html/libxml-dict.html | 12 +- doc/html/libxml-entities.html | 8 +- doc/html/libxml-lib.html | 2 +- doc/html/libxml-parser.html | 7 +- doc/html/libxml-parserInternals.html | 7 +- doc/html/libxml-relaxng.html | 2 +- doc/html/libxml-tree.html | 177 +- doc/html/libxml-valid.html | 2 +- doc/html/libxml-xmlIO.html | 8 +- doc/html/libxml-xmlerror.html | 9 +- doc/html/libxml-xmlmodule.html | 4 +- doc/html/libxml-xmlregexp.html | 6 +- doc/html/libxml-xmlschemas.html | 14 +- doc/html/libxml-xmlschemastypes.html | 4 +- doc/html/libxml-xmlversion.html | 3 +- doc/html/libxml-xmlwriter.html | 5 +- doc/html/libxml-xpath.html | 11 +- doc/html/libxml-xpathInternals.html | 14 +- doc/index.html | 274 +- doc/interface.html | 2 +- doc/intro.html | 3 +- doc/library.html | 39 +- doc/libxml2-api.xml | 345 +- doc/libxml2.xsa | 118 +- doc/news.html | 828 +- doc/python.html | 9 +- doc/symbols.xml | 19 + doc/threads.html | 6 +- doc/upgrade.html | 18 +- doc/xml.html | 436 +- doc/xmldtd.html | 21 +- doc/xmlio.html | 12 +- doc/xmllint.1 | 608 +- doc/xmllint.xml | 16 +- doc/xmlmem.html | 21 +- elfgcchack.h | 206 +- enc.h | 32 + encoding.c | 510 +- entities.c | 153 +- error.c | 77 +- example/Makefile.am | 9 +- example/Makefile.in | 254 +- globals.c | 28 +- hash.c | 51 +- include/Makefile.in | 300 +- include/libxml/DOCBparser.h | 18 +- include/libxml/HTMLparser.h | 44 +- include/libxml/HTMLtree.h | 38 +- include/libxml/Makefile.in | 210 +- include/libxml/SAX.h | 74 +- include/libxml/SAX2.h | 74 +- include/libxml/c14n.h | 2 +- include/libxml/catalog.h | 70 +- include/libxml/debugXML.h | 52 +- include/libxml/dict.h | 6 + include/libxml/encoding.h | 28 +- include/libxml/entities.h | 9 +- include/libxml/globals.h | 17 +- include/libxml/hash.h | 48 +- include/libxml/list.h | 52 +- include/libxml/nanoftp.h | 1 + include/libxml/nanohttp.h | 26 +- include/libxml/parser.h | 144 +- include/libxml/parserInternals.h | 179 +- include/libxml/relaxng.h | 8 +- include/libxml/schemasInternals.h | 4 +- include/libxml/schematron.h | 22 +- include/libxml/tree.h | 437 +- include/libxml/valid.h | 144 +- include/libxml/xlink.h | 14 +- include/libxml/xmlIO.h | 138 +- include/libxml/xmlautomata.h | 44 +- include/libxml/xmlerror.h | 15 +- include/libxml/xmlexports.h | 2 +- include/libxml/xmlmodule.h | 2 +- include/libxml/xmlreader.h | 39 +- include/libxml/xmlschemas.h | 32 +- include/libxml/xmlschemastypes.h | 40 +- include/libxml/xmlstring.h | 6 +- include/libxml/xmlversion.h | 25 +- include/libxml/xmlversion.h.in | 15 +- include/libxml/xmlwriter.h | 5 +- include/libxml/xpath.h | 94 +- include/libxml/xpathInternals.h | 160 +- include/libxml/xpointer.h | 46 +- include/win32config.h | 4 + include/wsockcompat.h | 2 +- install-sh | 35 +- legacy.c | 32 +- libxml-2.0-uninstalled.pc.in | 2 +- libxml-2.0.pc.in | 2 +- libxml.3 | 2 +- libxml.h | 9 + libxml.spec.in | 58 +- libxml2-config.cmake.in | 50 + libxml2.spec | 64 +- libxml2.syms | 35 + list.c | 76 +- ltmain.sh | 95 +- m4/libtool.m4 | 277 +- m4/ltoptions.m4 | 19 +- m4/ltversion.m4 | 10 +- missing | 461 +- nanoftp.c | 110 +- nanohttp.c | 81 +- os400/README400 | 214 + os400/dlfcn/dlfcn.c | 1213 +++ os400/dlfcn/dlfcn.h | 32 + os400/iconv/README.iconv | 47 + os400/iconv/bldcsndfa/bldcsndfa.c | 1953 ++++ os400/iconv/bldcsndfa/ccsid_mibenum.dtd | 15 + os400/iconv/bldcsndfa/ccsid_mibenum.xml | 270 + os400/iconv/bldcsndfa/character-sets.xhtml | 3077 ++++++ os400/iconv/ianatables.c | 4609 +++++++++ os400/iconv/iconv.c | 154 + os400/iconv/iconv.h | 40 + os400/initscript.sh | 290 + os400/libxmlrpg/DOCBparser.rpgle | 116 + os400/libxmlrpg/HTMLparser.rpgle | 403 + os400/libxmlrpg/HTMLtree.rpgle | 166 + os400/libxmlrpg/SAX.rpgle | 207 + os400/libxmlrpg/SAX2.rpgle | 248 + os400/libxmlrpg/c14n.rpgle | 119 + os400/libxmlrpg/catalog.rpgle | 235 + os400/libxmlrpg/chvalid.rpgle | 97 + os400/libxmlrpg/debugXML.rpgle | 241 + os400/libxmlrpg/dict.rpgle | 78 + os400/libxmlrpg/encoding.rpgle | 274 + os400/libxmlrpg/entities.rpgle | 174 + os400/libxmlrpg/globals.rpgle | 557 + os400/libxmlrpg/hash.rpgle | 231 + os400/libxmlrpg/list.rpgle | 168 + os400/libxmlrpg/nanoftp.rpgle | 156 + os400/libxmlrpg/nanohttp.rpgle | 103 + os400/libxmlrpg/parser.rpgle | 1407 +++ os400/libxmlrpg/parserInternals.rpgle | 575 ++ os400/libxmlrpg/pattern.rpgle | 117 + os400/libxmlrpg/relaxng.rpgle | 297 + os400/libxmlrpg/schemasInternals.rpgle | 1137 ++ os400/libxmlrpg/schematron.rpgle | 195 + os400/libxmlrpg/threads.rpgle | 70 + os400/libxmlrpg/transcode.rpgle | 71 + os400/libxmlrpg/tree.rpgle | 1628 +++ os400/libxmlrpg/uri.rpgle | 100 + os400/libxmlrpg/valid.rpgle | 575 ++ os400/libxmlrpg/xinclude.rpgle | 147 + os400/libxmlrpg/xlink.rpgle | 164 + os400/libxmlrpg/xmlIO.rpgle | 441 + os400/libxmlrpg/xmlautomata.rpgle | 179 + os400/libxmlrpg/xmlerror.rpgle | 1681 +++ os400/libxmlrpg/xmlexports.rpgle | 15 + os400/libxmlrpg/xmlmemory.rpgle | 239 + os400/libxmlrpg/xmlmodule.rpgle | 51 + os400/libxmlrpg/xmlreader.rpgle | 619 ++ os400/libxmlrpg/xmlregexp.rpgle | 246 + os400/libxmlrpg/xmlsave.rpgle | 96 + os400/libxmlrpg/xmlschemas.rpgle | 318 + os400/libxmlrpg/xmlschemastypes.rpgle | 235 + os400/libxmlrpg/xmlstdarg.rpgle | 34 + os400/libxmlrpg/xmlstring.rpgle | 162 + os400/libxmlrpg/xmlunicode.rpgle | 668 ++ os400/libxmlrpg/xmlversion.rpgle.in | 352 + os400/libxmlrpg/xmlwriter.rpgle | 725 ++ os400/libxmlrpg/xpath.rpgle | 649 ++ os400/libxmlrpg/xpathInternals.rpgle | 672 ++ os400/libxmlrpg/xpointer.rpgle | 157 + os400/make-bldcsndfa.sh | 43 + os400/make-include.sh | 81 + os400/make-rpg.sh | 97 + os400/make-src.sh | 241 + os400/make.sh | 75 + os400/os400config.h.in | 353 + os400/rpgsupport.c | 270 + os400/rpgsupport.h | 157 + os400/transcode.c | 268 + os400/transcode.h | 43 + os400/wrappers.c | 170 + os400/wrappers.h | 70 + parser.c | 1537 ++- parserInternals.c | 223 +- pattern.c | 178 +- python/Makefile.am | 63 +- python/Makefile.in | 509 +- python/drv_libxml2.py | 18 +- python/generator.py | 243 +- python/libxml.c | 325 +- python/libxml.py | 115 +- python/libxml2-export.c | 2063 ++++ python/libxml2-py.c | 14789 +++++++++++++++++++++++++++ python/libxml2-py.h | 2063 ++++ python/libxml2-python-api.xml | 9 + python/libxml2.py | 9319 +++++++++++++++++ python/libxml2class.py | 8531 +++++++++++++++ python/libxml2class.txt | 1177 +++ python/libxml_wrap.h | 30 + python/setup.py | 96 +- python/setup.py.in | 94 +- python/tests/Makefile.am | 7 +- python/tests/Makefile.in | 154 +- python/tests/attribs.py | 6 +- python/tests/build.py | 18 +- python/tests/compareNodes.py | 18 +- python/tests/ctxterror.py | 12 +- python/tests/cutnpaste.py | 6 +- python/tests/dtdvalid.py | 6 +- python/tests/error.py | 12 +- python/tests/inbuf.py | 13 +- python/tests/indexes.py | 20 +- python/tests/input_callback.py | 148 + python/tests/nsdel.py | 6 +- python/tests/outbuf.py | 49 +- python/tests/push.py | 8 +- python/tests/pushSAX.py | 8 +- python/tests/pushSAXhtml.py | 8 +- python/tests/reader.py | 185 +- python/tests/reader2.py | 63 +- python/tests/reader3.py | 63 +- python/tests/reader4.py | 17 +- python/tests/reader5.py | 15 +- python/tests/reader6.py | 27 +- python/tests/reader7.py | 17 +- python/tests/reader8.py | 7 +- python/tests/readererr.py | 21 +- python/tests/readernext.py | 39 +- python/tests/regexp.py | 14 +- python/tests/relaxng.py | 6 +- python/tests/resolver.py | 17 +- python/tests/schema.py | 6 +- python/tests/serialize.py | 36 +- python/tests/sync.py | 47 +- python/tests/thread2.py | 21 +- python/tests/tst.py | 10 +- python/tests/tstLastError.py | 20 +- python/tests/tstURI.py | 18 +- python/tests/tstmem.py | 6 +- python/tests/tstxpath.py | 16 +- python/tests/validDTD.py | 10 +- python/tests/validRNG.py | 10 +- python/tests/validSchemas.py | 10 +- python/tests/validate.py | 20 +- python/tests/walker.py | 23 +- python/tests/xpath.py | 14 +- python/tests/xpathext.py | 12 +- python/tests/xpathleak.py | 14 +- python/tests/xpathns.py | 8 +- python/tests/xpathret.py | 14 +- python/types.c | 282 +- relaxng.c | 147 +- runsuite.c | 37 +- runtest.c | 144 +- runxmlconf.c | 9 +- save.h | 35 + schematron.c | 36 +- testAutomata.c | 4 +- testC14N.c | 96 +- testHTML.c | 30 +- testModule.c | 4 +- testRegexp.c | 18 +- testRelax.c | 10 +- testSAX.c | 22 +- testSchemas.c | 10 +- testThreadsWin32.c | 6 +- testXPath.c | 16 +- testapi.c | 820 +- testchar.c | 20 +- testlimits.c | 1637 +++ testrecurse.c | 11 - threads.c | 17 +- timsort.h | 514 + tree.c | 426 +- trio.c | 436 +- trio.h | 16 +- triodef.h | 6 + trionan.c | 74 +- trionan.h | 2 +- triostr.c | 154 +- uri.c | 424 +- valid.c | 232 +- vms/build_libxml.com | 17 +- vms/config.vms | 7 + win32/.cvsignore | 7 - win32/Makefile.bcb | 20 +- win32/Makefile.mingw | 20 +- win32/Makefile.msvc | 30 +- win32/VC10/libxml2.vcxproj | 1 + win32/VC10/runsuite.vcxproj | 2 +- win32/configure.js | 2 + win32/libxml2.def.src | 26 + win32/wince/wincecompat.c | 7 +- xinclude.c | 132 +- xlink.c | 12 +- xml2-config.1 | 1 - xml2-config.in | 6 +- xmlIO.c | 288 +- xmlcatalog.c | 35 +- xmllint.c | 91 +- xmlmemory.c | 21 +- xmlmodule.c | 23 +- xmlreader.c | 203 +- xmlregexp.c | 261 +- xmlsave.c | 317 +- xmlschemas.c | 833 +- xmlschemastypes.c | 351 +- xmlstring.c | 34 +- xmlunicode.c | 1270 +-- xmlwriter.c | 70 +- xpath.c | 1915 ++-- xpointer.c | 128 +- xstc/Makefile.am | 4 +- xstc/Makefile.in | 130 +- xzlib.c | 51 +- xzlib.h | 1 + 427 files changed, 97556 insertions(+), 15959 deletions(-) create mode 100644 buf.c create mode 100644 buf.h mode change 100755 => 100644 chvalid.c create mode 100644 configure.ac delete mode 100644 configure.in create mode 100644 doc/examples/index.html create mode 100644 enc.h create mode 100644 libxml2-config.cmake.in mode change 100755 => 100644 ltmain.sh create mode 100644 os400/README400 create mode 100644 os400/dlfcn/dlfcn.c create mode 100644 os400/dlfcn/dlfcn.h create mode 100644 os400/iconv/README.iconv create mode 100644 os400/iconv/bldcsndfa/bldcsndfa.c create mode 100644 os400/iconv/bldcsndfa/ccsid_mibenum.dtd create mode 100644 os400/iconv/bldcsndfa/ccsid_mibenum.xml create mode 100644 os400/iconv/bldcsndfa/character-sets.xhtml create mode 100644 os400/iconv/ianatables.c create mode 100644 os400/iconv/iconv.c create mode 100644 os400/iconv/iconv.h create mode 100644 os400/initscript.sh create mode 100644 os400/libxmlrpg/DOCBparser.rpgle create mode 100644 os400/libxmlrpg/HTMLparser.rpgle create mode 100644 os400/libxmlrpg/HTMLtree.rpgle create mode 100644 os400/libxmlrpg/SAX.rpgle create mode 100644 os400/libxmlrpg/SAX2.rpgle create mode 100644 os400/libxmlrpg/c14n.rpgle create mode 100644 os400/libxmlrpg/catalog.rpgle create mode 100644 os400/libxmlrpg/chvalid.rpgle create mode 100644 os400/libxmlrpg/debugXML.rpgle create mode 100644 os400/libxmlrpg/dict.rpgle create mode 100644 os400/libxmlrpg/encoding.rpgle create mode 100644 os400/libxmlrpg/entities.rpgle create mode 100644 os400/libxmlrpg/globals.rpgle create mode 100644 os400/libxmlrpg/hash.rpgle create mode 100644 os400/libxmlrpg/list.rpgle create mode 100644 os400/libxmlrpg/nanoftp.rpgle create mode 100644 os400/libxmlrpg/nanohttp.rpgle create mode 100644 os400/libxmlrpg/parser.rpgle create mode 100644 os400/libxmlrpg/parserInternals.rpgle create mode 100644 os400/libxmlrpg/pattern.rpgle create mode 100644 os400/libxmlrpg/relaxng.rpgle create mode 100644 os400/libxmlrpg/schemasInternals.rpgle create mode 100644 os400/libxmlrpg/schematron.rpgle create mode 100644 os400/libxmlrpg/threads.rpgle create mode 100644 os400/libxmlrpg/transcode.rpgle create mode 100644 os400/libxmlrpg/tree.rpgle create mode 100644 os400/libxmlrpg/uri.rpgle create mode 100644 os400/libxmlrpg/valid.rpgle create mode 100644 os400/libxmlrpg/xinclude.rpgle create mode 100644 os400/libxmlrpg/xlink.rpgle create mode 100644 os400/libxmlrpg/xmlIO.rpgle create mode 100644 os400/libxmlrpg/xmlautomata.rpgle create mode 100644 os400/libxmlrpg/xmlerror.rpgle create mode 100644 os400/libxmlrpg/xmlexports.rpgle create mode 100644 os400/libxmlrpg/xmlmemory.rpgle create mode 100644 os400/libxmlrpg/xmlmodule.rpgle create mode 100644 os400/libxmlrpg/xmlreader.rpgle create mode 100644 os400/libxmlrpg/xmlregexp.rpgle create mode 100644 os400/libxmlrpg/xmlsave.rpgle create mode 100644 os400/libxmlrpg/xmlschemas.rpgle create mode 100644 os400/libxmlrpg/xmlschemastypes.rpgle create mode 100644 os400/libxmlrpg/xmlstdarg.rpgle create mode 100644 os400/libxmlrpg/xmlstring.rpgle create mode 100644 os400/libxmlrpg/xmlunicode.rpgle create mode 100644 os400/libxmlrpg/xmlversion.rpgle.in create mode 100644 os400/libxmlrpg/xmlwriter.rpgle create mode 100644 os400/libxmlrpg/xpath.rpgle create mode 100644 os400/libxmlrpg/xpathInternals.rpgle create mode 100644 os400/libxmlrpg/xpointer.rpgle create mode 100644 os400/make-bldcsndfa.sh create mode 100644 os400/make-include.sh create mode 100644 os400/make-rpg.sh create mode 100644 os400/make-src.sh create mode 100644 os400/make.sh create mode 100644 os400/os400config.h.in create mode 100644 os400/rpgsupport.c create mode 100644 os400/rpgsupport.h create mode 100644 os400/transcode.c create mode 100644 os400/transcode.h create mode 100644 os400/wrappers.c create mode 100644 os400/wrappers.h create mode 100644 python/libxml2-export.c create mode 100644 python/libxml2-py.c create mode 100644 python/libxml2-py.h create mode 100644 python/libxml2.py create mode 100644 python/libxml2class.py create mode 100644 python/libxml2class.txt create mode 100755 python/tests/input_callback.py mode change 100644 => 100755 python/tests/readererr.py mode change 100644 => 100755 python/tests/regexp.py mode change 100644 => 100755 python/tests/xpathleak.py create mode 100644 save.h create mode 100644 testlimits.c create mode 100644 timsort.h delete mode 100644 win32/.cvsignore (limited to 'tree.c') diff --git a/COPYING b/COPYING index 417e955..d613185 100644 --- a/COPYING +++ b/COPYING @@ -2,7 +2,7 @@ Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: - Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. + Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -17,11 +17,7 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Daniel Veillard shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. - +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/ChangeLog b/ChangeLog index 36045e6..08725dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8139,7 +8139,7 @@ Wed Dec 10 11:16:29 CET 2003 Daniel Veillard Tue Dec 9 23:50:23 CET 2003 Daniel Veillard - * entities.c: fixed an XML entites content serialization + * entities.c: fixed an XML entities content serialization potentially triggered by XInclude, see #126817 Tue Dec 9 16:12:50 CET 2003 Daniel Veillard diff --git a/Copyright b/Copyright index 417e955..d613185 100644 --- a/Copyright +++ b/Copyright @@ -2,7 +2,7 @@ Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: - Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. + Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -17,11 +17,7 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Daniel Veillard shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. - +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/DOCBparser.c b/DOCBparser.c index 3573743..f12511b 100644 --- a/DOCBparser.c +++ b/DOCBparser.c @@ -53,7 +53,7 @@ docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED, /** * docbParseDocument: * @ctxt: an SGML parser context - * + * * parse an SGML document (and build a tree if using the standard SAX * interface). * @@ -163,12 +163,12 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED, * @cur: a pointer to an array of xmlChar * @encoding: a free form C string describing the SGML document encoding, or NULL * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. + * @userData: if using SAX, this pointer will be provided on callbacks. * * parse an SGML in-memory document and build a tree. * It use the given SAX function block to handle the parsing callback. * If sax is NULL, fallback to the default DOM tree building routines. - * + * * Returns the resulting document tree */ @@ -196,7 +196,7 @@ docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED, * @encoding: a free form C string describing the SGML document encoding, or NULL * * parse an SGML in-memory document and build a tree. - * + * * Returns the resulting document tree */ @@ -221,7 +221,7 @@ docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED, * @filename: the filename * @encoding: the SGML document encoding, or NULL * - * Create a parser context for a file content. + * Create a parser context for a file content. * Automatic support for ZLIB/Compress compressed document is provided * by default if found at compile-time. * @@ -247,7 +247,7 @@ docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED, * @filename: the filename * @encoding: a free form C string describing the SGML document encoding, or NULL * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. + * @userData: if using SAX, this pointer will be provided on callbacks. * * parse an SGML file and build a tree. Automatic support for ZLIB/Compress * compressed document is provided by default if found at compile-time. diff --git a/HTMLparser.c b/HTMLparser.c index 66ff17b..d329d3b 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -44,6 +44,9 @@ #include #include +#include "buf.h" +#include "enc.h" + #define HTML_MAX_NAMELEN 1000 #define HTML_PARSER_BIG_BUFFER_SIZE 1000 #define HTML_PARSER_BUFFER_SIZE 100 @@ -1082,7 +1085,7 @@ static const char * const htmlStartClose[] = { "div", "p", "head", NULL, "noscript", "p", NULL, "center", "font", "b", "i", "p", "head", NULL, -"a", "a", NULL, +"a", "a", "head", NULL, "caption", "p", NULL, "colgroup", "caption", "colgroup", "col", "p", NULL, "col", "caption", "col", "p", NULL, @@ -1100,6 +1103,43 @@ static const char * const htmlStartClose[] = { "option", "option", NULL, "fieldset", "legend", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "listing", "xmp", "a", NULL, +/* most tags in in FONTSTYLE, PHRASE and SPECIAL should close */ +"tt", "head", NULL, +"i", "head", NULL, +"b", "head", NULL, +"u", "head", NULL, +"s", "head", NULL, +"strike", "head", NULL, +"big", "head", NULL, +"small", "head", NULL, + +"em", "head", NULL, +"strong", "head", NULL, +"dfn", "head", NULL, +"code", "head", NULL, +"samp", "head", NULL, +"kbd", "head", NULL, +"var", "head", NULL, +"cite", "head", NULL, +"abbr", "head", NULL, +"acronym", "head", NULL, + +/* "a" */ +"img", "head", NULL, +/* "applet" */ +/* "embed" */ +/* "object" */ +"font", "head", NULL, +/* "basefont" */ +"br", "head", NULL, +/* "script" */ +"map", "head", NULL, +"q", "head", NULL, +"sub", "head", NULL, +"sup", "head", NULL, +"span", "head", NULL, +"bdo", "head", NULL, +"iframe", "head", NULL, NULL }; @@ -1137,7 +1177,7 @@ static const char *const htmlScriptAttributes[] = { "onfocus", "onblur", "onsubmit", - "onrest", + "onreset", "onchange", "onselect" }; @@ -2941,9 +2981,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) { */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { - if (ctxt->sax->ignorableWhitespace != NULL) - ctxt->sax->ignorableWhitespace(ctxt->userData, - buf, nbchar); + if (ctxt->keepBlanks) { + if (ctxt->sax->characters != NULL) + ctxt->sax->characters(ctxt->userData, buf, nbchar); + } else { + if (ctxt->sax->ignorableWhitespace != NULL) + ctxt->sax->ignorableWhitespace(ctxt->userData, + buf, nbchar); + } } else { htmlCheckParagraph(ctxt); if (ctxt->sax->characters != NULL) @@ -2974,8 +3019,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) { */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { - if (ctxt->sax->ignorableWhitespace != NULL) - ctxt->sax->ignorableWhitespace(ctxt->userData, buf, nbchar); + if (ctxt->keepBlanks) { + if (ctxt->sax->characters != NULL) + ctxt->sax->characters(ctxt->userData, buf, nbchar); + } else { + if (ctxt->sax->ignorableWhitespace != NULL) + ctxt->sax->ignorableWhitespace(ctxt->userData, + buf, nbchar); + } } else { htmlCheckParagraph(ctxt); if (ctxt->sax->characters != NULL) @@ -3509,19 +3560,14 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) { * convert as much as possible to the parser reading buffer. */ processed = ctxt->input->cur - ctxt->input->base; - xmlBufferShrink(ctxt->input->buf->buffer, processed); - nbchars = xmlCharEncInFunc(ctxt->input->buf->encoder, - ctxt->input->buf->buffer, - ctxt->input->buf->raw); + xmlBufShrink(ctxt->input->buf->buffer, processed); + nbchars = xmlCharEncInput(ctxt->input->buf, 1); if (nbchars < 0) { htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, "htmlCheckEncoding: encoder error\n", NULL, NULL); } - ctxt->input->base = - ctxt->input->cur = ctxt->input->buf->buffer->content; - ctxt->input->end = - &ctxt->input->base[ctxt->input->buf->buffer->use]; + xmlBufResetInput(ctxt->input->buf->buffer, ctxt->input); } } } @@ -3625,13 +3671,13 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { int i; int discardtag = 0; - if (ctxt->instate == XML_PARSER_EOF) - return(-1); if ((ctxt == NULL) || (ctxt->input == NULL)) { htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, "htmlParseStartTag: context error\n", NULL, NULL); return -1; } + if (ctxt->instate == XML_PARSER_EOF) + return(-1); if (CUR != '<') return -1; NEXT; @@ -4320,7 +4366,7 @@ static void htmlParseElementInternal(htmlParserCtxtPtr ctxt) { const xmlChar *name; const htmlElemDesc * info; - htmlParserNodeInfo node_info; + htmlParserNodeInfo node_info = { 0, }; int failed; if ((ctxt == NULL) || (ctxt->input == NULL)) { @@ -4906,9 +4952,7 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) { input->filename = NULL; input->buf = buf; - input->base = input->buf->buffer->content; - input->cur = input->buf->buffer->content; - input->end = &input->buf->buffer->content[input->buf->buffer->use]; + xmlBufResetInput(buf->buffer, input); inputPush(ctxt, input); return(ctxt); @@ -5025,8 +5069,8 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, buf = in->base; len = in->length; } else { - buf = in->buf->buffer->content; - len = in->buf->buffer->use; + buf = xmlBufContent(in->buf->buffer); + len = xmlBufUse(in->buf->buffer); } /* take into account the sequence length */ @@ -5118,13 +5162,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, * @stop: Array of chars, which stop the lookup. * @stopLen: Length of stop-Array * - * Try to find if any char of the stop-Array is available in the input + * Try to find if any char of the stop-Array is available in the input * stream. * This function has a side effect of (possibly) incrementing ctxt->checkIndex * to avoid rescanning sequences of bytes, it DOES change the state of the * parser, do not use liberally. * - * Returns the index to the current parsing point if a stopChar + * Returns the index to the current parsing point if a stopChar * is available, -1 otherwise. */ static int @@ -5152,8 +5196,8 @@ htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop, buf = in->base; len = in->length; } else { - buf = in->buf->buffer->content; - len = in->buf->buffer->use; + buf = xmlBufContent(in->buf->buffer); + len = xmlBufUse(in->buf->buffer); } for (; base < len; base++) { @@ -5264,7 +5308,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); if ((avail == 0) && (terminate)) { htmlAutoCloseOnEnd(ctxt); if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { @@ -5300,7 +5344,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); } if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, @@ -5342,7 +5386,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); /* * no chars in buffer */ @@ -5415,7 +5459,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); if (avail < 2) goto done; cur = in->cur[0]; @@ -5456,7 +5500,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (in->buf == NULL) avail = in->length - (in->cur - in->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); if (avail < 1) goto done; cur = in->cur[0]; @@ -5654,9 +5698,15 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((cur != '<') && (cur != '&')) { if (ctxt->sax != NULL) { if (IS_BLANK_CH(cur)) { - if (ctxt->sax->ignorableWhitespace != NULL) - ctxt->sax->ignorableWhitespace( - ctxt->userData, &cur, 1); + if (ctxt->keepBlanks) { + if (ctxt->sax->characters != NULL) + ctxt->sax->characters( + ctxt->userData, &cur, 1); + } else { + if (ctxt->sax->ignorableWhitespace != NULL) + ctxt->sax->ignorableWhitespace( + ctxt->userData, &cur, 1); + } } else { htmlCheckParagraph(ctxt); if (ctxt->sax->characters != NULL) @@ -5941,7 +5991,7 @@ done: ctxt->sax->endDocument(ctxt->userData); } } - if ((ctxt->myDoc != NULL) && + if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL) && ((terminate) || (ctxt->instate == XML_PARSER_EOF) || (ctxt->instate == XML_PARSER_EPILOG))) { xmlDtdPtr dtd; @@ -5979,8 +6029,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, } if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) { - int base = ctxt->input->base - ctxt->input->buf->buffer->content; - int cur = ctxt->input->cur - ctxt->input->base; + size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input); + size_t cur = ctxt->input->cur - ctxt->input->base; int res; res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); @@ -5989,10 +6039,7 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, ctxt->disableSAX = 1; return (XML_PARSER_EOF); } - ctxt->input->base = ctxt->input->buf->buffer->content + base; - ctxt->input->cur = ctxt->input->base + cur; - ctxt->input->end = - &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use]; + xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur); #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size); #endif @@ -6007,13 +6054,16 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, if ((in->encoder != NULL) && (in->buffer != NULL) && (in->raw != NULL)) { int nbchars; + size_t base = xmlBufGetInputBase(in->buffer, ctxt->input); + size_t current = ctxt->input->cur - ctxt->input->base; - nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw); + nbchars = xmlCharEncInput(in, terminate); if (nbchars < 0) { htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, "encoder error\n", NULL, NULL); return(XML_ERR_INVALID_ENCODING); } + xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current); } } } @@ -6107,24 +6157,18 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, inputStream->filename = (char *) xmlCanonicPath((const xmlChar *) filename); inputStream->buf = buf; - inputStream->base = inputStream->buf->buffer->content; - inputStream->cur = inputStream->buf->buffer->content; - inputStream->end = - &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; + xmlBufResetInput(buf->buffer, inputStream); inputPush(ctxt, inputStream); if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL)) { - int base = ctxt->input->base - ctxt->input->buf->buffer->content; - int cur = ctxt->input->cur - ctxt->input->base; + size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input); + size_t cur = ctxt->input->cur - ctxt->input->base; xmlParserInputBufferPush(ctxt->input->buf, size, chunk); - ctxt->input->base = ctxt->input->buf->buffer->content + base; - ctxt->input->cur = ctxt->input->base + cur; - ctxt->input->end = - &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use]; + xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur); #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size); #endif @@ -6244,12 +6288,16 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) /* set encoding */ if (encoding) { - content = xmlMallocAtomic (xmlStrlen(content_line) + strlen(encoding) + 1); - if (content) { - strcpy ((char *)content, (char *)content_line); - strcat ((char *)content, (char *)encoding); - htmlCheckEncoding (ctxt, content); - xmlFree (content); + size_t l = strlen(encoding); + + if (l < 1000) { + content = xmlMallocAtomic (xmlStrlen(content_line) + l + 1); + if (content) { + strcpy ((char *)content, (char *)content_line); + strcat ((char *)content, (char *)encoding); + htmlCheckEncoding (ctxt, content); + xmlFree (content); + } } } @@ -6764,6 +6812,7 @@ htmlReadFd(int fd, const char *URL, const char *encoding, int options) if (fd < 0) return (NULL); + xmlInitParser(); xmlInitParser(); input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE); @@ -6854,6 +6903,7 @@ htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur, return (NULL); if (ctxt == NULL) return (NULL); + xmlInitParser(); htmlCtxtReset(ctxt); @@ -6887,6 +6937,7 @@ htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename, return (NULL); if (ctxt == NULL) return (NULL); + xmlInitParser(); htmlCtxtReset(ctxt); @@ -6923,6 +6974,7 @@ htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size, return (NULL); if (buffer == NULL) return (NULL); + xmlInitParser(); htmlCtxtReset(ctxt); @@ -6965,6 +7017,7 @@ htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd, return (NULL); if (ctxt == NULL) return (NULL); + xmlInitParser(); htmlCtxtReset(ctxt); @@ -7009,6 +7062,7 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, return (NULL); if (ctxt == NULL) return (NULL); + xmlInitParser(); htmlCtxtReset(ctxt); diff --git a/HTMLtree.c b/HTMLtree.c index 5d0893b..5c57fc5 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -30,16 +30,18 @@ #include #include +#include "buf.h" + /************************************************************************ * * - * Getting/Setting encoding meta tags * + * Getting/Setting encoding meta tags * * * ************************************************************************/ /** * htmlGetMetaEncoding: * @doc: the document - * + * * Encoding definition lookup in the Meta tags * * Returns the current encoding as flagged in the HTML source @@ -126,17 +128,17 @@ found_meta: found_content: encoding = xmlStrstr(content, BAD_CAST"charset="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"Charset="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"CHARSET="); if (encoding != NULL) { encoding += 8; } else { encoding = xmlStrstr(content, BAD_CAST"charset ="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"Charset ="); - if (encoding == NULL) + if (encoding == NULL) encoding = xmlStrstr(content, BAD_CAST"CHARSET ="); if (encoding != NULL) encoding += 9; @@ -314,7 +316,7 @@ static const char* htmlBooleanAttrs[] = { * @name: the name of the attribute to check * * Determine if a given attribute is a boolean attribute. - * + * * returns: false if the attribute is not boolean, true otherwise. */ int @@ -338,7 +340,7 @@ xmlOutputBufferPtr xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder); /************************************************************************ * * - * Output error handlers * + * Output error handlers * * * ************************************************************************/ /** @@ -387,17 +389,13 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra) /************************************************************************ * * - * Dumping HTML tree content to a simple buffer * + * Dumping HTML tree content to a simple buffer * * * ************************************************************************/ -static int -htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, - int format); - /** - * htmlNodeDumpFormat: - * @buf: the HTML buffer output + * htmlBufNodeDumpFormat: + * @buf: the xmlBufPtr output * @doc: the document * @cur: the current node * @format: should formatting spaces been added @@ -406,10 +404,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, * * Returns the number of byte written or -1 in case of error */ -static int -htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, +static size_t +htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int format) { - unsigned int use; + size_t use; int ret; xmlOutputBufferPtr outbuf; @@ -432,10 +430,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, outbuf->context = NULL; outbuf->written = 0; - use = buf->use; + use = xmlBufUse(buf); htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format); xmlFree(outbuf); - ret = buf->use - use; + ret = xmlBufUse(buf) - use; return (ret); } @@ -452,9 +450,24 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, */ int htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { + xmlBufPtr buffer; + size_t ret; + + if ((buf == NULL) || (cur == NULL)) + return(-1); + xmlInitParser(); + buffer = xmlBufFromBuffer(buf); + if (buffer == NULL) + return(-1); + + ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1); - return(htmlNodeDumpFormat(buf, doc, cur, 1)); + xmlBufBackToBuffer(buffer); + + if (ret > INT_MAX) + return(-1); + return((int) ret); } /** @@ -499,7 +512,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc, if (handler == NULL) handler = xmlFindCharEncodingHandler("ascii"); - /* + /* * save the content to a temp buffer. */ buf = xmlOutputBufferCreateFile(out, handler); @@ -595,11 +608,11 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { xmlOutputBufferFlush(buf); if (buf->conv != NULL) { - *size = buf->conv->use; - *mem = xmlStrndup(buf->conv->content, *size); + *size = xmlBufUse(buf->conv); + *mem = xmlStrndup(xmlBufContent(buf->conv), *size); } else { - *size = buf->buffer->use; - *mem = xmlStrndup(buf->buffer->content, *size); + *size = xmlBufUse(buf->buffer); + *mem = xmlStrndup(xmlBufContent(buf->buffer), *size); } (void)xmlOutputBufferClose(buf); } @@ -621,7 +634,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { /************************************************************************ * * - * Dumping HTML tree content to an I/O output buffer * + * Dumping HTML tree content to an I/O output buffer * * * ************************************************************************/ @@ -632,7 +645,7 @@ void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur); * @buf: the HTML buffer output * @doc: the document * @encoding: the encoding string - * + * * TODO: check whether encoding is needed * * Dump the HTML document DTD, if any. @@ -650,14 +663,14 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlOutputBufferWriteString(buf, (const char *)cur->name); if (cur->ExternalID != NULL) { xmlOutputBufferWriteString(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID); + xmlBufWriteQuotedString(buf->buffer, cur->ExternalID); if (cur->SystemID != NULL) { xmlOutputBufferWriteString(buf, " "); - xmlBufferWriteQuotedString(buf->buffer, cur->SystemID); - } + xmlBufWriteQuotedString(buf->buffer, cur->SystemID); + } } else if (cur->SystemID != NULL) { xmlOutputBufferWriteString(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf->buffer, cur->SystemID); + xmlBufWriteQuotedString(buf->buffer, cur->SystemID); } xmlOutputBufferWriteString(buf, ">\n"); } @@ -677,9 +690,10 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, xmlChar *value; /* - * TODO: The html output method should not escape a & character - * occurring in an attribute value immediately followed by - * a { character (see Section B.7.1 of the HTML 4.0 Recommendation). + * The html output method should not escape a & character + * occurring in an attribute value immediately followed by + * a { character (see Section B.7.1 of the HTML 4.0 Recommendation). + * This is implemented in xmlEncodeEntitiesReentrant */ if (cur == NULL) { @@ -702,20 +716,51 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, (!xmlStrcasecmp(cur->name, BAD_CAST "src")) || ((!xmlStrcasecmp(cur->name, BAD_CAST "name")) && (!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) { - xmlChar *escaped; xmlChar *tmp = value; + /* xmlURIEscapeStr() escapes '"' so it can be safely used. */ + xmlBufCCat(buf->buffer, "\""); while (IS_BLANK_CH(*tmp)) tmp++; - escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+"); - if (escaped != NULL) { - xmlBufferWriteQuotedString(buf->buffer, escaped); - xmlFree(escaped); - } else { - xmlBufferWriteQuotedString(buf->buffer, value); + /* URI Escape everything, except server side includes. */ + for ( ; ; ) { + xmlChar *escaped; + xmlChar endChar; + xmlChar *end = NULL; + xmlChar *start = (xmlChar *)xmlStrstr(tmp, BAD_CAST ""); + if (end != NULL) { + *start = '\0'; + } + } + + /* Escape the whole string, or until start (set to '\0'). */ + escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+"); + if (escaped != NULL) { + xmlBufCat(buf->buffer, escaped); + xmlFree(escaped); + } else { + xmlBufCat(buf->buffer, tmp); + } + + if (end == NULL) { /* Everything has been written. */ + break; + } + + /* Do not escape anything within server side includes. */ + *start = '<'; /* Restore the first character of "") */ + endChar = *end; + *end = '\0'; + xmlBufCat(buf->buffer, start); + *end = endChar; + tmp = end; } + + xmlBufCCat(buf->buffer, "\""); } else { - xmlBufferWriteQuotedString(buf->buffer, value); + xmlBufWriteQuotedString(buf->buffer, value); } xmlFree(value); } else { @@ -1105,7 +1150,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { if ((cur == NULL) || (filename == NULL)) return(-1); - + xmlInitParser(); encoding = (const char *) htmlGetMetaEncoding(cur); @@ -1136,7 +1181,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { if (handler == NULL) handler = xmlFindCharEncodingHandler("ascii"); - /* + /* * save the content to a temp buffer. */ buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); @@ -1156,7 +1201,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { * @encoding: the document encoding * * Dump an HTML document to a file using a given encoding. - * + * * returns: the number of byte written or -1 in case of failure. */ int @@ -1200,7 +1245,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, if (handler == NULL) handler = xmlFindCharEncodingHandler("ascii"); - /* + /* * save the content to a temp buffer. */ buf = xmlOutputBufferCreateFilename(filename, handler, 0); @@ -1220,7 +1265,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, * * Dump an HTML document to a file using a given encoding * and formatting returns/spaces are added. - * + * * returns: the number of byte written or -1 in case of failure. */ int diff --git a/INSTALL b/INSTALL index 7d1c323..007e939 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended @@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -362,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/Makefile.am b/Makefile.am index f82cefa..70720f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,23 +2,25 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ +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@ @LZMA_CFLAGS@ +AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include + +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS) noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ testThreads testC14N testAutomata testRegexp \ testReader testapi testModule runtest runsuite testchar \ - testdict runxmlconf testrecurse + testdict runxmlconf testrecurse testlimits bin_PROGRAMS = xmllint xmlcatalog bin_SCRIPTS=xml2-config lib_LTLIBRARIES = libxml2.la -libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +libxml2_la_LIBADD = $(ICU_LIBS) $(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 @@ -26,35 +28,37 @@ else LIBXML2_VERSION_SCRIPT = endif -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ - $(LIBXML2_VERSION_SCRIPT) \ - -version-info @LIBXML_VERSION_INFO@ \ - @MODULE_PLATFORM_LIBS@ +libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info $(LIBXML_VERSION_INFO) \ + $(MODULE_PLATFORM_LIBS) + +if WITH_SAX1_SOURCES +docb_sources = DOCBparser.c +else +docb_sources = +endif if WITH_TRIO_SOURCES -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 \ - valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ - xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ - catalog.c globals.c threads.c c14n.c xmlstring.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 xzlib.c +trio_sources = triostr.c trio.c else +trio_sources = +endif + 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 \ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ - xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ - catalog.c globals.c threads.c c14n.c xmlstring.c \ + xpointer.c xinclude.c nanohttp.c nanoftp.c \ + $(docb_sources) \ + catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ + $(trio_sources) \ xmlreader.c relaxng.c dict.c SAX2.c \ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ xmlmodule.c schematron.c xzlib.c -endif DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ @LZMA_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 @@ -65,32 +69,37 @@ m4data_DATA = libxml.m4 runtest_SOURCES=runtest.c runtest_LDFLAGS = runtest_DEPENDENCIES = $(DEPS) -runtest_LDADD= @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +runtest_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testrecurse_SOURCES=testrecurse.c testrecurse_LDFLAGS = testrecurse_DEPENDENCIES = $(DEPS) -testrecurse_LDADD= @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +testrecurse_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) + +testlimits_SOURCES=testlimits.c +testlimits_LDFLAGS = +testlimits_DEPENDENCIES = $(DEPS) +testlimits_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testchar_SOURCES=testchar.c testchar_LDFLAGS = testchar_DEPENDENCIES = $(DEPS) -testchar_LDADD= @RDL_LIBS@ $(LDADDS) +testchar_LDADD= $(RDL_LIBS) $(LDADDS) testdict_SOURCES=testdict.c testdict_LDFLAGS = testdict_DEPENDENCIES = $(DEPS) -testdict_LDADD= @RDL_LIBS@ $(LDADDS) +testdict_LDADD= $(RDL_LIBS) $(LDADDS) runsuite_SOURCES=runsuite.c runsuite_LDFLAGS = runsuite_DEPENDENCIES = $(DEPS) -runsuite_LDADD= @RDL_LIBS@ $(LDADDS) +runsuite_LDADD= $(RDL_LIBS) $(LDADDS) xmllint_SOURCES=xmllint.c xmllint_LDFLAGS = xmllint_DEPENDENCIES = $(DEPS) -xmllint_LDADD= @RDL_LIBS@ $(LDADDS) +xmllint_LDADD= $(RDL_LIBS) $(LDADDS) testSAX_SOURCES=testSAX.c testSAX_LDFLAGS = @@ -105,7 +114,7 @@ testHTML_LDADD= $(LDADDS) xmlcatalog_SOURCES=xmlcatalog.c xmlcatalog_LDFLAGS = xmlcatalog_DEPENDENCIES = $(DEPS) -xmlcatalog_LDADD= @RDL_LIBS@ $(LDADDS) +xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) testXPath_SOURCES=testXPath.c testXPath_LDFLAGS = @@ -117,10 +126,14 @@ testC14N_LDFLAGS = testC14N_DEPENDENCIES = $(DEPS) testC14N_LDADD= $(LDADDS) -testThreads_SOURCES=testThreads@THREADS_W32@.c +if THREADS_W32 +testThreads_SOURCES = testThreadsWin32.c +else +testThreads_SOURCES = testThreads.c +endif testThreads_LDFLAGS = testThreads_DEPENDENCIES = $(DEPS) -testThreads_LDADD= @BASE_THREAD_LIBS@ $(LDADDS) +testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS) testURI_SOURCES=testURI.c testURI_LDFLAGS = @@ -172,6 +185,8 @@ testapi.c: $(srcdir)/gentest.py -@(if [ "$(PYTHON)" != "" ] ; then \ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi ) +BUILT_SOURCES = testapi.c + testapi_SOURCES=testapi.c testapi_LDFLAGS = testapi_DEPENDENCIES = $(DEPS) @@ -188,28 +203,25 @@ runxmlconf_LDADD= $(LDADDS) #testOOM_LDADD= $(LDADDS) runtests: + [ -d test ] || $(LN_S) $(srcdir)/test . + [ -d result ] || $(LN_S) $(srcdir)/result . $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT) - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) check: all runtests -check-valgrind: all +check-valgrind valgrind: all @echo '## Running the regression tests under Valgrind' @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' check + $(MAKE) CHECKER='valgrind -q' runtests testall : tests SVGtests SAXtests -tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_SCHEMATRON@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) - @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) - -valgrind: - @echo '## Running the regression tests under Valgrind' - @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' tests +tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) + @(cd doc/examples ; $(MAKE) tests) APItests: testapi$(EXEEXT) @echo "## Running the API regression tests this may take a little while" @@ -1115,7 +1127,7 @@ SchemasPythonTests: echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) - @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) + @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi) Patterntests: xmllint$(EXEEXT) @(echo > .memdump) @@ -1147,12 +1159,12 @@ ModuleTests: testModule$(EXEEXT) testdso.la cleanup: -@(find . -name .\#\* -exec rm {} \;) - -@(find . -name \*.gcda -o *.gcno -exec rm {} \;) - -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm {} \;) + -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;) + -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;) dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) - (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos os400 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 @@ -1183,7 +1195,8 @@ xml2Conf.sh: xml2Conf.sh.in Makefile < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \ && mv xml2Conf.tmp xml2Conf.sh -CLEANFILES=xml2Conf.sh *.gcda *.gcno +CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res +DISTCLEANFILES = COPYING missing.lst confexecdir=$(libdir) confexec_DATA = xml2Conf.sh @@ -1194,17 +1207,21 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ check-xsddata-test-suite.py check-xinclude-test-suite.py \ example/Makefile.am example/gjobread.c example/gjobs.xml \ $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \ + libxml2-config.cmake.in \ trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ - triop.h triodef.h libxml.h elfgcchack.h xzlib.h \ - testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ + triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \ + enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ dbgen.pl dbgenattr.pl regressions.py regressions.xml \ - README.tests Makefile.tests libxml2.syms \ + README.tests Makefile.tests libxml2.syms timsort.h \ $(CVS_EXTRA_DIST) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libxml-2.0.pc +cmakedir = $(libdir)/cmake/libxml2 +cmake_DATA = libxml2-config.cmake + # # Install the tests program sources as examples # @@ -1213,13 +1230,13 @@ DOC_MODULE=libxml2-$(VERSION) EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples install-data-local: - @MKDIR_P@ $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - @MKDIR_P@ $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) + $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) uninstall-local: rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c diff --git a/Makefile.in b/Makefile.in index 6e88cc9..fbe49ec 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in 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. @@ -19,6 +18,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -43,29 +87,31 @@ noinst_PROGRAMS = testSchemas$(EXEEXT) testRelax$(EXEEXT) \ testAutomata$(EXEEXT) testRegexp$(EXEEXT) testReader$(EXEEXT) \ testapi$(EXEEXT) testModule$(EXEEXT) runtest$(EXEEXT) \ runsuite$(EXEEXT) testchar$(EXEEXT) testdict$(EXEEXT) \ - runxmlconf$(EXEEXT) testrecurse$(EXEEXT) + runxmlconf$(EXEEXT) testrecurse$(EXEEXT) testlimits$(EXEEXT) bin_PROGRAMS = xmllint$(EXEEXT) xmlcatalog$(EXEEXT) subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/libxml.spec.in \ + $(srcdir)/libxml-2.0.pc.in \ $(srcdir)/libxml-2.0-uninstalled.pc.in \ - $(srcdir)/libxml-2.0.pc.in $(srcdir)/libxml.spec.in \ - $(srcdir)/xml2-config.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS TODO config.guess config.sub \ - depcomp install-sh ltmain.sh missing + $(srcdir)/libxml2-config.cmake.in $(srcdir)/xml2-config.in \ + depcomp COPYING TODO config.guess config.sub install-sh \ + missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libxml2.spec xml2-config libxml-2.0.pc \ - libxml-2.0-uninstalled.pc +CONFIG_CLEAN_FILES = libxml2.spec libxml-2.0.pc \ + libxml-2.0-uninstalled.pc libxml2-config.cmake xml2-config CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -88,58 +134,49 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(confexecdir)" \ - "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)" + "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(cmakedir)" \ + "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" \ + "$(DESTDIR)$(pkgconfigdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__libxml2_la_SOURCES_DIST = SAX.c entities.c encoding.c error.c \ parserInternals.c parser.c tree.c hash.c list.c xmlIO.c \ xmlmemory.c uri.c valid.c xlink.c HTMLparser.c HTMLtree.c \ debugXML.c xpath.c xpointer.c xinclude.c nanohttp.c nanoftp.c \ DOCBparser.c catalog.c globals.c threads.c c14n.c xmlstring.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 xzlib.c \ - triostr.c trio.c -@WITH_TRIO_SOURCES_FALSE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \ -@WITH_TRIO_SOURCES_FALSE@ encoding.lo error.lo \ -@WITH_TRIO_SOURCES_FALSE@ parserInternals.lo parser.lo tree.lo \ -@WITH_TRIO_SOURCES_FALSE@ hash.lo list.lo xmlIO.lo xmlmemory.lo \ -@WITH_TRIO_SOURCES_FALSE@ uri.lo valid.lo xlink.lo \ -@WITH_TRIO_SOURCES_FALSE@ HTMLparser.lo HTMLtree.lo debugXML.lo \ -@WITH_TRIO_SOURCES_FALSE@ xpath.lo xpointer.lo xinclude.lo \ -@WITH_TRIO_SOURCES_FALSE@ nanohttp.lo nanoftp.lo DOCBparser.lo \ -@WITH_TRIO_SOURCES_FALSE@ catalog.lo globals.lo threads.lo \ -@WITH_TRIO_SOURCES_FALSE@ c14n.lo xmlstring.lo xmlregexp.lo \ -@WITH_TRIO_SOURCES_FALSE@ xmlschemas.lo xmlschemastypes.lo \ -@WITH_TRIO_SOURCES_FALSE@ xmlunicode.lo xmlreader.lo relaxng.lo \ -@WITH_TRIO_SOURCES_FALSE@ dict.lo SAX2.lo xmlwriter.lo \ -@WITH_TRIO_SOURCES_FALSE@ legacy.lo chvalid.lo pattern.lo \ -@WITH_TRIO_SOURCES_FALSE@ xmlsave.lo xmlmodule.lo schematron.lo \ -@WITH_TRIO_SOURCES_FALSE@ xzlib.lo -@WITH_TRIO_SOURCES_TRUE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \ -@WITH_TRIO_SOURCES_TRUE@ encoding.lo error.lo \ -@WITH_TRIO_SOURCES_TRUE@ parserInternals.lo parser.lo tree.lo \ -@WITH_TRIO_SOURCES_TRUE@ hash.lo list.lo xmlIO.lo xmlmemory.lo \ -@WITH_TRIO_SOURCES_TRUE@ uri.lo valid.lo xlink.lo HTMLparser.lo \ -@WITH_TRIO_SOURCES_TRUE@ HTMLtree.lo debugXML.lo xpath.lo \ -@WITH_TRIO_SOURCES_TRUE@ xpointer.lo xinclude.lo nanohttp.lo \ -@WITH_TRIO_SOURCES_TRUE@ nanoftp.lo DOCBparser.lo catalog.lo \ -@WITH_TRIO_SOURCES_TRUE@ globals.lo threads.lo c14n.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlstring.lo xmlregexp.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlschemas.lo xmlschemastypes.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlunicode.lo triostr.lo trio.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlreader.lo relaxng.lo dict.lo \ -@WITH_TRIO_SOURCES_TRUE@ SAX2.lo xmlwriter.lo legacy.lo \ -@WITH_TRIO_SOURCES_TRUE@ chvalid.lo pattern.lo xmlsave.lo \ -@WITH_TRIO_SOURCES_TRUE@ xmlmodule.lo schematron.lo xzlib.lo + buf.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 xzlib.c +@WITH_SAX1_SOURCES_TRUE@am__objects_1 = DOCBparser.lo +@WITH_TRIO_SOURCES_TRUE@am__objects_2 = triostr.lo trio.lo +am_libxml2_la_OBJECTS = SAX.lo entities.lo encoding.lo error.lo \ + parserInternals.lo parser.lo tree.lo hash.lo list.lo xmlIO.lo \ + xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo \ + HTMLtree.lo debugXML.lo xpath.lo xpointer.lo xinclude.lo \ + nanohttp.lo nanoftp.lo $(am__objects_1) catalog.lo globals.lo \ + threads.lo c14n.lo xmlstring.lo buf.lo xmlregexp.lo \ + xmlschemas.lo xmlschemastypes.lo xmlunicode.lo \ + $(am__objects_2) xmlreader.lo relaxng.lo dict.lo SAX2.lo \ + xmlwriter.lo legacy.lo chvalid.lo pattern.lo xmlsave.lo \ + xmlmodule.lo schematron.lo xzlib.lo libxml2_la_OBJECTS = $(am_libxml2_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libxml2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libxml2_la_LDFLAGS) $(LDFLAGS) -o $@ @@ -152,7 +189,10 @@ testdso_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_runsuite_OBJECTS = runsuite.$(OBJEXT) runsuite_OBJECTS = $(am_runsuite_OBJECTS) -am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(top_builddir)/libxml2.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) runsuite_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(runsuite_LDFLAGS) $(LDFLAGS) -o $@ @@ -211,7 +251,9 @@ testSchemas_OBJECTS = $(am_testSchemas_OBJECTS) testSchemas_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testSchemas_LDFLAGS) $(LDFLAGS) -o $@ -am_testThreads_OBJECTS = testThreads@THREADS_W32@.$(OBJEXT) +am__testThreads_SOURCES_DIST = testThreads.c testThreadsWin32.c +@THREADS_W32_FALSE@am_testThreads_OBJECTS = testThreads.$(OBJEXT) +@THREADS_W32_TRUE@am_testThreads_OBJECTS = testThreadsWin32.$(OBJEXT) testThreads_OBJECTS = $(am_testThreads_OBJECTS) testThreads_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -241,6 +283,11 @@ testdict_OBJECTS = $(am_testdict_OBJECTS) testdict_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(testdict_LDFLAGS) $(LDFLAGS) -o $@ +am_testlimits_OBJECTS = testlimits.$(OBJEXT) +testlimits_OBJECTS = $(am_testlimits_OBJECTS) +testlimits_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(testlimits_LDFLAGS) $(LDFLAGS) -o $@ am_testrecurse_OBJECTS = testrecurse.$(OBJEXT) testrecurse_OBJECTS = $(am_testrecurse_OBJECTS) testrecurse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -257,6 +304,18 @@ xmllint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(xmllint_LDFLAGS) $(LDFLAGS) -o $@ SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -267,22 +326,18 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \ $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \ $(testAutomata_SOURCES) $(testC14N_SOURCES) \ @@ -291,44 +346,76 @@ SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \ $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \ $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \ $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_SOURCES) \ - $(testrecurse_SOURCES) $(xmlcatalog_SOURCES) \ - $(xmllint_SOURCES) + $(testlimits_SOURCES) $(testrecurse_SOURCES) \ + $(xmlcatalog_SOURCES) $(xmllint_SOURCES) DIST_SOURCES = $(am__libxml2_la_SOURCES_DIST) $(testdso_la_SOURCES) \ $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \ $(testAutomata_SOURCES) $(testC14N_SOURCES) \ $(testHTML_SOURCES) $(testModule_SOURCES) \ $(testReader_SOURCES) $(testRegexp_SOURCES) \ $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \ - $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \ - $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_SOURCES) \ + $(am__testThreads_SOURCES_DIST) $(testURI_SOURCES) \ + $(testXPath_SOURCES) $(testapi_SOURCES) $(testchar_SOURCES) \ + $(testdict_SOURCES) $(testlimits_SOURCES) \ $(testrecurse_SOURCES) $(xmlcatalog_SOURCES) \ $(xmllint_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man1dir = $(mandir)/man1 man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) -DATA = $(confexec_DATA) $(m4data_DATA) $(pkgconfig_DATA) +DATA = $(cmake_DATA) $(confexec_DATA) $(m4data_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -356,13 +443,15 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -399,6 +488,7 @@ HTML_DIR = @HTML_DIR@ HTML_OBJ = @HTML_OBJ@ HTTP_OBJ = @HTTP_OBJ@ ICONV_LIBS = @ICONV_LIBS@ +ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -443,6 +533,9 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ @@ -454,7 +547,6 @@ RANLIB = @RANLIB@ RDL_LIBS = @RDL_LIBS@ READER_TEST = @READER_TEST@ RELDATE = @RELDATE@ -RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -479,7 +571,6 @@ TEST_VTIME = @TEST_VTIME@ TEST_XINCLUDE = @TEST_XINCLUDE@ TEST_XPATH = @TEST_XPATH@ TEST_XPTR = @TEST_XPTR@ -THREADS_W32 = @THREADS_W32@ THREAD_CFLAGS = @THREAD_CFLAGS@ THREAD_LIBS = @THREAD_LIBS@ VERSION = @VERSION@ @@ -512,6 +603,7 @@ WITH_SAX1 = @WITH_SAX1@ WITH_SCHEMAS = @WITH_SCHEMAS@ WITH_SCHEMATRON = @WITH_SCHEMATRON@ WITH_THREADS = @WITH_THREADS@ +WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@ WITH_TREE = @WITH_TREE@ WITH_TRIO = @WITH_TRIO@ WITH_VALID = @WITH_VALID@ @@ -586,68 +678,69 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ +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@ @LZMA_CFLAGS@ +AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include +AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS) bin_SCRIPTS = xml2-config lib_LTLIBRARIES = libxml2.la -libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) @USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT = @USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ - $(LIBXML2_VERSION_SCRIPT) \ - -version-info @LIBXML_VERSION_INFO@ \ - @MODULE_PLATFORM_LIBS@ - -@WITH_TRIO_SOURCES_FALSE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ -@WITH_TRIO_SOURCES_FALSE@ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ -@WITH_TRIO_SOURCES_FALSE@ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ -@WITH_TRIO_SOURCES_FALSE@ xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ -@WITH_TRIO_SOURCES_FALSE@ catalog.c globals.c threads.c c14n.c xmlstring.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlreader.c relaxng.c dict.c SAX2.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ -@WITH_TRIO_SOURCES_FALSE@ xmlmodule.c schematron.c xzlib.c - -@WITH_TRIO_SOURCES_TRUE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ -@WITH_TRIO_SOURCES_TRUE@ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ -@WITH_TRIO_SOURCES_TRUE@ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ -@WITH_TRIO_SOURCES_TRUE@ xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ -@WITH_TRIO_SOURCES_TRUE@ catalog.c globals.c threads.c c14n.c xmlstring.c \ -@WITH_TRIO_SOURCES_TRUE@ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ -@WITH_TRIO_SOURCES_TRUE@ triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \ -@WITH_TRIO_SOURCES_TRUE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ -@WITH_TRIO_SOURCES_TRUE@ xmlmodule.c schematron.c xzlib.c +libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info $(LIBXML_VERSION_INFO) \ + $(MODULE_PLATFORM_LIBS) + +@WITH_SAX1_SOURCES_FALSE@docb_sources = +@WITH_SAX1_SOURCES_TRUE@docb_sources = DOCBparser.c +@WITH_TRIO_SOURCES_FALSE@trio_sources = +@WITH_TRIO_SOURCES_TRUE@trio_sources = triostr.c trio.c +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 \ + valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ + xpointer.c xinclude.c nanohttp.c nanoftp.c \ + $(docb_sources) \ + catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \ + xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ + $(trio_sources) \ + xmlreader.c relaxng.c dict.c SAX2.c \ + xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ + xmlmodule.c schematron.c xzlib.c DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ @LZMA_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 m4datadir = $(datadir)/aclocal m4data_DATA = libxml.m4 runtest_SOURCES = runtest.c runtest_LDFLAGS = runtest_DEPENDENCIES = $(DEPS) -runtest_LDADD = @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +runtest_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testrecurse_SOURCES = testrecurse.c testrecurse_LDFLAGS = testrecurse_DEPENDENCIES = $(DEPS) -testrecurse_LDADD = @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS) +testrecurse_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) +testlimits_SOURCES = testlimits.c +testlimits_LDFLAGS = +testlimits_DEPENDENCIES = $(DEPS) +testlimits_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS) testchar_SOURCES = testchar.c testchar_LDFLAGS = testchar_DEPENDENCIES = $(DEPS) -testchar_LDADD = @RDL_LIBS@ $(LDADDS) +testchar_LDADD = $(RDL_LIBS) $(LDADDS) testdict_SOURCES = testdict.c testdict_LDFLAGS = testdict_DEPENDENCIES = $(DEPS) -testdict_LDADD = @RDL_LIBS@ $(LDADDS) +testdict_LDADD = $(RDL_LIBS) $(LDADDS) runsuite_SOURCES = runsuite.c runsuite_LDFLAGS = runsuite_DEPENDENCIES = $(DEPS) -runsuite_LDADD = @RDL_LIBS@ $(LDADDS) +runsuite_LDADD = $(RDL_LIBS) $(LDADDS) xmllint_SOURCES = xmllint.c xmllint_LDFLAGS = xmllint_DEPENDENCIES = $(DEPS) -xmllint_LDADD = @RDL_LIBS@ $(LDADDS) +xmllint_LDADD = $(RDL_LIBS) $(LDADDS) testSAX_SOURCES = testSAX.c testSAX_LDFLAGS = testSAX_DEPENDENCIES = $(DEPS) @@ -659,7 +752,7 @@ testHTML_LDADD = $(LDADDS) xmlcatalog_SOURCES = xmlcatalog.c xmlcatalog_LDFLAGS = xmlcatalog_DEPENDENCIES = $(DEPS) -xmlcatalog_LDADD = @RDL_LIBS@ $(LDADDS) +xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) testXPath_SOURCES = testXPath.c testXPath_LDFLAGS = testXPath_DEPENDENCIES = $(DEPS) @@ -668,10 +761,11 @@ testC14N_SOURCES = testC14N.c testC14N_LDFLAGS = testC14N_DEPENDENCIES = $(DEPS) testC14N_LDADD = $(LDADDS) -testThreads_SOURCES = testThreads@THREADS_W32@.c +@THREADS_W32_FALSE@testThreads_SOURCES = testThreads.c +@THREADS_W32_TRUE@testThreads_SOURCES = testThreadsWin32.c testThreads_LDFLAGS = testThreads_DEPENDENCIES = $(DEPS) -testThreads_LDADD = @BASE_THREAD_LIBS@ $(LDADDS) +testThreads_LDADD = $(BASE_THREAD_LIBS) $(LDADDS) testURI_SOURCES = testURI.c testURI_LDFLAGS = testURI_DEPENDENCIES = $(DEPS) @@ -703,6 +797,7 @@ testModule_LDADD = $(LDADDS) noinst_LTLIBRARIES = testdso.la testdso_la_SOURCES = testdso.c testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir) +BUILT_SOURCES = testapi.c testapi_SOURCES = testapi.c testapi_LDFLAGS = testapi_DEPENDENCIES = $(DEPS) @@ -711,7 +806,8 @@ runxmlconf_SOURCES = runxmlconf.c runxmlconf_LDFLAGS = runxmlconf_DEPENDENCIES = $(DEPS) runxmlconf_LDADD = $(LDADDS) -CLEANFILES = xml2Conf.sh *.gcda *.gcno +CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res +DISTCLEANFILES = COPYING missing.lst confexecdir = $(libdir) confexec_DATA = xml2Conf.sh CVS_EXTRA_DIST = @@ -721,15 +817,18 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ check-xsddata-test-suite.py check-xinclude-test-suite.py \ example/Makefile.am example/gjobread.c example/gjobs.xml \ $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \ + libxml2-config.cmake.in \ trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ - triop.h triodef.h libxml.h elfgcchack.h xzlib.h \ - testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ + triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \ + enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \ dbgen.pl dbgenattr.pl regressions.py regressions.xml \ - README.tests Makefile.tests libxml2.syms \ + README.tests Makefile.tests libxml2.syms timsort.h \ $(CVS_EXTRA_DIST) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libxml-2.0.pc +cmakedir = $(libdir)/cmake/libxml2 +cmake_DATA = libxml2-config.cmake # # Install the tests program sources as examples @@ -744,12 +843,12 @@ EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples # LCOV = /usr/bin/lcov GENHTML = /usr/bin/genhtml -all: config.h +all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -785,10 +884,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -802,15 +899,17 @@ distclean-hdr: -rm -f config.h stamp-h1 libxml2.spec: $(top_builddir)/config.status $(srcdir)/libxml.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ -xml2-config: $(top_builddir)/config.status $(srcdir)/xml2-config.in - cd $(top_builddir) && $(SHELL) ./config.status $@ libxml-2.0.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libxml-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +libxml2-config.cmake: $(top_builddir)/config.status $(srcdir)/libxml2-config.cmake.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +xml2-config: $(top_builddir)/config.status $(srcdir)/xml2-config.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -818,6 +917,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -833,35 +934,46 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES) $(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) $(libxml2_la_LIBADD) $(LIBS) -testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) + +testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) $(EXTRA_testdso_la_DEPENDENCIES) $(AM_V_CCLD)$(testdso_la_LINK) $(testdso_la_OBJECTS) $(testdso_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -882,7 +994,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -904,73 +1017,101 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -runsuite$(EXEEXT): $(runsuite_OBJECTS) $(runsuite_DEPENDENCIES) + +runsuite$(EXEEXT): $(runsuite_OBJECTS) $(runsuite_DEPENDENCIES) $(EXTRA_runsuite_DEPENDENCIES) @rm -f runsuite$(EXEEXT) $(AM_V_CCLD)$(runsuite_LINK) $(runsuite_OBJECTS) $(runsuite_LDADD) $(LIBS) -runtest$(EXEEXT): $(runtest_OBJECTS) $(runtest_DEPENDENCIES) + +runtest$(EXEEXT): $(runtest_OBJECTS) $(runtest_DEPENDENCIES) $(EXTRA_runtest_DEPENDENCIES) @rm -f runtest$(EXEEXT) $(AM_V_CCLD)$(runtest_LINK) $(runtest_OBJECTS) $(runtest_LDADD) $(LIBS) -runxmlconf$(EXEEXT): $(runxmlconf_OBJECTS) $(runxmlconf_DEPENDENCIES) + +runxmlconf$(EXEEXT): $(runxmlconf_OBJECTS) $(runxmlconf_DEPENDENCIES) $(EXTRA_runxmlconf_DEPENDENCIES) @rm -f runxmlconf$(EXEEXT) $(AM_V_CCLD)$(runxmlconf_LINK) $(runxmlconf_OBJECTS) $(runxmlconf_LDADD) $(LIBS) -testAutomata$(EXEEXT): $(testAutomata_OBJECTS) $(testAutomata_DEPENDENCIES) + +testAutomata$(EXEEXT): $(testAutomata_OBJECTS) $(testAutomata_DEPENDENCIES) $(EXTRA_testAutomata_DEPENDENCIES) @rm -f testAutomata$(EXEEXT) $(AM_V_CCLD)$(testAutomata_LINK) $(testAutomata_OBJECTS) $(testAutomata_LDADD) $(LIBS) -testC14N$(EXEEXT): $(testC14N_OBJECTS) $(testC14N_DEPENDENCIES) + +testC14N$(EXEEXT): $(testC14N_OBJECTS) $(testC14N_DEPENDENCIES) $(EXTRA_testC14N_DEPENDENCIES) @rm -f testC14N$(EXEEXT) $(AM_V_CCLD)$(testC14N_LINK) $(testC14N_OBJECTS) $(testC14N_LDADD) $(LIBS) -testHTML$(EXEEXT): $(testHTML_OBJECTS) $(testHTML_DEPENDENCIES) + +testHTML$(EXEEXT): $(testHTML_OBJECTS) $(testHTML_DEPENDENCIES) $(EXTRA_testHTML_DEPENDENCIES) @rm -f testHTML$(EXEEXT) $(AM_V_CCLD)$(testHTML_LINK) $(testHTML_OBJECTS) $(testHTML_LDADD) $(LIBS) -testModule$(EXEEXT): $(testModule_OBJECTS) $(testModule_DEPENDENCIES) + +testModule$(EXEEXT): $(testModule_OBJECTS) $(testModule_DEPENDENCIES) $(EXTRA_testModule_DEPENDENCIES) @rm -f testModule$(EXEEXT) $(AM_V_CCLD)$(testModule_LINK) $(testModule_OBJECTS) $(testModule_LDADD) $(LIBS) -testReader$(EXEEXT): $(testReader_OBJECTS) $(testReader_DEPENDENCIES) + +testReader$(EXEEXT): $(testReader_OBJECTS) $(testReader_DEPENDENCIES) $(EXTRA_testReader_DEPENDENCIES) @rm -f testReader$(EXEEXT) $(AM_V_CCLD)$(testReader_LINK) $(testReader_OBJECTS) $(testReader_LDADD) $(LIBS) -testRegexp$(EXEEXT): $(testRegexp_OBJECTS) $(testRegexp_DEPENDENCIES) + +testRegexp$(EXEEXT): $(testRegexp_OBJECTS) $(testRegexp_DEPENDENCIES) $(EXTRA_testRegexp_DEPENDENCIES) @rm -f testRegexp$(EXEEXT) $(AM_V_CCLD)$(testRegexp_LINK) $(testRegexp_OBJECTS) $(testRegexp_LDADD) $(LIBS) -testRelax$(EXEEXT): $(testRelax_OBJECTS) $(testRelax_DEPENDENCIES) + +testRelax$(EXEEXT): $(testRelax_OBJECTS) $(testRelax_DEPENDENCIES) $(EXTRA_testRelax_DEPENDENCIES) @rm -f testRelax$(EXEEXT) $(AM_V_CCLD)$(testRelax_LINK) $(testRelax_OBJECTS) $(testRelax_LDADD) $(LIBS) -testSAX$(EXEEXT): $(testSAX_OBJECTS) $(testSAX_DEPENDENCIES) + +testSAX$(EXEEXT): $(testSAX_OBJECTS) $(testSAX_DEPENDENCIES) $(EXTRA_testSAX_DEPENDENCIES) @rm -f testSAX$(EXEEXT) $(AM_V_CCLD)$(testSAX_LINK) $(testSAX_OBJECTS) $(testSAX_LDADD) $(LIBS) -testSchemas$(EXEEXT): $(testSchemas_OBJECTS) $(testSchemas_DEPENDENCIES) + +testSchemas$(EXEEXT): $(testSchemas_OBJECTS) $(testSchemas_DEPENDENCIES) $(EXTRA_testSchemas_DEPENDENCIES) @rm -f testSchemas$(EXEEXT) $(AM_V_CCLD)$(testSchemas_LINK) $(testSchemas_OBJECTS) $(testSchemas_LDADD) $(LIBS) -testThreads$(EXEEXT): $(testThreads_OBJECTS) $(testThreads_DEPENDENCIES) + +testThreads$(EXEEXT): $(testThreads_OBJECTS) $(testThreads_DEPENDENCIES) $(EXTRA_testThreads_DEPENDENCIES) @rm -f testThreads$(EXEEXT) $(AM_V_CCLD)$(testThreads_LINK) $(testThreads_OBJECTS) $(testThreads_LDADD) $(LIBS) -testURI$(EXEEXT): $(testURI_OBJECTS) $(testURI_DEPENDENCIES) + +testURI$(EXEEXT): $(testURI_OBJECTS) $(testURI_DEPENDENCIES) $(EXTRA_testURI_DEPENDENCIES) @rm -f testURI$(EXEEXT) $(AM_V_CCLD)$(testURI_LINK) $(testURI_OBJECTS) $(testURI_LDADD) $(LIBS) -testXPath$(EXEEXT): $(testXPath_OBJECTS) $(testXPath_DEPENDENCIES) + +testXPath$(EXEEXT): $(testXPath_OBJECTS) $(testXPath_DEPENDENCIES) $(EXTRA_testXPath_DEPENDENCIES) @rm -f testXPath$(EXEEXT) $(AM_V_CCLD)$(testXPath_LINK) $(testXPath_OBJECTS) $(testXPath_LDADD) $(LIBS) -testapi$(EXEEXT): $(testapi_OBJECTS) $(testapi_DEPENDENCIES) + +testapi$(EXEEXT): $(testapi_OBJECTS) $(testapi_DEPENDENCIES) $(EXTRA_testapi_DEPENDENCIES) @rm -f testapi$(EXEEXT) $(AM_V_CCLD)$(testapi_LINK) $(testapi_OBJECTS) $(testapi_LDADD) $(LIBS) -testchar$(EXEEXT): $(testchar_OBJECTS) $(testchar_DEPENDENCIES) + +testchar$(EXEEXT): $(testchar_OBJECTS) $(testchar_DEPENDENCIES) $(EXTRA_testchar_DEPENDENCIES) @rm -f testchar$(EXEEXT) $(AM_V_CCLD)$(testchar_LINK) $(testchar_OBJECTS) $(testchar_LDADD) $(LIBS) -testdict$(EXEEXT): $(testdict_OBJECTS) $(testdict_DEPENDENCIES) + +testdict$(EXEEXT): $(testdict_OBJECTS) $(testdict_DEPENDENCIES) $(EXTRA_testdict_DEPENDENCIES) @rm -f testdict$(EXEEXT) $(AM_V_CCLD)$(testdict_LINK) $(testdict_OBJECTS) $(testdict_LDADD) $(LIBS) -testrecurse$(EXEEXT): $(testrecurse_OBJECTS) $(testrecurse_DEPENDENCIES) + +testlimits$(EXEEXT): $(testlimits_OBJECTS) $(testlimits_DEPENDENCIES) $(EXTRA_testlimits_DEPENDENCIES) + @rm -f testlimits$(EXEEXT) + $(AM_V_CCLD)$(testlimits_LINK) $(testlimits_OBJECTS) $(testlimits_LDADD) $(LIBS) + +testrecurse$(EXEEXT): $(testrecurse_OBJECTS) $(testrecurse_DEPENDENCIES) $(EXTRA_testrecurse_DEPENDENCIES) @rm -f testrecurse$(EXEEXT) $(AM_V_CCLD)$(testrecurse_LINK) $(testrecurse_OBJECTS) $(testrecurse_LDADD) $(LIBS) -xmlcatalog$(EXEEXT): $(xmlcatalog_OBJECTS) $(xmlcatalog_DEPENDENCIES) + +xmlcatalog$(EXEEXT): $(xmlcatalog_OBJECTS) $(xmlcatalog_DEPENDENCIES) $(EXTRA_xmlcatalog_DEPENDENCIES) @rm -f xmlcatalog$(EXEEXT) $(AM_V_CCLD)$(xmlcatalog_LINK) $(xmlcatalog_OBJECTS) $(xmlcatalog_LDADD) $(LIBS) -xmllint$(EXEEXT): $(xmllint_OBJECTS) $(xmllint_DEPENDENCIES) + +xmllint$(EXEEXT): $(xmllint_OBJECTS) $(xmllint_DEPENDENCIES) $(EXTRA_xmllint_DEPENDENCIES) @rm -f xmllint$(EXEEXT) $(AM_V_CCLD)$(xmllint_LINK) $(xmllint_OBJECTS) $(xmllint_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -998,9 +1139,7 @@ uninstall-binSCRIPTS: @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1013,6 +1152,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTMLtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAX2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c14n.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catalog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chvalid.Plo@am__quote@ @@ -1044,13 +1184,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRelax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSAX.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSchemas.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreads@THREADS_W32@.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreads.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreadsWin32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testURI.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testXPath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testapi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdso.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlimits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrecurse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Plo@am__quote@ @@ -1080,26 +1222,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -1111,11 +1250,18 @@ distclean-libtool: -rm -f libtool config.lt install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1144,16 +1290,21 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man3: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1182,13 +1333,35 @@ uninstall-man3: sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) +install-cmakeDATA: $(cmake_DATA) + @$(NORMAL_INSTALL) + @list='$(cmake_DATA)'; test -n "$(cmakedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(cmakedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(cmakedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakedir)" || exit $$?; \ + done + +uninstall-cmakeDATA: + @$(NORMAL_UNINSTALL) + @list='$(cmake_DATA)'; test -n "$(cmakedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(cmakedir)'; $(am__uninstall_files_from_dir) install-confexecDATA: $(confexec_DATA) @$(NORMAL_INSTALL) - test -z "$(confexecdir)" || $(MKDIR_P) "$(DESTDIR)$(confexecdir)" @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(confexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(confexecdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1202,13 +1375,14 @@ uninstall-confexecDATA: @$(NORMAL_UNINSTALL) @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(confexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(confexecdir)" && rm -f $$files + dir='$(DESTDIR)$(confexecdir)'; $(am__uninstall_files_from_dir) install-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) - test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(m4datadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(m4datadir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1222,13 +1396,14 @@ uninstall-m4dataDATA: @$(NORMAL_UNINSTALL) @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(m4datadir)" && rm -f $$files + dir='$(DESTDIR)$(m4datadir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1242,27 +1417,28 @@ uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1277,57 +1453,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1343,12 +1474,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1360,15 +1486,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1377,24 +1499,33 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1428,13 +1559,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1466,36 +1594,36 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -1506,8 +1634,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -1517,9 +1645,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -1527,6 +1655,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -1550,13 +1679,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1573,17 +1710,19 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-recursive +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-recursive +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -1593,10 +1732,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1605,10 +1749,12 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ @@ -1634,8 +1780,8 @@ info: info-recursive info-am: -install-data-am: install-data-local install-m4dataDATA install-man \ - install-pkgconfigDATA +install-data-am: install-cmakeDATA install-data-local \ + install-m4dataDATA install-man install-pkgconfigDATA install-dvi: install-dvi-recursive @@ -1685,25 +1831,26 @@ ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-confexecDATA uninstall-libLTLIBRARIES \ - uninstall-local uninstall-m4dataDATA uninstall-man \ - uninstall-pkgconfigDATA + uninstall-cmakeDATA uninstall-confexecDATA \ + uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \ + uninstall-man uninstall-pkgconfigDATA uninstall-man: uninstall-man1 uninstall-man3 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-binSCRIPTS \ +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-binPROGRAMS \ + clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-binSCRIPTS install-cmakeDATA \ install-confexecDATA install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ @@ -1713,9 +1860,9 @@ uninstall-man: uninstall-man1 uninstall-man3 install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-confexecDATA \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-cmakeDATA uninstall-confexecDATA \ uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \ uninstall-man uninstall-man1 uninstall-man3 \ uninstall-pkgconfigDATA @@ -1738,28 +1885,25 @@ testapi.c: $(srcdir)/gentest.py #testOOM_LDADD= $(LDADDS) runtests: + [ -d test ] || $(LN_S) $(srcdir)/test . + [ -d result ] || $(LN_S) $(srcdir)/result . $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT) - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) check: all runtests -check-valgrind: all +check-valgrind valgrind: all @echo '## Running the regression tests under Valgrind' @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' check + $(MAKE) CHECKER='valgrind -q' runtests testall : tests SVGtests SAXtests -tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_SCHEMATRON@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@ - @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ - $(MAKE) MAKEFLAGS+=--silent tests ; fi) - @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests) - -valgrind: - @echo '## Running the regression tests under Valgrind' - @echo '## Go get a cup of coffee it is gonna take a while ...' - $(MAKE) CHECKER='valgrind -q' tests +tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) + @(cd doc/examples ; $(MAKE) tests) APItests: testapi$(EXEEXT) @echo "## Running the API regression tests this may take a little while" @@ -2665,7 +2809,7 @@ SchemasPythonTests: echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) - @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) + @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi) Patterntests: xmllint$(EXEEXT) @(echo > .memdump) @@ -2697,12 +2841,12 @@ ModuleTests: testModule$(EXEEXT) testdso.la cleanup: -@(find . -name .\#\* -exec rm {} \;) - -@(find . -name \*.gcda -o *.gcno -exec rm {} \;) - -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm {} \;) + -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;) + -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;) dist-hook: cleanup libxml2.spec -cp libxml2.spec $(distdir) - (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos os400 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 @@ -2728,13 +2872,13 @@ xml2Conf.sh: xml2Conf.sh.in Makefile && mv xml2Conf.tmp xml2Conf.sh install-data-local: - @MKDIR_P@ $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - @MKDIR_P@ $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) - -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) + $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) + -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) uninstall-local: rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c diff --git a/NEWS b/NEWS index cdfdda6..8027d55 100644 --- a/NEWS +++ b/NEWS @@ -4,17 +4,647 @@ Note that this is automatically generated from the news webpage at: http://xmlsoft.org/news.html -Items not finished and worked on, get in touch with the list if you want -to help those - More testing on RelaxNG - - Finishing up XML - Schemas - The change log at ChangeLog.html describes the recents commits -to the SVN at -http://svn.gnome.org/viewvc/libxml2/trunk/ +to the GIT at +http://git.gnome.org/browse/libxml2/ code base.Here is the list of public releases: +2.9.2: Oct 16 2014: + - Security: + Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard), + CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard) + + - Bug Fixes: + fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer), + xmlmemory: handle realloc properly (Yegor Yefremov), + Python generator bug raised by the const change (Daniel Veillard), + Windows Critical sections not released correctly (Daniel Veillard), + Parser error on repeated recursive entity expansion containing < (Daniel Veillard), + xpointer : fixing Null Pointers (Gaurav Gupta), + Remove Unnecessary Null check in xpointer.c (Gaurav Gupta), + parser bug on misformed namespace attributes (Dennis Filder), + Pointer dereferenced before null check (Daniel Veillard), + Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta), + Possible overflow in HTMLParser.c (Daniel Veillard), + python/tests/sync.py assumes Python dictionaries are ordered (John Beck), + Fix Enum check and missing break (Gaurav Gupta), + xmlIO: Handle error returns from dup() (Philip Withnall), + Fix a problem properly saving URIs (Daniel Veillard), + wrong error column in structured error when parsing attribute values (Juergen Keil), + wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil), + no error column in structured error handler for xml schema validation errors (Juergen Keil), + Couple of Missing Null checks (Gaurav Gupta), + Add couple of missing Null checks (Daniel Veillard), + xmlschemastypes: Fix potential array overflow (Philip Withnall), + runtest: Fix a memory leak on parse failure (Philip Withnall), + xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall), + xmlcatalog: Fix a memory leak on quit (Philip Withnall), + HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall), + Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer), + Avoid Possible Null Pointer in trio.c (Gaurav Gupta), + Fix processing in SAX2 in case of an allocation failure (Daniel Veillard), + XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard), + Fix various Missing Null checks (Gaurav Gupta), + Fix a potential NULL dereference (Daniel Veillard), + Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta), + Add a missing argument check (Gaurav Gupta), + Adding a check in case of allocation error (Gaurav Gupta), + xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder), + Adding some missing NULL checks (Gaurav), + Fixes for xmlInitParserCtxt (Daniel Veillard), + Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard), + erroneously ignores a validation error if no error callback set (Daniel Veillard), + xmllint was not parsing the --c14n11 flag (Sérgio Batista), + Avoid Possible null pointer dereference in memory debug mode (Gaurav), + Avoid Double Null Check (Gaurav), + Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer), + Fix xmlParseInNodeContext() if node is not element (Daniel Veillard), + Avoid a possible NULL pointer dereference (Gaurav), + Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard), + Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard), + fixing a ptotential uninitialized access (Daniel Veillard), + Fix an fd leak in an error case (Daniel Veillard), + Missing initialization for the catalog module (Daniel Veillard), + Handling of XPath function arguments in error case (Nick Wellnhofer), + Fix a couple of missing NULL checks (Gaurav), + Avoid a possibility of dangling encoding handler (Gaurav), + Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks), + Fix a bug loading some compressed files (Mike Alexander), + Fix XPath node comparison bug (Gaurav), + Type mismatch in xmlschemas.c (Gaurav), + Type mismatch in xmlschemastypes.c (Gaurav), + Avoid a deadcode in catalog.c (Daniel Veillard), + run close socket on Solaris, same as we do on other platforms (Denis Pauk), + Fix pointer dereferenced before null check (Gaurav), + Fix a potential NULL dereference in tree code (Daniel Veillard), + Fix potential NULL pointer dereferences in regexp code (Gaurav), + xmllint --pretty crashed without following numeric argument (Tim Galeckas), + Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer), + Fix XPath '//' optimization with predicates (Nick Wellnhofer), + Clear up a potential NULL dereference (Daniel Veillard), + Fix a possible NULL dereference (Gaurav), + Avoid crash if allocation fails (Daniel Veillard), + Remove occasional leading space in XPath number formatting (Daniel Veillard), + Fix handling of mmap errors (Daniel Veillard), + Catch malloc error and exit accordingly (Daniel Veillard), + missing else in xlink.c (Ami Fischman), + Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard), + Fix a regression in xmlGetDocCompressMode() (Daniel Veillard), + properly quote the namespace uris written out during c14n (Aleksey Sanin), + Remove premature XInclude check on URI being relative (Alexey Neyman), + Fix missing break on last() function for attributes (dcb), + Do not URI escape in server side includes (Romain Bondue), + Fix an error in xmlCleanupParser (Alexander Pastukhov) + + - Documentation: + typo in error messages "colon are forbidden from..." (Daniel Veillard), + Fix a link to James SAX documentation old page (Daniel Veillard), + Fix typos in relaxng.c (Jan Pokorný), + Fix a doc typo (Daniel Veillard), + Fix typos in {tree,xpath}.c (errror) (Jan Pokorný), + Add limitations about encoding conversion (Daniel Veillard), + Fix typos in xmlschemas{,types}.c (Jan Pokorný), + Fix incorrect spelling entites->entities (Jan Pokorný), + Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard) + + - Portability: + AC_CONFIG_FILES and executable bit (Roumen Petrov), + remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov), + fix some tabs mixing incompatible with python3 (Roumen Petrov), + Visual Studio 14 CTP defines snprintf() (Francis Dupont), + OS400: do not try to copy unexisting doc files (Patrick Monnerat), + OS400: use either configure.ac or configure.in. (Patrick Monnerat), + os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat), + OS400: Add some more C macros equivalent procedures. (Patrick Monnerat), + OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat), + OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat), + OS400: include in distribution tarball. (Patrick Monnerat), + OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat), + OS400: Add compilation scripts. (Patrick Monnerat), + OS400: ILE RPG language header files. (Patrick Monnerat), + OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat), + OS400: UTF8<-->EBCDIC wrappers for system and external library calls (Patrick Monnerat), + OS400: Easy character transcoding support (Patrick Monnerat), + OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat), + OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat), + Fix building when configuring without xpath and xptr (Daniel Veillard), + configure: Add --with-python-install-dir (Jonas Eriksson), + Fix compilation with minimum and xinclude. (Nicolas Le Cam), + Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam), + Fix compilation with minimum and schematron. (Nicolas Le Cam), + Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam), + Don't use xmlValidateName() when not available. (Nicolas Le Cam), + Fix a portability issue on Windows (Longstreth Jon), + Various portability patches for OpenVMS (Jacob (Jouk) Jansen), + Use specific macros for portability to OS/400 (Patrick Monnerat), + Add macros needed for OS/400 portability (Patrick Monnerat), + Portability patch for fopen on OS/400 (Patrick Monnerat), + Portability fixes for OS/400 (Patrick Monnerat), + Improve va_list portability (Patrick Monnerat), + Portability fix (Patrick Monnerat), + Portability fix (Patrick Monnerat), + Generic portability fix (Patrick Monnerat), + Shortening lines in headers (Patrick Monnerat), + build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall), + build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall), + fix some tabs mixing incompatible with python3 (Daniel Veillard), + add additional defines checks for support "./configure --with-minimum" (Denis Pauk), + Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis), + python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev), + python: Fix compiler warnings when building python3 bindings (Armin K), + Fix for compilation with python 2.6.8 (Petr Sumbera) + + - Improvements: + win32/libxml2.def.src after rebuild in doc (Roumen Petrov), + elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov), + elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov), + Provide cmake module (Samuel Martin), + Fix a couple of issues raised by make dist (Daniel Veillard), + Fix and add const qualifiers (Kurt Roeckx), + Preparing for upcoming release of 2.9.2 (Daniel Veillard), + Fix zlib and lzma libraries check via command line (Dmitriy), + wrong error column in structured error when parsing end tag (Juergen Keil), + doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat), + Add methods for python3 iterator (Ron Angeles), + Support element node traversal in document fragments. (Kyle VanderBeek), + xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom), + Added macros for argument casts (Eric Zurcher), + adding init calls to xml and html Read parsing entry points (Daniel Veillard), + Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný), + Implement choice for name classes on attributes (Shaun McCance), + Two small namespace tweaks (Daniel Veillard), + xmllint --memory should fail on empty files (Daniel Veillard), + Cast encoding name to char pointer to match arg type (Nikolay Sivov) + + - Cleanups: + Removal of old configure.in (Daniel Veillard), + Unreachable code in tree.c (Gaurav Gupta), + Remove a couple of dead conditions (Gaurav Gupta), + Avoid some dead code and cleanup in relaxng.c (Gaurav), + Drop not needed checks (Denis Pauk), + Fix a wrong test (Daniel Veillard) + + + +2.9.1: Apr 19 2013: + - Features: + Support for Python3 (Daniel Veillard), + Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh) + + - Documentation: + Add documentation for xmllint --xpath (Daniel Veillard), + Fix the URL of the SAX documentation from James (Daniel Veillard), + Fix spelling of "length". (Michael Wood) + + - Portability: + Fix python bindings with versions older than 2.7 (Daniel Veillard), + rebuild docs:Makefile.am (Roumen Petrov), + elfgcchack.h after rebuild in doc (Roumen Petrov), + elfgcchack for buf module (Roumen Petrov), + Fix a uneeded and wrong extra link parameter (Daniel Veillard), + Few cleanup patches for Windows (Denis Pauk), + Fix rpmbuild --nocheck (Mark Salter), + Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard), + Fix Broken multi-arch support in xml2-config (Daniel Veillard), + Fix a portability issue for GCC < 3.4.0 (Daniel Veillard), + Windows build fixes (Daniel Richard), + Fix a thread portability problem (Friedrich Haubensak), + Downgrade autoconf requirement to 2.63 (Daniel Veillard) + + - Bug Fixes: + Fix a linking error for python bindings (Daniel Veillard), + Fix a couple of return without value (Jüri Aedla), + Improve the hashing functions (Daniel Franke), + Improve handling of xmlStopParser() (Daniel Veillard), + Remove risk of lockup in dictionary initialization (Daniel Veillard), + Activate detection of encoding in external subset (Daniel Veillard), + Fix an output buffer flushing conversion bug (Mikhail Titov), + Fix an old bug in xmlSchemaValidateOneElement (Csaba László), + Fix configure cannot remove messages (Gilles Espinasse), + fix schema validation in combination with xsi:nil (Daniel Veillard), + xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf), + Fix a few problems with setEntityLoader (Alexey Neyman), + Detect excessive entities expansion upon replacement (Daniel Veillard), + Fix the flushing out of raw buffers on encoding conversions (Daniel, +Veillard), + Fix some buffer conversion issues (Daniel Veillard), + When calling xmlNodeDump make sure we grow the buffer quickly (Daniel, +Veillard), + Fix an error in the progressive DTD parsing code (Dan Winship), + xmllint should not load DTD by default when using the reader (Daniel, +Veillard), + Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera), + Fix potential out of bound access (Daniel Veillard), + Fix large parse of file from memory (Daniel Veillard), + Fix a bug in the nsclean option of the parser (Daniel Veillard), + Fix a regression in 2.9.0 breaking validation while streaming (Daniel, +Veillard), + Remove potential calls to exit() (Daniel Veillard) + + - Improvements: + Regenerated API, and testapi, rebuild documentation (Daniel Veillard), + Fix tree iterators broken by 2to3 script (Daniel Veillard), + update all tests for Python3 and Python2 (Daniel Veillard), + A few more fixes for python 3 affecting libxml2.py (Daniel Veillard), + Fix compilation on Python3 (Daniel Veillard), + Converting apibuild.py to python3 (Daniel Veillard), + First pass at starting porting to python3 (Daniel Veillard), + updated configure.in for python3 (Daniel Veillard), + Add support for xpathRegisterVariable in Python (Shaun McCance), + Added a regression tests from bug 694228 data (Daniel Veillard), + Cache presence of '<' in entities content (Daniel Veillard), + Avoid extra processing on entities (Daniel Veillard), + Python binding for xmlRegisterInputCallback (Alexey Neyman), + Python bindings: DOM casts everything to xmlNode (Alexey Neyman), + Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling), + Adding streaming validation to runtest checks (Daniel Veillard), + Add a --pushsmall option to xmllint (Daniel Veillard) + + - Cleanups: + Switched comment in file to UTF-8 encoding (Daniel Veillard), + Extend gitignore (Daniel Veillard), + Silent the new python test on input (Alexey Neyman), + Cleanup of a duplicate test (Daniel Veillard), + Cleanup on duplicate test expressions (Daniel Veillard), + Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick, +Gansterer), + Spec cleanups and a fix for multiarch support (Daniel Veillard), + Silence a clang warning (Daniel Veillard), + Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard), + rand_seed should be static in dict.c (Wouter Van Rooy), + Fix typos in parser comments (Jan Pokorný) + + + +2.9.0: Sep 11 2012: + - Features: + A few new API entry points, + More resilient push parser mode, + A lot of portability improvement, + Faster XPath evaluation + + - Documentation: + xml2-config.1 markup error (Christian Weisgerber), + libxml(3) manpage typo fix (John Bradshaw), + More cleanups to the documentation part of libxml2 (Daniel Richard G) + + - Portability: + Bug 676544 - fails to build with --without-sax1 (Akira TAGOH), + fix builds not having stdint.h (Rob Richards), + GetProcAddressA is available only on WinCE (Daniel Veillard), + More updates and cleanups on autotools and Makefiles (Daniel Richard G), + More changes for Win32 compilation (Eric Zurcher), + Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher), + Bundles all generated files for python into the distribution (Daniel Richard G), + Fix compiler warnings of wincecompat.c (Patrick Gansterer), + Fix non __GNUC__ build (Patrick Gansterer), + Fix windows unicode build (Patrick Gansterer), + clean redefinition of {v}snprintf in C-source (Roumen Petrov), + use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov), + fix runtests to use pthreads support for various Unix platforms (Daniel Richard G), + Various "make distcheck" and portability fixups 2nd part (Daniel Richard G), + Various "make distcheck" and portability fixups (Daniel Richard G), + Fix compilation on older Visual Studio (Daniel Veillard) + + - Bug Fixes: + Change the XPath code to percolate allocation errors (Daniel Veillard), + Fix reuse of xmlInitParser (Daniel Veillard), + Fix potential crash on entities errors (Daniel Veillard), + initialize var (Rob Richards), + Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard), + Fix problem with specific and generic error handlers (Pietro Cerutti), + Avoid a potential infinite recursion (Daniel Veillard), + Fix an XSD error when generating internal automata (Daniel Veillard), + Patch for xinclude of text using multibyte characters (Vitaly Ostanin), + Fix a segfault on XSD validation on pattern error (Daniel Veillard), + Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard), + Add a missing element check (Daniel Veillard), + Adding various checks on node type though the API (Daniel Veillard), + Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard), + Fix make dist to include new private header files (Daniel Veillard), + More fixups on the push parser behaviour (Daniel Veillard), + Strengthen behaviour of the push parser in problematic situations (Daniel Veillard), + Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard), + Fixup limits parser (Daniel Veillard), + Do not fetch external parsed entities (Daniel Veillard), + Fix an error in previous commit (Aron Xu), + Fix entities local buffers size problems (Daniel Veillard), + Fix parser local buffers size problems (Daniel Veillard), + Fix a failure to report xmlreader parsing failures (Daniel Veillard) + + - Improvements: + Keep libxml2.syms when running "make distclean" (Daniel Veillard), + Allow to set the quoting character of an xmlWriter (Csaba Raduly), + Keep non-significant blanks node in HTML parser (Daniel Veillard), + Add a forbidden variable error number and message to XPath (Daniel Veillard), + Support long path names on WNT (Michael Stahl), + Improve HTML escaping of attribute on output (Daniel Veillard), + Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis), + Switching XPath node sorting to Timsort (Vojtech Fried), + Optimizing '//' in XPath expressions (Nick Wellnhofer), + Expose xmlBufShrink in the public tree API (Daniel Veillard), + Visible HTML elements close the head tag (Conrad Irwin), + Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard), + Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard), + minimize use of HAVE_CONFIG_H (Roumen Petrov), + fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov), + Add support for big line numbers in error reporting (Daniel Veillard), + Avoid using xmlBuffer for serialization (Daniel Veillard), + Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard), + Provide new accessors for xmlOutputBuffer (Daniel Veillard), + Improvements for old buffer compatibility (Daniel Veillard), + Expand the limit test program (Daniel Veillard), + Improve error reporting on parser errors (Daniel Veillard), + Implement some default limits in the XPath module (Daniel Veillard), + Introduce some default parser limits (Daniel Veillard), + Cleanups and new limit APIs for dictionaries (Daniel Veillard), + Fixup for buf.c (Daniel Veillard), + Cleanup URI module memory allocation code (Daniel Veillard), + Extend testlimits (Daniel Veillard), + More avoid quadratic behaviour (Daniel Veillard), + Impose a reasonable limit on PI size (Daniel Veillard), + first version of testlimits new test (Daniel Veillard), + Avoid quadratic behaviour in some push parsing cases (Daniel Veillard), + Impose a reasonable limit on comment size (Daniel Veillard), + Impose a reasonable limit on attribute size (Daniel Veillard), + Harden the buffer code and make it more compatible (Daniel Veillard), + More cleanups for input/buffers code (Daniel Veillard), + Cleanup function xmlBufResetInput(), to set input from Buffer (Daniel Veillard) + Swicth the test program for characters to new input buffers (Daniel Veillard), + Convert the HTML tree module to the new buffers (Daniel Veillard), + Convert of the HTML parser to new input buffers (Daniel Veillard), + Convert the writer to new output buffer and save APIs (Daniel Veillard), + Convert XMLReader to the new input buffers (Daniel Veillard), + New saving functions using xmlBuf and conversion (Daniel Veillard), + Provide new xmlBuf based saving functions (Daniel Veillard), + Convert XInclude to the new input buffers (Daniel Veillard), + Convert catalog code to the new input buffers (Daniel Veillard), + Convert C14N to the new Input buffer (Daniel Veillard), + Convert xmlIO.c to the new input and output buffers (Daniel Veillard), + Convert XML parser to the new input buffers (Daniel Veillard), + Incompatible change to the Input and Output buffers (Daniel Veillard), + Adding new encoding function to deal with the new structures (Daniel Veillard), + Convert XPath to xmlBuf (Daniel Veillard), + Adding a new buf module for buffers (Daniel Veillard), + Memory error within SAX2 reuse common framework (Daniel Veillard), + Fix xmllint --xpath node initialization (Daniel Veillard) + + - Cleanups: + Various cleanups to avoid compiler warnings (Daniel Veillard), + Big space and tab cleanup (Daniel Veillard), + Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard), + Second round of cleanups for LibXML2 docs/examples (Daniel Richard), + Remove all .cvsignore as they are not used anymore (Daniel Veillard), + Fix a Timsort function helper comment (Daniel Veillard), + Small cleanup for valgrind target (Daniel Veillard), + Patch for portability of latin characters in C files (Daniel Veillard), + Cleanup some of the parser code (Daniel Veillard), + Fix a variable name in comment (Daniel Veillard), + Regenerated testapi.c (Daniel Veillard), + Regenerating docs and API files (Daniel Veillard), + Small cleanup of unused variables in test (Daniel Veillard), + Expand .gitignore with more files (Daniel Veillard) + + + +2.8.0: May 23 2012: + - Features: + add lzma compression support (Anders F Bjorklund) + + - Documentation: + xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä), + Update README.tests (Daniel Veillard), + URI handling code is not OOM resilient (Daniel Veillard), + Fix an error in comment (Daniel Veillard), + Fixed bug #617016 (Daniel Mustieles), + Fixed two typos in the README document (Daniel Neel), + add generated html files (Anders F Bjorklund), + Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard), + Improve documentation a bit (Daniel Veillard), + Updated URL for lxml python bindings (Daniel Veillard) + + - Portability: + Restore code for Windows compilation (Daniel Veillard), + Remove git error message during configure (Christian Dywan), + xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer), + remove a bashism in confgure.in (John Hein), + undef ERROR if already defined (Patrick R. Gansterer), + Fix library problems with mingw-w64 (Michael Cronenworth), + fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards), + prefer native threads on win32 (Sam Thursfield), + Allow to compile with Visual Studio 2010 (Thomas Lemm), + Fix mingw's snprintf configure check (Andoni Morales), + fixed a 64bit big endian issue (Marcus Meissner), + Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard), + Fix windows build from lzma addition (Rob Richards), + autogen: Only check for libtoolize (Colin Walters), + Fix the Windows build files (Patrick von Reth), + 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard), + 599241 fix an initialization problem on Win64 (Andrew W. Nosenko), + fix win build (Rob Richards) + + - Bug fixes: + Part for rand_r checking missing (Daniel Veillard), + Cleanup on randomization (Daniel Veillard), + Fix undefined reference in python module (Pacho Ramos), + Fix a race in xmlNewInputStream (Daniel Veillard), + Fix weird streaming RelaxNG errors (Noam), + Fix various bugs in new code raised by the API checking (Daniel Veillard), + Fix various problems with "make dist" (Daniel Veillard), + Fix a memory leak in the xzlib code (Daniel Veillard), + HTML parser error with