diff --git a/42sh/includes/job_control.h b/42sh/includes/job_control.h index 633596b9..f93e4b0f 100644 --- a/42sh/includes/job_control.h +++ b/42sh/includes/job_control.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/10 16:55:09 by jhalford #+# #+# */ -/* Updated: 2017/01/09 16:56:18 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 14:40:08 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,8 +53,8 @@ void job_update_rank(void); int do_job_notification(void); void job_notify_new(t_job *job); void job_notify_change(int id); -void job_format(t_job *j, int rank[2], int opts); -void job_format_head(t_job *j, int rank[2]); +void job_format(t_job *j, int opts); +void job_format_head(t_job *j); void job_update_status(void); void mark_job_as_running (t_job *j); diff --git a/42sh/src/glob/glob.c b/42sh/src/glob/glob.c index e086c68e..7f2cee28 100644 --- a/42sh/src/glob/glob.c +++ b/42sh/src/glob/glob.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/04 16:29:54 by wescande #+# #+# */ -/* Updated: 2017/01/30 12:08:49 by wescande ### ########.fr */ +/* Updated: 2017/01/31 14:16:38 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/glob_print.c b/42sh/src/glob/glob_print.c index e25ac25d..c78aa0e7 100644 --- a/42sh/src/glob/glob_print.c +++ b/42sh/src/glob/glob_print.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/05 16:09:40 by wescande #+# #+# */ -/* Updated: 2017/01/31 13:43:56 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 13:52:43 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/job-control/builtin_fg.c b/42sh/src/job-control/builtin_fg.c index 7c2dfe48..48945eca 100644 --- a/42sh/src/job-control/builtin_fg.c +++ b/42sh/src/job-control/builtin_fg.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/08 14:30:07 by jhalford #+# #+# */ -/* Updated: 2017/01/11 14:42:04 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:05:31 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/job-control/builtin_jobs.c b/42sh/src/job-control/builtin_jobs.c index 4009347e..9e3fe05d 100644 --- a/42sh/src/job-control/builtin_jobs.c +++ b/42sh/src/job-control/builtin_jobs.c @@ -6,43 +6,100 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 17:43:01 by jhalford #+# #+# */ -/* Updated: 2017/01/11 14:38:50 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:05:34 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "job_control.h" - -int builtin_jobs(const char *path, char *const av[], char *const envp[]) +static int bt_jobs_parse(char **av, int *i) { - t_jobc *jobc; - t_list *jlist; - t_list *tmplist; - int rank[2]; - int opts; + int opts; + int j; - (void)path; - (void)envp; - (void)av; - if (!SHELL_HAS_JOBC(data_singleton()->opts)) + opts = 0; + *i = 1; + while (av[*i]) { - ft_dprintf(2, "{red}jobs: %s{eoc}\n", SHELL_MSG_NOJOBC); - return (-1); + j = 0; + if (av[*i][j++] != '-') + break ; + while (av[*i][j]) + { + if (av[*i][j] == 'l') + opts |= JOBS_OPTS_L; + else + { + ft_dprintf(2, "{red}%s: bad option: -%c{eoc}\n", + SHELL_NAME, av[*i][j]); + return (-1); + } + j++; + } + (*i)++; } + return (opts); +} + +static void bt_jobs_all(int opts) +{ + t_jobc *jobc; + t_list *jlist; + t_list *tmplist; + jobc = &data_singleton()->jobc; jlist = jobc->first_job; - job_getrank(&rank); - opts = 0; - if (ft_strcmp(av[1], "-l") == 0) - opts |= JOBS_OPTS_L; tmplist = ft_lst_filter(jlist, NULL, NULL); ft_lstsort(&tmplist, job_cmp_id); jlist = tmplist; while (jlist) { - job_format(jlist->content, rank, opts); + job_format(jlist->content, opts); jlist = jlist->next; } ft_lstdel(&tmplist, ft_lst_cfree); +} + +static int bt_jobs_spec(char **av, int opts) +{ + t_jobc *jobc; + t_list *jlist; + t_list *lst; + int id; + + jobc = &data_singleton()->jobc; + jlist = jobc->first_job; + while (*av) + { + id = ft_atoi(*av); + if (!(lst = ft_lst_find(jlist, &id, job_cmp_id))) + { + ft_dprintf(2, "{red}jobs: %s: no such job{eoc}\n", *av); + return (1); + } + job_format(lst->content, opts); + av++; + } + return (0); +} + +int builtin_jobs(const char *path, char *const av[], char *const envp[]) +{ + int opts; + int i; + + (void)path; + (void)envp; + if (!SHELL_HAS_JOBC(data_singleton()->opts)) + { + ft_dprintf(2, "{red}jobs: %s{eoc}\n", SHELL_MSG_NOJOBC); + return (1); + } + if ((opts = bt_jobs_parse((char**)av, &i)) < 0) + return (1); + if (!av[i]) + bt_jobs_all(opts); + else if (bt_jobs_spec((char **)av + i, opts)) + return (1); return (0); } diff --git a/42sh/src/job-control/do_job_notification.c b/42sh/src/job-control/do_job_notification.c index c748bd3f..b47b83b0 100644 --- a/42sh/src/job-control/do_job_notification.c +++ b/42sh/src/job-control/do_job_notification.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */ -/* Updated: 2017/01/11 17:35:15 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:06:05 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,18 +26,15 @@ int do_job_notification(void) while (jlist) { j = jlist->content; - DG("checking [%i]", j->id); - if (job_is_completed(j->id)) + if (job_is_completed(j->id) + || (job_is_stopped(j->id) && !(j->attributes & JOB_NOTIFIED))) { ret = 1; job_notify_change(j->id); - job_remove(j->id); - } - else if (job_is_stopped(j->id) && !(j->attributes & JOB_NOTIFIED)) - { - ret = 1; - job_notify_change(j->id); - j->attributes |= JOB_NOTIFIED; + if (job_is_completed(j->id)) + job_remove(j->id); + else + j->attributes |= JOB_NOTIFIED; } jlist = jlist->next; } diff --git a/42sh/src/job-control/job_addprocess.c b/42sh/src/job-control/job_addprocess.c index 22a1c28a..171df690 100644 --- a/42sh/src/job-control/job_addprocess.c +++ b/42sh/src/job-control/job_addprocess.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 13:54:51 by jhalford #+# #+# */ -/* Updated: 2017/01/11 14:40:34 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:07:16 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,5 +33,5 @@ int job_addprocess(t_process *p) } if (JOB_IS_BG(job->attributes) && IS_PIPEEND(p->attributes)) job_notify_new(job); - return(0); + return (0); } diff --git a/42sh/src/job-control/job_cmp_id.c b/42sh/src/job-control/job_cmp_id.c index cc9614d2..d3f6b162 100644 --- a/42sh/src/job-control/job_cmp_id.c +++ b/42sh/src/job-control/job_cmp_id.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 13:38:13 by jhalford #+# #+# */ -/* Updated: 2017/01/10 11:08:46 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:06:26 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,4 +16,3 @@ int job_cmp_id(t_job *job, int *id) { return (job->id - *id); } - diff --git a/42sh/src/job-control/job_format.c b/42sh/src/job-control/job_format.c index 1c8f3dd1..5c811a86 100644 --- a/42sh/src/job-control/job_format.c +++ b/42sh/src/job-control/job_format.c @@ -1,23 +1,23 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* job_format.c :+: :+: :+: */ +/* job_format.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2017/01/09 12:47:17 by jhalford #+# #+# */ -/* Updated: 2017/01/10 11:16:50 by jhalford ### ########.fr */ +/* Created: 2017/01/31 15:06:44 by jhalford #+# #+# */ +/* Updated: 2017/01/31 15:06:57 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "job_control.h" -void job_format(t_job *j, int rank[2], int opts) +void job_format(t_job *j, int opts) { t_list *plist; int firstp; - job_format_head(j, rank); + job_format_head(j); plist = j->first_process; firstp = 1; while (plist) diff --git a/42sh/src/job-control/job_format_head.c b/42sh/src/job-control/job_format_head.c index f0b0bf22..e463a269 100644 --- a/42sh/src/job-control/job_format_head.c +++ b/42sh/src/job-control/job_format_head.c @@ -6,16 +6,19 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/09 13:10:38 by jhalford #+# #+# */ -/* Updated: 2017/01/09 13:53:48 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 14:53:13 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "job_control.h" -void job_format_head(t_job *j, int rank[2]) +void job_format_head(t_job *j) { char crank; + int rank[2]; + job_getrank(&rank); + DG("rank[0]=%i,rank[1]=%i", rank[0], rank[1]); if (j->id == rank[0]) crank = '+'; else if (j->id == rank[1]) diff --git a/42sh/src/job-control/job_getprocess.c b/42sh/src/job-control/job_getprocess.c index a4fa75ba..b5223287 100644 --- a/42sh/src/job-control/job_getprocess.c +++ b/42sh/src/job-control/job_getprocess.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* job_getprocess.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/01/31 15:07:30 by jhalford #+# #+# */ +/* Updated: 2017/01/31 15:07:41 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "job_control.h" t_process *job_getprocess(pid_t pid) diff --git a/42sh/src/job-control/job_getrank.c b/42sh/src/job-control/job_getrank.c index 8c7b6996..aadd7745 100644 --- a/42sh/src/job-control/job_getrank.c +++ b/42sh/src/job-control/job_getrank.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/09 12:38:31 by jhalford #+# #+# */ -/* Updated: 2017/01/10 10:30:20 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:04:33 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,9 +24,11 @@ void job_getrank(int (*rank)[2]) jlist = jobc->first_job; (*rank)[0] = 0; (*rank)[1] = 0; + DG("check 1"); while (jlist && i < 2) { job = jlist->content; + DG("check 2: id=%i", job->id); if (job_is_stopped(job->id)) (*rank)[i++] = job->id; jlist = jlist->next; diff --git a/42sh/src/job-control/job_is_completed.c b/42sh/src/job-control/job_is_completed.c index 17970b3d..8c9a0f1c 100644 --- a/42sh/src/job-control/job_is_completed.c +++ b/42sh/src/job-control/job_is_completed.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 15:10:20 by jhalford #+# #+# */ -/* Updated: 2017/01/31 13:50:40 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 13:52:36 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/job-control/job_notify_change.c b/42sh/src/job-control/job_notify_change.c index 73f0a594..fd6c7728 100644 --- a/42sh/src/job-control/job_notify_change.c +++ b/42sh/src/job-control/job_notify_change.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 15:04:03 by jhalford #+# #+# */ -/* Updated: 2017/01/10 11:16:17 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 14:46:48 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,10 +16,8 @@ void job_notify_change(int id) { t_job *job; t_jobc *jobc; - int rank[2]; jobc = &data_singleton()->jobc; job = ft_lst_find(jobc->first_job, &id, job_cmp_id)->content; - job_getrank(&rank); - job_format(job, rank, JOBS_OPTS_L); + job_format(job, JOBS_OPTS_L); } diff --git a/42sh/src/job-control/job_run.c b/42sh/src/job-control/job_run.c index 14f8502b..ce5c0f07 100644 --- a/42sh/src/job-control/job_run.c +++ b/42sh/src/job-control/job_run.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/09 16:54:18 by jhalford #+# #+# */ -/* Updated: 2017/01/11 14:37:23 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 14:47:26 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,10 +14,7 @@ void job_run(t_job *job, int foreground) { - int rank[2]; - - job_getrank(&rank); mark_job_as_running(job); - job_format(job, rank, JOBS_OPTS_L); + job_format(job, JOBS_OPTS_L); foreground ? put_job_in_foreground(job, 1) : put_job_in_background(job, 1); } diff --git a/42sh/src/job-control/job_update_status.c b/42sh/src/job-control/job_update_status.c index 5426c5fc..e9f9a24e 100644 --- a/42sh/src/job-control/job_update_status.c +++ b/42sh/src/job-control/job_update_status.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 12:56:11 by jhalford #+# #+# */ -/* Updated: 2017/01/10 12:33:09 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:07:51 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,7 +17,7 @@ void job_update_status(void) int status; pid_t pid; - pid = waitpid (WAIT_ANY, &status, WUNTRACED | WNOHANG); + pid = waitpid(WAIT_ANY, &status, WUNTRACED | WNOHANG); while (!process_mark_status(pid, status)) - pid = waitpid (WAIT_ANY, &status, WUNTRACED | WNOHANG); + pid = waitpid(WAIT_ANY, &status, WUNTRACED | WNOHANG); } diff --git a/42sh/src/job-control/mark_job_as_running.c b/42sh/src/job-control/mark_job_as_running.c index 0854b8d9..ea82a0e7 100644 --- a/42sh/src/job-control/mark_job_as_running.c +++ b/42sh/src/job-control/mark_job_as_running.c @@ -6,13 +6,13 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/08 14:40:40 by jhalford #+# #+# */ -/* Updated: 2017/01/10 10:52:36 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:08:11 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "job_control.h" -void mark_job_as_running (t_job *j) +void mark_job_as_running(t_job *j) { t_list *plist; t_process *p; diff --git a/42sh/src/job-control/process_cmp_pid.c b/42sh/src/job-control/process_cmp_pid.c index d0b3b09c..7683e116 100644 --- a/42sh/src/job-control/process_cmp_pid.c +++ b/42sh/src/job-control/process_cmp_pid.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 13:00:21 by jhalford #+# #+# */ -/* Updated: 2016/12/12 13:40:13 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:06:21 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/job-control/process_format.c b/42sh/src/job-control/process_format.c index 00591d4c..25fe10cb 100644 --- a/42sh/src/job-control/process_format.c +++ b/42sh/src/job-control/process_format.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/09 13:05:55 by jhalford #+# #+# */ -/* Updated: 2017/01/12 13:16:45 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:10:56 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -64,7 +64,7 @@ static void process_format_com_short(t_list **plist, t_flag state) p = (*plist)->content; if (!(p->attributes & state) || (state == PROCESS_COMPLETED && p->status != 0)) - break; + break ; if (p->attributes & PROCESS_CONTINUED) { p->attributes &= ~PROCESS_STATE_MASK; diff --git a/42sh/src/job-control/process_mark_status.c b/42sh/src/job-control/process_mark_status.c index 2ae9375a..b02290e7 100644 --- a/42sh/src/job-control/process_mark_status.c +++ b/42sh/src/job-control/process_mark_status.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 12:41:11 by jhalford #+# #+# */ -/* Updated: 2017/01/31 13:44:49 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:10:04 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,11 +32,11 @@ int process_mark_status(pid_t pid, int status) p->attributes |= PROCESS_COMPLETED; if (WIFSIGNALED(status)) ft_printf("{mag}%d: Terminated by signal %d.\n{eoc}", - (int) pid, WTERMSIG(p->status)); + (int)pid, WTERMSIG(p->status)); } - return(0); + return (0); } ft_dprintf(2, "No child process %d.\n", pid); } - return(-1); + return (-1); } diff --git a/42sh/src/job-control/put_job_in_background.c b/42sh/src/job-control/put_job_in_background.c index a23dee5e..8de13514 100644 --- a/42sh/src/job-control/put_job_in_background.c +++ b/42sh/src/job-control/put_job_in_background.c @@ -6,17 +6,16 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 15:03:29 by jhalford #+# #+# */ -/* Updated: 2017/01/08 13:24:53 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:09:06 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "job_control.h" -int put_job_in_background(t_job *job, int cont) +int put_job_in_background(t_job *job, int cont) { - /* Send the job a continue signal, if necessary. */ if (cont) - if (kill (-job->pgid, SIGCONT) < 0) - perror ("kill (SIGCONT)"); + if (kill(-job->pgid, SIGCONT) < 0) + perror("kill (SIGCONT)"); return (0); } diff --git a/42sh/src/job-control/put_job_in_foreground.c b/42sh/src/job-control/put_job_in_foreground.c index 6027c234..1df2c754 100644 --- a/42sh/src/job-control/put_job_in_foreground.c +++ b/42sh/src/job-control/put_job_in_foreground.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 14:58:36 by jhalford #+# #+# */ -/* Updated: 2017/01/31 13:47:41 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:10:45 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,9 +21,9 @@ int put_job_in_foreground(t_job *job, int cont) { signal(SIGTTOU, SIG_IGN); if (tcsetpgrp(STDIN, job->pgid) == -1) - DG("couldn't put process in control. errno=%i, pgid=%i", errno, job->pgid); + return (1); signal(SIGTTOU, sigttou_handler); - tcsetattr (STDIN, TCSANOW, &job->tmodes); + tcsetattr(STDIN, TCSANOW, &job->tmodes); if (kill(-job->pgid, SIGCONT) < 0) perror("kill (SIGCONT)"); } diff --git a/42sh/src/job-control/sigchld_handler.c b/42sh/src/job-control/sigchld_handler.c index 11800df5..87f795c7 100644 --- a/42sh/src/job-control/sigchld_handler.c +++ b/42sh/src/job-control/sigchld_handler.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/10 17:37:56 by jhalford #+# #+# */ -/* Updated: 2017/01/10 17:59:28 by jhalford ### ########.fr */ +/* Updated: 2017/01/31 15:09:29 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,9 +18,4 @@ void sigchld_handler(int signo) (void)signo; data = data_singleton(); - /* DG("got SIGCHLD"); */ - /* if (do_job_notification()) */ - /* ft_putstr(SHELL_PROMPT); */ - /* if (data_singleton()->mode != MODE_EXEC) */ - /* job_update_status(); */ } diff --git a/42sh/src/line-editing/check_backslash.c b/42sh/src/line-editing/check_backslash.c index fa91a8ab..108ba5df 100644 --- a/42sh/src/line-editing/check_backslash.c +++ b/42sh/src/line-editing/check_backslash.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/26 13:32:52 by gwojda #+# #+# */ -/* Updated: 2017/01/26 13:50:00 by gwojda ### ########.fr */ +/* Updated: 2017/01/31 15:03:59 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/line-editing/prompt.c b/42sh/src/line-editing/prompt.c index 94482a27..4e26763d 100644 --- a/42sh/src/line-editing/prompt.c +++ b/42sh/src/line-editing/prompt.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 13:51:33 by gwojda #+# #+# */ -/* Updated: 2017/01/25 16:31:24 by gwojda ### ########.fr */ +/* Updated: 2017/01/31 15:02:39 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -54,6 +54,7 @@ void ft_prompt(void) { int ret; + do_job_notification(); ft_get_date(); ft_putstr("\033[22;36m"); ret = ft_currend_dir(); diff --git a/42sh/src/line-editing/readline.c b/42sh/src/line-editing/readline.c index 154089c8..67a48bbd 100644 --- a/42sh/src/line-editing/readline.c +++ b/42sh/src/line-editing/readline.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */ -/* Updated: 2017/01/26 13:38:29 by gwojda ### ########.fr */ +/* Updated: 2017/01/31 15:04:02 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */