*** empty log message ***
authorroot <root>
Tue, 28 Oct 2008 04:45:58 +0000 (04:45 +0000)
committerroot <root>
Tue, 28 Oct 2008 04:45:58 +0000 (04:45 +0000)
Changes
src/command.C
src/rxvt.h

diff --git a/Changes b/Changes
index ffa5fddcfa269a9a529646ab238572eaa94fa864..888377aa17862e13e18f1a78cc67f869429ea847 100644 (file)
--- a/Changes
+++ b/Changes
@@ -21,6 +21,8 @@ DUMB: support tex fonts
 
 TODO:   /*TODO: the xlceararea/xfillrectangle below don't take scroll offste into account, ask mikachu for details */
 
+TODO: investgate wm resize race: while sleep 0.001; do printf "\033[?30l";sleep 0.001;printf "\033[?30h";done
+TODO: investigate miroslav patches
 TODO: artificially enlargen wide characters at end to correctly cut&paste.
 TODO: cursor over overlays, when focus change?
        - remove bogus "setuid/setgid security issues" from rxvt.1.pod, they
@@ -31,6 +33,8 @@ TODO: cursor over overlays, when focus change?
        - ignore byte-order marks and do not treat them like combining characters.
         - fix build issue when CURSOR_BLINK is not defined (Emanuele Giaquinta).
         - do some ยต-optimisations to the character fast path.
+        - use a less cunning, but more robust algorithm to avoid one terminal
+          monopolising the whole process by outputting a lot of text.
         - try to work around linux first breaking sched_yield and now breaking
           the only known workaround.
 
index ce5084d9594f750698db262a406b301efbf6f319..b68b43ad23436494d52a1353fe71eb9e3864eb77 100644 (file)
@@ -1193,9 +1193,8 @@ rxvt_term::pty_cb (ev::io &w, int revents)
 
   if (revents & ev::READ)
     // loop, but don't allow a single term to monopolize us
-    while (pty_fill ())
-      if (cmd_parse ())
-        break;
+    for (int i = CBUFCNT; i-- && pty_fill (); )
+      cmd_parse ();
 
   if (revents & ev::WRITE)
     pty_write ();
@@ -2187,10 +2186,9 @@ rxvt_term::button_release (XButtonEvent &ev)
 
 /*}}} */
 
-bool
+void
 rxvt_term::cmd_parse ()
 {
-  bool flag = false;
   wchar_t ch = NOCHAR;
   char *seq_begin; // remember start of esc-sequence here
 
@@ -2294,11 +2292,9 @@ rxvt_term::cmd_parse ()
            */
           if (refreshnow)
             {
-              flag = true;
               scr_refresh ();
               want_refresh = 1;
             }
-
         }
       else
         {
@@ -2316,8 +2312,6 @@ rxvt_term::cmd_parse ()
           ch = NOCHAR;
         }
     }
-
-  return flag;
 }
 
 // read the next character
index 7a7cf35f80b7ce165b9188e2376e27476ae47181..ce8b3fbc8c2301dbf5e0ab999c738f3a0a150c9b 100644 (file)
@@ -552,6 +552,7 @@ enum {
 #define IMBUFSIZ               128     // input modifier buffer sizes
 #define KBUFSZ                 512     // size of keyboard mapping buffer
 #define CBUFSIZ                2048    // size of command buffer
+#define CBUFCNT                8       // never call pty_fill/cmd_parse more than this often in a row
 #define UBUFSIZ                2048    // character buffer
 
 #if ENABLE_FRILLS
@@ -1194,7 +1195,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {
   uint32_t next_octet () NOTHROW;
   uint32_t cmd_get8 () THROW ((class out_of_input));
 
-  bool cmd_parse ();
+  void cmd_parse ();
   void mouse_report (XButtonEvent &ev);
   void button_press (XButtonEvent &ev);
   void button_release (XButtonEvent &ev);