MCPcopy Create free account
hub / github.com/Kitware/CMake / entityValueProcessor

Function entityValueProcessor

Utilities/cmexpat/lib/xmlparse.c:5140–5174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5138}
5139
5140static enum XML_Error PTRCALL
5141entityValueProcessor(XML_Parser parser, const char *s, const char *end,
5142 const char **nextPtr) {
5143 const char *start = s;
5144 const char *next = s;
5145 const ENCODING *enc = parser->m_encoding;
5146 int tok;
5147
5148 for (;;) {
5149 tok = XmlPrologTok(enc, start, end, &next);
5150 /* Note: These bytes are accounted later in:
5151 - storeEntityValue
5152 */
5153 if (tok <= 0) {
5154 if (! parser->m_parsingStatus.finalBuffer && tok != XML_TOK_INVALID) {
5155 *nextPtr = s;
5156 return XML_ERROR_NONE;
5157 }
5158 switch (tok) {
5159 case XML_TOK_INVALID:
5160 return XML_ERROR_INVALID_TOKEN;
5161 case XML_TOK_PARTIAL:
5162 return XML_ERROR_UNCLOSED_TOKEN;
5163 case XML_TOK_PARTIAL_CHAR:
5164 return XML_ERROR_PARTIAL_CHAR;
5165 case XML_TOK_NONE: /* start == end */
5166 default:
5167 break;
5168 }
5169 /* found end of entity value - can store it now */
5170 return storeEntityValue(parser, enc, s, end, XML_ACCOUNT_DIRECT, NULL);
5171 }
5172 start = next;
5173 }
5174}
5175
5176#endif /* XML_DTD */
5177

Callers 1

entityValueInitProcessorFunction · 0.85

Calls 1

storeEntityValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…