(run_msdos_command): Don't call dos_ttcooked, dos_ttraw, and bright_bg
authorEli Zaretskii <eliz@gnu.org>
Sat, 15 Nov 2008 16:20:09 +0000 (16:20 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 15 Nov 2008 16:20:09 +0000 (16:20 +0000)
if noninteractive is non-zero.

src/ChangeLog
src/msdos.c

index f1fadd2..eaaa96c 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * msdos.c (run_msdos_command): Don't call dos_ttcooked, dos_ttraw,
+       and bright_bg if noninteractive is non-zero.
+
 2008-11-15  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * xterm.c (x_draw_glyph_string): For stretch glyphs, don't call
index 86b765f..7548d91 100644 (file)
@@ -4749,7 +4749,8 @@ run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv)
   if (have_mouse > 0)
     mouse_get_xy (&x, &y);
 
-  dos_ttcooked ();     /* do it here while 0 = stdin */
+  if (!noninteractive)
+    dos_ttcooked ();   /* do it here while 0 = stdin */
 
   dup2 (tempin, 0);
   dup2 (tempout, 1);
@@ -4809,7 +4810,8 @@ run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv)
   emacs_close (outbak);
   emacs_close (errbak);
 
-  dos_ttraw (CURTTY ());
+  if (!noninteractive)
+    dos_ttraw (CURTTY ());
   if (have_mouse > 0)
     {
       mouse_init ();
@@ -4819,7 +4821,8 @@ run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv)
   /* Some programs might change the meaning of the highest bit of the
      text attribute byte, so we get blinking characters instead of the
      bright background colors.  Restore that.  */
-  bright_bg ();
+  if (!noninteractive)
+    bright_bg ();
 
  done:
   chdir (oldwd);