From b342bd0b462f69a9fc9a59d52bcd4bb34b57114f Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 16 Oct 2016 19:04:05 +0000 Subject: Mass rename struct cmd_q to struct cmdq_item and related. --- cmd-display-panes.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'cmd-display-panes.c') 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); -- cgit v1.2.3