Make struct cmd local to cmd.c and move it out of tmux.h.

This commit is contained in:
nicm
2020-04-13 08:26:27 +00:00
parent 9cbe9675ea
commit c20eb0c0ae
65 changed files with 314 additions and 247 deletions

View File

@ -69,7 +69,7 @@ static void
cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
struct environ_entry *envent)
{
struct args *args = self->args;
struct args *args = cmd_get_args(self);
char *escaped;
if (!args_has(args, 'h') && (envent->flags & ENVIRON_HIDDEN))
@ -77,7 +77,7 @@ cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
if (args_has(args, 'h') && (~envent->flags & ENVIRON_HIDDEN))
return;
if (!args_has(self->args, 's')) {
if (!args_has(args, 's')) {
if (envent->value != NULL)
cmdq_print(item, "%s=%s", envent->name, envent->value);
else
@ -97,7 +97,7 @@ cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
static enum cmd_retval
cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
struct args *args = cmd_get_args(self);
struct environ *env;
struct environ_entry *envent;
const char *target;
@ -109,7 +109,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item)
}
}
if (args_has(self->args, 'g'))
if (args_has(args, 'g'))
env = global_environ;
else {
if (item->target.s == NULL) {