antoine-source/appleworksgs/Spell/Src/ZALLOC.C
2023-03-04 03:45:20 +01:00

1 line
580 B
C
Executable File

/***********************************************************************\
Filename: zalloc.c
\***********************************************************************/
#include <prodos.h>
#include <memory.h>
#include "proxlib.h"
#include "driver.h"
char *zalloc(id, size)
int id;
unsigned size;
{
char **temp;
temp = (char **) D_NEEDHANDLEID((long) size, 0x4010, id);
asm { bcs bogus }
return *temp;
bogus:
return 0L;
}
/* free a pointer, but only if it is not null */
void nzfree(ptr)
char *ptr;
{
if (ptr)
DisposeHandle(FindHandle((char *) ptr));
}