2013-05-14 15:11:29 +00:00
|
|
|
#include <stdlib.h>
|
1984-11-29 14:22:02 +00:00
|
|
|
|
|
|
|
char * salloc(length)
|
1985-01-21 23:54:46 +00:00
|
|
|
unsigned length;
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
|
|
|
char *c, *s;
|
1985-01-21 12:35:53 +00:00
|
|
|
c= malloc(length);
|
1985-01-21 23:54:46 +00:00
|
|
|
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);
|
|
|
|
}
|