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

Function xmlXPtrGetStartPoint

ThirdParty/libxml2/vtklibxml2/xpointer.c:2577–2601  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

2575 * Returns -1 in case of failure, 0 otherwise
2576 */
2577static int
2578xmlXPtrGetStartPoint(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:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected