]> git.eshelyaron.com Git - emacs.git/commitdiff
Include blockinput.h.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Tue, 20 Mar 2007 08:51:20 +0000 (08:51 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Tue, 20 Mar 2007 08:51:20 +0000 (08:51 +0000)
(write_glyphs, insert_glyphs): Add BLOCK_INPUT around fwrite.

src/term.c

index e407aec2fe1e12fcddbdf294f14f5f38a38b18fe..556ae9f65b1dae115e3c1c5dd57b18f959caad41 100644 (file)
@@ -38,6 +38,7 @@ Boston, MA 02110-1301, USA.  */
 #include "dispextern.h"
 #include "window.h"
 #include "keymap.h"
+#include "blockinput.h"
 
 /* For now, don't try to include termcap.h.  On some systems,
    configure finds a non-standard termcap.h that the main build
@@ -990,11 +991,13 @@ write_glyphs (string, len)
       conversion_buffer = encode_terminal_code (string, n, coding);
       if (coding->produced > 0)
        {
+         BLOCK_INPUT;
          fwrite (conversion_buffer, 1, coding->produced, stdout);
          if (ferror (stdout))
            clearerr (stdout);
          if (termscript)
            fwrite (conversion_buffer, 1, coding->produced, termscript);
+         UNBLOCK_INPUT;
        }
       len -= n;
       string += n;
@@ -1089,11 +1092,13 @@ insert_glyphs (start, len)
 
       if (coding->produced > 0)
        {
+         BLOCK_INPUT;
          fwrite (conversion_buffer, 1, coding->produced, stdout);
          if (ferror (stdout))
            clearerr (stdout);
          if (termscript)
            fwrite (conversion_buffer, 1, coding->produced, termscript);
+         UNBLOCK_INPUT;
        }
 
       OUTPUT1_IF (TS_pad_inserted_char);