* xmlPatternFromRoot: * @comp: the precompiled pattern * * Check if the pattern must be looked at from the root. * * Returns 1 if true, 0 if false and -1 in case of error */
| 2548 | * Returns 1 if true, 0 if false and -1 in case of error |
| 2549 | */ |
| 2550 | int |
| 2551 | xmlPatternFromRoot(xmlPatternPtr comp) { |
| 2552 | if (comp == NULL) |
| 2553 | return(-1); |
| 2554 | while (comp != NULL) { |
| 2555 | if (comp->stream == NULL) |
| 2556 | return(-1); |
| 2557 | if (comp->flags & PAT_FROM_ROOT) |
| 2558 | return(1); |
| 2559 | comp = comp->next; |
| 2560 | } |
| 2561 | return(0); |
| 2562 | |
| 2563 | } |
| 2564 | |
| 2565 | #endif /* LIBXML_PATTERN_ENABLED */ |
no outgoing calls
no test coverage detected