MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPtrGetEndPoint

Function xmlXPtrGetEndPoint

ThirdParty/libxml2/vtklibxml2/xpointer.c:2613–2637  ·  view source on GitHub ↗

* xmlXPtrGetEndPoint: * @obj: an range * @node: the resulting node * @indx: the resulting indx * * read the object and return the end point coordinates. * * Returns -1 in case of failure, 0 otherwise */

Source from the content-addressed store, hash-verified

2611 * Returns -1 in case of failure, 0 otherwise
2612 */
2613static int
2614xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
2615 if ((obj == NULL) || (node == NULL) || (indx == NULL))
2616 return(-1);
2617
2618 switch (obj->type) {
2619 case XPATH_POINT:
2620 *node = obj->user;
2621 if (obj->index <= 0)
2622 *indx = 0;
2623 else
2624 *indx = obj->index;
2625 return(0);
2626 case XPATH_RANGE:
2627 *node = obj->user;
2628 if (obj->index <= 0)
2629 *indx = 0;
2630 else
2631 *indx = obj->index;
2632 return(0);
2633 default:
2634 break;
2635 }
2636 return(-1);
2637}
2638
2639/**
2640 * xmlXPtrStringRangeFunction:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected