From 49349c3adb48fd2c21d8eaee38c8e22361c51461 Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Sun, 26 Mar 2017 14:15:50 +0200 Subject: [PATCH] norme --- 42sh/src/builtin/builtin_cd.c | 4 ++-- 42sh/src/main/data_exit.c | 3 +-- 42sh/src/main/shell_init.c | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/42sh/src/builtin/builtin_cd.c b/42sh/src/builtin/builtin_cd.c index af086139..5c95e860 100644 --- a/42sh/src/builtin/builtin_cd.c +++ b/42sh/src/builtin/builtin_cd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/25 18:20:42 by ariard #+# #+# */ -/* Updated: 2017/03/25 21:23:11 by ariard ### ########.fr */ +/* Updated: 2017/03/26 14:11:03 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,7 +31,7 @@ static t_cliopts g_cdopts[] = {0, NULL, 0, 0, NULL, 0}, }; -int cd_file_autorisations(char *target, int flag) +int cd_file_autorisations(char *target, int flag) { (void)flag; if (access(target, F_OK)) diff --git a/42sh/src/main/data_exit.c b/42sh/src/main/data_exit.c index d8911c0f..b43d0b07 100644 --- a/42sh/src/main/data_exit.c +++ b/42sh/src/main/data_exit.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/07 18:07:50 by jhalford #+# #+# */ -/* Updated: 2017/03/25 20:27:32 by jhalford ### ########.fr */ +/* Updated: 2017/03/26 14:11:44 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,7 +19,6 @@ void data_exit(void) data = data_singleton(); ft_strdel(&data->line.input); ft_strdel(&data->binary); - /* exec_popfds(); */ ft_sstrfree(data->env); ft_sstrfree(data->local_var); ft_sstrfree(data->argv); diff --git a/42sh/src/main/shell_init.c b/42sh/src/main/shell_init.c index ec68356f..e769df3c 100644 --- a/42sh/src/main/shell_init.c +++ b/42sh/src/main/shell_init.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */ -/* Updated: 2017/03/25 01:41:36 by wescande ### ########.fr */ +/* Updated: 2017/03/26 14:13:44 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -89,10 +89,10 @@ int shell_init(int ac, char **av, char **env) if (data_init(ac, av, env) < 0) return (-1); if (cliopts_get(av, g_opts, data)) - return (ft_perror(NULL) - && SH_ERR("%s", SHELL_USAGE1) - && SH_ERR("%s", SHELL_USAGE2) - && SH_ERR("%s", SHELL_USAGE3)); + { + return (ft_perror(NULL) && SH_ERR("%s", SHELL_USAGE1) + && SH_ERR("%s", SHELL_USAGE2) && SH_ERR("%s", SHELL_USAGE3)); + } if (!isatty(STDIN) || *data->av_data) data->opts &= ~(SH_INTERACTIVE | SH_OPTS_JOBC); if ((data->fd = get_input_fd(data, NULL)) < 0)