changeset 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 2fb8fb4a9bab
children 04b7ffb4f622
files src/term.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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);