summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-20 18:52:20 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-20 18:52:20 +0200
commitf9869d5fdf97b932977f70eac1bc085be6761ee3 (patch)
tree571dbeeaddf5b508b31a1afff972b14f32618e5a
parentTrying linked lists (diff)
download42-minishell-f9869d5fdf97b932977f70eac1bc085be6761ee3.tar.gz
42-minishell-f9869d5fdf97b932977f70eac1bc085be6761ee3.tar.bz2
42-minishell-f9869d5fdf97b932977f70eac1bc085be6761ee3.tar.xz
42-minishell-f9869d5fdf97b932977f70eac1bc085be6761ee3.tar.zst
42-minishell-f9869d5fdf97b932977f70eac1bc085be6761ee3.zip
Continuing
-rw-r--r--src/ft_s_init.c1
-rw-r--r--src/ft_s_lcom.c14
-rw-r--r--src/ft_s_lcom.h18
3 files changed, 32 insertions, 1 deletions
diff --git a/src/ft_s_init.c b/src/ft_s_init.c
index 2d55e88..c9e4845 100644
--- a/src/ft_s_init.c
+++ b/src/ft_s_init.c
@@ -34,5 +34,6 @@ t_msh
msh->ret = 0;
ft_m_funptr(msh);
msh->lcom = NULL;
+ msh->lcom_head = msh->lcom;
return (msh);
}
diff --git a/src/ft_s_lcom.c b/src/ft_s_lcom.c
index 9189113..19e503b 100644
--- a/src/ft_s_lcom.c
+++ b/src/ft_s_lcom.c
@@ -1,9 +1,21 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_s_lcom.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 <libft.h>
#include <stdlib.h>
#include "ft_s_struct.h"
t_lcom
- *ft_lcom_lstnew(const char word[])
+ *ft_lcom_new(const char word[])
{
t_lcom nlcom;
char **words
diff --git a/src/ft_s_lcom.h b/src/ft_s_lcom.h
index e69de29..186f93d 100644
--- a/src/ft_s_lcom.h
+++ b/src/ft_s_lcom.h
@@ -0,0 +1,18 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_s_lcom.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 FT_S_LCOM_H
+#define FT_S_LCOM_H
+
+t_com *ft_lcom_new(const char word[]);
+
+#endif