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

Function SzClone

general.cpp:3135–3150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3133// space and can't just be local variables in a function reading them in.
3134
3135char *SzClone(char *szSrc)
3136{
3137 char *szNew;
3138 int cb;
3139
3140 // Make a copy of the string and use it.
3141 cb = CchSz(szSrc)+1;
3142 szNew = (char *)PAllocate(cb, "string");
3143 if (szNew != NULL) {
3144 CopyRgb((pbyte)szSrc, (pbyte)szNew, cb);
3145 is.cAlloc--;
3146 is.cAllocTotal--;
3147 is.cbAllocSize -= cb;
3148 }
3149 return szNew;
3150}
3151
3152
3153// This is Astrolog's memory allocation routine, returning a pointer given

Callers 13

FProcessSwitchesFunction · 0.85
FProcessAAFFileFunction · 0.85
FProcessQuickFileFunction · 0.85
FProcessADBFileFunction · 0.85
FProcessSFTextFileFunction · 0.85
FProcessCalendarFileFunction · 0.85
FInputDataFunction · 0.85
PrintInDaysFunction · 0.85
ChartTransitSearchFunction · 0.85
ChartHorizonRisingFunction · 0.85
DlgInfoFunction · 0.85
DlgDefaultFunction · 0.85

Calls 3

CchSzFunction · 0.85
PAllocateFunction · 0.85
CopyRgbFunction · 0.85

Tested by

no test coverage detected