1 // Copyright (C) 1992-1998 by Michael K. Johnson, johnsonm@redhat.com
2 // Copyright 2002 Albert Cahalan
4 // This file is placed under the conditions of the GNU Library
5 // General Public License, version 2, or any later version.
6 // See file COPYING for information on distribution conditions.
12 void *xcalloc(void *pointer, int size) {
16 if (!(ret = calloc(1, size))) {
17 fprintf(stderr, "xcalloc: allocation error, size = %d\n", size);
23 void *xmalloc(unsigned int size) {
30 fprintf(stderr, "xmalloc: malloc(%d) failed", size);
37 void *xrealloc(void *oldp, unsigned int size) {
42 p = realloc(oldp, size);
44 fprintf(stderr, "xrealloc: realloc(%d) failed", size);