[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty.c between version 1.206 and 1.207

version 1.206, 2016/10/03 19:19:18 version 1.207, 2016/10/10 21:29:23
Line 31 
Line 31 
   
 #include "tmux.h"  #include "tmux.h"
   
 static int tty_log_fd = -1;  static int      tty_log_fd = -1;
   
 void    tty_read_callback(struct bufferevent *, void *);  static void     tty_read_callback(struct bufferevent *, void *);
 void    tty_error_callback(struct bufferevent *, short, void *);  static void     tty_error_callback(struct bufferevent *, short, void *);
   
 static int tty_client_ready(struct client *, struct window_pane *);  static int      tty_client_ready(struct client *, struct window_pane *);
   
 void    tty_set_italics(struct tty *);  static void     tty_set_italics(struct tty *);
 int     tty_try_colour(struct tty *, int, const char *);  static int      tty_try_colour(struct tty *, int, const char *);
   
 void    tty_colours(struct tty *, const struct grid_cell *);  static void     tty_colours(struct tty *, const struct grid_cell *);
 void    tty_check_fg(struct tty *, struct grid_cell *);  static void     tty_check_fg(struct tty *, struct grid_cell *);
 void    tty_check_bg(struct tty *, struct grid_cell *);  static void     tty_check_bg(struct tty *, struct grid_cell *);
 void    tty_colours_fg(struct tty *, const struct grid_cell *);  static void     tty_colours_fg(struct tty *, const struct grid_cell *);
 void    tty_colours_bg(struct tty *, const struct grid_cell *);  static void     tty_colours_bg(struct tty *, const struct grid_cell *);
   
 int     tty_large_region(struct tty *, const struct tty_ctx *);  static int      tty_large_region(struct tty *, const struct tty_ctx *);
 int     tty_fake_bce(const struct tty *, const struct window_pane *);  static int      tty_fake_bce(const struct tty *, const struct window_pane *);
 void    tty_redraw_region(struct tty *, const struct tty_ctx *);  static void     tty_redraw_region(struct tty *, const struct tty_ctx *);
 void    tty_emulate_repeat(struct tty *, enum tty_code_code, enum tty_code_code,  static void     tty_emulate_repeat(struct tty *, enum tty_code_code,
             u_int);                      enum tty_code_code, u_int);
 void    tty_repeat_space(struct tty *, u_int);  static void     tty_repeat_space(struct tty *, u_int);
 void    tty_cell(struct tty *, const struct grid_cell *,  static void     tty_cell(struct tty *, const struct grid_cell *,
             const struct window_pane *);                      const struct window_pane *);
 void    tty_default_colours(struct grid_cell *, const struct window_pane *);  static void     tty_default_colours(struct grid_cell *,
                       const struct window_pane *);
   
 #define tty_use_acs(tty) \  #define tty_use_acs(tty) \
         (tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8))          (tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8))
