version 1.183, 2015/05/19 08:48:37 |
version 1.184, 2015/07/13 15:49:31 |
|
|
#define tty_pane_full_width(tty, ctx) \ |
#define tty_pane_full_width(tty, ctx) \ |
((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx) |
((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx) |
|
|
void |
int
|
tty_init(struct tty *tty, struct client *c, int fd, char *term) |
tty_init(struct tty *tty, struct client *c, int fd, char *term) |
{ |
{ |
char *path; |
char *path; |
|
|
|
if (!isatty(fd))
|
|
return (-1);
|
|
|
memset(tty, 0, sizeof *tty); |
memset(tty, 0, sizeof *tty); |
tty->log_fd = -1; |
tty->log_fd = -1; |
|
|
|
|
tty->client = c; |
tty->client = c; |
|
|
if ((path = ttyname(fd)) == NULL) |
if ((path = ttyname(fd)) == NULL) |
fatalx("ttyname failed"); |
return (-1);
|
tty->path = xstrdup(path); |
tty->path = xstrdup(path); |
tty->cstyle = 0; |
tty->cstyle = 0; |
tty->ccolour = xstrdup(""); |
tty->ccolour = xstrdup(""); |
|
|
tty->flags = 0; |
tty->flags = 0; |
tty->term_flags = 0; |
tty->term_flags = 0; |
|
|
|
return (0);
|
} |
} |
|
|
int |
int |