/* * Copyright © 1993-1999 Marc Baudoin * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby * granted, provided that the above copyright notice appear in all * copies and that both that copyright notice and this permission * notice appear in supporting documentation. The author makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. * */ static char *const cvsid = "$Id: util.c,v 1.1.1.1.2.1 1999/07/29 21:25:32 babafou Exp $" ; #include #include #include #include /* ------------------------------------------------------------------------- */ void *xmalloc ( size_t size ) { void *ptr ; ptr = malloc ( size ) ; if ( ptr == NULL ) { fprintf ( stderr , "Can't allocate memory.\n" ) ; exit ( EX_SOFTWARE ) ; } return ptr ; }