diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-10-16 19:04:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-10-16 19:04:06 +0000 |
commit | 3f0dad54b9b7fbe7e951cb592fa147fbdc7bdde6 (patch) | |
tree | a685fa2872c014d3bc9be168c7338d3974fcab39 /usr.bin/tmux/cmd.c | |
parent | f71299d662dee69becff6a71ecf049a77fbacd95 (diff) |
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r-- | usr.bin/tmux/cmd.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index 18ab02b5d6e..c2d50f8ed77 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.125 2016/10/16 17:55:14 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.126 2016/10/16 19:04:05 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -390,7 +390,7 @@ usage: static int cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, - struct cmd_q *cmdq) + struct cmdq_item *item) { int targetflags, error; struct cmd_find_state *fs = NULL; @@ -402,9 +402,9 @@ cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, return (0); if (c == 't') - fs = &cmdq->state.tflag; + fs = &item->state.tflag; else if (c == 's') - fs = &cmdq->state.sflag; + fs = &item->state.sflag; if (flag == CMD_SESSION_WITHPANE) { if (target != NULL && target[strcspn(target, ":.")] != '\0') @@ -450,7 +450,7 @@ cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, } log_debug("%s: flag %c %d %#x", __func__, c, flag, targetflags); - error = cmd_find_current(¤t, cmdq, targetflags); + error = cmd_find_current(¤t, item, targetflags); if (error != 0 && ~targetflags & CMD_FIND_QUIET) return (-1); if (!cmd_find_empty_state(¤t) && !cmd_find_valid_state(¤t)) @@ -465,13 +465,13 @@ cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, case CMD_SESSION_CANFAIL: case CMD_SESSION_PREFERUNATTACHED: case CMD_SESSION_WITHPANE: - error = cmd_find_target(fs, ¤t, cmdq, target, + error = cmd_find_target(fs, ¤t, item, target, CMD_FIND_SESSION, targetflags); if (error != 0 && ~targetflags & CMD_FIND_QUIET) return (-1); break; case CMD_MOVEW_R: - error = cmd_find_target(fs, ¤t, cmdq, target, + error = cmd_find_target(fs, ¤t, item, target, CMD_FIND_SESSION, CMD_FIND_QUIET); if (error == 0) break; @@ -480,7 +480,7 @@ cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, case CMD_WINDOW_CANFAIL: case CMD_WINDOW_MARKED: case CMD_WINDOW_INDEX: - error = cmd_find_target(fs, ¤t, cmdq, target, + error = cmd_find_target(fs, ¤t, item, target, CMD_FIND_WINDOW, targetflags); if (error != 0 && ~targetflags & CMD_FIND_QUIET) return (-1); @@ -488,7 +488,7 @@ cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, case CMD_PANE: case CMD_PANE_CANFAIL: case CMD_PANE_MARKED: - error = cmd_find_target(fs, ¤t, cmdq, target, + error = cmd_find_target(fs, ¤t, item, target, CMD_FIND_PANE, targetflags); if (error != 0 && ~targetflags & CMD_FIND_QUIET) return (-1); @@ -500,17 +500,17 @@ cmd_prepare_state_flag(char c, const char *target, enum cmd_entry_flag flag, } int -cmd_prepare_state(struct cmd *cmd, struct cmd_q *cmdq) +cmd_prepare_state(struct cmd *cmd, struct cmdq_item *item) { const struct cmd_entry *entry = cmd->entry; - struct cmd_state *state = &cmdq->state; + struct cmd_state *state = &item->state; char *tmp; enum cmd_entry_flag flag; const char *s; int error; tmp = cmd_print(cmd); - log_debug("preparing state for %s (client %p)", tmp, cmdq->client); + log_debug("preparing state for %s (client %p)", tmp, item->client); free(tmp); state->c = NULL; @@ -528,12 +528,12 @@ cmd_prepare_state(struct cmd *cmd, struct cmd_q *cmdq) s = args_get(cmd->args, 'c'); switch (flag) { case CMD_CLIENT: - state->c = cmd_find_client(cmdq, s, 0); + state->c = cmd_find_client(item, s, 0); if (state->c == NULL) return (-1); break; default: - state->c = cmd_find_client(cmdq, s, 1); + state->c = cmd_find_client(item, s, 1); break; } log_debug("using client %p", state->c); @@ -541,14 +541,14 @@ cmd_prepare_state(struct cmd *cmd, struct cmd_q *cmdq) s = args_get(cmd->args, 't'); log_debug("preparing -t state: target %s", s == NULL ? "none" : s); - error = cmd_prepare_state_flag('t', s, entry->tflag, cmdq); + error = cmd_prepare_state_flag('t', s, entry->tflag, item); if (error != 0) return (error); s = args_get(cmd->args, 's'); log_debug("preparing -s state: target %s", s == NULL ? "none" : s); - error = cmd_prepare_state_flag('s', s, entry->sflag, cmdq); + error = cmd_prepare_state_flag('s', s, entry->sflag, item); if (error != 0) return (error); |