aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-03-26 16:47:02 +0000
committerPedro Alves <palves@redhat.com>2013-03-26 16:47:02 +0000
commit1fb2e2b56901690331720448836755a4eee944c7 (patch)
tree7ffbe22450fe009b99003d40b956e1d0c5a4fb77
parent9b978282144d6bab479c042070c66bdfcdae6b02 (diff)
downloadgdb-1fb2e2b56901690331720448836755a4eee944c7.zip
gdb-1fb2e2b56901690331720448836755a4eee944c7.tar.gz
gdb-1fb2e2b56901690331720448836755a4eee944c7.tar.bz2
Use readline's 'history_max_entries' instead of the old 'max_input_history'.
Ref: http://www.sourceware.org/ml/gdb-patches/2002-08/msg00486.html We've long since imported a newer readline, no need to use the old compatibility variable anymore. Tested on x86_64 Fedora 17. gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * top.c (gdb_rl_operate_and_get_next): Replace max_input_history use with history_max_entries use. Remove FIXME note.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/top.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1233bd7..bc533be 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-26 Pedro Alves <palves@redhat.com>
+
+ * top.c (gdb_rl_operate_and_get_next): Replace max_input_history
+ use with history_max_entries use. Remove FIXME note.
+
2013-03-26 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_close): Call
diff --git a/gdb/top.c b/gdb/top.c
index 7905b51..645c898 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -876,13 +876,8 @@ gdb_rl_operate_and_get_next (int count, int key)
/* Find the current line, and find the next line to use. */
where = where_history();
- /* FIXME: kettenis/20020817: max_input_history is renamed into
- history_max_entries in readline-4.2. When we do a new readline
- import, we should probably change it here too, even though
- readline maintains backwards compatibility for now by still
- defining max_input_history. */
- if ((history_is_stifled () && (history_length >= max_input_history)) ||
- (where >= history_length - 1))
+ if ((history_is_stifled () && (history_length >= history_max_entries))
+ || (where >= history_length - 1))
operate_saved_history = where;
else
operate_saved_history = where + 1;