From 02bd5bbfcb410bba129e86584f8d755439a1ff92 Mon Sep 17 00:00:00 2001 From: Arthur David Olson Date: Thu, 25 Dec 1986 18:05:25 -0500 Subject: [PATCH] split alloc.c into ialloc.c and ealloc.c SCCS-file: ialloc.c SCCS-SID: 7.10 --- ialloc.c | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/ialloc.c b/ialloc.c index c0c4d64..d66d345 100644 --- a/ialloc.c +++ b/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); -}