exit mem_realloc, enters p_realloc/xrealloc.
[apps/madmutt.git] / lib / mem.c
diff --git a/lib/mem.c b/lib/mem.c
deleted file mode 100644 (file)
index df2e2ed..0000000
--- a/lib/mem.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-
-#include <stdlib.h>
-
-#include "mem.h"
-#include "exit.h"
-#include "intl.h"
-
-void _mem_realloc (void *ptr, size_t siz, int line, const char* fname) {
-  void *r;
-  void **p = (void **) ptr;
-
-  if (siz == 0) {
-    if (*p) {
-      free (*p);                /* __MEM_CHECKED__ */
-      *p = NULL;
-    }
-    return;
-  }
-
-  if (*p)
-    r = (void *) realloc (*p, siz);     /* __MEM_CHECKED__ */
-  else {
-    /* realloc(NULL, nbytes) doesn't seem to work under SunOS 4.1.x  --- __MEM_CHECKED__ */
-    r = (void *) malloc (siz);  /* __MEM_CHECKED__ */
-  }
-
-  if (!r)
-    exit_fatal ("mem_realloc", _("Out of memory!"), line, fname, 1);
-
-  *p = r;
-}