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

Function htmlParseHTMLName

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:2448–2473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2446 */
2447
2448static const xmlChar *
2449htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
2450 const xmlChar *ret;
2451 int i = 0;
2452 xmlChar loc[HTML_PARSER_BUFFER_SIZE];
2453
2454 if (!IS_ASCII_LETTER(CUR) && (CUR != '_') &&
2455 (CUR != ':') && (CUR != '.')) return(NULL);
2456
2457 while ((i < HTML_PARSER_BUFFER_SIZE) &&
2458 ((IS_ASCII_LETTER(CUR)) || (IS_ASCII_DIGIT(CUR)) ||
2459 (CUR == ':') || (CUR == '-') || (CUR == '_') ||
2460 (CUR == '.'))) {
2461 if ((CUR >= 'A') && (CUR <= 'Z')) loc[i] = CUR + 0x20;
2462 else loc[i] = CUR;
2463 i++;
2464
2465 NEXT;
2466 }
2467
2468 ret = xmlDictLookup(ctxt->dict, loc, i);
2469 if (ret == NULL)
2470 htmlErrMemory(ctxt);
2471
2472 return(ret);
2473}
2474
2475
2476/**

Callers 3

htmlParseAttributeFunction · 0.85
htmlParseStartTagFunction · 0.85
htmlParseEndTagFunction · 0.85

Calls 2

xmlDictLookupFunction · 0.85
htmlErrMemoryFunction · 0.85

Tested by

no test coverage detected