summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2016-10-15 09:27:53 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2016-10-15 09:27:53 +0000
commit43a23c05bd2129ce775aa2d0367a592b5c6361af (patch)
tree81a4ee21de2a4857305c51b1ed6e466d2524ab37
parent5d0e2280c62829f61d7b035a8eb33603d7b6647f (diff)
Give window_create and window_create1 better names.
-rw-r--r--usr.bin/tmux/cmd-break-pane.c4
-rw-r--r--usr.bin/tmux/session.c4
-rw-r--r--usr.bin/tmux/tmux.h6
-rw-r--r--usr.bin/tmux/window.c12
4 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/tmux/cmd-break-pane.c b/usr.bin/tmux/cmd-break-pane.c
index 4dc06a285db..efcd4c93939 100644
--- a/usr.bin/tmux/cmd-break-pane.c
+++ b/usr.bin/tmux/cmd-break-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-break-pane.c,v 1.38 2016/10/10 21:51:39 nicm Exp $ */
+/* $OpenBSD: cmd-break-pane.c,v 1.39 2016/10/15 09:27:52 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -75,7 +75,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq)
window_lost_pane(w, wp);
layout_close_pane(wp);
- w = wp->window = window_create1(dst_s->sx, dst_s->sy);
+ w = wp->window = window_create(dst_s->sx, dst_s->sy);
TAILQ_INSERT_HEAD(&w->panes, wp, entry);
w->active = wp;
name = default_window_name(w);
diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c
index b7d4f50e8d4..db791bc6937 100644
--- a/usr.bin/tmux/session.c
+++ b/usr.bin/tmux/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.66 2016/10/15 00:12:58 nicm Exp $ */
+/* $OpenBSD: session.c,v 1.67 2016/10/15 09:27:52 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -349,7 +349,7 @@ session_new(struct session *s, const char *name, int argc, char **argv,
shell = _PATH_BSHELL;
hlimit = options_get_number(s->options, "history-limit");
- w = window_create(name, argc, argv, path, shell, cwd, env, s->tio,
+ w = window_create_spawn(name, argc, argv, path, shell, cwd, env, s->tio,
s->sx, s->sy, hlimit, cause);
if (w == NULL) {
winlink_remove(&s->windows, wl);
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index d0809fe3f45..c9c3a849d00 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.665 2016/10/15 00:12:58 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.666 2016/10/15 09:27:52 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2061,8 +2061,8 @@ void winlink_stack_remove(struct winlink_stack *, struct winlink *);
struct window *window_find_by_id_str(const char *);
struct window *window_find_by_id(u_int);
void window_update_activity(struct window *);
-struct window *window_create1(u_int, u_int);
-struct window *window_create(const char *, int, char **, const char *,
+struct window *window_create(u_int, u_int);
+struct window *window_create_spawn(const char *, int, char **, const char *,
const char *, const char *, struct environ *,
struct termios *, u_int, u_int, u_int, char **);
void window_destroy(struct window *);
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 3dcbdf9ca87..bd08b40dffc 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.170 2016/10/13 20:27:27 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.171 2016/10/15 09:27:52 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -293,7 +293,7 @@ window_update_activity(struct window *w)
}
struct window *
-window_create1(u_int sx, u_int sy)
+window_create(u_int sx, u_int sy)
{
struct window *w;
@@ -323,19 +323,19 @@ window_create1(u_int sx, u_int sy)
}
struct window *
-window_create(const char *name, int argc, char **argv, const char *path,
+window_create_spawn(const char *name, int argc, char **argv, const char *path,
const char *shell, const char *cwd, struct environ *env,
struct termios *tio, u_int sx, u_int sy, u_int hlimit, char **cause)
{
struct window *w;
struct window_pane *wp;
- w = window_create1(sx, sy);
+ w = window_create(sx, sy);
wp = window_add_pane(w, NULL, hlimit);
layout_init(w, wp);
- if (window_pane_spawn(wp, argc, argv, path, shell, cwd, env, tio,
- cause) != 0) {
+ if (window_pane_spawn(wp, argc, argv, path, shell, cwd,
+ env, tio, cause) != 0) {
window_destroy(w);
return (NULL);
}