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

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

int aValue;

more masters expands the mpt by the number of elements specified
by aValue. For each inc of aValue the mpt is expanded by the
number of bytes specified by byte offset. A value of noErr is
returned if the function is able to expand the table. Otherwise,
an error is returned.

calling params:
# of elements to expand table by

return params:
err | noErr

side effects:
global variables gMPTsize & *gTableSizeCountAdrs
Author: Byro
Creation: 01/09/91
Modified: 01/30/91


int j; /* j holds 1st empty hndl, not needed here */
long nuSize;
unsigned long myTemp = ZERO;

extern long gMPTsize,

/* compute nu mpt's blk size in bytes */

nuSize = aValue * BYTE_OFFSET;

/* look for free space */

if (ComputeFree(nuSize, &j) != NO_ERR)
return(MORE_MASTERS); /* error */

/* clr nu eles */

myTemp = (unsigned long) gTableSizeCountAdrs + ((gMPTsize + 1) * BYTE_OFFSET);
ZeroStruct(myTemp, aValue * BYTE_OFFSET);

/* update mpt table count size and global mpt count variable */

gMPTsize += aValue;
*gTableSizeCountAdrs += aValue;


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