* xmlXPtrGetStartPoint: * @obj: an range * @node: the resulting node * @indx: the resulting index * * read the object and return the start point coordinates. * * Returns -1 in case of failure, 0 otherwise */
| 2575 | * Returns -1 in case of failure, 0 otherwise |
| 2576 | */ |
| 2577 | static int |
| 2578 | xmlXPtrGetStartPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) { |
| 2579 | if ((obj == NULL) || (node == NULL) || (indx == NULL)) |
| 2580 | return(-1); |
| 2581 | |
| 2582 | switch (obj->type) { |
| 2583 | case XPATH_POINT: |
| 2584 | *node = obj->user; |
| 2585 | if (obj->index <= 0) |
| 2586 | *indx = 0; |
| 2587 | else |
| 2588 | *indx = obj->index; |
| 2589 | return(0); |
| 2590 | case XPATH_RANGE: |
| 2591 | *node = obj->user; |
| 2592 | if (obj->index <= 0) |
| 2593 | *indx = 0; |
| 2594 | else |
| 2595 | *indx = obj->index; |
| 2596 | return(0); |
| 2597 | default: |
| 2598 | break; |
| 2599 | } |
| 2600 | return(-1); |
| 2601 | } |
| 2602 | |
| 2603 | /** |
| 2604 | * xmlXPtrGetEndPoint: |
no outgoing calls
no test coverage detected