diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-10-26 13:42:56 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-10-26 13:42:56 +0100 |
commit | 0277ddfac754ab4ad5bdd2b692e31a717efbe569 (patch) | |
tree | 49d7c5fd3a12248af85e2c3a3254bc1538ae5775 /src/m_funptr.c | |
parent | reqdy for MERGE (diff) | |
parent | TODO update (diff) | |
download | 42-minishell-0277ddfac754ab4ad5bdd2b692e31a717efbe569.tar.gz 42-minishell-0277ddfac754ab4ad5bdd2b692e31a717efbe569.tar.bz2 42-minishell-0277ddfac754ab4ad5bdd2b692e31a717efbe569.tar.xz 42-minishell-0277ddfac754ab4ad5bdd2b692e31a717efbe569.tar.zst 42-minishell-0277ddfac754ab4ad5bdd2b692e31a717efbe569.zip |
merge wif master
Diffstat (limited to 'src/m_funptr.c')
-rw-r--r-- | src/m_funptr.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/m_funptr.c b/src/m_funptr.c index 2fdf4d1..bb8d80d 100644 --- a/src/m_funptr.c +++ b/src/m_funptr.c @@ -22,16 +22,14 @@ 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; - if (!(msh->bu_ref = ft_split(FT_BUILTINS, '|'))) - { - f_alloc_and_destroy_msh(msh); - } + 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; + msh->bu_ptr[FT_ID_ALIAS] = b_alias; } |