void cmd_list_panes_session( struct cmd *self, struct session *s, struct cmd_q *cmdq, int type) { struct winlink *wl; RB_FOREACH(wl, winlinks, &s->windows) cmd_list_panes_window(self, s, wl, cmdq, type); }
static void cmd_list_panes_session(struct cmd *self, struct session *s, struct cmdq_item *item, int type) { struct winlink *wl; RB_FOREACH(wl, winlinks, &s->windows) cmd_list_panes_window(self, s, wl, item, type); }
enum cmd_retval cmd_list_panes_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; struct session *s = cmdq->state.tflag.s; struct winlink *wl = cmdq->state.tflag.wl; if (args_has(args, 'a')) cmd_list_panes_server(self, cmdq); else if (args_has(args, 's')) cmd_list_panes_session(self, s, cmdq, 1); else cmd_list_panes_window(self, s, wl, cmdq, 0); return (CMD_RETURN_NORMAL); }
enum cmd_retval cmd_list_panes_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; struct session *s; struct winlink *wl; if (args_has(args, 'a')) cmd_list_panes_server(self, cmdq); else if (args_has(args, 's')) { s = cmd_find_session(cmdq, args_get(args, 't'), 0); if (s == NULL) return (CMD_RETURN_ERROR); cmd_list_panes_session(self, s, cmdq, 1); } else { wl = cmd_find_window(cmdq, args_get(args, 't'), &s); if (wl == NULL) return (CMD_RETURN_ERROR); cmd_list_panes_window(self, s, wl, cmdq, 0); } return (CMD_RETURN_NORMAL); }