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

Function xmlRegStateAddTransTo

ThirdParty/libxml2/vtklibxml2/xmlregexp.c:1262–1288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260}
1261
1262static void
1263xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,
1264 int from) {
1265 if (target->maxTransTo == 0) {
1266 target->maxTransTo = 8;
1267 target->transTo = (int *) xmlMalloc(target->maxTransTo *
1268 sizeof(int));
1269 if (target->transTo == NULL) {
1270 xmlRegexpErrMemory(ctxt);
1271 target->maxTransTo = 0;
1272 return;
1273 }
1274 } else if (target->nbTransTo >= target->maxTransTo) {
1275 int *tmp;
1276 target->maxTransTo *= 2;
1277 tmp = (int *) xmlRealloc(target->transTo, target->maxTransTo *
1278 sizeof(int));
1279 if (tmp == NULL) {
1280 xmlRegexpErrMemory(ctxt);
1281 target->maxTransTo /= 2;
1282 return;
1283 }
1284 target->transTo = tmp;
1285 }
1286 target->transTo[target->nbTransTo] = from;
1287 target->nbTransTo++;
1288}
1289
1290static void
1291xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,

Callers 1

xmlRegStateAddTransFunction · 0.85

Calls 1

xmlRegexpErrMemoryFunction · 0.85

Tested by

no test coverage detected