Mass rename struct cmd_q to struct cmdq_item and related.

This commit is contained in:
nicm
2016-10-16 19:04:05 +00:00
parent ddc4512d2e
commit b342bd0b46
73 changed files with 1002 additions and 972 deletions

View File

@ -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);