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

Function doProlog

Utilities/cmexpat/lib/xmlparse.c:5188–6259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5186}
5187
5188static enum XML_Error
5189doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
5190 int tok, const char *next, const char **nextPtr, XML_Bool haveMore,
5191 XML_Bool allowClosingDoctype, enum XML_Account account) {
5192#ifdef XML_DTD
5193 static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
5194#endif /* XML_DTD */
5195 static const XML_Char atypeCDATA[]
5196 = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
5197 static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
5198 static const XML_Char atypeIDREF[]
5199 = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
5200 static const XML_Char atypeIDREFS[]
5201 = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
5202 static const XML_Char atypeENTITY[]
5203 = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
5204 static const XML_Char atypeENTITIES[]
5205 = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
5206 ASCII_I, ASCII_E, ASCII_S, '\0'};
5207 static const XML_Char atypeNMTOKEN[]
5208 = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
5209 static const XML_Char atypeNMTOKENS[]
5210 = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
5211 ASCII_E, ASCII_N, ASCII_S, '\0'};
5212 static const XML_Char notationPrefix[]
5213 = {ASCII_N, ASCII_O, ASCII_T, ASCII_A, ASCII_T,
5214 ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
5215 static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
5216 static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
5217
5218#ifndef XML_DTD
5219 UNUSED_P(account);
5220#endif
5221
5222 /* save one level of indirection */
5223 DTD *const dtd = parser->m_dtd;
5224
5225 const char **eventPP;
5226 const char **eventEndPP;
5227 enum XML_Content_Quant quant;
5228
5229 if (enc == parser->m_encoding) {
5230 eventPP = &parser->m_eventPtr;
5231 eventEndPP = &parser->m_eventEndPtr;
5232 } else {
5233 eventPP = &(parser->m_openInternalEntities->internalEventPtr);
5234 eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
5235 }
5236
5237 for (;;) {
5238 int role;
5239 XML_Bool handleDefault = XML_TRUE;
5240 *eventPP = s;
5241 *eventEndPP = next;
5242 if (tok <= 0) {
5243 if (haveMore && tok != XML_TOK_INVALID) {
5244 *nextPtr = s;
5245 return XML_ERROR_NONE;

Callers 3

externalParEntProcessorFunction · 0.85
prologProcessorFunction · 0.85
internalEntityProcessorFunction · 0.85

Calls 15

accountingDiffToleratedFunction · 0.85
accountingOnAbortFunction · 0.85
processXmlDeclFunction · 0.85
poolStoreStringFunction · 0.85
poolClearFunction · 0.85
normalizePublicIdFunction · 0.85
contentProcessorFunction · 0.85
getElementTypeFunction · 0.85
getAttributeIdFunction · 0.85
poolAppendStringFunction · 0.85
poolAppendFunction · 0.85
defineAttributeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…