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

Function htmlParseHTMLName_nonInvasive

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:2487–2509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2485 */
2486
2487static const xmlChar *
2488htmlParseHTMLName_nonInvasive(htmlParserCtxtPtr ctxt) {
2489 int i = 0;
2490 xmlChar loc[HTML_PARSER_BUFFER_SIZE];
2491 const xmlChar *ret;
2492
2493 if (!IS_ASCII_LETTER(NXT(1)) && (NXT(1) != '_') &&
2494 (NXT(1) != ':')) return(NULL);
2495
2496 while ((i < HTML_PARSER_BUFFER_SIZE) &&
2497 ((IS_ASCII_LETTER(NXT(1+i))) || (IS_ASCII_DIGIT(NXT(1+i))) ||
2498 (NXT(1+i) == ':') || (NXT(1+i) == '-') || (NXT(1+i) == '_'))) {
2499 if ((NXT(1+i) >= 'A') && (NXT(1+i) <= 'Z')) loc[i] = NXT(1+i) + 0x20;
2500 else loc[i] = NXT(1+i);
2501 i++;
2502 }
2503
2504 ret = xmlDictLookup(ctxt->dict, loc, i);
2505 if (ret == NULL)
2506 htmlErrMemory(ctxt);
2507
2508 return(ret);
2509}
2510
2511
2512/**

Callers 2

htmlParseContentFunction · 0.85
htmlParseContentInternalFunction · 0.85

Calls 2

xmlDictLookupFunction · 0.85
htmlErrMemoryFunction · 0.85

Tested by

no test coverage detected