mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-22 14:30:24 +00:00
1 line
580 B
C
Executable File
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));
|
|
}
|