diff src/term.c @ 76627:c53e7d075f1a

Include blockinput.h. (write_glyphs, insert_glyphs): Add BLOCK_INPUT around fwrite.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Tue, 20 Mar 2007 08:51:20 +0000
parents 3d45362f1d38
children 922696f363b0 3d81d0b44577 738ce3540ffb c0409ee15cee
line wrap: on
line diff
--- a/src/term.c	Tue Mar 20 08:51:03 2007 +0000
+++ b/src/term.c	Tue Mar 20 08:51:20 2007 +0000
@@ -38,6 +38,7 @@
 #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 @@
       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 @@
 
       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);