diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-07-13 15:51:32 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-07-13 15:51:32 +0000 |
commit | 218912046f594316c138947b1d67a19ae94a0ca3 (patch) | |
tree | d46c2446eaffe37a4791a01894abc27fff81005d /usr.bin | |
parent | a5b926d23cb47daedc71de1868615af012f8297c (diff) |
Fix line endings.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/server-client.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tty.c | 16 |
3 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 919c5a8e1a3..141a2cd2955 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.144 2015/07/13 15:49:31 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.145 2015/07/13 15:51:31 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -96,8 +96,8 @@ server_client_create(int fd) environ_init(&c->environ); - c->cwd = -1;
-
+ c->cwd = -1; + c->cmdq = cmdq_new(c); c->cmdq->client_exit = 1; @@ -1255,7 +1255,7 @@ server_client_msg_identify(struct client *c, struct imsg *imsg) if (c->fd == -1) return; - if (tty_init(&c->tty, c, c->fd, c->term) != 0) {
+ if (tty_init(&c->tty, c, c->fd, c->term) != 0) { close(c->fd); c->fd = -1; return; diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 36b72676042..315e8522ffe 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.527 2015/07/13 15:49:31 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.528 2015/07/13 15:51:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1600,7 +1600,7 @@ void tty_putcode_ptr2(struct tty *, enum tty_code_code, const void *, void tty_puts(struct tty *, const char *); void tty_putc(struct tty *, u_char); void tty_putn(struct tty *, const void *, size_t, u_int); -int tty_init(struct tty *, struct client *, int, char *);
+int tty_init(struct tty *, struct client *, int, char *); int tty_resize(struct tty *); int tty_set_size(struct tty *, u_int, u_int); void tty_set_class(struct tty *, u_int); diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 09dc381626d..2d747564c33 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.184 2015/07/13 15:49:31 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.185 2015/07/13 15:51:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -59,14 +59,14 @@ void tty_default_colours(struct grid_cell *, const struct window_pane *); #define tty_pane_full_width(tty, ctx) \ ((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx) -int
+int tty_init(struct tty *tty, struct client *c, int fd, char *term) { char *path; - if (!isatty(fd))
- return (-1);
-
+ if (!isatty(fd)) + return (-1); + memset(tty, 0, sizeof *tty); tty->log_fd = -1; @@ -78,15 +78,15 @@ tty_init(struct tty *tty, struct client *c, int fd, char *term) tty->client = c; if ((path = ttyname(fd)) == NULL) - return (-1);
+ return (-1); tty->path = xstrdup(path); tty->cstyle = 0; tty->ccolour = xstrdup(""); tty->flags = 0; tty->term_flags = 0; -
- return (0);
+ + return (0); } int |