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

Function xmlRegGetCounter

ThirdParty/libxml2/vtklibxml2/xmlregexp.c:1211–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1209}
1210
1211static int
1212xmlRegGetCounter(xmlRegParserCtxtPtr ctxt) {
1213 if (ctxt->maxCounters == 0) {
1214 ctxt->maxCounters = 4;
1215 ctxt->counters = (xmlRegCounter *) xmlMalloc(ctxt->maxCounters *
1216 sizeof(xmlRegCounter));
1217 if (ctxt->counters == NULL) {
1218 xmlRegexpErrMemory(ctxt);
1219 ctxt->maxCounters = 0;
1220 return(-1);
1221 }
1222 } else if (ctxt->nbCounters >= ctxt->maxCounters) {
1223 xmlRegCounter *tmp;
1224 ctxt->maxCounters *= 2;
1225 tmp = (xmlRegCounter *) xmlRealloc(ctxt->counters, ctxt->maxCounters *
1226 sizeof(xmlRegCounter));
1227 if (tmp == NULL) {
1228 xmlRegexpErrMemory(ctxt);
1229 ctxt->maxCounters /= 2;
1230 return(-1);
1231 }
1232 ctxt->counters = tmp;
1233 }
1234 ctxt->counters[ctxt->nbCounters].min = -1;
1235 ctxt->counters[ctxt->nbCounters].max = -1;
1236 return(ctxt->nbCounters++);
1237}
1238
1239static int
1240xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {

Callers 6

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

Calls 1

xmlRegexpErrMemoryFunction · 0.85

Tested by

no test coverage detected