pterm now uses the new uxsel module, so it's one step closer to
[u/mdw/putty] / terminal.h
index 647b55d..0050c0e 100644 (file)
@@ -198,6 +198,16 @@ struct terminal_tag {
      * than only the default.
      */
     Config cfg;
+
+    /*
+     * from_backend calls term_out, but it can also be called from
+     * the ldisc if the ldisc is called _within_ term_out. So we
+     * have to guard against re-entrancy - if from_backend is
+     * called recursively like this, it will simply add data to the
+     * end of the buffer term_out is in the process of working
+     * through.
+     */
+    int in_term_out;
 };
 
 #define in_utf(term) ((term)->utf || (term)->ucsdata->line_codepage==CP_UTF8)