summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-respawn-pane.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2016-10-16 19:04:06 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2016-10-16 19:04:06 +0000
commit3f0dad54b9b7fbe7e951cb592fa147fbdc7bdde6 (patch)
treea685fa2872c014d3bc9be168c7338d3974fcab39 /usr.bin/tmux/cmd-respawn-pane.c
parentf71299d662dee69becff6a71ecf049a77fbacd95 (diff)
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'usr.bin/tmux/cmd-respawn-pane.c')
-rw-r--r--usr.bin/tmux/cmd-respawn-pane.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/tmux/cmd-respawn-pane.c b/usr.bin/tmux/cmd-respawn-pane.c
index 58ad36611fe..4c31d003f8d 100644
--- a/usr.bin/tmux/cmd-respawn-pane.c
+++ b/usr.bin/tmux/cmd-respawn-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-respawn-pane.c,v 1.21 2016/10/10 21:51:39 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-pane.c,v 1.22 2016/10/16 19:04:05 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -28,7 +28,7 @@
* Respawn a pane (restart the command). Kill existing if -k given.
*/
-static enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmdq_item *);
const struct cmd_entry cmd_respawn_pane_entry = {
.name = "respawn-pane",
@@ -44,13 +44,13 @@ const struct cmd_entry cmd_respawn_pane_entry = {
};
static enum cmd_retval
-cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
+cmd_respawn_pane_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
- struct winlink *wl = cmdq->state.tflag.wl;
+ struct winlink *wl = item->state.tflag.wl;
struct window *w = wl->window;
- struct window_pane *wp = cmdq->state.tflag.wp;
- struct session *s = cmdq->state.tflag.s;
+ struct window_pane *wp = item->state.tflag.wp;
+ struct session *s = item->state.tflag.s;
struct environ *env;
const char *path;
char *cause;
@@ -60,7 +60,7 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
if (!args_has(self->args, 'k') && wp->fd != -1) {
if (window_pane_index(wp, &idx) != 0)
fatalx("index not found");
- cmdq_error(cmdq, "pane still active: %s:%d.%u",
+ cmdq_error(item, "pane still active: %s:%d.%u",
s->name, wl->idx, idx);
return (CMD_RETURN_ERROR);
}
@@ -75,8 +75,8 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
input_init(wp);
path = NULL;
- if (cmdq->client != NULL && cmdq->client->session == NULL)
- envent = environ_find(cmdq->client->environ, "PATH");
+ if (item->client != NULL && item->client->session == NULL)
+ envent = environ_find(item->client->environ, "PATH");
else
envent = environ_find(s->environ, "PATH");
if (envent != NULL)
@@ -84,7 +84,7 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
if (window_pane_spawn(wp, args->argc, args->argv, path, NULL, NULL, env,
s->tio, &cause) != 0) {
- cmdq_error(cmdq, "respawn pane failed: %s", cause);
+ cmdq_error(item, "respawn pane failed: %s", cause);
free(cause);
environ_free(env);
return (CMD_RETURN_ERROR);