diff options
author | 2019-03-14 09:50:09 +0000 | |
---|---|---|
committer | 2019-03-14 09:50:09 +0000 | |
commit | ec36fca03da60fc8eb10410795e5a1915a1773e4 (patch) | |
tree | d9b0006b15cf68aa64296a37e89b961b1b93aa3a /usr.bin/tmux/tty.c | |
parent | build with NDEBUG defined to disable debug/tracking code (diff) | |
download | wireguard-openbsd-ec36fca03da60fc8eb10410795e5a1915a1773e4.tar.xz wireguard-openbsd-ec36fca03da60fc8eb10410795e5a1915a1773e4.zip |
Do not use const on struct window_pane, it causes more trouble than it
is worth.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 3527dc5508e..54222b6bee0 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.316 2019/03/13 22:01:22 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.317 2019/03/14 09:50:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -45,9 +45,9 @@ static void tty_cursor_pane_unless_wrap(struct tty *, const struct tty_ctx *, u_int, u_int); static void tty_invalidate(struct tty *); static void tty_colours(struct tty *, const struct grid_cell *); -static void tty_check_fg(struct tty *, const struct window_pane *, +static void tty_check_fg(struct tty *, struct window_pane *, struct grid_cell *); -static void tty_check_bg(struct tty *, const struct window_pane *, +static void tty_check_bg(struct tty *, struct window_pane *, 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 *); @@ -58,18 +58,16 @@ static void tty_region(struct tty *, u_int, u_int); static void tty_margin_pane(struct tty *, const struct tty_ctx *); static void tty_margin(struct tty *, u_int, u_int); static int tty_large_region(struct tty *, const struct tty_ctx *); -static int tty_fake_bce(const struct tty *, const struct window_pane *, - u_int); +static int tty_fake_bce(const struct tty *, struct window_pane *, u_int); 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_draw_pane(struct tty *, const struct tty_ctx *, 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 *); -static void tty_default_attributes(struct tty *, const struct window_pane *, + struct window_pane *); +static void tty_default_colours(struct grid_cell *, struct window_pane *); +static void tty_default_attributes(struct tty *, struct window_pane *, u_int); #define tty_use_margin(tty) \ @@ -847,7 +845,7 @@ tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx) * emulated. */ static int -tty_fake_bce(const struct tty *tty, const struct window_pane *wp, u_int bg) +tty_fake_bce(const struct tty *tty, struct window_pane *wp, u_int bg) { struct grid_cell gc; @@ -956,8 +954,8 @@ tty_clamp_line(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py, /* Clear a line. */ static void -tty_clear_line(struct tty *tty, const struct window_pane *wp, u_int py, - u_int px, u_int nx, u_int bg) +tty_clear_line(struct tty *tty, struct window_pane *wp, u_int py, u_int px, + u_int nx, u_int bg) { struct client *c = tty->client; @@ -1075,8 +1073,8 @@ tty_clamp_area(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py, /* Clear an area, adjusting to visible part of pane. */ static void -tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py, - u_int ny, u_int px, u_int nx, u_int bg) +tty_clear_area(struct tty *tty, struct window_pane *wp, u_int py, u_int ny, + u_int px, u_int nx, u_int bg) { struct client *c = tty->client; u_int yy; @@ -1198,8 +1196,8 @@ tty_check_codeset(struct tty *tty, const struct grid_cell *gc) } void -tty_draw_line(struct tty *tty, const struct window_pane *wp, - struct screen *s, u_int px, u_int py, u_int nx, u_int atx, u_int aty) +tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s, + u_int px, u_int py, u_int nx, u_int atx, u_int aty) { struct grid *gd = s->grid; struct grid_cell gc, last; @@ -1802,8 +1800,7 @@ tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx) } static void -tty_cell(struct tty *tty, const struct grid_cell *gc, - const struct window_pane *wp) +tty_cell(struct tty *tty, const struct grid_cell *gc, struct window_pane *wp) { const struct grid_cell *gcp; @@ -2117,7 +2114,7 @@ out: void tty_attributes(struct tty *tty, const struct grid_cell *gc, - const struct window_pane *wp) + struct window_pane *wp) { struct grid_cell *tc = &tty->cell, gc2; int changed; @@ -2265,8 +2262,7 @@ tty_colours(struct tty *tty, const struct grid_cell *gc) } static void -tty_check_fg(struct tty *tty, const struct window_pane *wp, - struct grid_cell *gc) +tty_check_fg(struct tty *tty, struct window_pane *wp, struct grid_cell *gc) { u_char r, g, b; u_int colours; @@ -2326,8 +2322,7 @@ tty_check_fg(struct tty *tty, const struct window_pane *wp, } static void -tty_check_bg(struct tty *tty, const struct window_pane *wp, - struct grid_cell *gc) +tty_check_bg(struct tty *tty, struct window_pane *wp, struct grid_cell *gc) { u_char r, g, b; u_int colours; @@ -2499,7 +2494,7 @@ fallback_256: } static void -tty_default_colours(struct grid_cell *gc, const struct window_pane *wp) +tty_default_colours(struct grid_cell *gc, struct window_pane *wp) { struct window *w = wp->window; struct options *oo = w->options; @@ -2550,7 +2545,7 @@ tty_default_colours(struct grid_cell *gc, const struct window_pane *wp) } static void -tty_default_attributes(struct tty *tty, const struct window_pane *wp, u_int bg) +tty_default_attributes(struct tty *tty, struct window_pane *wp, u_int bg) { static struct grid_cell gc; |