mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-05-06 19:29:06 +00:00
split alloc.c into ialloc.c and ealloc.c
SCCS-file: ialloc.c SCCS-SID: 7.10
This commit is contained in:
committed by
Paul Eggert
parent
8f752fd403
commit
02bd5bbfcb
51
ialloc.c
51
ialloc.c
@@ -21,8 +21,8 @@ static char sccsid[] = "%W%";
|
||||
#define NULLMAL(x) ((x) == NULL)
|
||||
#endif
|
||||
|
||||
extern char * malloc();
|
||||
extern char * calloc();
|
||||
extern char * malloc();
|
||||
extern char * realloc();
|
||||
extern char * strcpy();
|
||||
|
||||
@@ -94,52 +94,3 @@ char * p;
|
||||
if (!NULLMAL(p))
|
||||
free(p);
|
||||
}
|
||||
|
||||
static char *
|
||||
check(pointer)
|
||||
char * pointer;
|
||||
{
|
||||
if (pointer == NULL)
|
||||
wildrexit("allocating memory");
|
||||
return pointer;
|
||||
}
|
||||
|
||||
char *
|
||||
emalloc(size)
|
||||
{
|
||||
return check(imalloc(size));
|
||||
}
|
||||
|
||||
char *
|
||||
ecalloc(nelem, elsize)
|
||||
{
|
||||
return check(icalloc(nelem, elsize));
|
||||
}
|
||||
|
||||
char *
|
||||
erealloc(ptr, size)
|
||||
char * ptr;
|
||||
{
|
||||
return check(irealloc(ptr, size));
|
||||
}
|
||||
|
||||
char *
|
||||
ecatalloc(old, new)
|
||||
char * old;
|
||||
char * new;
|
||||
{
|
||||
return check(icatalloc(old, new));
|
||||
}
|
||||
|
||||
char *
|
||||
ecpyalloc(string)
|
||||
char * string;
|
||||
{
|
||||
return check(icpyalloc(string));
|
||||
}
|
||||
|
||||
efree(p)
|
||||
char * p;
|
||||
{
|
||||
ifree(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user