aboutsummaryrefslogtreecommitdiff
path: root/readline/misc.c
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2015-07-25 15:41:05 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2015-07-25 15:57:00 -0400
commit5836a818eccb180d75c92ce4c861abb6fe8dec23 (patch)
tree624044ca5df5a6c192e47933a735ab4fe9aaea71 /readline/misc.c
parentb8cc7b2e9afab37eb9a7cff0d3ae4ebbcf7d494f (diff)
downloadgdb-5836a818eccb180d75c92ce4c861abb6fe8dec23.zip
gdb-5836a818eccb180d75c92ce4c861abb6fe8dec23.tar.gz
gdb-5836a818eccb180d75c92ce4c861abb6fe8dec23.tar.bz2
Revert "Sync readline/ to version 7.0 alpha"
This reverts commit b558ff043d41ba8d17a82f5f9ae5f9dade66160e. This reverts commit 4a11f2065906976675808364ddbd1c0f77eea41f. The initial import commit failed to retain local changes made to readline's configure.in (and the commit message erroneously stated that there were no local changes that needed to be reapplied). Also the import caused a couple of build errors and a scattering of testsuite regressions throughout many arches. It's probably better to start over with this import, hopefully more carefully next time.
Diffstat (limited to 'readline/misc.c')
-rw-r--r--readline/misc.c41
1 files changed, 2 insertions, 39 deletions
diff --git a/readline/misc.c b/readline/misc.c
index a890cda..9f45773 100644
--- a/readline/misc.c
+++ b/readline/misc.c
@@ -1,6 +1,6 @@
/* misc.c -- miscellaneous bindable readline functions. */
-/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -56,8 +56,6 @@
static int rl_digit_loop PARAMS((void));
static void _rl_history_set_point PARAMS((void));
-extern int history_offset;
-
/* Forward declarations used in this file */
void _rl_free_history_entry PARAMS((HIST_ENTRY *));
@@ -461,7 +459,6 @@ _rl_revert_all_lines ()
saved_undo_list = 0;
/* Set up rl_line_buffer and other variables from history entry */
rl_replace_from_history (entry, 0); /* entry->line is now current */
- entry->data = 0; /* entry->data is now current undo list */
/* Undo all changes to this history entry */
while (rl_undo_list)
rl_do_undo ();
@@ -469,6 +466,7 @@ _rl_revert_all_lines ()
the timestamp. */
FREE (entry->line);
entry->line = savestring (rl_line_buffer);
+ entry->data = 0;
}
entry = previous_history ();
}
@@ -485,37 +483,6 @@ _rl_revert_all_lines ()
xfree (lbuf);
}
-/* Free the history list, including private readline data and take care
- of pointer aliases to history data. Resets rl_undo_list if it points
- to an UNDO_LIST * saved as some history entry's data member. This
- should not be called while editing is active. */
-void
-rl_clear_history ()
-{
- HIST_ENTRY **hlist, *hent;
- register int i;
- UNDO_LIST *ul, *saved_undo_list;
-
- saved_undo_list = rl_undo_list;
- hlist = history_list (); /* direct pointer, not copy */
-
- for (i = 0; i < history_length; i++)
- {
- hent = hlist[i];
- if (ul = (UNDO_LIST *)hent->data)
- {
- if (ul == saved_undo_list)
- saved_undo_list = 0;
- _rl_free_undo_list (ul);
- hent->data = 0;
- }
- _rl_free_history_entry (hent);
- }
-
- history_offset = history_length = 0;
- rl_undo_list = saved_undo_list; /* should be NULL */
-}
-
/* **************************************************************** */
/* */
/* History Commands */
@@ -656,10 +623,6 @@ rl_emacs_editing_mode (count, key)
rl_editing_mode = emacs_mode;
_rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
_rl_keymap = emacs_standard_keymap;
-
- if (_rl_show_mode_in_prompt)
- _rl_reset_prompt ();
-
return 0;
}