1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
1985-01-21 12:35:53 +00:00
|
|
|
|
|
|
|
extern char *malloc() ;
|
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);
|
|
|
|
}
|