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

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

UpdateBlk(aHndl, theSize)
long *aHndl;
int theSize;

updates info in header of data block. Occurs whenever a new blk is
created or moved.

calling params:
hndl to data blk
size of blk, for nu blk | -1, for updating existing blk

return params:
err | noErr
Author: Byro
Creation: 01/10/91
Modified: 01/21/91


dataStruct *aBlkPtr = NIL;
unsigned long myTemp; /* used 2 avoid errs during computing adrses */

if (*aHndl == NIL)

aBlkPtr = (dataStruct *) *aHndl;

if (theSize != MINUS_ONE) /* set size field if nu blk */
aBlkPtr->blkSize = theSize;

/* compute nu adrs */

myTemp = (unsigned long) aBlkPtr + HDR;
aBlkPtr->dataSpace = (long *) myTemp;


  3 Responses to “Category : C Source Code
Archive   : HEAPMAN.ZIP
Filename : UPDATEBL.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: