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

Function xmlPatternMinDepth

ThirdParty/libxml2/vtklibxml2/pattern.c:2525–2540  ·  view source on GitHub ↗

* xmlPatternMinDepth: * @comp: the precompiled pattern * * Check the minimum depth reachable by a pattern, 0 mean the / or . are * part of the set. * * Returns -1 in case of error otherwise the depth, * */

Source from the content-addressed store, hash-verified

2523 *
2524 */
2525int
2526xmlPatternMinDepth(xmlPatternPtr comp) {
2527 int ret = 12345678;
2528 if (comp == NULL)
2529 return(-1);
2530 while (comp != NULL) {
2531 if (comp->stream == NULL)
2532 return(-1);
2533 if (comp->stream->nbStep < ret)
2534 ret = comp->stream->nbStep;
2535 if (ret == 0)
2536 return(0);
2537 comp = comp->next;
2538 }
2539 return(ret);
2540}
2541
2542/**
2543 * xmlPatternFromRoot:

Callers 1

xmlXPathRunStreamEvalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected