i-bash/lib/readline/xmalloc.h

46 lines
1.3 KiB
C
Raw Normal View History

2000-03-17 21:46:59 +00:00
/* xmalloc.h -- memory allocation that aborts on errors. */
2009-01-12 13:36:28 +00:00
/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
2000-03-17 21:46:59 +00:00
2009-01-12 13:36:28 +00:00
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
2000-03-17 21:46:59 +00:00
2009-01-12 13:36:28 +00:00
Readline is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
2000-03-17 21:46:59 +00:00
(at your option) any later version.
2009-01-12 13:36:28 +00:00
Readline is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2000-03-17 21:46:59 +00:00
GNU General Public License for more details.
2009-01-12 13:36:28 +00:00
You should have received a copy of the GNU General Public License
along with Readline. If not, see <http://www.gnu.org/licenses/>.
*/
2000-03-17 21:46:59 +00:00
#if !defined (_XMALLOC_H_)
#define _XMALLOC_H_
#if defined (READLINE_LIBRARY)
# include "rlstdc.h"
#else
# include <readline/rlstdc.h>
#endif
#ifndef PTR_T
#ifdef __STDC__
# define PTR_T void *
#else
# define PTR_T char *
#endif
#endif /* !PTR_T */
2001-11-13 17:56:06 +00:00
extern PTR_T xmalloc PARAMS((size_t));
extern PTR_T xrealloc PARAMS((void *, size_t));
extern void xfree PARAMS((void *));
2000-03-17 21:46:59 +00:00
#endif /* _XMALLOC_H_ */