summaryrefslogtreecommitdiffstats
path: root/cmd-display-panes.c
diff options
context:
space:
mode:
authornicm <nicm>2016-10-16 19:04:05 +0000
committernicm <nicm>2016-10-16 19:04:05 +0000
commitb342bd0b462f69a9fc9a59d52bcd4bb34b57114f (patch)
tree2da71181e3b540b8b52422cb598682f1505c2e89 /cmd-display-panes.c
parentddc4512d2e0eda6c705e002cb5dbf80719d709e1 (diff)
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'cmd-display-panes.c')
-rw-r--r--cmd-display-panes.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/cmd-display-panes.c b/cmd-display-panes.c
index 471bec02..65813804 100644
--- a/cmd-display-panes.c
+++ b/cmd-display-panes.c
@@ -27,10 +27,11 @@
* Display panes on a client.
*/
-static enum cmd_retval cmd_display_panes_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_display_panes_exec(struct cmd *,
+ struct cmdq_item *);
-static void cmd_display_panes_callback(struct client *,
- struct window_pane *);
+static void cmd_display_panes_callback(struct client *,
+ struct window_pane *);
const struct cmd_entry cmd_display_panes_entry = {
.name = "display-panes",
@@ -46,10 +47,10 @@ const struct cmd_entry cmd_display_panes_entry = {
};
static enum cmd_retval
-cmd_display_panes_exec(struct cmd *self, struct cmd_q *cmdq)
+cmd_display_panes_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
- struct client *c = cmdq->state.c;
+ struct client *c = item->state.c;
if (c->identify_callback != NULL)
return (CMD_RETURN_NORMAL);
@@ -66,11 +67,11 @@ cmd_display_panes_exec(struct cmd *self, struct cmd_q *cmdq)
}
static enum cmd_retval
-cmd_display_panes_error(struct cmd_q *cmdq, void *data)
+cmd_display_panes_error(struct cmdq_item *item, void *data)
{
char *error = data;
- cmdq_error(cmdq, "%s", error);
+ cmdq_error(item, "%s", error);
free(error);
return (CMD_RETURN_NORMAL);
@@ -79,9 +80,9 @@ cmd_display_panes_error(struct cmd_q *cmdq, void *data)
static void
cmd_display_panes_callback(struct client *c, struct window_pane *wp)
{
- struct cmd_list *cmdlist;
- struct cmd_q *new_cmdq;
- char *template, *cmd, *expanded, *cause;
+ struct cmd_list *cmdlist;
+ struct cmdq_item *new_item;
+ char *template, *cmd, *expanded, *cause;
template = c->identify_callback_data;
if (wp == NULL)
@@ -91,17 +92,17 @@ cmd_display_panes_callback(struct client *c, struct window_pane *wp)
if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) {
if (cause != NULL) {
- new_cmdq = cmdq_get_callback(cmd_display_panes_error,
+ new_item = cmdq_get_callback(cmd_display_panes_error,
cause);
} else
- new_cmdq = NULL;
+ new_item = NULL;
} else {
- new_cmdq = cmdq_get_command(cmdlist, NULL, NULL, 0);
+ new_item = cmdq_get_command(cmdlist, NULL, NULL, 0);
cmd_list_free(cmdlist);
}
- if (new_cmdq != NULL)
- cmdq_append(c, new_cmdq);
+ if (new_item != NULL)
+ cmdq_append(c, new_item);
free(cmd);
free(expanded);