Subversion Repositories filter_foundry

Compare Revisions

Regard whitespace Rev 243 → Rev 244

/trunk/main.c
97,9 → 97,12
 
// Register "gdata" that contains the PARM information and other things which need to be persistant
// TODO: memory leak? where is the stuff freed?
/*
if ((pb->sSPBasic == 0) ||
(pb->sSPBasic->AcquireSuite(kPSBufferSuite, kPSBufferSuiteVersion1, (const void**)&pSBufferSuite32)) ||
(pSBufferSuite32 == NULL))
*/
if (true) // TODO: we cannot use the new buffer suite, because we require the behavior of the deprecated buffer suite that it will always give use the same address of memory, which we use for gdata!
{
// Old deprecated buffer suite
BufferID tempId;
120,12 → 123,12
// Side note: pb->bufferSpace64/pb->maxSpace64 was documented in SDK CC 2017.
// pb->bufferProcs->allocateProc64/spaceProc64 was documented in SDK CS 6.
unsigned32 siz = sizeof(globals_t);
Ptr data = pSBufferSuite32->New(&siz, siz);
if ((data == NULL) || (siz == 0)) {
Ptr data2 = pSBufferSuite32->New(&siz, siz);
if ((data2 == NULL) || (siz == 0)) {
*result = errPlugInHostInsufficient; // TODO: what is the correct error code for "out of memory"?
return;
}
gdata = (globals_t*)data;
gdata = (globals_t*)data2;
pb->sSPBasic->ReleaseSuite(kPSBufferSuite, kPSBufferSuiteVersion1);
}
gdata->standalone = gdata->parmloaded = false;