ack/lang/basic/lib/salloc.c
David Given d5f0107746 Build the Basic run-time library (after some modernisation).
--HG--
branch : dtrg-buildsystem
2013-05-14 16:11:29 +01:00

19 lines
214 B
C

#include <stdlib.h>
char * salloc(length)
unsigned length;
{
char *c, *s;
c= malloc(length);
if( !c ) error(5);
for(s=c;s<c+length;s++) *s = 0;
return(c);
}
sfree(c)
char *c;
{
if( !c ) return;
free(c);
}