=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.206 retrieving revision 1.207 diff -c -r1.206 -r1.207 *** src/usr.bin/tmux/tty.c 2016/10/03 19:19:18 1.206 --- src/usr.bin/tmux/tty.c 2016/10/10 21:29:23 1.207 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.206 2016/10/03 19:19:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.207 2016/10/10 21:29:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 31,61 **** #include "tmux.h" ! static int tty_log_fd = -1; ! void tty_read_callback(struct bufferevent *, void *); ! void tty_error_callback(struct bufferevent *, short, void *); ! static int tty_client_ready(struct client *, struct window_pane *); ! void tty_set_italics(struct tty *); ! int tty_try_colour(struct tty *, int, const char *); ! void tty_colours(struct tty *, const struct grid_cell *); ! void tty_check_fg(struct tty *, struct grid_cell *); ! void tty_check_bg(struct tty *, struct grid_cell *); ! void tty_colours_fg(struct tty *, const struct grid_cell *); ! void tty_colours_bg(struct tty *, const struct grid_cell *); ! int tty_large_region(struct tty *, const struct tty_ctx *); ! int tty_fake_bce(const struct tty *, const struct window_pane *); ! void tty_redraw_region(struct tty *, const struct tty_ctx *); ! void tty_emulate_repeat(struct tty *, enum tty_code_code, enum tty_code_code, ! u_int); ! void tty_repeat_space(struct tty *, u_int); ! void tty_cell(struct tty *, const struct grid_cell *, ! const struct window_pane *); ! void tty_default_colours(struct grid_cell *, const struct window_pane *); #define tty_use_acs(tty) \ (tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8)) --- 31,62 ---- #include "tmux.h" ! static int tty_log_fd = -1; ! static void tty_read_callback(struct bufferevent *, void *); ! static void tty_error_callback(struct bufferevent *, short, void *); ! static int tty_client_ready(struct client *, struct window_pane *); ! static void tty_set_italics(struct tty *); ! static int tty_try_colour(struct tty *, int, const char *); ! static void tty_colours(struct tty *, const struct grid_cell *); ! static void tty_check_fg(struct tty *, struct grid_cell *); ! static void tty_check_bg(struct tty *, struct grid_cell *); ! static void tty_colours_fg(struct tty *, const struct grid_cell *); ! static void tty_colours_bg(struct tty *, const struct grid_cell *); ! static int tty_large_region(struct tty *, const struct tty_ctx *); ! static int tty_fake_bce(const struct tty *, const struct window_pane *); ! static void tty_redraw_region(struct tty *, const struct tty_ctx *); ! static void tty_emulate_repeat(struct tty *, enum tty_code_code, ! enum tty_code_code, u_int); ! static void tty_repeat_space(struct tty *, u_int); ! static void tty_cell(struct tty *, const struct grid_cell *, ! const struct window_pane *); ! static void tty_default_colours(struct grid_cell *, ! const struct window_pane *); #define tty_use_acs(tty) \ (tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8)) *************** *** 173,179 **** return (0); } ! void tty_read_callback(__unused struct bufferevent *bufev, void *data) { struct tty *tty = data; --- 174,180 ---- return (0); } ! static void tty_read_callback(__unused struct bufferevent *bufev, void *data) { struct tty *tty = data; *************** *** 182,188 **** ; } ! void tty_error_callback(__unused struct bufferevent *bufev, __unused short what, __unused void *data) { --- 183,189 ---- ; } ! static void tty_error_callback(__unused struct bufferevent *bufev, __unused short what, __unused void *data) { *************** *** 450,456 **** tty->cx += width; } ! void tty_set_italics(struct tty *tty) { const char *s; --- 451,457 ---- tty->cx += width; } ! static void tty_set_italics(struct tty *tty) { const char *s; *************** *** 559,565 **** tty->mode = mode; } ! void tty_emulate_repeat(struct tty *tty, enum tty_code_code code, enum tty_code_code code1, u_int n) { --- 560,566 ---- tty->mode = mode; } ! static void tty_emulate_repeat(struct tty *tty, enum tty_code_code code, enum tty_code_code code1, u_int n) { *************** *** 571,577 **** } } ! void tty_repeat_space(struct tty *tty, u_int n) { while (n-- > 0) --- 572,578 ---- } } ! static void tty_repeat_space(struct tty *tty, u_int n) { while (n-- > 0) *************** *** 583,589 **** * probably several times now? Currently yes if it is more than 50% of the * pane. */ ! int tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; --- 584,590 ---- * probably several times now? Currently yes if it is more than 50% of the * pane. */ ! static int tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; *************** *** 595,601 **** * Return if BCE is needed but the terminal doesn't have it - it'll need to be * emulated. */ ! int tty_fake_bce(const struct tty *tty, const struct window_pane *wp) { struct grid_cell gc; --- 596,602 ---- * Return if BCE is needed but the terminal doesn't have it - it'll need to be * emulated. */ ! static int tty_fake_bce(const struct tty *tty, const struct window_pane *wp) { struct grid_cell gc; *************** *** 614,620 **** * CSR not supported, or window is a pane that doesn't take up the full * width of the terminal. */ ! void tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; --- 615,621 ---- * CSR not supported, or window is a pane that doesn't take up the full * width of the terminal. */ ! static void tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; *************** *** 1129,1135 **** tty_cursor(tty, 0, 0); } ! void tty_cell(struct tty *tty, const struct grid_cell *gc, const struct window_pane *wp) { --- 1130,1136 ---- tty_cursor(tty, 0, 0); } ! static void tty_cell(struct tty *tty, const struct grid_cell *gc, const struct window_pane *wp) { *************** *** 1419,1425 **** tty_putcode(tty, TTYC_SMACS); } ! void tty_colours(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; --- 1420,1426 ---- tty_putcode(tty, TTYC_SMACS); } ! static void tty_colours(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; *************** *** 1559,1565 **** gc->bg -= 90; } ! void tty_colours_fg(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; --- 1560,1566 ---- gc->bg -= 90; } ! static void tty_colours_fg(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; *************** *** 1589,1595 **** tc->fg = gc->fg; } ! void tty_colours_bg(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; --- 1590,1596 ---- tc->fg = gc->fg; } ! static void tty_colours_bg(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; *************** *** 1619,1625 **** tc->bg = gc->bg; } ! int tty_try_colour(struct tty *tty, int colour, const char *type) { u_char r, g, b; --- 1620,1626 ---- tc->bg = gc->bg; } ! static int tty_try_colour(struct tty *tty, int colour, const char *type) { u_char r, g, b; *************** *** 1672,1678 **** return (0); } ! void tty_default_colours(struct grid_cell *gc, const struct window_pane *wp) { struct window *w = wp->window; --- 1673,1679 ---- return (0); } ! static void tty_default_colours(struct grid_cell *gc, const struct window_pane *wp) { struct window *w = wp->window;