diff options
author | Stu Grossman <grossman@cygnus> | 1991-11-19 23:37:53 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1991-11-19 23:37:53 +0000 |
commit | b936814f58c99d69432f0f08e099087d0767f3d4 (patch) | |
tree | 93af31d865390d2dab78652354569570ceedb75a | |
parent | 6df61f79578f02667a8d493371f81844b30d9f0e (diff) | |
download | gdb-b936814f58c99d69432f0f08e099087d0767f3d4.zip gdb-b936814f58c99d69432f0f08e099087d0767f3d4.tar.gz gdb-b936814f58c99d69432f0f08e099087d0767f3d4.tar.bz2 |
Integrate new readline from Brian Fox.
-rw-r--r-- | readline/keymaps.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/readline/keymaps.c b/readline/keymaps.c index b7c79ce..e4c3884 100644 --- a/readline/keymaps.c +++ b/readline/keymaps.c @@ -27,12 +27,12 @@ #endif /* Remove these declarations when we have a complete libgnu.a. */ -#define STATIC_MALLOC -#ifndef STATIC_MALLOC +/* #define STATIC_MALLOC */ +#if !defined (STATIC_MALLOC) extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); -#endif +#endif /* STATIC_MALLOC */ /* **************************************************************** */ /* */ @@ -86,8 +86,7 @@ rl_copy_keymap (map) Keymap rl_make_keymap () { - extern rl_insert (), rl_rubout (), rl_do_lowercase_version (); - extern rl_digit_argument (); + extern rl_insert (), rl_rubout (); register int i; Keymap newmap; @@ -99,6 +98,7 @@ rl_make_keymap () newmap[TAB].function = rl_insert; newmap[RUBOUT].function = rl_rubout; + newmap[CTRL('H')].function = rl_rubout; return (newmap); } @@ -156,7 +156,12 @@ xrealloc (pointer, bytes) char *pointer; int bytes; { - char *temp = (char *)realloc (pointer, bytes); + char *temp; + + if (!pointer) + temp = (char *)malloc (bytes); + else + temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); |