2000-07-09 18:21:23 +02:00
|
|
|
/* xmalloc.h -- memory allocation that aborts on errors. */
|
|
|
|
|
2011-05-12 01:38:44 +02:00
|
|
|
/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
|
2000-07-09 18:21:23 +02:00
|
|
|
|
2011-05-12 01:38:44 +02: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-07-09 18:21:23 +02:00
|
|
|
|
2011-05-12 01:38:44 +02: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-07-09 18:21:23 +02:00
|
|
|
(at your option) any later version.
|
|
|
|
|
2011-05-12 01:38:44 +02: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-07-09 18:21:23 +02:00
|
|
|
GNU General Public License for more details.
|
|
|
|
|
2011-05-12 01:38:44 +02: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-07-09 18:21:23 +02: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 */
|
|
|
|
|
2011-06-29 22:51:10 +02:00
|
|
|
/* xmalloc and xrealloc should be also protected from RL_STATE_SIGHANDLER. */
|
|
|
|
#define xfree xfree_readline
|
|
|
|
|
Import of readline 4.3.
Non-readline modified files:
src/gdb/ChangeLog src/gdb/defs.h src/gdb/cli/cli-cmds.c
src/gdb/cli/cli-setshow.c src/gdb/tui/ChangeLog
src/gdb/tui/tuiWin.c
In readline directory:
* compat.c, mbutil.c, misc.c, rlmbutil.h, rltypedefs.h,
text.c, doc/history.0, doc/history.3, support/wcwidth.c,
examples/readlinebuf.h, examples/rlcat.c: New files.
* CHANGELOG, CHANGES, INSTALL, MANIFEST, Makefile.in, README,
aclocal.m4, ansi_stdlib.h, bind.c, callback.c, chardefs.h,
complete.c, config.h.in, configure, configure.in, display.c,
emacs_keymap.c, funmap.c, histexpand.c, histfile.c, histlib.h,
history.c, history.h, histsearch.c, input.c, isearch.c,
keymaps.c, keymaps.h, kill.c, macro.c, nls.c, parens.c,
posixdir.h, readline.c, readline.h, rlconf.h, rldefs.h,
rlprivate.h, rlshell.h, rlstdc.h, rltty.c, savestring.c,
search.c, shell.c, signals.c, terminal.c, tilde.c, tilde.h,
undo.c, util.c, vi_keymap.c, vi_mode.c, xmalloc.c, xmalloc.h,
doc/Makefile.in, doc/hist.texinfo, doc/hstech.texinfo,
doc/hsuser.texinfo, doc/manvers.texinfo, doc/readline.3,
doc/rlman.texinfo, doc/rltech.texinfo, doc/rluser.texinfo
doc/rluserman.texinfo, doc/texi2dvi, doc/texi2html,
shlib/Makefile.in, support/install.sh, support/mkdirs,
support/mkdist, support/shlib-install, support/shobj-conf,
examples/Inputrc, examples/Makefile.in, examples/fileman.c,
examples/histexamp.c, examples/manexamp.c, examples/rl.c,
examples/rlfe.c, examples/rltest.c, examples/rlversion.c:
Modified files.
2002-12-08 23:31:39 +01:00
|
|
|
extern PTR_T xmalloc PARAMS((size_t));
|
|
|
|
extern PTR_T xrealloc PARAMS((void *, size_t));
|
|
|
|
extern void xfree PARAMS((void *));
|
2000-07-09 18:21:23 +02:00
|
|
|
|
|
|
|
#endif /* _XMALLOC_H_ */
|