From eca7d2ebbc4db224a335837111771e5573bc30f2 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 11 Sep 2020 17:16:20 +0200 Subject: Better --- Makefile | 1 + src/s_alias.c | 0 src/s_alias.h | 0 src/s_destroy.c | 1 + src/s_lalias.c | 18 ++++++++++++++++++ src/s_lalias.h | 20 ++++++++++++++++++++ src/s_lvars.c | 2 +- src/u_alias.c | 0 src/u_alias.h | 0 9 files changed, 41 insertions(+), 1 deletion(-) delete mode 100644 src/s_alias.c delete mode 100644 src/s_alias.h create mode 100644 src/s_lalias.c create mode 100644 src/s_lalias.h delete mode 100644 src/u_alias.c delete mode 100644 src/u_alias.h diff --git a/Makefile b/Makefile index 16aa45a..8154c48 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/s_alias.h b/src/s_alias.h deleted file mode 100644 index e69de29..0000000 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 +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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 +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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 diff --git a/src/u_alias.h b/src/u_alias.h deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3