ack/lang/basic/lib/salloc.c

19 lines
214 B
C
Raw Normal View History

#include <stdlib.h>
1984-11-29 14:22:02 +00:00
char * salloc(length)
unsigned length;
1984-11-29 14:22:02 +00:00
{
char *c, *s;
1985-01-21 12:35:53 +00:00
c= malloc(length);
if( !c ) error(5);
1984-11-29 14:22:02 +00:00
for(s=c;s<c+length;s++) *s = 0;
return(c);
}
sfree(c)
char *c;
{
1985-01-21 12:35:53 +00:00
if( !c ) return;
1984-11-29 14:22:02 +00:00
free(c);
}