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

Function xmlParseNameAndCompare

ThirdParty/libxml2/vtklibxml2/parser.c:3527–3553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3525 */
3526
3527static const xmlChar *
3528xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
3529 register const xmlChar *cmp = other;
3530 register const xmlChar *in;
3531 const xmlChar *ret;
3532
3533 GROW;
3534
3535 in = ctxt->input->cur;
3536 while (*in != 0 && *in == *cmp) {
3537 ++in;
3538 ++cmp;
3539 }
3540 if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
3541 /* success */
3542 ctxt->input->col += in - ctxt->input->cur;
3543 ctxt->input->cur = in;
3544 return (const xmlChar*) 1;
3545 }
3546 /* failure (or end of input buffer), check with full function */
3547 ret = xmlParseName (ctxt);
3548 /* strings coming from the dictionary direct compare possible */
3549 if (ret == other) {
3550 return (const xmlChar*) 1;
3551 }
3552 return ret;
3553}
3554
3555/**
3556 * xmlParseStringName:

Callers 3

xmlParseEndTag1Function · 0.85
xmlParseQNameAndCompareFunction · 0.85
xmlParseEndTag2Function · 0.85

Calls 1

xmlParseNameFunction · 0.85

Tested by

no test coverage detected