=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-show-environment.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- src/usr.bin/tmux/cmd-show-environment.c 2012/07/11 07:10:15 1.6 +++ src/usr.bin/tmux/cmd-show-environment.c 2013/03/24 09:54:10 1.7 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-environment.c,v 1.6 2012/07/11 07:10:15 nicm Exp $ */ +/* $OpenBSD: cmd-show-environment.c,v 1.7 2013/03/24 09:54:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -27,7 +27,7 @@ * Show environment. */ -enum cmd_retval cmd_show_environment_exec(struct cmd *, struct cmd_ctx *); +enum cmd_retval cmd_show_environment_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_show_environment_entry = { "show-environment", "showenv", @@ -40,7 +40,7 @@ }; enum cmd_retval -cmd_show_environment_exec(struct cmd *self, struct cmd_ctx *ctx) +cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; struct session *s; @@ -50,7 +50,7 @@ if (args_has(self->args, 'g')) env = &global_environ; else { - if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL) + if ((s = cmd_find_session(cmdq, args_get(args, 't'), 0)) == NULL) return (CMD_RETURN_ERROR); env = &s->environ; } @@ -58,21 +58,21 @@ if (args->argc != 0) { envent = environ_find(env, args->argv[0]); if (envent == NULL) { - ctx->error(ctx, "unknown variable: %s", args->argv[0]); + cmdq_error(cmdq, "unknown variable: %s", args->argv[0]); return (CMD_RETURN_ERROR); } if (envent->value != NULL) - ctx->print(ctx, "%s=%s", envent->name, envent->value); + cmdq_print(cmdq, "%s=%s", envent->name, envent->value); else - ctx->print(ctx, "-%s", envent->name); + cmdq_print(cmdq, "-%s", envent->name); return (CMD_RETURN_NORMAL); } RB_FOREACH(envent, environ, env) { if (envent->value != NULL) - ctx->print(ctx, "%s=%s", envent->name, envent->value); + cmdq_print(cmdq, "%s=%s", envent->name, envent->value); else - ctx->print(ctx, "-%s", envent->name); + cmdq_print(cmdq, "-%s", envent->name); } return (CMD_RETURN_NORMAL);