minor libft interface changes

This commit is contained in:
Jack Halford 2017-03-08 12:04:05 +01:00
parent 9f8f9bb729
commit 91a8e81c45
10 changed files with 16 additions and 18 deletions

@ -1 +1 @@
Subproject commit 73c28532404e437d670607c909fbe56d717e9683
Subproject commit b209bb1fb718a68256253d5ab5ff69a46a90d5d6

View file

View file

@ -6,7 +6,7 @@
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 15:47:30 by wescande #+# #+# */
/* Updated: 2017/03/08 03:25:23 by wescande ### ########.fr */
/* Updated: 2017/03/08 11:50:20 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/27 20:30:32 by jhalford #+# #+# */
/* Updated: 2017/03/08 03:34:10 by wescande ### ########.fr */
/* Updated: 2017/03/08 11:57:19 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/08 03:38:36 by wescande #+# #+# */
/* Updated: 2017/03/08 04:40:50 by wescande ### ########.fr */
/* Updated: 2017/03/08 12:01:07 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -27,10 +27,10 @@ void *node_copy(void *data)
new->pattern = old->pattern;
if (old->type == CMD || old->type == TK_ASSIGNEMENT_WORD)
{
new->data.cmd.redir = ft_lstdup(&old->data.cmd.redir, &redir_copy);
new->data.cmd.redir = ft_lstmap(old->data.cmd.redir, &redir_copy);
new->data.cmd.token = ft_ld_copy(old->data.cmd.token, &tab_esc_copy);
}
if (old->type == TK_FOR || old->type == TK_PAREN_OPEN || old->type == TK_CASE)
new->data.cmd.wordlist = ft_ld_copy(old->data.cmd.token, &tab_esc_copy);
new->data.cmd.wordlist = ft_ld_copy(old->data.cmd.token, &tab_esc_copy);
return (new);
}

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/08 00:02:58 by ariard #+# #+# */
/* Updated: 2017/03/08 00:41:57 by ariard ### ########.fr */
/* Updated: 2017/03/08 11:53:26 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,14 +15,14 @@
void *redir_copy(void *data)
{
t_redir *old;
t_redir *new;
t_redir *new;
if (!data)
return (NULL);
old = data;
ft_bzero((void *)&new, sizeof(t_astdata));
new = (t_redir *)ft_memalloc(sizeof(t_redir));
new->type = old->type;
new->n = old->n;
new->word = ft_strdup(old->word);
return (0);
}
return (new);
}

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/05 14:54:45 by jhalford #+# #+# */
/* Updated: 2017/03/07 21:12:02 by wescande ### ########.fr */
/* Updated: 2017/03/08 11:53:31 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -38,10 +38,8 @@ int set_process(t_process *p, t_btree *ast)
p->to_close = fds[PIPE_READ];
p->fdout = fds[PIPE_WRITE];
exec->fdin = fds[PIPE_READ];
p->redirs = ft_lstmap(cmd->redir, ft_id);
p->redirs = ft_lstmap(cmd->redir, &redir_copy);
if (set_process_map(p, ast, cmd))
return (1);
// if (exec->control_count)
// p->attrs |= PROCESS_CONTROL;
return (0);
}

View file

@ -6,7 +6,7 @@
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 15:06:05 by wescande #+# #+# */
/* Updated: 2017/03/07 21:44:40 by wescande ### ########.fr */
/* Updated: 2017/03/08 11:49:32 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 15:08:12 by wescande #+# #+# */
/* Updated: 2017/03/08 00:23:22 by wescande ### ########.fr */
/* Updated: 2017/03/08 11:50:08 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/08 00:02:01 by wescande #+# #+# */
/* Updated: 2017/03/08 01:52:45 by ariard ### ########.fr */
/* Updated: 2017/03/08 11:51:04 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */