emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src ChangeLog dispnew.c


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/src ChangeLog dispnew.c
Date: Thu, 03 Sep 2009 00:36:14 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/09/03 00:36:13

Modified files:
        src            : ChangeLog dispnew.c 

Log message:
        (Fsend_string_to_terminal): Make it work again on the initial terminal 
as well.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7727&r2=1.7728
http://cvs.savannah.gnu.org/viewcvs/emacs/src/dispnew.c?cvsroot=emacs&r1=1.430&r2=1.431

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7727
retrieving revision 1.7728
diff -u -b -r1.7727 -r1.7728
--- ChangeLog   2 Sep 2009 17:03:20 -0000       1.7727
+++ ChangeLog   3 Sep 2009 00:36:11 -0000       1.7728
@@ -1,7 +1,12 @@
+2009-09-03  Stefan Monnier  <address@hidden>
+
+       * dispnew.c (Fsend_string_to_terminal): Make it work again on the
+       initial terminal as well.
+
 2009-09-02  Jan Djärv  <address@hidden>
 
        * xterm.h: Rename x_non_menubar_window_to_frame to
-       x_menubar_window_to_frame
+       x_menubar_window_to_frame.
 
        * xterm.c: Remove declarations also in xterm.h
        (XTmouse_position): Do not return valid positions

Index: dispnew.c
===================================================================
RCS file: /sources/emacs/emacs/src/dispnew.c,v
retrieving revision 1.430
retrieving revision 1.431
diff -u -b -r1.430 -r1.431
--- dispnew.c   26 Jul 2009 23:09:45 -0000      1.430
+++ dispnew.c   3 Sep 2009 00:36:13 -0000       1.431
@@ -6475,8 +6475,8 @@
      Lisp_Object string;
      Lisp_Object terminal;
 {
-  struct terminal *t = get_tty_terminal (terminal, 1);
-  struct tty_display_info *tty;
+  struct terminal *t = get_terminal (terminal, 1);
+  FILE *out;
 
   /* ??? Perhaps we should do something special for multibyte strings here.  */
   CHECK_STRING (string);
@@ -6485,7 +6485,13 @@
   if (!t)
     error ("Unknown terminal device");
 
-  tty = t->display_info.tty;
+  if (t->type == output_initial)
+    out = stdout;
+  else if (t->type != output_termcap && t->type != output_msdos_raw)
+    error ("Device %d is not a termcap terminal device", t->id);
+  else
+    {
+      struct tty_display_info *tty = t->display_info.tty;
 
   if (! tty->output)
     error ("Terminal is currently suspended");
@@ -6495,8 +6501,10 @@
       fwrite (SDATA (string), 1, SBYTES (string), tty->termscript);
       fflush (tty->termscript);
     }
-  fwrite (SDATA (string), 1, SBYTES (string), tty->output);
-  fflush (tty->output);
+      out = tty->output;
+    }
+  fwrite (SDATA (string), 1, SBYTES (string), out);
+  fflush (out);
   UNBLOCK_INPUT;
   return Qnil;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]