MCPcopy Create free account
hub / github.com/cuberite/cuberite / entityValueProcessor

Function entityValueProcessor

lib/expat/xmlparse.c:3592–3626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3590}
3591
3592static enum XML_Error PTRCALL
3593entityValueProcessor(XML_Parser parser,
3594 const char *s,
3595 const char *end,
3596 const char **nextPtr)
3597{
3598 const char *start = s;
3599 const char *next = s;
3600 const ENCODING *enc = encoding;
3601 int tok;
3602
3603 for (;;) {
3604 tok = XmlPrologTok(enc, start, end, &next);
3605 if (tok <= 0) {
3606 if (!ps_finalBuffer && tok != XML_TOK_INVALID) {
3607 *nextPtr = s;
3608 return XML_ERROR_NONE;
3609 }
3610 switch (tok) {
3611 case XML_TOK_INVALID:
3612 return XML_ERROR_INVALID_TOKEN;
3613 case XML_TOK_PARTIAL:
3614 return XML_ERROR_UNCLOSED_TOKEN;
3615 case XML_TOK_PARTIAL_CHAR:
3616 return XML_ERROR_PARTIAL_CHAR;
3617 case XML_TOK_NONE: /* start == end */
3618 default:
3619 break;
3620 }
3621 /* found end of entity value - can store it now */
3622 return storeEntityValue(parser, enc, s, end);
3623 }
3624 start = next;
3625 }
3626}
3627
3628#endif /* XML_DTD */
3629

Callers 1

entityValueInitProcessorFunction · 0.85

Calls 1

storeEntityValueFunction · 0.85

Tested by

no test coverage detected