Category : C Source Code
Archive   : HEAPMAN.ZIP
Filename : DISPOSEH.C

Output of file : DISPOSEH.C contained in archive : HEAPMAN.ZIP
#include "mm.h"

long *aPtr;

Deallocates address containing handle in mpt. Deallocation is
accomplished by clearing entries in the mpt and compacting the heap.
DisposeHndl returns an error if the handle is not in the mpt; otherwise,
it returns no err.

calling params:
ptr to mpt entry

return params:
err | noErr

Author: Byro
Creation: 02/04/91
Modified: 02/05/91

int i;
long *thisPtr = NIL;
unsigned long myTemp;

extern long gMPTsize,

/* look for mpt adrs */

for (i = 1; i <= gMPTsize; i++)
myTemp = (unsigned long ) gTableSizeCountAdrs + (i * BYTE_OFFSET);
thisPtr = (long *) myTemp;

if (thisPtr == aPtr) /* clr mpt element if found */
*aPtr = ZERO;
*aPtr = ZERO;

if (i > gMPTsize)


  3 Responses to “Category : C Source Code
Archive   : HEAPMAN.ZIP
Filename : DISPOSEH.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: