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,7 +27,8 @@
* Switch client to a different session.
*/
static enum cmd_retval cmd_switch_client_exec(struct cmd *, struct cmd_q *);
static enum cmd_retval cmd_switch_client_exec(struct cmd *,
struct cmdq_item *);
const struct cmd_entry cmd_switch_client_entry = {
.name = "switch-client",
@@ -45,12 +46,12 @@ const struct cmd_entry cmd_switch_client_entry = {
};
static enum cmd_retval
cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
struct cmd_state *state = &cmdq->state;
struct cmd_state *state = &item->state;
struct client *c = state->c;
struct session *s = cmdq->state.tflag.s;
struct session *s = item->state.tflag.s;
struct window_pane *wp;
const char *tablename, *update;
struct key_table *table;
@@ -62,7 +63,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
if (tablename != NULL) {
table = key_bindings_get_table(tablename, 0);
if (table == NULL) {
cmdq_error(cmdq, "table %s doesn't exist", tablename);
cmdq_error(item, "table %s doesn't exist", tablename);
return (CMD_RETURN_ERROR);
}
table->references++;
@@ -73,12 +74,12 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
if (args_has(args, 'n')) {
if ((s = session_next_session(c->session)) == NULL) {
cmdq_error(cmdq, "can't find next session");
cmdq_error(item, "can't find next session");
return (CMD_RETURN_ERROR);
}
} else if (args_has(args, 'p')) {
if ((s = session_previous_session(c->session)) == NULL) {
cmdq_error(cmdq, "can't find previous session");
cmdq_error(item, "can't find previous session");
return (CMD_RETURN_ERROR);
}
} else if (args_has(args, 'l')) {
@@ -87,11 +88,11 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
else
s = NULL;
if (s == NULL) {
cmdq_error(cmdq, "can't find last session");
cmdq_error(item, "can't find last session");
return (CMD_RETURN_ERROR);
}
} else {
if (cmdq->client == NULL)
if (item->client == NULL)
return (CMD_RETURN_NORMAL);
if (state->tflag.wl != NULL) {
wp = state->tflag.wp;