1/************************************************************************
2 *	Some common routines to all programs but procmail		*
3 *									*
4 *	Copyright (c) 1993-1997, S.R. van den Berg, The Netherlands	*
5 *	#include "../README"						*
6 ************************************************************************/
7#ifdef RCS
8static /*const*/char rcsid[]=
9 "$Id: ecommon.c,v 1.10 1999/12/12 08:50:50 guenther Exp $";
10#endif
11#include "includes.h"
12#include "ecommon.h"
13
14void
15 nlog P((const char*const a));
16
17static const char outofmem[]="Out of memory\n";
18
19void*tmalloc(len)const size_t len;
20{ void*p;
21  if(p=malloc(len))
22     return p;
23  nlog(outofmem);exit(EX_OSERR);
24}
25
26void*trealloc(old,len)void*old;const size_t len;
27{ if(old=realloc(old,len))
28     return old;
29  nlog(outofmem);exit(EX_OSERR);
30}
31
32void tfree(a)void*a;
33{ free(a);
34}
35
36#include "shell.h"
37