Line 173 
Line 174 
         return (0);          return (0);
 }  }
   
 void  static void
 tty_read_callback(__unused struct bufferevent *bufev, void *data)  tty_read_callback(__unused struct bufferevent *bufev, void *data)
 {  {
         struct tty      *tty = data;          struct tty      *tty = data;
Line 182 
Line 183 
                 ;                  ;
 }  }
   
 void  static void
 tty_error_callback(__unused struct bufferevent *bufev, __unused short what,  tty_error_callback(__unused struct bufferevent *bufev, __unused short what,
     __unused void *data)      __unused void *data)
 {  {
Line 450 
Line 451 
         tty->cx += width;          tty->cx += width;
 }  }
   
 void  static void
 tty_set_italics(struct tty *tty)  tty_set_italics(struct tty *tty)
 {  {
         const char      *s;          const char      *s;
Line 559 
Line 560 
         tty->mode = mode;          tty->mode = mode;
 }  }
   
 void  static void
 tty_emulate_repeat(struct tty *tty, enum tty_code_code code,  tty_emulate_repeat(struct tty *tty, enum tty_code_code code,
     enum tty_code_code code1, u_int n)      enum tty_code_code code1, u_int n)
 {  {
Line 571 
Line 572 
         }          }
 }  }
   
 void  static void
 tty_repeat_space(struct tty *tty, u_int n)  tty_repeat_space(struct tty *tty, u_int n)
 {  {
         while (n-- > 0)          while (n-- > 0)
Line 583 
Line 584 
  * probably several times now? Currently yes if it is more than 50% of the   * probably several times now? Currently yes if it is more than 50% of the
  * pane.   * pane.
  */   */
 int  static int
 tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx)  tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx)
 {  {
         struct window_pane      *wp = ctx->wp;          struct window_pane      *wp = ctx->wp;
Line 595 
Line 596 
  * Return if BCE is needed but the terminal doesn't have it - it'll need to be   * Return if BCE is needed but the terminal doesn't have it - it'll need to be
  * emulated.   * emulated.
  */   */
 int  static int
 tty_fake_bce(const struct tty *tty, const struct window_pane *wp)  tty_fake_bce(const struct tty *tty, const struct window_pane *wp)
 {  {
         struct grid_cell        gc;          struct grid_cell        gc;
Line 614 
Line 615 
  * CSR not supported, or window is a pane that doesn't take up the full   * CSR not supported, or window is a pane that doesn't take up the full
  * width of the terminal.   * width of the terminal.
  */   */
 void  static void
 tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx)  tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx)
 {  {
         struct window_pane      *wp = ctx->wp;          struct window_pane      *wp = ctx->wp;
Line 1129 
Line 1130 
         tty_cursor(tty, 0, 0);          tty_cursor(tty, 0, 0);
 }  }
   
 void  static void
 tty_cell(struct tty *tty, const struct grid_cell *gc,  tty_cell(struct tty *tty, const struct grid_cell *gc,
     const struct window_pane *wp)      const struct window_pane *wp)
 {  {
Line 1419 
Line 1420 
                 tty_putcode(tty, TTYC_SMACS);                  tty_putcode(tty, TTYC_SMACS);
 }  }
   
 void  static void
 tty_colours(struct tty *tty, const struct grid_cell *gc)  tty_colours(struct tty *tty, const struct grid_cell *gc)
 {  {
         struct grid_cell        *tc = &tty->cell;          struct grid_cell        *tc = &tty->cell;
Line 1559 
Line 1560 
                 gc->bg -= 90;                  gc->bg -= 90;
 }  }
   
 void  static void
 tty_colours_fg(struct tty *tty, const struct grid_cell *gc)  tty_colours_fg(struct tty *tty, const struct grid_cell *gc)
 {  {
         struct grid_cell        *tc = &tty->cell;          struct grid_cell        *tc = &tty->cell;
Line 1589 
Line 1590 
         tc->fg = gc->fg;          tc->fg = gc->fg;
 }  }
   
 void  static void
 tty_colours_bg(struct tty *tty, const struct grid_cell *gc)  tty_colours_bg(struct tty *tty, const struct grid_cell *gc)
 {  {
         struct grid_cell        *tc = &tty->cell;          struct grid_cell        *tc = &tty->cell;
Line 1619 
Line 1620 
         tc->bg = gc->bg;          tc->bg = gc->bg;
 }  }
   
 int  static int
 tty_try_colour(struct tty *tty, int colour, const char *type)  tty_try_colour(struct tty *tty, int colour, const char *type)
 {  {
         u_char  r, g, b;          u_char  r, g, b;
Line 1672 
Line 1673 
         return (0);          return (0);
 }  }
   
 void  static void
 tty_default_colours(struct grid_cell *gc, const struct window_pane *wp)  tty_default_colours(struct grid_cell *gc, const struct window_pane *wp)
 {  {
         struct window           *w = wp->window;          struct window           *w = wp->window;

Legend:
Removed from v.1.206  
changed lines
  Added in v.1.207