diff options
author | nicm <nicm> | 2016-10-16 19:04:05 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-16 19:04:05 +0000 |
commit | b342bd0b462f69a9fc9a59d52bcd4bb34b57114f (patch) | |
tree | 2da71181e3b540b8b52422cb598682f1505c2e89 /cmd-switch-client.c | |
parent | ddc4512d2e0eda6c705e002cb5dbf80719d709e1 (diff) | |
download | rtmux-b342bd0b462f69a9fc9a59d52bcd4bb34b57114f.tar.gz rtmux-b342bd0b462f69a9fc9a59d52bcd4bb34b57114f.tar.bz2 rtmux-b342bd0b462f69a9fc9a59d52bcd4bb34b57114f.zip |
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'cmd-switch-client.c')
-rw-r--r-- | cmd-switch-client.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cmd-switch-client.c b/cmd-switch-client.c index cc3212db..eb7c5351 100644 --- a/cmd-switch-client.c +++ b/cmd-switch-client.c @@ -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; |