summaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-11-27 04:15:09 +0000
committerTom Tromey <tromey@redhat.com>2001-11-27 04:15:09 +0000
commit467d85198ffb27a97ef21aa85c044a3ace19990a (patch)
treea7a6c2ce830a8954c50aa5d49113a63c54bcf557 /gdb/event-top.c
parent88118b3abf152ba1d5a7a112918cab91674237f5 (diff)
downloadbinutils-gdb-467d85198ffb27a97ef21aa85c044a3ace19990a.tar.gz
* NEWS: Updated.
* event-loop.c (start_event_loop): Call after_char_processing_hook. * event-top.h (after_char_processing_hook): Declare. * event-top.c (rl_callback_read_char_wrapper): Call after_char_processing_hook. (after_char_processing_hook): New global. * top.c (operate_saved_history): New global. (gdb_rl_operate_and_get_next): New function. (init_main): Add the operate-and-get-next defun. (gdb_rl_operate_and_get_next_completion): New function.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index e76f08728c9..4703a86c366 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -153,6 +153,10 @@ struct readline_input_state
char *linebuffer_ptr;
}
readline_input_state;
+
+/* This hook is called by rl_callback_read_char_wrapper after each
+ character is processed. */
+void (*after_char_processing_hook) ();
/* Wrapper function for calling into the readline library. The event
@@ -162,6 +166,8 @@ static void
rl_callback_read_char_wrapper (gdb_client_data client_data)
{
rl_callback_read_char ();
+ if (after_char_processing_hook)
+ (*after_char_processing_hook) ();
}
/* Initialize all the necessary variables, start the event loop,