MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / FEnsureParVar

Function FEnsureParVar

express.cpp:2587–2604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2585// variable array, reallocating if needed.
2586
2587flag FEnsureParVar(int cparNew)
2588{
2589 PAR *pparT;
2590
2591 if (cparNew <= xi.cparVar)
2592 return fTrue;
2593
2594 if (cparNew <= cLetter)
2595 cparNew = cLetter + 1;
2596 pparT = (PAR *)RgReallocate(xi.rgparVar, xi.cparVar, sizeof(PAR), cparNew,
2597 "variable list");
2598 if (pparT == NULL)
2599 return fFalse;
2600 DeallocatePIf(xi.rgparVar);
2601 xi.rgparVar = pparT;
2602 xi.cparVar = cparNew;
2603 return fTrue;
2604}
2605
2606
2607// Ensure there are at least the given number of slots available in the

Callers 4

FEvalFunctionFunction · 0.85
PchGetParameterFunction · 0.85
ExpSetNFunction · 0.85
ExpSetRFunction · 0.85

Calls 1

RgReallocateFunction · 0.85

Tested by

no test coverage detected