00001 /* xmalloc.h -- memory allocation that aborts on errors. */ 00002 00003 /* Copyright (C) 1999 Free Software Foundation, Inc. 00004 00005 This file is part of the GNU Readline Library, a library for 00006 reading lines of text with interactive input and history editing. 00007 00008 The GNU Readline Library is free software; you can redistribute it 00009 and/or modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2, or 00011 (at your option) any later version. 00012 00013 The GNU Readline Library is distributed in the hope that it will be 00014 useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00015 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 The GNU General Public License is often shipped with GNU software, and 00019 is generally kept in a file called COPYING or LICENSE. If you do not 00020 have a copy of the license, write to the Free Software Foundation, 00021 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ 00022 00023 #if !defined (_XMALLOC_H_) 00024 #define _XMALLOC_H_ 00025 00026 #include "rlstdc.h" 00027 00028 #ifndef PTR_T 00029 00030 #ifdef __STDC__ 00031 # define PTR_T void * 00032 #else 00033 # define PTR_T char * 00034 #endif 00035 00036 #endif /* !PTR_T */ 00037 00038 extern PTR_T xmalloc PARAMS((size_t)); 00039 extern PTR_T xrealloc PARAMS((void *, size_t)); 00040 extern void xfree PARAMS((void *)); 00041 00042 #endif /* _XMALLOC_H_ */