=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-display-panes.c,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** src/usr.bin/tmux/cmd-display-panes.c 2016/10/16 17:55:14 1.15 --- src/usr.bin/tmux/cmd-display-panes.c 2016/10/16 19:04:05 1.16 *************** *** 1,4 **** ! /* $OpenBSD: cmd-display-panes.c,v 1.15 2016/10/16 17:55:14 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-display-panes.c,v 1.16 2016/10/16 19:04:05 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 27,36 **** * Display panes on a client. */ ! static enum cmd_retval cmd_display_panes_exec(struct cmd *, struct cmd_q *); ! static void cmd_display_panes_callback(struct client *, ! struct window_pane *); const struct cmd_entry cmd_display_panes_entry = { .name = "display-panes", --- 27,37 ---- * Display panes on a client. */ ! static enum cmd_retval cmd_display_panes_exec(struct cmd *, ! struct cmdq_item *); ! static void cmd_display_panes_callback(struct client *, ! struct window_pane *); const struct cmd_entry cmd_display_panes_entry = { .name = "display-panes", *************** *** 46,55 **** }; static enum cmd_retval ! cmd_display_panes_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; ! struct client *c = cmdq->state.c; if (c->identify_callback != NULL) return (CMD_RETURN_NORMAL); --- 47,56 ---- }; static enum cmd_retval ! cmd_display_panes_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = self->args; ! struct client *c = item->state.c; if (c->identify_callback != NULL) return (CMD_RETURN_NORMAL); *************** *** 66,76 **** } static enum cmd_retval ! cmd_display_panes_error(struct cmd_q *cmdq, void *data) { char *error = data; ! cmdq_error(cmdq, "%s", error); free(error); return (CMD_RETURN_NORMAL); --- 67,77 ---- } static enum cmd_retval ! cmd_display_panes_error(struct cmdq_item *item, void *data) { char *error = data; ! cmdq_error(item, "%s", error); free(error); return (CMD_RETURN_NORMAL); *************** *** 79,87 **** static void cmd_display_panes_callback(struct client *c, struct window_pane *wp) { ! struct cmd_list *cmdlist; ! struct cmd_q *new_cmdq; ! char *template, *cmd, *expanded, *cause; template = c->identify_callback_data; if (wp == NULL) --- 80,88 ---- static void cmd_display_panes_callback(struct client *c, struct window_pane *wp) { ! struct cmd_list *cmdlist; ! struct cmdq_item *new_item; ! char *template, *cmd, *expanded, *cause; template = c->identify_callback_data; if (wp == NULL) *************** *** 91,107 **** if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) { if (cause != NULL) { ! new_cmdq = cmdq_get_callback(cmd_display_panes_error, cause); } else ! new_cmdq = NULL; } else { ! new_cmdq = cmdq_get_command(cmdlist, NULL, NULL, 0); cmd_list_free(cmdlist); } ! if (new_cmdq != NULL) ! cmdq_append(c, new_cmdq); free(cmd); free(expanded); --- 92,108 ---- if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) { if (cause != NULL) { ! new_item = cmdq_get_callback(cmd_display_panes_error, cause); } else ! new_item = NULL; } else { ! new_item = cmdq_get_command(cmdlist, NULL, NULL, 0); cmd_list_free(cmdlist); } ! if (new_item != NULL) ! cmdq_append(c, new_item); free(cmd); free(expanded);