diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-22 18:08:56 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-22 18:08:56 +0000 |
commit | b6afa30c3954d2d98304ea69b1375d7b51091cc9 (patch) | |
tree | 0443ed5819d4cf4499ab1993f14f889f91535adc /tmux.h | |
parent | 75a44d856e6b8bf6b1b09c57d630e99c66774214 (diff) | |
download | rtmux-b6afa30c3954d2d98304ea69b1375d7b51091cc9.tar.gz rtmux-b6afa30c3954d2d98304ea69b1375d7b51091cc9.tar.bz2 rtmux-b6afa30c3954d2d98304ea69b1375d7b51091cc9.zip |
Sync OpenBSD patchset 159:
There are relatively few arguments to tty_cmd_* functions now, so tidy them up
by using a struct rather than hiding everything with varargs.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.381 2009-07-22 17:58:42 tcunha Exp $ */ +/* $Id: tmux.h,v 1.382 2009-07-22 18:08:56 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -291,6 +291,16 @@ enum tty_cmd { TTY_REVERSEINDEX, }; +struct tty_ctx { + struct window_pane *wp; + + const struct grid_cell *cell; + const struct grid_utf8 *utf8; + + u_int num; + void *ptr; +}; + /* Message codes. */ enum hdrtype { MSG_COMMAND, @@ -1047,8 +1057,7 @@ 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_vwrite( - struct tty *, struct window_pane *, enum tty_cmd, va_list); +void tty_write(struct tty *, enum tty_cmd, struct tty_ctx *); /* tty-term.c */ extern struct tty_terms tty_terms; @@ -1071,7 +1080,10 @@ void tty_keys_free(struct tty *); int tty_keys_next(struct tty *, int *, u_char *); /* tty-write.c */ -void tty_write_cmd(struct window_pane *, enum tty_cmd, ...); +void tty_write0(struct window_pane *, enum tty_cmd); +void tty_writenum(struct window_pane *, enum tty_cmd, u_int); +void tty_writeptr(struct window_pane *, enum tty_cmd, void *); +void tty_write_cmd(enum tty_cmd, struct tty_ctx *); /* options-cmd.c */ void set_option_string(struct cmd_ctx *, |