| Index: third_party/libxml/xpointer.c
|
| diff --git a/third_party/libxml/xpointer.c b/third_party/libxml/xpointer.c
|
| index 5298fa5c5a318b135ce80e7fded72f4d83222f98..7a42d02e3859daaa7937a105426374b77469ecf5 100644
|
| --- a/third_party/libxml/xpointer.c
|
| +++ b/third_party/libxml/xpointer.c
|
| @@ -1152,10 +1152,12 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
| if (name == NULL)
|
| XP_ERROR(XPATH_EXPR_ERROR);
|
| while (name != NULL) {
|
| + ctxt->error = XPATH_EXPRESSION_OK;
|
| xmlXPtrEvalXPtrPart(ctxt, name);
|
|
|
| /* in case of syntax error, break here */
|
| - if (ctxt->error != XPATH_EXPRESSION_OK)
|
| + if ((ctxt->error != XPATH_EXPRESSION_OK) &&
|
| + (ctxt->error != XML_XPTR_UNKNOWN_SCHEME))
|
| return;
|
|
|
| /*
|
| @@ -1299,12 +1301,19 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
|
| * *
|
| ************************************************************************/
|
|
|
| +static
|
| void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
| +static
|
| void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
| +static
|
| void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
| +static
|
| void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
| +static
|
| void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
| +static
|
| void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
| +static
|
| void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
|
|
| /**
|
| @@ -1732,7 +1741,7 @@ xmlXPtrNbLocChildren(xmlNodePtr node) {
|
| * Function implementing here() operation
|
| * as described in 5.4.3
|
| */
|
| -void
|
| +static void
|
| xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| CHECK_ARITY(0);
|
|
|
| @@ -1750,7 +1759,7 @@ xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| * Function implementing origin() operation
|
| * as described in 5.4.3
|
| */
|
| -void
|
| +static void
|
| xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| CHECK_ARITY(0);
|
|
|
| @@ -1783,7 +1792,7 @@ xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| * ----------------
|
| *
|
| */
|
| -void
|
| +static void
|
| xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| xmlXPathObjectPtr tmp, obj, point;
|
| xmlLocationSetPtr newset = NULL;
|
| @@ -1877,7 +1886,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| * syntax error.
|
| * ----------------------------
|
| */
|
| -void
|
| +static void
|
| xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| xmlXPathObjectPtr tmp, obj, point;
|
| xmlLocationSetPtr newset = NULL;
|
| @@ -2022,7 +2031,7 @@ xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
|
| * location-set, a range location representing the covering range of
|
| * x is added to the result location-set.
|
| */
|
| -void
|
| +static void
|
| xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| int i;
|
| xmlXPathObjectPtr set;
|
| @@ -2168,7 +2177,7 @@ xmlXPtrInsideRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
|
| * location children of x.
|
| *
|
| */
|
| -void
|
| +static void
|
| xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| int i;
|
| xmlXPathObjectPtr set;
|
| @@ -2622,13 +2631,12 @@ xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) {
|
|
|
| if (cur == NULL)
|
| return(-1);
|
| -
|
| +
|
| if ((cur->type == XML_ELEMENT_NODE) ||
|
| (cur->type == XML_DOCUMENT_NODE) ||
|
| (cur->type == XML_HTML_DOCUMENT_NODE)) {
|
| if (pos > 0) {
|
| cur = xmlXPtrGetNthChild(cur, pos);
|
| - pos = 0;
|
| }
|
| }
|
| while (cur != NULL) {
|
| @@ -2757,7 +2765,7 @@ xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
|
| * all be character points.
|
| * ------------------------------
|
| */
|
| -void
|
| +static void
|
| xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
| int i, startindex, endindex = 0, fendindex;
|
| xmlNodePtr start, end = 0, fend;
|
|
|