diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-06-28 14:50:30 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-06-28 14:50:30 +0000 |
commit | 4502f7c0f4c16106911e8758ee05d038385c9d1a (patch) | |
tree | db1a9c1c4836389f8ba217f08e32380946304027 /xmalloc.c | |
parent | c2f70e92a60dbfb176e92735a26a795d77203a0f (diff) | |
download | fetchmail-4502f7c0f4c16106911e8758ee05d038385c9d1a.tar.gz fetchmail-4502f7c0f4c16106911e8758ee05d038385c9d1a.tar.bz2 fetchmail-4502f7c0f4c16106911e8758ee05d038385c9d1a.zip |
Initial revision
svn path=/trunk/; revision=15
Diffstat (limited to 'xmalloc.c')
-rw-r--r-- | xmalloc.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/xmalloc.c b/xmalloc.c new file mode 100644 index 00000000..ffae9dd9 --- /dev/null +++ b/xmalloc.c @@ -0,0 +1,63 @@ +/* Copyright 1993-95 by Carl Harris, Jr. + * All rights reserved + * + * Distribute freely, except: don't remove my name from the source or + * documentation (don't take credit for my work), mark your changes (don't + * get me blamed for your possible bugs), don't alter or remove this + * notice. May be sold if buildable source is provided to buyer. No + * warrantee of any kind, express or implied, is included with this + * software; use at your own risk, responsibility for damages (if any) to + * anyone resulting from the use of this software rests entirely with the + * user. + * + * Send bug reports, bug fixes, enhancements, requests, flames, etc., and + * I'll try to keep a version up to date. I can be reached as follows: + * Carl Harris <ceharris@mal.com> + */ + +/*********************************************************************** + module: xmalloc.c + project: popclient + programmer: Carl Harris, ceharris@mal.com + description: malloc wrapper. + + $Log: xmalloc.c,v $ + Revision 1.1 1996/06/28 14:50:30 esr + Initial revision + + Revision 1.1 1995/08/09 01:33:08 ceharris + Version 3.0 beta 2 release. + Added + - .poprc functionality + - GNU long options + - multiple servers on the command line. + Fixed + - Passwords showing up in ps output. + + ***********************************************************************/ + + +#include <config.h> +#include <stdio.h> +#include <sys/types.h> +#include "popclient.h" + +#if defined(HAVE_VOIDPOINTER) +#define XMALLOCTYPE void +#else +#define XMALLOCTYPE char +#endif + +XMALLOCTYPE * +xmalloc (n) +size_t n; +{ + XMALLOCTYPE *p; + + p = (XMALLOCTYPE *) malloc(n); + if (p == (XMALLOCTYPE *) 0) { + fputs("malloc failed\n",stderr); + exit(PS_UNDEFINED); + } + return(p); +} |