コード例 #1
0
ファイル: cmd-list-panes.c プロジェクト: Darkoe/tmux
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);
}
コード例 #2
0
ファイル: cmd-list-panes.c プロジェクト: alexdavid/tmux
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);
}
コード例 #3
0
ファイル: cmd-list-panes.c プロジェクト: 20400992/tmux
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);
}
コード例 #4
0
ファイル: cmd-list-panes.c プロジェクト: Darkoe/tmux
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);
}