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

Function xmlRegAtomPush

ThirdParty/libxml2/vtklibxml2/xmlregexp.c:1239–1260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1237}
1238
1239static int
1240xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
1241 if (atom == NULL) {
1242 ERROR("atom push: atom is NULL");
1243 return(-1);
1244 }
1245 if (ctxt->nbAtoms >= ctxt->maxAtoms) {
1246 size_t newSize = ctxt->maxAtoms ? ctxt->maxAtoms * 2 : 4;
1247 xmlRegAtomPtr *tmp;
1248
1249 tmp = xmlRealloc(ctxt->atoms, newSize * sizeof(xmlRegAtomPtr));
1250 if (tmp == NULL) {
1251 xmlRegexpErrMemory(ctxt);
1252 return(-1);
1253 }
1254 ctxt->atoms = tmp;
1255 ctxt->maxAtoms = newSize;
1256 }
1257 atom->no = ctxt->nbAtoms;
1258 ctxt->atoms[ctxt->nbAtoms++] = atom;
1259 return(0);
1260}
1261
1262static void
1263xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,

Callers 5

xmlFAGenerateTransitionsFunction · 0.85
xmlAutomataNewCountTransFunction · 0.85
xmlAutomataNewOnceTrans2Function · 0.85
xmlAutomataNewOnceTransFunction · 0.85

Calls 1

xmlRegexpErrMemoryFunction · 0.85

Tested by

no test coverage detected