ack/lang/basic/lib/salloc.c

21 lines
241 B
C
Raw Normal View History

1985-01-21 12:35:53 +00:00
/* $Header$ */
extern char *malloc() ;
1984-11-29 14:22:02 +00:00
char * salloc(length)
int length;
{
char *c, *s;
1985-01-21 12:35:53 +00:00
c= malloc(length);
1984-11-29 14:22:02 +00:00
if( c== (char *) -1) error(5);
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);
}