* 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 */
| 2611 | * Returns -1 in case of failure, 0 otherwise |
| 2612 | */ |
| 2613 | static int |
| 2614 | xmlXPtrGetEndPoint(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: |
no outgoing calls
no test coverage detected