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

Function xmlPatScanNCName

ThirdParty/libxml2/vtklibxml2/pattern.c:835–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833 */
834
835static xmlChar *
836xmlPatScanNCName(xmlPatParserContextPtr ctxt) {
837 const xmlChar *q, *cur;
838 xmlChar *ret = NULL;
839 int val, len;
840
841 SKIP_BLANKS;
842
843 cur = q = CUR_PTR;
844 val = xmlStringCurrentChar(NULL, cur, &len);
845 if (!IS_LETTER(val) && (val != '_'))
846 return(NULL);
847
848 while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
849 (val == '.') || (val == '-') ||
850 (val == '_') ||
851 (IS_COMBINING(val)) ||
852 (IS_EXTENDER(val))) {
853 cur += len;
854 val = xmlStringCurrentChar(NULL, cur, &len);
855 }
856 if (ctxt->dict)
857 ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
858 else
859 ret = xmlStrndup(q, cur - q);
860 if (ret == NULL)
861 ctxt->error = -1;
862 CUR_PTR = cur;
863 return(ret);
864}
865
866#if 0
867/**

Callers 3

xmlPatScanQNameFunction · 0.85
xmlCompileAttributeTestFunction · 0.85
xmlCompileStepPatternFunction · 0.85

Calls 3

xmlStringCurrentCharFunction · 0.85
xmlDictLookupFunction · 0.85
xmlStrndupFunction · 0.85

Tested by

no test coverage detected