texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5690] ea_quoted_insert


From: Gavin D. Smith
Subject: [5690] ea_quoted_insert
Date: Sun, 29 Jun 2014 09:54:45 +0000

Revision: 5690
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5690
Author:   gavin
Date:     2014-06-29 09:54:44 +0000 (Sun, 29 Jun 2014)
Log Message:
-----------
ea_quoted_insert

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/echo-area.c
    trunk/info/session.c
    trunk/info/session.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-06-28 21:48:27 UTC (rev 5689)
+++ trunk/ChangeLog     2014-06-29 09:54:44 UTC (rev 5690)
@@ -1,3 +1,9 @@
+2014-06-29  Gavin Smith  <address@hidden>
+
+       * info/session.c (info_get_another_input_byte): Removed.
+       * info/echo-area.c (ea_quoted_insert): Call get_another_input_key
+       instead.
+
 2014-06-28  Gavin Smith  <address@hidden>
 
        * info/session.c (info_set_pending_input): Function removed.

Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c      2014-06-28 21:48:27 UTC (rev 5689)
+++ trunk/info/echo-area.c      2014-06-29 09:54:44 UTC (rev 5690)
@@ -477,9 +477,13 @@
 
 DECLARE_INFO_COMMAND (ea_quoted_insert, _("Insert next character verbatim"))
 {
-  unsigned char character;
+  int character;
 
-  character = info_get_another_input_byte ();
+  character = get_another_input_key ();
+  
+  if (character >= 256 || character < 0)
+    return;
+
   ea_insert (window, count, character);
 }
 

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-06-28 21:48:27 UTC (rev 5689)
+++ trunk/info/session.c        2014-06-29 09:54:44 UTC (rev 5690)
@@ -4548,46 +4548,6 @@
   info_keyseq_displayed_p = 1;
 }
 
-/* Called by interactive commands to read another byte when bytes have already
-   been read as part of the current command (and possibly displayed in status
-   line with display_info_keyseq).
-   TODO: Replace calls to this function with calls to
-   get_another_input_key. */
-unsigned char
-info_get_another_input_byte (void)
-{
-  int ready = !info_keyseq_displayed_p; /* ready if new and pending key */
-
-  /* If there isn't any input currently available, then wait a
-     moment looking for input.  If we don't get it fast enough,
-     prompt a little bit with the current key sequence. */
-  if (!info_keyseq_displayed_p)
-    {
-      ready = 1;
-      if (!info_any_buffered_input_p ())
-        {
-#if defined (FD_SET)
-          struct timeval timer;
-          fd_set readfds;
-
-          FD_ZERO (&readfds);
-          FD_SET (fileno (info_input_stream), &readfds);
-          timer.tv_sec = 1;
-          timer.tv_usec = 750;
-          ready = select (fileno(info_input_stream)+1, &readfds,
-                         NULL, NULL, &timer);
-#else
-          ready = 0;
-#endif /* FD_SET */
-      }
-    }
-
-  if (!ready)
-    display_info_keyseq (1);
-
-  return info_get_input_byte ();
-}
-
 /* Called by interactive commands to read another key when keys have already
    been read as part of the current command (and possibly displayed in status
    line with display_info_keyseq). */

Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h        2014-06-28 21:48:27 UTC (rev 5689)
+++ trunk/info/session.h        2014-06-29 09:54:44 UTC (rev 5690)
@@ -76,7 +76,6 @@
 /* Utility functions found in session.c */
 extern void info_dispatch_on_key (int key, Keymap map);
 extern unsigned char info_get_input_byte (void);
-extern unsigned char info_get_another_input_byte (void);
 extern unsigned char info_input_pending_p (void);
 extern void info_set_node_of_window (WINDOW *window, NODE *node);
 extern void initialize_keyseq (void);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]