Merge from emacs-23
[bpt/emacs.git] / src / termchar.h
index 390b649..e0eccaa 100644 (file)
@@ -1,13 +1,13 @@
 /* Flags and parameters describing terminal's characteristics.
    Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+                 2005, 2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
-GNU Emacs is free software; you can redistribute it and/or modify
+GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,9 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Each termcap frame points to its own struct tty_output object in
    the output_data.tty field.  The tty_output structure contains the
@@ -36,18 +34,18 @@ struct tty_output
 struct tty_display_info
 {
   struct tty_display_info *next; /* Chain of all tty devices. */
-  
+
   char *name;                   /* The name of the device file or 0 if
                                    stdin/stdout. */
   char *type;                   /* The type of the tty. */
-  
+
   /* Input/output */
-  
+
   FILE *input;                  /* The stream to be used for terminal input.
                                    NULL if the terminal is suspended. */
   FILE *output;                 /* The stream to be used for terminal output.
                                    NULL if the terminal is suspended. */
-  
+
   FILE *termscript;             /* If nonzero, send all terminal output
                                    characters to this stream also.  */
 
@@ -67,9 +65,23 @@ struct tty_display_info
   /* Redisplay. */
 
   Lisp_Object top_frame;        /* The topmost frame on this tty. */
-  
+
   /* The previous frame we displayed on this tty.  */
   struct frame *previous_frame;
+  int previous_color_mode;
+
+  /* Information about the range of text currently shown in
+     mouse-face.  */
+  Mouse_HLInfo mouse_highlight;
+
+  /* Buffer used internally by termcap (see tgetent in the Termcap
+     manual).  Only init_tty and delete_tty should change this.  */
+  char *termcap_term_buffer;
+
+  /* Buffer storing terminal description strings (see tgetstr in the
+     Termcap manual).  Only init_tty and delete_tty should change
+     this.  */
+  char *termcap_strings_buffer;
 
   /* Strings, numbers and flags taken from the termcap entry.  */
 
@@ -154,12 +166,12 @@ struct tty_display_info
   int RPov;                     /* # chars to start a TS_repeat */
 
   int delete_in_insert_mode;    /* delete mode == insert mode */
-  
+
   int se_is_so;                 /* 1 if same string both enters and leaves
                                    standout mode */
-  
+
   int costs_set;                /* Nonzero if costs have been calculated. */
-  
+
   int insert_mode;              /* Nonzero when in insert mode.  */
   int standout_mode;            /* Nonzero when in standout mode.  */
 
@@ -178,7 +190,7 @@ struct tty_display_info
    lines from those operations.  */
 
   int specified_window;
-  
+
   /* Flag used in tty_show/hide_cursor.  */
 
   int cursor_hidden;
@@ -193,7 +205,8 @@ extern struct tty_display_info *tty_list;
 
 
 #define FRAME_TTY(f)                            \
-  ((f)->output_method == output_termcap         \
+  (((f)->output_method == output_termcap       \
+    || (f)->output_method == output_msdos_raw) \
    ? (f)->terminal->display_info.tty            \
    : (abort(), (struct tty_display_info *) 0))