aboutsummaryrefslogtreecommitdiffstats
path: root/lib/readline/keymaps.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1996-12-23 17:02:34 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:49 +0000
commitccc6cda312fea9f0468ee65b8f368e9653e1380b (patch)
treeb059878adcfd876c4acb8030deda1eeb918c7e75 /lib/readline/keymaps.c
parent726f63884db0132f01745f1fb4465e6621088ccf (diff)
downloadandroid_external_bash-ccc6cda312fea9f0468ee65b8f368e9653e1380b.tar.gz
android_external_bash-ccc6cda312fea9f0468ee65b8f368e9653e1380b.tar.bz2
android_external_bash-ccc6cda312fea9f0468ee65b8f368e9653e1380b.zip
Imported from ../bash-2.0.tar.gz.
Diffstat (limited to 'lib/readline/keymaps.c')
-rw-r--r--lib/readline/keymaps.c54
1 files changed, 2 insertions, 52 deletions
diff --git a/lib/readline/keymaps.c b/lib/readline/keymaps.c
index e1be552..9359749 100644
--- a/lib/readline/keymaps.c
+++ b/lib/readline/keymaps.c
@@ -21,7 +21,7 @@
#define READLINE_LIBRARY
#if defined (HAVE_CONFIG_H)
-# include "config.h"
+# include <config.h>
#endif
#if defined (HAVE_STDLIB_H)
@@ -41,11 +41,7 @@
extern int rl_do_lowercase_version ();
extern int rl_rubout (), rl_insert ();
-#if defined (STATIC_MALLOC)
-static char *xmalloc (), *xrealloc ();
-#else
extern char *xmalloc (), *xrealloc ();
-#endif /* STATIC_MALLOC */
/* **************************************************************** */
/* */
@@ -109,7 +105,7 @@ rl_make_keymap ()
newmap[i].function = rl_insert;
newmap[TAB].function = rl_insert;
- newmap[RUBOUT].function = rl_rubout;
+ newmap[RUBOUT].function = rl_rubout; /* RUBOUT == 127 */
newmap[CTRL('H')].function = rl_rubout;
#if KEYMAP_SIZE > 128
@@ -152,49 +148,3 @@ rl_discard_keymap (map)
}
}
}
-
-#if defined (STATIC_MALLOC)
-
-/* **************************************************************** */
-/* */
-/* xmalloc and xrealloc () */
-/* */
-/* **************************************************************** */
-
-static void memory_error_and_abort ();
-
-static char *
-xmalloc (bytes)
- int bytes;
-{
- char *temp = (char *)malloc (bytes);
-
- if (!temp)
- memory_error_and_abort ();
- return (temp);
-}
-
-static char *
-xrealloc (pointer, bytes)
- char *pointer;
- int bytes;
-{
- char *temp;
-
- if (!pointer)
- temp = (char *)malloc (bytes);
- else
- temp = (char *)realloc (pointer, bytes);
-
- if (!temp)
- memory_error_and_abort ();
- return (temp);
-}
-
-static void
-memory_error_and_abort ()
-{
- fprintf (stderr, "readline: Out of virtual memory!\n");
- abort ();
-}
-#endif /* STATIC_MALLOC */