From 39d80124439e6c164b5b0a758effe6df5a94b20e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 24 Aug 2020 20:57:09 +0200 Subject: sqb in progress --- src/m_funptr.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/m_funptr.c') diff --git a/src/m_funptr.c b/src/m_funptr.c index 2fdf4d1..a6b31f2 100644 --- a/src/m_funptr.c +++ b/src/m_funptr.c @@ -22,14 +22,15 @@ void init_buptr(t_msh *msh) { - msh->bu_ptr[0] = b_echo; - msh->bu_ptr[1] = b_cd; - msh->bu_ptr[2] = b_pwd; - msh->bu_ptr[3] = b_export; - msh->bu_ptr[4] = b_unset; - msh->bu_ptr[5] = b_env; - msh->bu_ptr[6] = b_exit; - msh->bu_ptr[7] = b_type; + msh->bu_ptr[FT_ID_ECHO] = b_echo; + msh->bu_ptr[FT_ID_CD] = b_cd; + msh->bu_ptr[FT_ID_PWD] = b_pwd; + msh->bu_ptr[FT_ID_EXPORT] = b_export; + msh->bu_ptr[FT_ID_UNSET] = b_unset; + msh->bu_ptr[FT_ID_ENV] = b_env; + msh->bu_ptr[FT_ID_EXIT] = b_exit; + msh->bu_ptr[FT_ID_TYPE] = b_type; + msh->bu_ptr[FT_ID_SQB] = b_sqb; if (!(msh->bu_ref = ft_split(FT_BUILTINS, '|'))) { f_alloc_and_destroy_msh(msh); -- cgit v1.2.3 From 0ab424df075f09aac376890a9a5a73cb74e053bf Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 11 Sep 2020 16:56:23 +0200 Subject: alias in progress --- src/m_funptr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/m_funptr.c') diff --git a/src/m_funptr.c b/src/m_funptr.c index a6b31f2..1983e73 100644 --- a/src/m_funptr.c +++ b/src/m_funptr.c @@ -31,7 +31,8 @@ void msh->bu_ptr[FT_ID_EXIT] = b_exit; msh->bu_ptr[FT_ID_TYPE] = b_type; msh->bu_ptr[FT_ID_SQB] = b_sqb; - if (!(msh->bu_ref = ft_split(FT_BUILTINS, '|'))) + msh->bu_ptr[FT_ID_ALIAS] = b_alias; + if ((msh->bu_ref = ft_split(FT_BUILTINS, '|')) == NULL) { f_alloc_and_destroy_msh(msh); } -- cgit v1.2.3 From aeb1dec54283f4506f47893923b29a71499353de Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 15 Sep 2020 20:14:00 +0200 Subject: Init fix --- src/m_funptr.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/m_funptr.c') diff --git a/src/m_funptr.c b/src/m_funptr.c index 1983e73..bb8d80d 100644 --- a/src/m_funptr.c +++ b/src/m_funptr.c @@ -32,8 +32,4 @@ void msh->bu_ptr[FT_ID_TYPE] = b_type; msh->bu_ptr[FT_ID_SQB] = b_sqb; msh->bu_ptr[FT_ID_ALIAS] = b_alias; - if ((msh->bu_ref = ft_split(FT_BUILTINS, '|')) == NULL) - { - f_alloc_and_destroy_msh(msh); - } } -- cgit v1.2.3