Sync OpenBSD patchset 1121:

Store client in tty struct directly instead of using a callback function
pointer.
This commit is contained in:
Tiago Cunha
2012-05-22 21:05:30 +00:00
parent fff7c0b276
commit 17da2f7d5f
4 changed files with 15 additions and 16 deletions

3
tty.c
View File

@ -64,7 +64,7 @@ void tty_cell(struct tty *,
((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx)
void
tty_init(struct tty *tty, int fd, char *term)
tty_init(struct tty *tty, struct client *c, int fd, char *term)
{
char *path;
@ -76,6 +76,7 @@ tty_init(struct tty *tty, int fd, char *term)
else
tty->termname = xstrdup(term);
tty->fd = fd;
tty->client = c;
if ((path = ttyname(fd)) == NULL)
fatalx("ttyname failed");