Merge from emacs-23
[bpt/emacs.git] / src / termchar.h
index 0e56237..e0eccaa 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
@@ -34,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.  */
 
@@ -65,11 +65,24 @@ 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.  */
 
   char *TS_ins_line;           /* "al" */
@@ -153,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.  */
 
@@ -177,7 +190,7 @@ struct tty_display_info
    lines from those operations.  */
 
   int specified_window;
-  
+
   /* Flag used in tty_show/hide_cursor.  */
 
   int cursor_hidden;
@@ -192,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))