summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-list-panes.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-list-panes.c
parentf71299d662dee69becff6a71ecf049a77fbacd95 (diff)
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'usr.bin/tmux/cmd-list-panes.c')
-rw-r--r--usr.bin/tmux/cmd-list-panes.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/usr.bin/tmux/cmd-list-panes.c b/usr.bin/tmux/cmd-list-panes.c
index 577c526c673..04947718b07 100644
--- a/usr.bin/tmux/cmd-list-panes.c
+++ b/usr.bin/tmux/cmd-list-panes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-panes.c,v 1.29 2016/10/14 22:14:22 nicm Exp $ */
+/* $OpenBSD: cmd-list-panes.c,v 1.30 2016/10/16 19:04:05 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,13 +26,13 @@
* List panes on given window.
*/
-static enum cmd_retval cmd_list_panes_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_list_panes_exec(struct cmd *, struct cmdq_item *);
-static void cmd_list_panes_server(struct cmd *, struct cmd_q *);
+static void cmd_list_panes_server(struct cmd *, struct cmdq_item *);
static void cmd_list_panes_session(struct cmd *, struct session *,
- struct cmd_q *, int);
+ struct cmdq_item *, int);
static void cmd_list_panes_window(struct cmd *, struct session *,
- struct winlink *, struct cmd_q *, int);
+ struct winlink *, struct cmdq_item *, int);
const struct cmd_entry cmd_list_panes_entry = {
.name = "list-panes",
@@ -48,44 +48,44 @@ const struct cmd_entry cmd_list_panes_entry = {
};
static enum cmd_retval
-cmd_list_panes_exec(struct cmd *self, struct cmd_q *cmdq)
+cmd_list_panes_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
- struct session *s = cmdq->state.tflag.s;
- struct winlink *wl = cmdq->state.tflag.wl;
+ struct session *s = item->state.tflag.s;
+ struct winlink *wl = item->state.tflag.wl;
if (args_has(args, 'a'))
- cmd_list_panes_server(self, cmdq);
+ cmd_list_panes_server(self, item);
else if (args_has(args, 's'))
- cmd_list_panes_session(self, s, cmdq, 1);
+ cmd_list_panes_session(self, s, item, 1);
else
- cmd_list_panes_window(self, s, wl, cmdq, 0);
+ cmd_list_panes_window(self, s, wl, item, 0);
return (CMD_RETURN_NORMAL);
}
static void
-cmd_list_panes_server(struct cmd *self, struct cmd_q *cmdq)
+cmd_list_panes_server(struct cmd *self, struct cmdq_item *item)
{
struct session *s;
RB_FOREACH(s, sessions, &sessions)
- cmd_list_panes_session(self, s, cmdq, 2);
+ cmd_list_panes_session(self, s, item, 2);
}
static void
-cmd_list_panes_session(struct cmd *self, struct session *s, struct cmd_q *cmdq,
- int type)
+cmd_list_panes_session(struct cmd *self, struct session *s,
+ struct cmdq_item *item, int type)
{
struct winlink *wl;
RB_FOREACH(wl, winlinks, &s->windows)
- cmd_list_panes_window(self, s, wl, cmdq, type);
+ cmd_list_panes_window(self, s, wl, item, type);
}
static void
cmd_list_panes_window(struct cmd *self, struct session *s, struct winlink *wl,
- struct cmd_q *cmdq, int type)
+ struct cmdq_item *item, int type)
{
struct args *args = self->args;
struct window_pane *wp;
@@ -123,12 +123,12 @@ cmd_list_panes_window(struct cmd *self, struct session *s, struct winlink *wl,
n = 0;
TAILQ_FOREACH(wp, &wl->window->panes, entry) {
- ft = format_create(cmdq, 0);
+ ft = format_create(item, 0);
format_add(ft, "line", "%u", n);
format_defaults(ft, NULL, s, wl, wp);
line = format_expand(ft, template);
- cmdq_print(cmdq, "%s", line);
+ cmdq_print(item, "%s", line);
free(line);
format_free(ft);