From 7ae114fd554e1d1ae9d4a2da125c05151355cefb Mon Sep 17 00:00:00 2001 From: wescande Date: Tue, 7 Mar 2017 12:19:10 +0100 Subject: [PATCH] permet la compilation en commentant exec_var --- 42sh/Makefile | 6 +++--- 42sh/libft | 2 +- 42sh/src/exec/exec_var.c | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/42sh/Makefile b/42sh/Makefile index fe951535..b9ffe23a 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -60,6 +60,7 @@ completion/c_terminal.c\ completion/completion.c\ exec/ast_free.c\ exec/bad_fd.c\ +exec/error_badidentifier.c\ exec/exec_ampersand.c\ exec/exec_and_if.c\ exec/exec_case.c\ @@ -96,7 +97,6 @@ exec/redirect_less.c\ exec/redirect_lessand.c\ exec/set_exitstatus.c\ exec/set_process.c\ -exec/error_badidentifier.c\ glob/command_getoutput.c\ glob/dir_glob.c\ glob/esc_print.c\ @@ -235,12 +235,12 @@ parser/add_cmd.c\ parser/add_condition.c\ parser/add_func.c\ parser/add_loop.c\ +parser/add_math.c\ +parser/add_number.c\ parser/add_redir.c\ parser/add_sep.c\ parser/add_subshell.c\ parser/add_var.c\ -parser/add_number.c\ -parser/add_math.c\ parser/aggregate_sym.c\ parser/build_tree.c\ parser/error_syntax.c\ diff --git a/42sh/libft b/42sh/libft index dc155bf5..a966b8a2 160000 --- a/42sh/libft +++ b/42sh/libft @@ -1 +1 @@ -Subproject commit dc155bf51cc9de83df073669a1d2a9a915f16121 +Subproject commit a966b8a20028daba5580237fa0b0b18e16208f1b diff --git a/42sh/src/exec/exec_var.c b/42sh/src/exec/exec_var.c index 3bfc50ce..4eca2107 100644 --- a/42sh/src/exec/exec_var.c +++ b/42sh/src/exec/exec_var.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/30 17:33:53 by ariard #+# #+# */ -/* Updated: 2017/03/03 20:32:27 by wescande ### ########.fr */ +/* Updated: 2017/03/07 12:17:43 by wescande ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,9 +14,12 @@ static int set_var(char *stream, char **var, char **value) { - *var = ft_strdupchr(stream, '='); + (void)stream; + (void)var; + (void)value; +/* *var = ft_strdupchr(stream, '='); stream += ft_strlenchr(stream, '=') + 1; - *value = ft_strdup(stream); + value = ft_strdup(stream);*/ return (0); }