=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-show-environment.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/tmux/cmd-show-environment.c 2012/03/22 11:11:57 1.5 +++ src/usr.bin/tmux/cmd-show-environment.c 2012/07/11 07:10:15 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-environment.c,v 1.5 2012/03/22 11:11:57 nicm Exp $ */ +/* $OpenBSD: cmd-show-environment.c,v 1.6 2012/07/11 07:10:15 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -27,7 +27,7 @@ * Show environment. */ -int cmd_show_environment_exec(struct cmd *, struct cmd_ctx *); +enum cmd_retval cmd_show_environment_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_show_environment_entry = { "show-environment", "showenv", @@ -39,7 +39,7 @@ cmd_show_environment_exec }; -int +enum cmd_retval cmd_show_environment_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; @@ -51,7 +51,7 @@ env = &global_environ; else { if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL) - return (-1); + return (CMD_RETURN_ERROR); env = &s->environ; } @@ -59,13 +59,13 @@ envent = environ_find(env, args->argv[0]); if (envent == NULL) { ctx->error(ctx, "unknown variable: %s", args->argv[0]); - return (-1); + return (CMD_RETURN_ERROR); } if (envent->value != NULL) ctx->print(ctx, "%s=%s", envent->name, envent->value); else ctx->print(ctx, "-%s", envent->name); - return (0); + return (CMD_RETURN_NORMAL); } RB_FOREACH(envent, environ, env) { @@ -75,5 +75,5 @@ ctx->print(ctx, "-%s", envent->name); } - return (0); + return (CMD_RETURN_NORMAL); }