mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 02:23:15 +01:00
Miscellaneous unused functions, including one which was basically a
duplicate. Found by lint.
This commit is contained in:
parent
ed8350422e
commit
1675ddb4d1
25
grid.c
25
grid.c
@ -430,31 +430,6 @@ grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny)
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear a group of cells. */
|
||||
void
|
||||
grid_clear_cells(struct grid *gd, u_int px, u_int py, u_int nx)
|
||||
{
|
||||
u_int xx;
|
||||
|
||||
GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx);
|
||||
|
||||
if (nx == 0)
|
||||
return;
|
||||
|
||||
if (grid_check_x(gd, px) != 0)
|
||||
return;
|
||||
if (grid_check_x(gd, px + nx - 1) != 0)
|
||||
return;
|
||||
if (grid_check_y(gd, py) != 0)
|
||||
return;
|
||||
|
||||
for (xx = px; xx < px + nx; xx++) {
|
||||
if (xx >= gd->size[py])
|
||||
break;
|
||||
grid_put_cell(gd, xx, py, &grid_default_cell);
|
||||
}
|
||||
}
|
||||
|
||||
/* Move a group of cells. */
|
||||
void
|
||||
grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx)
|
||||
|
16
server-fn.c
16
server-fn.c
@ -75,22 +75,6 @@ server_write_session(
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
server_write_window(
|
||||
struct window *w, enum hdrtype type, const void *buf, size_t len)
|
||||
{
|
||||
struct client *c;
|
||||
u_int i;
|
||||
|
||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||
c = ARRAY_ITEM(&clients, i);
|
||||
if (c == NULL || c->session == NULL)
|
||||
continue;
|
||||
if (c->session->curw->window == w)
|
||||
server_write_client(c, type, buf, len);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
server_redraw_client(struct client *c)
|
||||
{
|
||||
|
8
tmux.h
8
tmux.h
@ -1007,8 +1007,6 @@ void tty_redraw_region(struct tty *, struct window_pane *);
|
||||
int tty_open(struct tty *, char **);
|
||||
void tty_close(struct tty *, int);
|
||||
void tty_free(struct tty *, int);
|
||||
void tty_write(
|
||||
struct tty *, struct window_pane *, enum tty_cmd, ...);
|
||||
void tty_vwrite(
|
||||
struct tty *, struct window_pane *, enum tty_cmd, va_list);
|
||||
|
||||
@ -1034,7 +1032,6 @@ int tty_keys_next(struct tty *, int *, u_char *);
|
||||
|
||||
/* tty-write.c */
|
||||
void tty_write_cmd(struct window_pane *, enum tty_cmd, ...);
|
||||
void tty_write_mode(struct window_pane *, int);
|
||||
|
||||
/* options-cmd.c */
|
||||
void set_option_string(struct cmd_ctx *,
|
||||
@ -1263,8 +1260,6 @@ void server_write_client(
|
||||
struct client *, enum hdrtype, const void *, size_t);
|
||||
void server_write_session(
|
||||
struct session *, enum hdrtype, const void *, size_t);
|
||||
void server_write_window(
|
||||
struct window *, enum hdrtype, const void *, size_t);
|
||||
void server_redraw_client(struct client *);
|
||||
void server_status_client(struct client *);
|
||||
void server_redraw_session(struct session *);
|
||||
@ -1325,7 +1320,6 @@ void grid_set_utf8(struct grid *, u_int, u_int, const struct grid_utf8 *);
|
||||
void grid_clear(struct grid *, u_int, u_int, u_int, u_int);
|
||||
void grid_clear_lines(struct grid *, u_int, u_int);
|
||||
void grid_move_lines(struct grid *, u_int, u_int, u_int);
|
||||
void grid_clear_cells(struct grid *, u_int, u_int, u_int);
|
||||
void grid_move_cells(struct grid *, u_int, u_int, u_int, u_int);
|
||||
char *grid_string_cells(struct grid *, u_int, u_int, u_int);
|
||||
|
||||
@ -1439,7 +1433,6 @@ void window_set_active_pane(struct window *, struct window_pane *);
|
||||
struct window_pane *window_add_pane(struct window *, int,
|
||||
const char *, const char *, const char **, u_int, char **);
|
||||
void window_remove_pane(struct window *, struct window_pane *);
|
||||
u_int window_index_of_pane(struct window *, struct window_pane *);
|
||||
struct window_pane *window_pane_at_index(struct window *, u_int);
|
||||
u_int window_count_panes(struct window *);
|
||||
void window_destroy_panes(struct window *);
|
||||
@ -1486,7 +1479,6 @@ void window_scroll_pageup(struct window_pane *);
|
||||
/* window-more.c */
|
||||
extern const struct window_mode window_more_mode;
|
||||
void window_more_vadd(struct window_pane *, const char *, va_list);
|
||||
void printflike2 window_more_add(struct window_pane *, const char *, ...);
|
||||
|
||||
/* window-choose.c */
|
||||
extern const struct window_mode window_choose_mode;
|
||||
|
25
tty-write.c
25
tty-write.c
@ -63,28 +63,3 @@ tty_vwrite_cmd(struct window_pane *wp, enum tty_cmd cmd, va_list ap)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tty_write_mode(struct window_pane *wp, int mode)
|
||||
{
|
||||
struct client *c;
|
||||
u_int i;
|
||||
|
||||
if (wp == NULL)
|
||||
return;
|
||||
|
||||
if (wp->window->flags & WINDOW_REDRAW || wp->flags & PANE_REDRAW)
|
||||
return;
|
||||
if (wp->window->flags & WINDOW_HIDDEN || wp->flags & PANE_HIDDEN)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||
c = ARRAY_ITEM(&clients, i);
|
||||
if (c == NULL || c->session == NULL)
|
||||
continue;
|
||||
if (c->flags & CLIENT_SUSPENDED)
|
||||
continue;
|
||||
|
||||
tty_update_mode(&c->tty, mode);
|
||||
}
|
||||
}
|
||||
|
10
tty.c
10
tty.c
@ -546,16 +546,6 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tty_write(struct tty *tty, struct window_pane *wp, enum tty_cmd cmd, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, cmd);
|
||||
tty_vwrite(tty, wp, cmd, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
tty_vwrite(
|
||||
struct tty *tty, struct window_pane *wp, enum tty_cmd cmd, va_list ap)
|
||||
|
23
utf8.c
23
utf8.c
@ -198,7 +198,6 @@ struct utf8_width_entry *utf8_width_root = NULL;
|
||||
int utf8_overlap(struct utf8_width_entry *, struct utf8_width_entry *);
|
||||
void utf8_print(struct utf8_width_entry *, int);
|
||||
u_int utf8_combine(const u_char *);
|
||||
void utf8_split(u_int, u_char *);
|
||||
|
||||
int
|
||||
utf8_overlap(
|
||||
@ -274,28 +273,6 @@ utf8_combine(const u_char *data)
|
||||
return (uvalue);
|
||||
}
|
||||
|
||||
void
|
||||
utf8_split(u_int uvalue, u_char *data)
|
||||
{
|
||||
memset(data, 0xff, 4);
|
||||
|
||||
if (uvalue <= 0x7f)
|
||||
data[0] = uvalue;
|
||||
else if (uvalue > 0x7f && uvalue <= 0x7ff) {
|
||||
data[0] = (uvalue >> 6) | 0xc0;
|
||||
data[1] = (uvalue & 0x3f) | 0x80;
|
||||
} else if (uvalue > 0x7ff && uvalue <= 0xffff) {
|
||||
data[0] = (uvalue >> 12) | 0xe0;
|
||||
data[1] = ((uvalue >> 6) & 0x3f) | 0x80;
|
||||
data[2] = (uvalue & 0x3f) | 0x80;
|
||||
} else if (uvalue > 0xffff && uvalue <= 0x10ffff) {
|
||||
data[0] = (uvalue >> 18) | 0xf0;
|
||||
data[1] = ((uvalue >> 12) & 0x3f) | 0x80;
|
||||
data[2] = ((uvalue >> 6) & 0x3f) | 0x80;
|
||||
data[3] = (uvalue & 0x3f) | 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
utf8_width(const u_char *udata)
|
||||
{
|
||||
|
@ -75,16 +75,6 @@ window_more_vadd(struct window_pane *wp, const char *fmt, va_list ap)
|
||||
screen_write_stop(&ctx);
|
||||
}
|
||||
|
||||
void printflike2
|
||||
window_more_add(struct window_pane *wp, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
window_more_vadd(wp, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
struct screen *
|
||||
window_more_init(struct window_pane *wp)
|
||||
{
|
||||
|
15
window.c
15
window.c
@ -327,21 +327,6 @@ window_remove_pane(struct window *w, struct window_pane *wp)
|
||||
window_pane_destroy(wp);
|
||||
}
|
||||
|
||||
u_int
|
||||
window_index_of_pane(struct window *w, struct window_pane *find)
|
||||
{
|
||||
struct window_pane *wp;
|
||||
u_int n;
|
||||
|
||||
n = 0;
|
||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||
if (wp == find)
|
||||
return (n);
|
||||
n++;
|
||||
}
|
||||
fatalx("unknown pane");
|
||||
}
|
||||
|
||||
struct window_pane *
|
||||
window_pane_at_index(struct window *w, u_int idx)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user