=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-respawn-pane.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/tmux/cmd-respawn-pane.c 2012/07/10 11:53:01 1.6 --- src/usr.bin/tmux/cmd-respawn-pane.c 2012/07/11 07:10:15 1.7 *************** *** 1,4 **** ! /* $OpenBSD: cmd-respawn-pane.c,v 1.6 2012/07/10 11:53:01 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-respawn-pane.c,v 1.7 2012/07/11 07:10:15 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 28,34 **** * Respawn a pane (restart the command). Kill existing if -k given. */ ! int cmd_respawn_pane_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_respawn_pane_entry = { "respawn-pane", "respawnp", --- 28,34 ---- * Respawn a pane (restart the command). Kill existing if -k given. */ ! enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_respawn_pane_entry = { "respawn-pane", "respawnp", *************** *** 40,46 **** cmd_respawn_pane_exec }; ! int cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; --- 40,46 ---- cmd_respawn_pane_exec }; ! enum cmd_retval cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; *************** *** 54,60 **** u_int idx; if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL) ! return (-1); w = wl->window; if (!args_has(self->args, 'k') && wp->fd != -1) { --- 54,60 ---- u_int idx; if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL) ! return (CMD_RETURN_ERROR); w = wl->window; if (!args_has(self->args, 'k') && wp->fd != -1) { *************** *** 62,68 **** fatalx("index not found"); ctx->error(ctx, "pane still active: %s:%u.%u", s->name, wl->idx, idx); ! return (-1); } environ_init(&env); --- 62,68 ---- fatalx("index not found"); ctx->error(ctx, "pane still active: %s:%u.%u", s->name, wl->idx, idx); ! return (CMD_RETURN_ERROR); } environ_init(&env); *************** *** 82,92 **** ctx->error(ctx, "respawn pane failed: %s", cause); free(cause); environ_free(&env); ! return (-1); } wp->flags |= PANE_REDRAW; server_status_window(w); environ_free(&env); ! return (0); } --- 82,92 ---- ctx->error(ctx, "respawn pane failed: %s", cause); free(cause); environ_free(&env); ! return (CMD_RETURN_ERROR); } wp->flags |= PANE_REDRAW; server_status_window(w); environ_free(&env); ! return (CMD_RETURN_NORMAL); }