close #184
This commit is contained in:
parent
6889554f96
commit
a4f2220f1c
3 changed files with 9 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/08 14:31:42 by jhalford #+# #+# */
|
/* Created: 2017/03/08 14:31:42 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/22 18:26:03 by jhalford ### ########.fr */
|
/* Updated: 2017/03/24 14:06:48 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@ int exec_reset_job(t_job *job)
|
||||||
{
|
{
|
||||||
job->id = 0;
|
job->id = 0;
|
||||||
job->pgid = 0;
|
job->pgid = 0;
|
||||||
job->attrs = JOB_NOTIFIED;
|
job->attrs = 0;
|
||||||
job->first_process = NULL;
|
job->first_process = NULL;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/15 17:43:01 by jhalford #+# #+# */
|
/* Created: 2016/12/15 17:43:01 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/24 12:35:04 by wescande ### ########.fr */
|
/* Updated: 2017/03/24 14:08:12 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -66,13 +66,13 @@ int builtin_jobs(const char *path, char *const av[], char *const envp[])
|
||||||
|
|
||||||
(void)path;
|
(void)path;
|
||||||
(void)envp;
|
(void)envp;
|
||||||
ft_bzero(&data, sizeof(t_data_template));
|
|
||||||
do_job_notification();
|
do_job_notification();
|
||||||
if (!SH_HAS_JOBC(data_singleton()->opts))
|
if (!SH_HAS_JOBC(data_singleton()->opts))
|
||||||
{
|
{
|
||||||
SH_ERR("jobs: %s", SH_MSG_NOJOBC);
|
SH_ERR("jobs: %s", SH_MSG_NOJOBC);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
ft_bzero(&data, sizeof(t_data_template));
|
||||||
if (cliopts_get((char**)av, g_jobs_opts, &data))
|
if (cliopts_get((char**)av, g_jobs_opts, &data))
|
||||||
return (ft_perror());
|
return (ft_perror());
|
||||||
if (!*data.av_data)
|
if (!*data.av_data)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/09 20:39:06 by jhalford #+# #+# */
|
/* Created: 2017/02/09 20:39:06 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/20 15:00:58 by jhalford ### ########.fr */
|
/* Updated: 2017/03/24 14:20:30 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -21,7 +21,8 @@ t_lexstate get_state_global(t_lexer *lexer)
|
||||||
|
|
||||||
c = lexer->str[lexer->pos];
|
c = lexer->str[lexer->pos];
|
||||||
cn = lexer->str[lexer->pos + 1];
|
cn = lexer->str[lexer->pos + 1];
|
||||||
cl = lexer->str[lexer->pos ? lexer->pos - 1 : 0];
|
cl = lexer->pos ? lexer->str[lexer->pos - 1] : 0;
|
||||||
|
DG("%i : '%c'", lexer->pos, cl);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if ((ft_is_delim(c) && (ret = DELIM))
|
if ((ft_is_delim(c) && (ret = DELIM))
|
||||||
|| ((c == '&' || c == ';' || c == '|' || c == '!') && (ret = SEP))
|
|| ((c == '&' || c == ';' || c == '|' || c == '!') && (ret = SEP))
|
||||||
|
|
@ -31,7 +32,8 @@ t_lexstate get_state_global(t_lexer *lexer)
|
||||||
|| ((c == '\"') && (ret = DQUOTE))
|
|| ((c == '\"') && (ret = DQUOTE))
|
||||||
|| ((c == '`') && (ret = BQUOTE))
|
|| ((c == '`') && (ret = BQUOTE))
|
||||||
|| ((c == '(' || c == ')') && (ret = PAREN))
|
|| ((c == '(' || c == ')') && (ret = PAREN))
|
||||||
|| (((c == '{' && cn == ' ') || (c == '}' && cl == ' '))
|
|| (((c == '{' && (cn == ' ' || cn == 0))
|
||||||
|
|| (c == '}' && (cl == ' ' || cl == 0)))
|
||||||
&& (ret = CURLY_BRACKETS))
|
&& (ret = CURLY_BRACKETS))
|
||||||
|| ((c == 0) && (ret = END)))
|
|| ((c == 0) && (ret = END)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue