=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-show-options.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- src/usr.bin/tmux/cmd-show-options.c 2012/02/25 12:57:42 1.15 +++ src/usr.bin/tmux/cmd-show-options.c 2012/07/11 07:10:15 1.16 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-options.c,v 1.15 2012/02/25 12:57:42 nicm Exp $ */ +/* $OpenBSD: cmd-show-options.c,v 1.16 2012/07/11 07:10:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -27,7 +27,7 @@ * Show options. */ -int cmd_show_options_exec(struct cmd *, struct cmd_ctx *); +enum cmd_retval cmd_show_options_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_show_options_entry = { "show-options", "show", @@ -49,7 +49,7 @@ cmd_show_options_exec }; -int +enum cmd_retval cmd_show_options_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; @@ -71,7 +71,7 @@ else { wl = cmd_find_window(ctx, args_get(args, 't'), NULL); if (wl == NULL) - return (-1); + return (CMD_RETURN_ERROR); oo = &wl->window->options; } } else { @@ -81,7 +81,7 @@ else { s = cmd_find_session(ctx, args_get(args, 't'), 0); if (s == NULL) - return (-1); + return (CMD_RETURN_ERROR); oo = &s->options; } } @@ -90,14 +90,14 @@ table = oe = NULL; if (options_table_find(args->argv[0], &table, &oe) != 0) { ctx->error(ctx, "ambiguous option: %s", args->argv[0]); - return (-1); + return (CMD_RETURN_ERROR); } if (oe == NULL) { ctx->error(ctx, "unknown option: %s", args->argv[0]); - return (-1); + return (CMD_RETURN_ERROR); } if ((o = options_find1(oo, oe->name)) == NULL) - return (0); + return (CMD_RETURN_NORMAL); optval = options_table_print_entry(oe, o); ctx->print(ctx, "%s %s", oe->name, optval); } else { @@ -109,5 +109,5 @@ } } - return (0); + return (CMD_RETURN_NORMAL); }