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

@ -24,7 +24,7 @@
* Refresh client.
*/
static enum cmd_retval cmd_refresh_client_exec(struct cmd *, struct cmd_q *);
static enum cmd_retval cmd_refresh_client_exec(struct cmd *, struct cmdq_item *);
const struct cmd_entry cmd_refresh_client_entry = {
.name = "refresh-client",
@ -40,29 +40,29 @@ const struct cmd_entry cmd_refresh_client_entry = {
};
static enum cmd_retval
cmd_refresh_client_exec(struct cmd *self, struct cmd_q *cmdq)
cmd_refresh_client_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;
const char *size;
u_int w, h;
if (args_has(args, 'C')) {
if ((size = args_get(args, 'C')) == NULL) {
cmdq_error(cmdq, "missing size");
cmdq_error(item, "missing size");
return (CMD_RETURN_ERROR);
}
if (sscanf(size, "%u,%u", &w, &h) != 2) {
cmdq_error(cmdq, "bad size argument");
cmdq_error(item, "bad size argument");
return (CMD_RETURN_ERROR);
}
if (w < PANE_MINIMUM || w > 5000 ||
h < PANE_MINIMUM || h > 5000) {
cmdq_error(cmdq, "size too small or too big");
cmdq_error(item, "size too small or too big");
return (CMD_RETURN_ERROR);
}
if (!(c->flags & CLIENT_CONTROL)) {
cmdq_error(cmdq, "not a control client");
cmdq_error(item, "not a control client");
return (CMD_RETURN_ERROR);
}
if (tty_set_size(&c->tty, w, h))