/*
 * dml - Dialog Markup Language
 *
 * $Id: xalloc.c,v 1.2 2002/07/29 13:07:05 malekith Exp $
 * Author: Michal Moskal <malekith@pld-linux.org>
 * include COPYING-GNU
 */

#include "pi.h"
#include <stdlib.h>

void *xmalloc(int size)
{
	void *r;

	r = malloc(size);
	if (r == 0)
		pi_die("out of memory");
	return r;
}

void xfree(void *p)
{
	free(p);
}

void *xrealloc(void *ptr, int s)
{
	void *r;

	r = realloc(ptr, s);
	if (r == 0)
		pi_die("out of memory");

	return r;
}
