diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-11 17:16:20 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-11 17:16:20 +0200 |
commit | eca7d2ebbc4db224a335837111771e5573bc30f2 (patch) | |
tree | c6b0cec1b0af769632df2ff31ca3331e9f7c301c | |
parent | Preparing files (diff) | |
download | 42-minishell-eca7d2ebbc4db224a335837111771e5573bc30f2.tar.gz 42-minishell-eca7d2ebbc4db224a335837111771e5573bc30f2.tar.bz2 42-minishell-eca7d2ebbc4db224a335837111771e5573bc30f2.tar.xz 42-minishell-eca7d2ebbc4db224a335837111771e5573bc30f2.tar.zst 42-minishell-eca7d2ebbc4db224a335837111771e5573bc30f2.zip |
Better
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | src/s_alias.c | 0 | ||||
-rw-r--r-- | src/s_alias.h | 0 | ||||
-rw-r--r-- | src/s_destroy.c | 1 | ||||
-rw-r--r-- | src/s_lalias.c | 18 | ||||
-rw-r--r-- | src/s_lalias.h | 20 | ||||
-rw-r--r-- | src/s_lvars.c | 2 | ||||
-rw-r--r-- | src/u_alias.c | 0 | ||||
-rw-r--r-- | src/u_alias.h | 0 |
9 files changed, 41 insertions, 1 deletions
@@ -60,6 +60,7 @@ SRCS_NAME += m_redirs SRCS_NAME += s_destroy SRCS_NAME += s_com SRCS_NAME += s_init +SRCS_NAME += s_lalias SRCS_NAME += s_line SRCS_NAME += s_lvars SRCS_NAME += s_lpipes diff --git a/src/s_alias.c b/src/s_alias.c deleted file mode 100644 index e69de29..0000000 --- a/src/s_alias.c +++ /dev/null diff --git a/src/s_alias.h b/src/s_alias.h deleted file mode 100644 index e69de29..0000000 --- a/src/s_alias.h +++ /dev/null diff --git a/src/s_destroy.c b/src/s_destroy.c index 97a47d8..6626bd9 100644 --- a/src/s_destroy.c +++ b/src/s_destroy.c @@ -23,5 +23,6 @@ void ft_delwords(msh->bu_ref); ft_delwords(msh->envp); lvars_clear(&msh->vars); + s_lalias_clear(&msh->alias); ft_memdel((void*)&msh); } diff --git a/src/s_lalias.c b/src/s_lalias.c new file mode 100644 index 0000000..3bbee14 --- /dev/null +++ b/src/s_lalias.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* s_lalias.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include "s_struct.h" + +t_lalias +*s_lalias_new(const char name[], const char val[]) +{ +} diff --git a/src/s_lalias.h b/src/s_lalias.h new file mode 100644 index 0000000..8add358 --- /dev/null +++ b/src/s_lalias.h @@ -0,0 +1,20 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* s_lalias.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef S_LALIAS_H +#define S_LALIAS_H + +#include "s_struct.h" + +t_lalias *s_lalias_new(const char name[], const char val[]); + +#endif diff --git a/src/s_lvars.c b/src/s_lvars.c index ff19d92..3eb4943 100644 --- a/src/s_lvars.c +++ b/src/s_lvars.c @@ -85,7 +85,7 @@ void t_lvars *tmp; t_lvars *renext; - if (!lvars) + if (lvars == NULL) return ; tmp = *lvars; while (tmp) diff --git a/src/u_alias.c b/src/u_alias.c deleted file mode 100644 index e69de29..0000000 --- a/src/u_alias.c +++ /dev/null diff --git a/src/u_alias.h b/src/u_alias.h deleted file mode 100644 index e69de29..0000000 --- a/src/u_alias.h +++ /dev/null |