/* ealloc.c -- allocate memory, die if error * * unsigned size; * char *space; * space = ealloc(size); * * ealloc allocates memory just like the library routine malloc, * except that if there is no memory, ealloc executes error("no * memory"). */ #include char *malloc(); char * ealloc(s) unsigned s; { register char *a; if (NULL == (a = malloc(s))) error("no memory"); return(a); }