This commit is contained in:
wescande 2017-03-20 15:11:32 +01:00
commit 692323a2f9
10 changed files with 33 additions and 32 deletions

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/10/15 13:27:14 by alao #+# #+# */
/* Updated: 2017/03/19 15:34:38 by gwojda ### ########.fr */
/* Updated: 2017/03/20 14:41:04 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,7 +22,8 @@ static int c_chevron(t_comp *c)
pos = c->ircmd;
if (pos >= ft_strlen(c->rcmd))
pos = ft_strlen(c->rcmd) - (ft_strlen(data_singleton()->line.input) - pos);
pos = ft_strlen(c->rcmd) - (ft_strlen(data_singleton()->line.input)
- pos);
while (pos)
{
if (c->rcmd[pos] == '<' || c->rcmd[pos] == '>')

View file

@ -3,10 +3,10 @@
/* ::: :::::::: */
/* builtin_fg.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/08 14:30:07 by jhalford #+# #+# */
/* Updated: 2017/03/20 12:12:16 by jhalford ### ########.fr */
/* Updated: 2017/03/20 14:42:22 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */
/* Updated: 2017/03/20 14:16:03 by gwojda ### ########.fr */
/* Updated: 2017/03/20 14:49:03 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/07 18:07:50 by jhalford #+# #+# */
/* Updated: 2017/03/18 15:43:07 by gwojda ### ########.fr */
/* Updated: 2017/03/20 14:44:51 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,7 +17,6 @@ void data_exit(void)
t_data *data;
data = data_singleton();
/* ft_strdel(&data->line.input); */
ft_sstrfree(data->env);
ft_sstrfree(data->local_var);
ft_sstrfree(data->argv);

View file

@ -6,13 +6,13 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/10 11:36:39 by jhalford #+# #+# */
/* Updated: 2017/03/16 15:12:53 by jhalford ### ########.fr */
/* Updated: 2017/03/20 14:45:01 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
t_data *data_singleton()
t_data *data_singleton(void)
{
static t_data *data = NULL;

View file

@ -3,9 +3,10 @@
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Updated: 2017/03/17 10:51:23 by gwojda ### ########.fr */
/* Created: 2017/03/20 14:45:40 by gwojda #+# #+# */
/* Updated: 2017/03/20 14:46:44 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */
/* Updated: 2017/03/20 11:30:42 by jhalford ### ########.fr */
/* Updated: 2017/03/20 14:54:28 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */
@ -47,7 +47,8 @@ static int get_input_fd(t_data *data)
ft_printf("{red}%s: %s: No such file or directory\n{eoc}",
data->argv[0], file);
else if (S_ISDIR(buf.st_mode))
ft_printf("{red}%s: %s: is a directory\n{eoc}", data->argv[0], file);
ft_printf("{red}%s: %s: is a directory\n{eoc}", data->argv[0],
file);
else if ((fds[PIPE_READ] = open(file, O_RDONLY | O_CLOEXEC)) < 0)
ft_printf("{red}%s: %s: No such file or directory\n{eoc}",
data->argv[0], file);

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/24 18:41:50 by ariard #+# #+# */
/* Updated: 2017/03/18 15:50:28 by ariard ### ########.fr */
/* Updated: 2017/03/20 14:57:34 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/09 15:32:10 by ariard #+# #+# */
/* Updated: 2017/03/15 16:33:57 by ariard ### ########.fr */
/* Updated: 2017/03/20 14:59:23 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */
@ -227,7 +227,6 @@ int ft_read_stack(t_sym *stack)
return (0);
}
int ft_show_heredoc_data(t_astnode *node)
{
t_redir *redir;

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/18 17:13:31 by ariard #+# #+# */
/* Updated: 2017/03/18 17:15:11 by ariard ### ########.fr */
/* Updated: 2017/03/20 14:57:58 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */