mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Move job struct into job.c.
This commit is contained in:
@ -44,7 +44,6 @@ const struct cmd_entry cmd_show_messages_entry = {
|
||||
};
|
||||
|
||||
static int cmd_show_messages_terminals(struct cmdq_item *, int);
|
||||
static int cmd_show_messages_jobs(struct cmdq_item *, int);
|
||||
|
||||
static int
|
||||
cmd_show_messages_terminals(struct cmdq_item *item, int blank)
|
||||
@ -67,25 +66,6 @@ cmd_show_messages_terminals(struct cmdq_item *item, int blank)
|
||||
return (n != 0);
|
||||
}
|
||||
|
||||
static int
|
||||
cmd_show_messages_jobs(struct cmdq_item *item, int blank)
|
||||
{
|
||||
struct job *job;
|
||||
u_int n;
|
||||
|
||||
n = 0;
|
||||
LIST_FOREACH(job, &all_jobs, entry) {
|
||||
if (blank) {
|
||||
cmdq_print(item, "%s", "");
|
||||
blank = 0;
|
||||
}
|
||||
cmdq_print(item, "Job %u: %s [fd=%d, pid=%ld, status=%d]",
|
||||
n, job->cmd, job->fd, (long)job->pid, job->status);
|
||||
n++;
|
||||
}
|
||||
return (n != 0);
|
||||
}
|
||||
|
||||
static enum cmd_retval
|
||||
cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item)
|
||||
{
|
||||
@ -104,7 +84,7 @@ cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item)
|
||||
done = 1;
|
||||
}
|
||||
if (args_has(args, 'J')) {
|
||||
cmd_show_messages_jobs(item, blank);
|
||||
job_print_summary(item, blank);
|
||||
done = 1;
|
||||
}
|
||||
if (done)
|
||||
|
Reference in New Issue
Block a user