diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-23 12:38:01 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-23 12:38:01 +0000 |
commit | 9c6fa9085735d800643e2052a6d0d34ae4ee1344 (patch) | |
tree | 1bfcd36e8153ee6bb323e3cc8ae1e85f3f5c3834 /tty.c | |
parent | 83d1f2b4801d0bdbfbe9fac5cd544a86afbd1929 (diff) | |
download | rtmux-9c6fa9085735d800643e2052a6d0d34ae4ee1344.tar.gz rtmux-9c6fa9085735d800643e2052a6d0d34ae4ee1344.tar.bz2 rtmux-9c6fa9085735d800643e2052a6d0d34ae4ee1344.zip |
Sync OpenBSD patchset 160:
enum tty_cmd is only used as an index into the array of command function
pointers, so remove it and use the function pointers directly to represent
themselves.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 48 |
1 files changed, 5 insertions, 43 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.115 2009-07-22 18:08:56 tcunha Exp $ */ +/* $Id: tty.c,v 1.116 2009-07-23 12:38:01 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -38,39 +38,10 @@ void tty_attributes(struct tty *, const struct grid_cell *); void tty_attributes_fg(struct tty *, const struct grid_cell *); void tty_attributes_bg(struct tty *, const struct grid_cell *); -void tty_cmd_alignmenttest(struct tty *, struct tty_ctx *); -void tty_cmd_cell(struct tty *, struct tty_ctx *); -void tty_cmd_clearendofline(struct tty *, struct tty_ctx *); -void tty_cmd_clearendofscreen(struct tty *, struct tty_ctx *); -void tty_cmd_clearline(struct tty *, struct tty_ctx *); -void tty_cmd_clearscreen(struct tty *, struct tty_ctx *); -void tty_cmd_clearstartofline(struct tty *, struct tty_ctx *); -void tty_cmd_clearstartofscreen(struct tty *, struct tty_ctx *); -void tty_cmd_deletecharacter(struct tty *, struct tty_ctx *); -void tty_cmd_deleteline(struct tty *, struct tty_ctx *); -void tty_cmd_insertcharacter(struct tty *, struct tty_ctx *); -void tty_cmd_insertline(struct tty *, struct tty_ctx *); -void tty_cmd_linefeed(struct tty *, struct tty_ctx *); -void tty_cmd_utf8character(struct tty *, struct tty_ctx *); -void tty_cmd_reverseindex(struct tty *, struct tty_ctx *); - -void (*tty_cmds[])(struct tty *, struct tty_ctx *) = { - tty_cmd_alignmenttest, - tty_cmd_cell, - tty_cmd_clearendofline, - tty_cmd_clearendofscreen, - tty_cmd_clearline, - tty_cmd_clearscreen, - tty_cmd_clearstartofline, - tty_cmd_clearstartofscreen, - tty_cmd_deletecharacter, - tty_cmd_deleteline, - tty_cmd_insertcharacter, - tty_cmd_insertline, - tty_cmd_linefeed, - tty_cmd_utf8character, - tty_cmd_reverseindex, -}; +void tty_emulate_repeat( + struct tty *, enum tty_code_code, enum tty_code_code, u_int); +void tty_cell(struct tty *, + const struct grid_cell *, const struct grid_utf8 *); void tty_init(struct tty *tty, char *path, char *term) @@ -555,15 +526,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, enum tty_cmd cmd, struct tty_ctx *ctx) -{ - if (tty->flags & TTY_FREEZE || tty->term == NULL) - return; - if (tty_cmds[cmd] != NULL) - tty_cmds[cmd](tty, ctx); -} - -void tty_cmd_insertcharacter(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; |