[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5679] read_and_dispatch_in_echo_area
From: |
Gavin D. Smith |
Subject: |
[5679] read_and_dispatch_in_echo_area |
Date: |
Fri, 20 Jun 2014 17:08:00 +0000 |
Revision: 5679
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5679
Author: gavin
Date: 2014-06-20 17:07:57 +0000 (Fri, 20 Jun 2014)
Log Message:
-----------
read_and_dispatch_in_echo_area
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/echo-area.c
trunk/info/session.c
trunk/info/session.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-06-20 16:54:46 UTC (rev 5678)
+++ trunk/ChangeLog 2014-06-20 17:07:57 UTC (rev 5679)
@@ -1,5 +1,13 @@
2014-06-20 Gavin Smith <address@hidden>
+ * info/echo-area.c (read_and_dispatch_in_echo_area): Copy of
+ info_read_and_dispatch with special casing for echo area made
+ unconditional. Callers updated.
+ * info/session.c (info_read_and_dispatch): Special casing for echo area
+ removed.
+
+2014-06-20 Gavin Smith <address@hidden>
+
* info/session.c (info_set_pending_input): Place argument in
info_input_buffer instead of pending_input_character.
(pending_input_charater, info_clear_pending_input)
Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c 2014-06-20 16:54:46 UTC (rev 5678)
+++ trunk/info/echo-area.c 2014-06-20 17:07:57 UTC (rev 5679)
@@ -160,6 +160,48 @@
return return_value;
}
+static void
+read_and_dispatch_in_echo_area (void)
+{
+ unsigned char key;
+
+ while (1)
+ {
+ int lk = 0;
+
+ lk = echo_area_last_command_was_kill;
+ echo_area_prep_read ();
+
+ if (!info_any_buffered_input_p ())
+ display_update_display (windows);
+
+ display_cursor_at_point (active_window);
+ info_initialize_numeric_arg ();
+
+ initialize_keyseq ();
+ key = info_get_input_char ();
+
+ info_error_was_printed = 0;
+
+ /* Do the selected command. */
+ info_dispatch_on_key (key, active_window->keymap);
+
+ /* Echo area commands that do killing increment the value of
+ ECHO_AREA_LAST_COMMAND_WAS_KILL. Thus, if there is no
+ change in the value of this variable, the last command
+ executed was not a kill command. */
+ if (lk == echo_area_last_command_was_kill)
+ echo_area_last_command_was_kill = 0;
+
+ if (ea_last_executed_command == (VFunction *) ea_newline ||
+ info_aborted_echo_area)
+ {
+ ea_last_executed_command = NULL;
+ break;
+ }
+ }
+}
+
/* Read a line of text in the echo area. Return a malloc ()'ed string,
or NULL if the user aborted out of this read. WINDOW is the currently
active window, so that we can restore it when we need to. PROMPT, if
@@ -188,7 +230,7 @@
active_window = the_echo_area;
/* Read characters in the echo area. */
- info_read_and_dispatch ();
+ read_and_dispatch_in_echo_area ();
echo_area_is_active--;
@@ -804,7 +846,7 @@
/* Read characters in the echo area. */
while (1)
{
- info_read_and_dispatch ();
+ read_and_dispatch_in_echo_area ();
line = echo_area_after_read ();
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-06-20 16:54:46 UTC (rev 5678)
+++ trunk/info/session.c 2014-06-20 17:07:57 UTC (rev 5679)
@@ -51,6 +51,8 @@
/* */
/* **************************************************************** */
+static void info_read_and_dispatch (void);
+
/* The place that we are reading input from. */
static FILE *info_input_stream = NULL;
@@ -162,23 +164,13 @@
close_dribble_file ();
}
-/* Here is a window-location dependent event loop. Called from the
- functions info_session (), and from read_xxx_in_echo_area (). */
-void
+static void
info_read_and_dispatch (void)
{
unsigned char key;
for (quit_info_immediately = 0; !quit_info_immediately; )
{
- int lk = 0;
-
- if (echo_area_is_active)
- {
- lk = echo_area_last_command_was_kill;
- echo_area_prep_read ();
- }
-
if (!info_any_buffered_input_p ())
display_update_display (windows);
@@ -188,32 +180,12 @@
initialize_keyseq ();
key = info_get_input_char ();
- /* No errors yet. We just read a character, that's all. Only clear
- the echo_area if it is not currently active. */
- if (!echo_area_is_active)
- window_clear_echo_area ();
+ window_clear_echo_area ();
info_error_was_printed = 0;
/* Do the selected command. */
info_dispatch_on_key (key, active_window->keymap);
-
- if (echo_area_is_active)
- {
- /* Echo area commands that do killing increment the value of
- ECHO_AREA_LAST_COMMAND_WAS_KILL. Thus, if there is no
- change in the value of this variable, the last command
- executed was not a kill command. */
- if (lk == echo_area_last_command_was_kill)
- echo_area_last_command_was_kill = 0;
-
- if (ea_last_executed_command == (VFunction *) ea_newline ||
- info_aborted_echo_area)
- {
- ea_last_executed_command = NULL;
- break;
- }
- }
}
}
Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h 2014-06-20 16:54:46 UTC (rev 5678)
+++ trunk/info/session.h 2014-06-20 17:07:57 UTC (rev 5679)
@@ -117,7 +117,6 @@
extern void info_session (void);
extern void initialize_terminal_and_keymaps (char *init_file);
extern void initialize_info_session (void);
-extern void info_read_and_dispatch (void);
extern REFERENCE *info_intuit_options_node (NODE *initial_node, char *program);
/* Moving the point within a node. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5679] read_and_dispatch_in_echo_area,
Gavin D. Smith <=